@k8slens/extensions / Exports / Main / LensExtension
Class: LensExtension#
Main.LensExtension
Hierarchy#
↳ LensExtension
Table of contents#
Constructors#
Properties#
Accessors#
Methods#
- activate
- addCatalogSource
- disable
- enable
- getExtensionFileFolder
- navigate
- onActivate
- onDeactivate
- removeCatalogSource
Constructors#
constructor#
• new LensExtension(extension
)
Parameters#
Name | Type |
---|---|
extension |
InstalledExtension |
Overrides#
Properties#
appMenus#
• appMenus: MenuRegistration
[] | IComputedValue
<MenuRegistration
[]>
id#
• Readonly
id: string
Inherited from#
isBundled#
• Readonly
isBundled: boolean
Inherited from#
manifest#
• Readonly
manifest: LensExtensionManifest
Inherited from#
manifestPath#
• Readonly
manifestPath: string
Inherited from#
protocolHandlers#
• protocolHandlers: ProtocolHandlerRegistration
[]
Inherited from#
LensExtension.protocolHandlers
terminalShellEnvModifier#
• Optional
terminalShellEnvModifier: ShellEnvModifier
implement this to modify the shell environment that Lens terminals are opened with. The ShellEnvModifier type has the signature
(ctx: ShellEnvContext, env: Record
Param
the shell environment context, specifically the relevant catalog entity for the terminal. This can be used, for example, to get cluster-specific information that can be made available in the shell environment by the implementation of terminalShellEnvModifier
Param
the current shell environment that the terminal will be opened with. The implementation should modify this as desired.
trayMenus#
• trayMenus: TrayMenuRegistration
[] | IComputedValue
<TrayMenuRegistration
[]>
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#
addCatalogSource#
▸ addCatalogSource(id
, source
): void
Parameters#
Name | Type |
---|---|
id |
string |
source |
IObservableArray <CatalogEntity <CatalogEntityMetadata , CatalogEntityStatus , CatalogEntitySpec >> | IComputedValue <CatalogEntity <CatalogEntityMetadata , CatalogEntityStatus , CatalogEntitySpec >[]> |
Returns#
void
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
navigate#
▸ navigate(pageId?
, params?
, frameId?
): Promise
<void
>
Parameters#
Name | Type |
---|---|
pageId? |
string |
params? |
Record <string , any > |
frameId? |
number |
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
>
Inherited from#
removeCatalogSource#
▸ removeCatalogSource(id
): void
Parameters#
Name | Type |
---|---|
id |
string |
Returns#
void