1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Moving cluster delete event from catalog initializer to ipc

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev 2021-09-06 09:23:16 +03:00
parent b89e76191f
commit 8faa108c86
2 changed files with 1 additions and 2 deletions

View File

@ -77,6 +77,7 @@ export function initIpcMainHandlers() {
});
ipcMainHandle(clusterDeleteHandler, (event, clusterId: ClusterId) => {
appEventBus.emit({ name: "cluster", action: "remove" });
const cluster = ClusterStore.getInstance().getById(clusterId);
if (!cluster) {

View File

@ -24,7 +24,6 @@ import fs from "fs";
import "../../common/catalog-entities/kubernetes-cluster";
import { WebLinkCategory } from "../../common/catalog-entities";
import { ClusterStore } from "../../common/cluster-store";
import { appEventBus } from "../../common/event-bus";
import { catalogCategoryRegistry } from "../api/catalog-category-registry";
import { WeblinkAddCommand } from "../components/catalog-entities/weblink-add-command";
import { CommandOverlay } from "../components/command-palette";
@ -50,7 +49,6 @@ function initKubernetesClusters() {
}
async function onClusterDelete(clusterId: string) {
appEventBus.emit({ name: "cluster", action: "remove" });
const cluster = ClusterStore.getInstance().getById(clusterId);
if (!cluster) {