mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
fix reconnect, better handling no-clusters state
Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
1 parent
0490dc1d12
commit
408f64c184
12 files changed
+145
-138
No files matched your search
@@ -17,12 +17,4 @@ export const clusterIpc = {
|
||||
return clusterStore.getById(clusterId)?.disconnect();
|
||||
},
|
||||
}),
|
||||
|
||||
reconnect: createIpcChannel({
|
||||
channel: "cluster:reconnect",
|
||||
handle: (clusterId: ClusterId = clusterStore.activeClusterId) => {
|
||||
tracker.event("cluster", "reconnect");
|
||||
return clusterStore.getById(clusterId)?.reconnect();
|
||||
},
|
||||
}),
|
||||
}
|
||||
@@ -197,3 +197,8 @@ export class ClusterStore extends BaseStore<ClusterStoreModel> {
|
||||
}
|
||||
|
||||
export const clusterStore = ClusterStore.getInstance<ClusterStore>();
|
||||
|
||||
export function getHostedCluster(): Cluster {
|
||||
const clusterId = location.hostname.split(".")[0];
|
||||
return clusterStore.getById(clusterId);
|
||||
}
|
||||
Reference in new issue
Block a user