Use entity name as cluster name in sidebar (#3751)

* Using entity name as cluster name in sidebar

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Use entity name if preferences name is empty

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* simplify

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

Co-authored-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
Alex AndreevandJari Kolehmainen authored and GitHub committed 2021-09-08 12:44:23 +03:00
1 parent 9ae84182a1
commit ffdf4a03cd
4 files changed
+17 -7

No files matched your search

+3
View File
@@ -28,6 +28,7 @@ import type { ClusterId } from "../../common/cluster-types";
import { appEventBus } from "../../common/event-bus";
import { dialogShowOpenDialogHandler, ipcMainHandle } from "../../common/ipc";
import { catalogEntityRegistry } from "../catalog";
import { pushCatalogToRenderer } from "../catalog-pusher";
import { ClusterManager } from "../cluster-manager";
import { bundledKubectlPath } from "../kubectl";
import logger from "../logger";
@@ -48,6 +49,8 @@ export function initIpcMainHandlers() {
if (cluster) {
clusterFrameMap.set(cluster.id, { frameId: event.frameId, processId: event.processId });
cluster.pushState();
pushCatalogToRenderer(catalogEntityRegistry);
}
});