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() {
|
||||
try {
|
||||
await super.load();
|
||||
|
||||
type clusterStateSync = {
|
||||
id: string;
|
||||
state: ClusterState;
|
||||
@ -155,6 +157,11 @@ export class ClusterStore extends BaseStore<ClusterStoreModel> {
|
||||
return states;
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
logger.error("[CLUSTER-STORE] error loading: ", error);
|
||||
this.fromStore();
|
||||
this.isLoaded = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected pushStateToViewsAutomatically() {
|
||||
|
||||
@ -160,6 +160,7 @@ export class WorkspaceStore extends BaseStore<WorkspaceStoreModel> {
|
||||
}
|
||||
|
||||
async load() {
|
||||
try {
|
||||
await super.load();
|
||||
type workspaceStateSync = {
|
||||
id: string;
|
||||
@ -191,6 +192,9 @@ export class WorkspaceStore extends BaseStore<WorkspaceStoreModel> {
|
||||
return states;
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
logger.error("[WORKSPACE-STORE] error loading: ", { error });
|
||||
}
|
||||
}
|
||||
|
||||
registerIpcListener() {
|
||||
|
||||
@ -103,7 +103,7 @@ app.on("ready", async () => {
|
||||
|
||||
logger.info("💾 Loading stores");
|
||||
// preload
|
||||
await Promise.all([
|
||||
await Promise.allSettled([
|
||||
userStore.load(),
|
||||
clusterStore.load(),
|
||||
workspaceStore.load(),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user