mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
1 parent
a40a9fec0e
commit
13c29a7fed
8 files changed
+58
-60
No files matched your search
@@ -3,14 +3,10 @@ import { ClusterId, clusterStore } from "./cluster-store";
|
||||
import { tracker } from "./tracker";
|
||||
|
||||
export const clusterIpc = {
|
||||
refresh: createIpcChannel({
|
||||
channel: "cluster:refresh",
|
||||
activate: createIpcChannel({
|
||||
channel: "cluster:activate",
|
||||
handle: async (clusterId: ClusterId = clusterStore.activeClusterId) => {
|
||||
const cluster = clusterStore.getById(clusterId);
|
||||
if (cluster) {
|
||||
await cluster.refreshStatus();
|
||||
return cluster.pushState();
|
||||
}
|
||||
return clusterStore.getById(clusterId)?.activate();
|
||||
},
|
||||
}),
|
||||
|
||||
|
||||
Reference in new issue
Block a user