@k8slens/extensions / Exports / Renderer / LensExtension
Class: LensExtension#
Renderer.LensExtension
Hierarchy#
↳ LensExtension
Table of contents#
Constructors#
Properties#
- additionalCategoryColumns
- appPreferenceTabs
- appPreferences
- catalogEntityDetailItems
- clusterFrameComponents
- clusterPageMenus
- clusterPages
- commands
- customCategoryViews
- entitySettings
- globalPages
- id
- isBundled
- kubeObjectDetailItems
- kubeObjectHandlers
- kubeObjectMenuItems
- kubeObjectStatusTexts
- kubeWorkloadsOverviewItems
- manifest
- manifestPath
- protocolHandlers
- statusBarItems
- topBarItems
- welcomeBanners
- welcomeMenus
Accessors#
Methods#
- activate
- addCatalogCategoryFilter
- addCatalogFilter
- disable
- enable
- getExtensionFileFolder
- isEnabledForCluster
- navigate
- onActivate
- onDeactivate
Constructors#
constructor#
• new LensExtension(extension
)
Parameters#
Name | Type |
---|---|
extension |
InstalledExtension |
Overrides#
Properties#
additionalCategoryColumns#
• additionalCategoryColumns: AdditionalCategoryColumnRegistration
[]
appPreferenceTabs#
• appPreferenceTabs: AppPreferenceTabRegistration
[]
appPreferences#
• appPreferences: AppPreferenceRegistration
[]
catalogEntityDetailItems#
• catalogEntityDetailItems: CatalogEntityDetailRegistration
<CatalogEntity
<CatalogEntityMetadata
, CatalogEntityStatus
, CatalogEntitySpec
>>[]
clusterFrameComponents#
• clusterFrameComponents: ClusterFrameChildComponent
[]
clusterPageMenus#
• clusterPageMenus: ClusterPageMenuRegistration
[]
clusterPages#
• clusterPages: PageRegistration
[]
commands#
• commands: CommandRegistration
[]
customCategoryViews#
• customCategoryViews: CustomCategoryViewRegistration
[]
entitySettings#
• entitySettings: EntitySettingRegistration
[]
globalPages#
• globalPages: PageRegistration
[]
id#
• Readonly
id: string
Inherited from#
isBundled#
• Readonly
isBundled: boolean
Inherited from#
kubeObjectDetailItems#
• kubeObjectDetailItems: KubeObjectDetailRegistration
<KubeObject
<KubeObjectMetadata
<KubeObjectScope
>, unknown
, unknown
>>[]
kubeObjectHandlers#
• kubeObjectHandlers: KubeObjectHandlerRegistration
[]
kubeObjectMenuItems#
• kubeObjectMenuItems: KubeObjectMenuRegistration
[]
kubeObjectStatusTexts#
• kubeObjectStatusTexts: KubeObjectStatusRegistration
[]
kubeWorkloadsOverviewItems#
• kubeWorkloadsOverviewItems: WorkloadsOverviewDetailRegistration
[]
manifest#
• Readonly
manifest: LensExtensionManifest
Inherited from#
manifestPath#
• Readonly
manifestPath: string
Inherited from#
protocolHandlers#
• protocolHandlers: ProtocolHandlerRegistration
[]
Inherited from#
LensExtension.protocolHandlers
statusBarItems#
• statusBarItems: StatusBarRegistration
[]
topBarItems#
• topBarItems: TopBarRegistration
[]
welcomeBanners#
• welcomeBanners: WelcomeBannerRegistration
[]
welcomeMenus#
• welcomeMenus: WelcomeMenuRegistration
[]
Accessors#
description#
• get
description(): undefined
| string
Returns#
undefined
| string
Inherited from#
LensExtension.description
isEnabled#
• get
isEnabled(): boolean
Returns#
boolean
Inherited from#
LensExtension.isEnabled
name#
• get
name(): string
Returns#
string
Inherited from#
LensExtension.name
sanitizedExtensionId#
• get
sanitizedExtensionId(): string
Returns#
string
Inherited from#
LensExtension.sanitizedExtensionId
storeName#
• get
storeName(): string
Returns#
string
Inherited from#
LensExtension.storeName
version#
• get
version(): string
Returns#
string
Inherited from#
LensExtension.version
Methods#
activate#
▸ activate(): Promise
<void
>
Returns#
Promise
<void
>
Inherited from#
addCatalogCategoryFilter#
▸ addCatalogCategoryFilter(fn
): Disposer
Add a filtering function for the catalog categories. This will be removed if the extension is disabled.
Parameters#
Name | Type | Description |
---|---|---|
fn |
CategoryFilter |
The function which should return a truthy value for those categories which should be kept. |
Returns#
A function to clean up the filter
addCatalogFilter#
▸ addCatalogFilter(fn
): Disposer
Add a filtering function for the catalog entities. This will be removed if the extension is disabled.
Parameters#
Name | Type | Description |
---|---|---|
fn |
EntityFilter |
The function which should return a truthy value for those entities which should be kept. |
Returns#
A function to clean up the filter
disable#
▸ disable(): Promise
<void
>
Returns#
Promise
<void
>
Inherited from#
enable#
▸ enable(): Promise
<void
>
Returns#
Promise
<void
>
Inherited from#
getExtensionFileFolder#
▸ getExtensionFileFolder(): Promise
<string
>
getExtensionFileFolder returns the path to an already created folder. This folder is for the sole use of this extension.
Note: there is no security done on this folder, only obfuscation of the folder name.
Returns#
Promise
<string
>
Inherited from#
LensExtension.getExtensionFileFolder
isEnabledForCluster#
▸ isEnabledForCluster(cluster
): Promise
<Boolean
>
Defines if extension is enabled for a given cluster. This method is only called when the extension is created within a cluster frame.
The default implementation is to return true
Deprecated
Switch to using "enabled" or "visible" properties in each registration together with activeCluster
Parameters#
Name | Type |
---|---|
cluster |
KubernetesCluster <KubernetesClusterMetadata , KubernetesClusterStatus , KubernetesClusterSpec > |
Returns#
Promise
<Boolean
>
navigate#
▸ navigate(pageId?
, params?
): Promise
<void
>
Parameters#
Name | Type |
---|---|
pageId? |
string |
params? |
object |
Returns#
Promise
<void
>
onActivate#
▸ Protected
onActivate(): void
| Promise
<void
>
Returns#
void
| Promise
<void
>
Inherited from#
onDeactivate#
▸ Protected
onDeactivate(): void
| Promise
<void
>
Returns#
void
| Promise
<void
>