mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
attempt to recover the ui after failing to load cluster store
Signed-off-by: Jim Ehrismann <jehrismann@mirantis.com>
This commit is contained in:
parent
b3176a6fc4
commit
c19f0b182b
@ -124,7 +124,9 @@ export class ClusterStore extends BaseStore<ClusterStoreModel> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async load() {
|
async load() {
|
||||||
|
try {
|
||||||
await super.load();
|
await super.load();
|
||||||
|
|
||||||
type clusterStateSync = {
|
type clusterStateSync = {
|
||||||
id: string;
|
id: string;
|
||||||
state: ClusterState;
|
state: ClusterState;
|
||||||
@ -155,6 +157,11 @@ export class ClusterStore extends BaseStore<ClusterStoreModel> {
|
|||||||
return states;
|
return states;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
} catch (error) {
|
||||||
|
logger.error("[CLUSTER-STORE] error loading: ", error);
|
||||||
|
this.fromStore();
|
||||||
|
this.isLoaded = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected pushStateToViewsAutomatically() {
|
protected pushStateToViewsAutomatically() {
|
||||||
|
|||||||
@ -160,6 +160,7 @@ export class WorkspaceStore extends BaseStore<WorkspaceStoreModel> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async load() {
|
async load() {
|
||||||
|
try {
|
||||||
await super.load();
|
await super.load();
|
||||||
type workspaceStateSync = {
|
type workspaceStateSync = {
|
||||||
id: string;
|
id: string;
|
||||||
@ -191,6 +192,9 @@ export class WorkspaceStore extends BaseStore<WorkspaceStoreModel> {
|
|||||||
return states;
|
return states;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
} catch (error) {
|
||||||
|
logger.error("[WORKSPACE-STORE] error loading: ", { error });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
registerIpcListener() {
|
registerIpcListener() {
|
||||||
|
|||||||
@ -103,7 +103,7 @@ app.on("ready", async () => {
|
|||||||
|
|
||||||
logger.info("💾 Loading stores");
|
logger.info("💾 Loading stores");
|
||||||
// preload
|
// preload
|
||||||
await Promise.all([
|
await Promise.allSettled([
|
||||||
userStore.load(),
|
userStore.load(),
|
||||||
clusterStore.load(),
|
clusterStore.load(),
|
||||||
workspaceStore.load(),
|
workspaceStore.load(),
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user