Loading frontend/src/app/features/cockpit/workspaces/state/buses/buses.effects.ts +10 −2 Original line number Diff line number Diff line Loading @@ -67,12 +67,20 @@ export class BusesEffects { withLatestFrom(this.store$), filter(([action, state]) => !!state.buses.byId[action.payload.id]), map(([action, state]) => { const { id, reason } = action.payload; const { id, reason, content } = action.payload; const bus = state.buses.byId[id]; this.notifications.info(bus.name, reason); return new Buses.Removed(bus); return batchActions([ new Endpoints.Clean(), new Interfaces.Clean(), new Services.Clean(), new Endpoints.Added(toJsTable(content.endpoints)), new Interfaces.Added(toJsTable(content.interfaces)), new Services.Added(toJsTable(content.services)), new Buses.Removed(bus), ]); }) ); Loading frontend/src/app/shared/services/sse.service.ts +11 −1 Original line number Diff line number Diff line Loading @@ -138,7 +138,17 @@ export namespace SseActions { export const BusDeletedType = '[Sse] Bus deleted'; export class BusDeleted implements Action { readonly type = BusDeletedType; constructor(public readonly payload: { id: string; reason: string }) {} constructor( public readonly payload: { id: string; reason: string; content: { endpoints: { [key: string]: IEndpointBackendSSE }; interfaces: { [key: string]: IInterfaceBackendSSE }; services: { [key: string]: IServiceBackendSSE }; }; } ) {} } export const WorkspaceDeletedSse = 'WORKSPACE_DELETED'; Loading Loading
frontend/src/app/features/cockpit/workspaces/state/buses/buses.effects.ts +10 −2 Original line number Diff line number Diff line Loading @@ -67,12 +67,20 @@ export class BusesEffects { withLatestFrom(this.store$), filter(([action, state]) => !!state.buses.byId[action.payload.id]), map(([action, state]) => { const { id, reason } = action.payload; const { id, reason, content } = action.payload; const bus = state.buses.byId[id]; this.notifications.info(bus.name, reason); return new Buses.Removed(bus); return batchActions([ new Endpoints.Clean(), new Interfaces.Clean(), new Services.Clean(), new Endpoints.Added(toJsTable(content.endpoints)), new Interfaces.Added(toJsTable(content.interfaces)), new Services.Added(toJsTable(content.services)), new Buses.Removed(bus), ]); }) ); Loading
frontend/src/app/shared/services/sse.service.ts +11 −1 Original line number Diff line number Diff line Loading @@ -138,7 +138,17 @@ export namespace SseActions { export const BusDeletedType = '[Sse] Bus deleted'; export class BusDeleted implements Action { readonly type = BusDeletedType; constructor(public readonly payload: { id: string; reason: string }) {} constructor( public readonly payload: { id: string; reason: string; content: { endpoints: { [key: string]: IEndpointBackendSSE }; interfaces: { [key: string]: IInterfaceBackendSSE }; services: { [key: string]: IServiceBackendSSE }; }; } ) {} } export const WorkspaceDeletedSse = 'WORKSPACE_DELETED'; Loading