fix: "disconnect" cluster from clusters context-menu

Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
Roman committed 2020-07-21 13:22:54 +03:00
1 parent 70bbb9fa62
commit a40a9fec0e
3 files changed
+14 -11

No files matched your search

+5 -5
View File
@@ -9,24 +9,24 @@ export const clusterIpc = {
const cluster = clusterStore.getById(clusterId);
if (cluster) {
await cluster.refreshStatus();
cluster.pushState();
return cluster.pushState();
}
},
}),
disconnect: createIpcChannel({
channel: "cluster:disconnect",
handle: (clusterId: ClusterId) => {
handle: (clusterId: ClusterId = clusterStore.activeClusterId) => {
tracker.event("cluster", "stop");
clusterStore.getById(clusterId)?.disconnect();
return clusterStore.getById(clusterId)?.disconnect();
},
}),
reconnect: createIpcChannel({
channel: "cluster:reconnect",
handle: (clusterId: ClusterId) => {
handle: (clusterId: ClusterId = clusterStore.activeClusterId) => {
tracker.event("cluster", "reconnect");
clusterStore.getById(clusterId)?.reconnect();
return clusterStore.getById(clusterId)?.reconnect();
},
}),
}