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:
parent
b89e76191f
commit
8faa108c86
@ -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) {
|
||||
|
||||
@ -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) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user