Broadcast cluster's disconnected state before stopping KubeAuthProxy (#4273)

This commit is contained in:
Sebastian Malton authored and GitHub committed 2021-11-23 14:34:37 -05:00
1 parent 8c9e3b2fdc
commit 8081d35f9c
7 files changed
+47 -24

No files matched your search

@@ -21,6 +21,7 @@
import { action, IReactionDisposer, makeObservable, observable, when } from "mobx";
import logger from "../../../main/logger";
import { broadcastMessage } from "../../../common/ipc";
import { clusterVisibilityHandler } from "../../../common/cluster-ipc";
import { ClusterStore } from "../../../common/cluster-store";
import type { ClusterId } from "../../../common/cluster-types";
@@ -88,6 +89,7 @@ export class ClusterFrameHandler extends Singleton {
logger.info(`[LENS-VIEW]: remove dashboard, clusterId=${clusterId}`);
this.views.delete(clusterId);
iframe.parentNode.removeChild(iframe);
broadcastMessage(`cluster:${clusterId}:frame-removed`);
dispose();
},
);