Move cluster related types and function into seperate files (#3530)

This commit is contained in:
Sebastian Malton authored and GitHub committed 2021-08-03 10:36:14 -04:00
1 parent 2893ad956d
commit a6e91fc34a
49 files changed
+435 -258

No files matched your search

+3 -3
View File
@@ -24,9 +24,9 @@ import { EventEmitter } from "events";
import { isEqual } from "lodash";
import { action, computed, makeObservable, observable, observe, reaction, when } from "mobx";
import path from "path";
import { getHostedCluster } from "../common/cluster-store";
import { ClusterStore } from "../common/cluster-store";
import { broadcastMessage, ipcMainOn, ipcRendererOn, requestMain, ipcMainHandle } from "../common/ipc";
import { Disposer, Singleton, toJS } from "../common/utils";
import { Disposer, getHostedClusterId, Singleton, toJS } from "../common/utils";
import logger from "../main/logger";
import type { InstalledExtension } from "./extension-discovery";
import { ExtensionsStore } from "./extensions-store";
@@ -296,7 +296,7 @@ export class ExtensionLoader extends Singleton {
loadOnClusterRenderer() {
logger.debug(`${logModule}: load on cluster renderer (dashboard)`);
const cluster = getHostedCluster();
const cluster = ClusterStore.getInstance().getById(getHostedClusterId());
this.autoInitExtensions(async (extension: LensRendererExtension) => {
if ((await extension.isEnabledForCluster(cluster)) === false) {