Switch to more specific IPC helpers (#2821)

This commit is contained in:
Sebastian Malton authored and GitHub committed 2021-06-10 10:34:22 -04:00
1 parent a12cb0a16e
commit 280af6391e
18 files changed
+191 -178

No files matched your search

+3 -3
View File
@@ -21,7 +21,6 @@
import "../common/cluster-ipc";
import type http from "http";
import { ipcMain } from "electron";
import { action, autorun, makeObservable, reaction } from "mobx";
import { ClusterStore, getClusterIdFromHost } from "../common/cluster-store";
import type { Cluster } from "./cluster";
@@ -30,6 +29,7 @@ import { apiKubePrefix } from "../common/vars";
import { Singleton } from "../common/utils";
import { catalogEntityRegistry } from "./catalog";
import { KubernetesCluster, KubernetesClusterPrometheusMetrics } from "../common/catalog-entities/kubernetes-cluster";
import { ipcMainOn } from "../common/ipc";
export class ClusterManager extends Singleton {
private store = ClusterStore.getInstance();
@@ -67,8 +67,8 @@ export class ClusterManager extends Singleton {
delay: 250
});
ipcMain.on("network:offline", this.onNetworkOffline);
ipcMain.on("network:online", this.onNetworkOnline);
ipcMainOn("network:offline", this.onNetworkOffline);
ipcMainOn("network:online", this.onNetworkOnline);
}
@action