mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Add LensRendererExtension.isEnabledForCluster (#1502)
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
1 parent
cb14d77a56
commit
1be86b34f4
3 files changed
+30
-13
No files matched your search
@@ -1,8 +1,10 @@
|
||||
import type { AppPreferenceRegistration, ClusterFeatureRegistration, KubeObjectDetailRegistration, KubeObjectMenuRegistration, KubeObjectStatusRegistration, PageMenuRegistration, PageRegistration, StatusBarRegistration, } from "./registries";
|
||||
import type { Cluster } from "../main/cluster";
|
||||
import { observable } from "mobx";
|
||||
import { LensExtension } from "./lens-extension";
|
||||
import { getExtensionPageUrl } from "./registries/page-registry";
|
||||
|
||||
|
||||
export class LensRendererExtension extends LensExtension {
|
||||
@observable.shallow globalPages: PageRegistration[] = [];
|
||||
@observable.shallow clusterPages: PageRegistration[] = [];
|
||||
@@ -24,4 +26,11 @@ export class LensRendererExtension extends LensExtension {
|
||||
});
|
||||
navigate(pageUrl);
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines if extension is enabled for a given cluster. Defaults to `true`.
|
||||
*/
|
||||
async isEnabledForCluster(cluster: Cluster): Promise<Boolean> {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user