mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Improve how kubernetes cluster status is resolved (#2909)
This commit is contained in:
1 parent
0ad44d6f40
commit
39149eedfd
4 files changed
+36
-6
No files matched your search
@@ -22,6 +22,8 @@
|
||||
import { observable, when } from "mobx";
|
||||
import { ClusterId, ClusterStore, getClusterFrameUrl } from "../../../common/cluster-store";
|
||||
import logger from "../../../main/logger";
|
||||
import { requestMain } from "../../../common/ipc";
|
||||
import { clusterVisibilityHandler } from "../../../common/cluster-ipc";
|
||||
|
||||
export interface LensView {
|
||||
isLoaded?: boolean
|
||||
@@ -93,5 +95,9 @@ export function refreshViews(visibleClusterId?: string) {
|
||||
const isVisible = isCurrent && isLoaded && isReady;
|
||||
|
||||
view.style.display = isVisible ? "flex" : "none";
|
||||
|
||||
requestMain(clusterVisibilityHandler, clusterId, isVisible).catch(() => {
|
||||
logger.error(`[LENS-VIEW]: failed to set cluster visibility, clusterId=${clusterId}`);
|
||||
});
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user