Unify UI workflows and streamline fleet management
This commit is contained in:
@@ -23,7 +23,7 @@ function updateDeployment(id: string, mutate: (d: PipelineDeployment) => void):
|
||||
});
|
||||
}
|
||||
|
||||
export function startPipelineStream(): void {
|
||||
export function startPipelineStream(): (() => void) | undefined {
|
||||
if (!browser || source) return;
|
||||
source = new EventSource('/api/events/pipeline');
|
||||
|
||||
@@ -49,4 +49,5 @@ export function startPipelineStream(): void {
|
||||
d.servers.set(data.server, { state: data.state, players: data.players, error: data.error });
|
||||
});
|
||||
});
|
||||
return () => { source?.close(); source = null; };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user