Change isEnabledForCluster to use KubernetesCluster instead of Cluster (#4584)

This commit is contained in:
Sebastian Malton authored and GitHub committed 2021-12-17 08:28:47 -05:00
1 parent 3418c0acfe
commit bde0a9ef91
6 files changed
+74 -20

No files matched your search

+6 -1
View File
@@ -30,6 +30,8 @@ import { once } from "lodash";
import logger from "../../common/logger";
import { catalogEntityRunContext } from "./catalog-entity";
import { CatalogRunEvent } from "../../common/catalog/catalog-run-event";
import { ipcRenderer } from "electron";
import { CatalogIpcEvents } from "../../common/ipc/catalog";
export type EntityFilter = (entity: CatalogEntity) => any;
export type CatalogEntityOnBeforeRun = (event: CatalogRunEvent) => void | Promise<void>;
@@ -70,9 +72,12 @@ export class CatalogEntityRegistry {
}
init() {
ipcRendererOn("catalog:items", (event, items: (CatalogEntityData & CatalogEntityKindData)[]) => {
ipcRendererOn(CatalogIpcEvents.ITEMS, (event, items: (CatalogEntityData & CatalogEntityKindData)[]) => {
this.updateItems(items);
});
// Make sure that we get items ASAP and not the next time one of them changes
ipcRenderer.send(CatalogIpcEvents.INIT);
}
@action updateItems(items: (CatalogEntityData & CatalogEntityKindData)[]) {