Fix: cluster commands disappeared from Command Palette (#2886)

* Cluster commands disappeared from Command Palette, close #2760

Signed-off-by: Roman <ixrock@gmail.com>

* refactoring: get rid of ClusterStore.active && ClusterStore.activeCluster (managed via catalog's entity)

Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
Roman authored and GitHub committed 2021-05-28 14:06:18 +03:00
1 parent d0dbb8744c
commit 643b0d861f
23 files changed
+99 -155

No files matched your search

@@ -22,7 +22,6 @@
// Extensions API -> Commands
import { BaseRegistry } from "./base-registry";
import { makeObservable, observable } from "mobx";
import type { LensExtension } from "../lens-extension";
import type { CatalogEntity } from "../../common/catalog";
@@ -39,14 +38,6 @@ export interface CommandRegistration {
}
export class CommandRegistry extends BaseRegistry<CommandRegistration> {
@observable.ref activeEntity: CatalogEntity;
constructor() {
super();
makeObservable(this);
}
add(items: CommandRegistration | CommandRegistration[], extension?: LensExtension) {
const itemArray = [items].flat();