@k8slens/extensions 5.4.0-git.76f48df56b.0 → 5.4.0-git.81819dbbe9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/common/catalog/catalog-category-registry.d.ts +2 -2
- package/dist/src/common/catalog-entities/kubernetes-cluster.d.ts +1 -1
- package/dist/src/common/cluster/authorization-review.injectable.d.ts +13 -0
- package/dist/src/common/cluster/cluster.d.ts +11 -21
- package/dist/src/common/cluster/list-namespaces.injectable.d.ts +10 -0
- package/dist/src/common/item.store.d.ts +3 -1
- package/dist/src/common/k8s-api/kube-object.store.d.ts +3 -2
- package/dist/src/common/user-store/user-store.d.ts +1 -1
- package/dist/src/common/utils/collection-functions.d.ts +18 -4
- package/dist/src/common/utils/index.d.ts +1 -2
- package/dist/src/common/utils/objects.d.ts +2 -3
- package/dist/src/common/utils/openBrowser.d.ts +17 -0
- package/dist/src/extensions/common-api/registrations.d.ts +2 -1
- package/dist/src/extensions/common-api/utils.d.ts +1 -1
- package/dist/src/extensions/extension-api.js +47 -47
- package/dist/src/extensions/lens-extension.d.ts +1 -1
- package/dist/src/extensions/lens-main-extension.d.ts +15 -0
- package/dist/src/extensions/lens-renderer-extension.d.ts +1 -1
- package/dist/src/extensions/main-api/index.d.ts +2 -1
- package/dist/src/extensions/main-api/power.d.ts +24 -0
- package/dist/src/main/catalog-pusher.d.ts +2 -1
- package/dist/src/main/cluster-manager.d.ts +20 -2
- package/dist/src/main/create-cluster/create-cluster.injectable.d.ts +1 -2
- package/dist/src/main/helm/helm-repo-manager.d.ts +8 -9
- package/dist/src/main/shell-session/local-shell-session/local-shell-session.d.ts +6 -0
- package/dist/src/main/shell-session/shell-env-modifier/shell-env-modifier-registration.d.ts +9 -0
- package/dist/src/main/shell-session/shell-env-modifier/terminal-shell-env-modifiers.d.ts +12 -0
- package/dist/src/main/shell-session/shell-env-modifier/terminal-shell-env-modify.injectable.d.ts +7 -0
- package/dist/src/renderer/api/websocket-api.d.ts +1 -1
- package/dist/src/renderer/components/+catalog/custom-category-columns.d.ts +1 -1
- package/dist/src/renderer/components/+config-secrets/secret-details.d.ts +1 -1
- package/dist/src/renderer/components/+custom-resources/route-tabs.injectable.d.ts +1 -1
- package/dist/src/renderer/components/+custom-resources/route.d.ts +1 -4
- package/dist/src/renderer/components/+preferences/add-helm-repo-dialog.d.ts +0 -1
- package/dist/src/renderer/components/+preferences/helm-charts.d.ts +4 -2
- package/dist/src/renderer/components/item-object-list/content.d.ts +1 -1
- package/dist/src/renderer/components/item-object-list/list-layout.d.ts +2 -4
- package/dist/src/renderer/components/kube-object-list-layout/kube-object-list-layout.d.ts +5 -1
- package/dist/src/renderer/components/layout/tab-routes-sidebar-items.d.ts +8 -4
- package/dist/src/renderer/components/status-bar/registered-status-bar-items.injectable.d.ts +14 -0
- package/dist/src/renderer/components/status-bar/status-bar-items.injectable.d.ts +3 -0
- package/dist/src/renderer/components/status-bar/status-bar-registration.d.ts +38 -0
- package/dist/src/renderer/components/{cluster-manager/bottom-bar.d.ts → status-bar/status-bar.d.ts} +3 -1
- package/dist/src/renderer/components/{cluster-manager/bottom-bar.test.d.ts → status-bar/status-bar.test.d.ts} +0 -0
- package/dist/src/renderer/create-cluster/create-cluster.injectable.d.ts +1 -2
- package/dist/src/renderer/port-forward/port-forward-store/port-forward-store.d.ts +1 -1
- package/package.json +1 -1
- package/dist/src/common/utils/extended-map.d.ts +0 -30
- package/dist/src/common/utils/openExternal.d.ts +0 -5
- package/dist/src/renderer/components/cluster-manager/bottom-bar-items.injectable.d.ts +0 -4
- package/dist/src/renderer/components/cluster-manager/status-bar-registration.d.ts +0 -24
|
@@ -41,7 +41,7 @@ export declare class LensExtension {
|
|
|
41
41
|
getExtensionFileFolder(): Promise<string>;
|
|
42
42
|
enable(register: (ext: LensExtension) => Promise<Disposer[]>): Promise<void>;
|
|
43
43
|
disable(): Promise<void>;
|
|
44
|
-
activate():
|
|
44
|
+
activate(): Promise<void>;
|
|
45
45
|
protected onActivate(): Promise<void> | void;
|
|
46
46
|
protected onDeactivate(): Promise<void> | void;
|
|
47
47
|
}
|
|
@@ -7,9 +7,24 @@ import type { CatalogEntity } from "../common/catalog";
|
|
|
7
7
|
import type { IObservableArray } from "mobx";
|
|
8
8
|
import type { MenuRegistration } from "../main/menu/menu-registration";
|
|
9
9
|
import type { TrayMenuRegistration } from "../main/tray/tray-menu-registration";
|
|
10
|
+
import type { ShellEnvModifier } from "../main/shell-session/shell-env-modifier/shell-env-modifier-registration";
|
|
10
11
|
export declare class LensMainExtension extends LensExtension {
|
|
11
12
|
appMenus: MenuRegistration[];
|
|
12
13
|
trayMenus: TrayMenuRegistration[];
|
|
14
|
+
/**
|
|
15
|
+
* implement this to modify the shell environment that Lens terminals are opened with. The ShellEnvModifier type has the signature
|
|
16
|
+
*
|
|
17
|
+
* (ctx: ShellEnvContext, env: Record<string, string | undefined>) => Record<string, string | undefined>
|
|
18
|
+
*
|
|
19
|
+
* @param ctx the shell environment context, specifically the relevant catalog entity for the terminal. This can be used, for example, to get
|
|
20
|
+
* cluster-specific information that can be made available in the shell environment by the implementation of terminalShellEnvModifier
|
|
21
|
+
*
|
|
22
|
+
* @param env the current shell environment that the terminal will be opened with. The implementation should modify this as desired.
|
|
23
|
+
*
|
|
24
|
+
* @returns the modified shell environment that the terminal will be opened with. The implementation must return env as passed in, if it
|
|
25
|
+
* does not modify the shell environment
|
|
26
|
+
*/
|
|
27
|
+
terminalShellEnvModifier?: ShellEnvModifier;
|
|
13
28
|
navigate(pageId?: string, params?: Record<string, any>, frameId?: number): Promise<void>;
|
|
14
29
|
addCatalogSource(id: string, source: IObservableArray<CatalogEntity>): void;
|
|
15
30
|
removeCatalogSource(id: string): void;
|
|
@@ -16,7 +16,7 @@ import type { CommandRegistration } from "../renderer/components/command-palette
|
|
|
16
16
|
import type { AppPreferenceRegistration } from "../renderer/components/+preferences/app-preferences/app-preference-registration";
|
|
17
17
|
import type { AdditionalCategoryColumnRegistration } from "../renderer/components/+catalog/custom-category-columns";
|
|
18
18
|
import type { CustomCategoryViewRegistration } from "../renderer/components/+catalog/custom-views";
|
|
19
|
-
import type { StatusBarRegistration } from "../renderer/components/
|
|
19
|
+
import type { StatusBarRegistration } from "../renderer/components/status-bar/status-bar-registration";
|
|
20
20
|
import type { KubeObjectMenuRegistration } from "../renderer/components/kube-object-menu/dependencies/kube-object-menu-items/kube-object-menu-registration";
|
|
21
21
|
export declare class LensRendererExtension extends LensExtension {
|
|
22
22
|
globalPages: registries.PageRegistration[];
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import * as Catalog from "./catalog";
|
|
6
6
|
import * as Navigation from "./navigation";
|
|
7
7
|
import * as K8sApi from "./k8s-api";
|
|
8
|
+
import * as Power from "./power";
|
|
8
9
|
import { IpcMain as Ipc } from "../ipc/ipc-main";
|
|
9
10
|
import { LensMainExtension as LensExtension } from "../lens-main-extension";
|
|
10
|
-
export { Catalog, Navigation, K8sApi, Ipc, LensExtension, };
|
|
11
|
+
export { Catalog, Navigation, K8sApi, Ipc, LensExtension, Power, };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Disposer } from "../../common/utils/disposer";
|
|
2
|
+
/**
|
|
3
|
+
* Event listener for system power events
|
|
4
|
+
*/
|
|
5
|
+
export declare type PowerEventListener = () => void;
|
|
6
|
+
/**
|
|
7
|
+
* Adds event listener to system suspend events
|
|
8
|
+
* @param listener function which will be called on system suspend
|
|
9
|
+
* @returns function to remove event listener
|
|
10
|
+
*/
|
|
11
|
+
export declare const onSuspend: (listener: PowerEventListener) => Disposer;
|
|
12
|
+
/**
|
|
13
|
+
* Adds event listener to system resume event
|
|
14
|
+
* @param listener function which will be called on system resume
|
|
15
|
+
* @returns function to remove event listener
|
|
16
|
+
*/
|
|
17
|
+
export declare const onResume: (listener: PowerEventListener) => Disposer;
|
|
18
|
+
/**
|
|
19
|
+
* Adds event listener to the event which is emitted when
|
|
20
|
+
* the system is about to reboot or shut down
|
|
21
|
+
* @param listener function which will be called on system shutdown
|
|
22
|
+
* @returns function to remove event listener
|
|
23
|
+
*/
|
|
24
|
+
export declare const onShutdown: (listener: PowerEventListener) => Disposer;
|
|
@@ -4,4 +4,5 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import type { CatalogEntityRegistry } from "./catalog";
|
|
6
6
|
import "../common/catalog-entities/kubernetes-cluster";
|
|
7
|
-
export declare function pushCatalogToRenderer(catalog: CatalogEntityRegistry):
|
|
7
|
+
export declare function pushCatalogToRenderer(catalog: CatalogEntityRegistry): void;
|
|
8
|
+
export declare function startCatalogSyncToRenderer(catalog: CatalogEntityRegistry): import("../common/utils").ExtendableDisposer;
|
|
@@ -7,7 +7,7 @@ import "../common/ipc/cluster";
|
|
|
7
7
|
import type http from "http";
|
|
8
8
|
import { Cluster } from "../common/cluster/cluster";
|
|
9
9
|
import { Singleton } from "../common/utils";
|
|
10
|
-
import { KubernetesCluster } from "../common/catalog-entities/kubernetes-cluster";
|
|
10
|
+
import { KubernetesCluster, LensKubernetesClusterStatus } from "../common/catalog-entities/kubernetes-cluster";
|
|
11
11
|
import type { ClusterId } from "../common/cluster-types";
|
|
12
12
|
export declare class ClusterManager extends Singleton {
|
|
13
13
|
private store;
|
|
@@ -24,4 +24,22 @@ export declare class ClusterManager extends Singleton {
|
|
|
24
24
|
stop(): void;
|
|
25
25
|
getClusterForRequest(req: http.IncomingMessage): Cluster;
|
|
26
26
|
}
|
|
27
|
-
export declare function catalogEntityFromCluster(cluster: Cluster): KubernetesCluster
|
|
27
|
+
export declare function catalogEntityFromCluster(cluster: Cluster): KubernetesCluster<{
|
|
28
|
+
uid: string;
|
|
29
|
+
name: string;
|
|
30
|
+
source: string;
|
|
31
|
+
labels: {
|
|
32
|
+
[x: string]: string;
|
|
33
|
+
};
|
|
34
|
+
distro: string;
|
|
35
|
+
kubeVersion: string;
|
|
36
|
+
}, {
|
|
37
|
+
phase: LensKubernetesClusterStatus;
|
|
38
|
+
reason: string;
|
|
39
|
+
message: string;
|
|
40
|
+
active: boolean;
|
|
41
|
+
}, {
|
|
42
|
+
kubeconfigPath: string;
|
|
43
|
+
kubeconfigContext: string;
|
|
44
|
+
icon: {};
|
|
45
|
+
}>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference types="@ogre-tools/injectable" />
|
|
2
|
-
import type { ClusterModel } from "../../common/cluster-types";
|
|
3
2
|
import { Cluster } from "../../common/cluster/cluster";
|
|
4
|
-
declare const createClusterInjectable: import("@ogre-tools/injectable").Injectable<import("@ogre-tools/injectable").InjectionToken<(model: ClusterModel) => Cluster, void>, (model: ClusterModel) => Cluster, void>;
|
|
3
|
+
declare const createClusterInjectable: import("@ogre-tools/injectable").Injectable<import("@ogre-tools/injectable").InjectionToken<(model: import("../../common/cluster-types").ClusterModel) => Cluster, void>, (model: import("../../common/cluster-types").ClusterModel) => Cluster, void>;
|
|
5
4
|
export default createClusterInjectable;
|
|
@@ -24,15 +24,14 @@ export interface HelmRepo {
|
|
|
24
24
|
export declare class HelmRepoManager extends Singleton {
|
|
25
25
|
protected repos: HelmRepo[];
|
|
26
26
|
protected helmEnv: HelmEnv;
|
|
27
|
-
protected
|
|
28
|
-
|
|
29
|
-
private
|
|
30
|
-
protected
|
|
27
|
+
protected didUpdateOnce: boolean;
|
|
28
|
+
loadAvailableRepos(): Promise<HelmRepo[]>;
|
|
29
|
+
private ensureInitialized;
|
|
30
|
+
protected parseHelmEnv(): Promise<HelmEnv>;
|
|
31
31
|
repo(name: string): Promise<HelmRepo>;
|
|
32
|
-
private
|
|
32
|
+
private list;
|
|
33
33
|
repositories(): Promise<HelmRepo[]>;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
static removeRepo({ name, url }: HelmRepo): Promise<string>;
|
|
34
|
+
update(): Promise<string>;
|
|
35
|
+
addRepo({ name, url, insecureSkipTlsVerify, username, password, caFile, keyFile, certFile }: HelmRepo): Promise<string>;
|
|
36
|
+
removeRepo({ name, url }: HelmRepo): Promise<string>;
|
|
38
37
|
}
|
|
@@ -2,9 +2,15 @@
|
|
|
2
2
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
|
3
3
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
|
4
4
|
*/
|
|
5
|
+
import type WebSocket from "ws";
|
|
6
|
+
import type { Cluster } from "../../../common/cluster/cluster";
|
|
7
|
+
import type { ClusterId } from "../../../common/cluster-types";
|
|
5
8
|
import { ShellSession } from "../shell-session";
|
|
9
|
+
import type { Kubectl } from "../../kubectl/kubectl";
|
|
6
10
|
export declare class LocalShellSession extends ShellSession {
|
|
11
|
+
protected shellEnvModify: (clusterId: ClusterId, env: Record<string, string>) => Record<string, string>;
|
|
7
12
|
ShellType: string;
|
|
13
|
+
constructor(shellEnvModify: (clusterId: ClusterId, env: Record<string, string>) => Record<string, string>, kubectl: Kubectl, websocket: WebSocket, cluster: Cluster, terminalId: string);
|
|
8
14
|
protected getPathEntries(): string[];
|
|
9
15
|
protected get cwd(): string | undefined;
|
|
10
16
|
open(): Promise<void>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) OpenLens Authors. All rights reserved.
|
|
3
|
+
* Licensed under MIT License. See LICENSE in root directory for more information.
|
|
4
|
+
*/
|
|
5
|
+
import type { CatalogEntity } from "../../../common/catalog";
|
|
6
|
+
export interface ShellEnvContext {
|
|
7
|
+
catalogEntity: CatalogEntity;
|
|
8
|
+
}
|
|
9
|
+
export declare type ShellEnvModifier = (ctx: ShellEnvContext, env: Record<string, string | undefined>) => Record<string, string | undefined>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) OpenLens Authors. All rights reserved.
|
|
3
|
+
* Licensed under MIT License. See LICENSE in root directory for more information.
|
|
4
|
+
*/
|
|
5
|
+
import { IComputedValue } from "mobx";
|
|
6
|
+
import type { ClusterId } from "../../../common/cluster-types";
|
|
7
|
+
import type { LensMainExtension } from "../../../extensions/lens-main-extension";
|
|
8
|
+
interface Dependencies {
|
|
9
|
+
extensions: IComputedValue<LensMainExtension[]>;
|
|
10
|
+
}
|
|
11
|
+
export declare const terminalShellEnvModify: ({ extensions }: Dependencies) => (clusterId: ClusterId, env: Record<string, string>) => Record<string, string>;
|
|
12
|
+
export {};
|
package/dist/src/main/shell-session/shell-env-modifier/terminal-shell-env-modify.injectable.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) OpenLens Authors. All rights reserved.
|
|
3
|
+
* Licensed under MIT License. See LICENSE in root directory for more information.
|
|
4
|
+
*/
|
|
5
|
+
/// <reference types="@ogre-tools/injectable" />
|
|
6
|
+
declare const terminalShellEnvModifyInjectable: import("@ogre-tools/injectable").Injectable<import("@ogre-tools/injectable").InjectionToken<(clusterId: string, env: Record<string, string>) => Record<string, string>, unknown>, (clusterId: string, env: Record<string, string>) => Record<string, string>, unknown>;
|
|
7
|
+
export default terminalShellEnvModifyInjectable;
|
|
@@ -52,7 +52,7 @@ export interface WebSocketEvents {
|
|
|
52
52
|
declare type Defaulted<Params, DefaultParams extends keyof Params> = Required<Pick<Params, DefaultParams>> & Omit<Params, DefaultParams>;
|
|
53
53
|
declare const WebSocketApi_base: new <T>() => TypedEventEmitter<T>;
|
|
54
54
|
export declare class WebSocketApi<Events extends WebSocketEvents> extends WebSocketApi_base<Events> {
|
|
55
|
-
protected socket
|
|
55
|
+
protected socket?: WebSocket | null;
|
|
56
56
|
protected pendingCommands: (string | ArrayBufferLike | Blob | ArrayBufferView)[];
|
|
57
57
|
protected reconnectTimer?: any;
|
|
58
58
|
protected pingTimer?: any;
|
|
@@ -13,7 +13,7 @@ export declare class SecretDetails extends React.Component<Props> {
|
|
|
13
13
|
data: {
|
|
14
14
|
[name: string]: string;
|
|
15
15
|
};
|
|
16
|
-
revealSecret:
|
|
16
|
+
revealSecret: import("mobx").ObservableSet<string>;
|
|
17
17
|
constructor(props: Props);
|
|
18
18
|
componentDidMount(): Promise<void>;
|
|
19
19
|
saveSecret: () => Promise<void>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="@ogre-tools/injectable" />
|
|
2
2
|
import { IComputedValue } from "mobx";
|
|
3
3
|
import type { TabLayoutRoute } from "../layout/tab-layout";
|
|
4
|
-
export interface CustomResourceTabLayoutRoute extends TabLayoutRoute {
|
|
4
|
+
export interface CustomResourceTabLayoutRoute extends Omit<TabLayoutRoute, "component"> {
|
|
5
5
|
id: string;
|
|
6
6
|
}
|
|
7
7
|
export interface CustomResourceGroupTabLayoutRoute extends CustomResourceTabLayoutRoute {
|
|
@@ -2,7 +2,4 @@
|
|
|
2
2
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
|
3
3
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
|
4
4
|
*/
|
|
5
|
-
|
|
6
|
-
export declare const CustomResourcesRoute: React.ForwardRefExoticComponent<React.RefAttributes<any> & {
|
|
7
|
-
children?: React.ReactNode;
|
|
8
|
-
}>;
|
|
5
|
+
export declare const CustomResourcesRoute: () => JSX.Element;
|
|
@@ -6,12 +6,14 @@ import React from "react";
|
|
|
6
6
|
import { HelmRepo } from "../../../main/helm/helm-repo-manager";
|
|
7
7
|
import { SelectOption } from "../select";
|
|
8
8
|
export declare class HelmCharts extends React.Component {
|
|
9
|
-
|
|
9
|
+
loadingRepos: boolean;
|
|
10
|
+
loadingAvailableRepos: boolean;
|
|
10
11
|
repos: HelmRepo[];
|
|
11
12
|
addedRepos: import("mobx").ObservableMap<string, HelmRepo>;
|
|
12
13
|
constructor(props: {});
|
|
13
14
|
get options(): SelectOption<HelmRepo>[];
|
|
14
|
-
componentDidMount():
|
|
15
|
+
componentDidMount(): void;
|
|
16
|
+
loadAvailableRepos(): Promise<void>;
|
|
15
17
|
loadRepos(): Promise<void>;
|
|
16
18
|
addRepo(repo: HelmRepo): Promise<void>;
|
|
17
19
|
removeRepo(repo: HelmRepo): Promise<void>;
|
|
@@ -43,7 +43,7 @@ export declare class ItemListLayoutContent<I extends ItemObject> extends React.C
|
|
|
43
43
|
constructor(props: ItemListLayoutContentProps<I>);
|
|
44
44
|
get failedToLoad(): boolean;
|
|
45
45
|
getRow(uid: string): JSX.Element;
|
|
46
|
-
removeItemsDialog(): void;
|
|
46
|
+
removeItemsDialog(selectedItems: I[]): void;
|
|
47
47
|
renderNoItems(): JSX.Element;
|
|
48
48
|
renderItems(): JSX.Element[];
|
|
49
49
|
renderTableHeader(): JSX.Element;
|
|
@@ -10,7 +10,6 @@ import { IClassName, StorageHelper } from "../../utils";
|
|
|
10
10
|
import type { AddRemoveButtonsProps } from "../add-remove-buttons";
|
|
11
11
|
import type { ItemObject, ItemStore } from "../../../common/item.store";
|
|
12
12
|
import type { SearchInputUrlProps } from "../input";
|
|
13
|
-
import { Filter } from "./page-filters.store";
|
|
14
13
|
import type { NamespaceStore } from "../+namespaces/namespace-store/namespace.store";
|
|
15
14
|
export declare type SearchFilter<I extends ItemObject> = (item: I) => string | number | (string | number)[];
|
|
16
15
|
export declare type SearchFilters<I extends ItemObject> = Record<string, SearchFilter<I>>;
|
|
@@ -26,8 +25,7 @@ export declare type HeaderCustomizer = (placeholders: HeaderPlaceholders) => Hea
|
|
|
26
25
|
export interface ItemListLayoutProps<I extends ItemObject> {
|
|
27
26
|
tableId?: string;
|
|
28
27
|
className: IClassName;
|
|
29
|
-
|
|
30
|
-
getItems?: () => I[];
|
|
28
|
+
getItems: () => I[];
|
|
31
29
|
store: ItemStore<I>;
|
|
32
30
|
dependentStores?: ItemStore<ItemObject>[];
|
|
33
31
|
preloadStores?: boolean;
|
|
@@ -77,7 +75,7 @@ declare class NonInjectedItemListLayout<I extends ItemObject> extends React.Comp
|
|
|
77
75
|
private loadStores;
|
|
78
76
|
get showFilters(): boolean;
|
|
79
77
|
set showFilters(showFilters: boolean);
|
|
80
|
-
get filters(): Filter[];
|
|
78
|
+
get filters(): import("./page-filters.store").Filter[];
|
|
81
79
|
toggleFilters(): void;
|
|
82
80
|
get isReady(): boolean;
|
|
83
81
|
renderFilters(): JSX.Element;
|
|
@@ -6,9 +6,13 @@ import "./kube-object-list-layout.scss";
|
|
|
6
6
|
import type { KubeObject } from "../../../common/k8s-api/kube-object";
|
|
7
7
|
import { ItemListLayoutProps } from "../item-object-list/list-layout";
|
|
8
8
|
import type { KubeObjectStore } from "../../../common/k8s-api/kube-object.store";
|
|
9
|
-
|
|
9
|
+
declare type ItemListLayoutPropsWithoutGetItems<K extends KubeObject> = Omit<ItemListLayoutProps<K>, "getItems">;
|
|
10
|
+
export interface KubeObjectListLayoutProps<K extends KubeObject> extends ItemListLayoutPropsWithoutGetItems<K> {
|
|
11
|
+
items?: K[];
|
|
12
|
+
getItems?: () => K[];
|
|
10
13
|
store: KubeObjectStore<K>;
|
|
11
14
|
dependentStores?: KubeObjectStore<KubeObject>[];
|
|
12
15
|
subscribeStores?: boolean;
|
|
13
16
|
}
|
|
14
17
|
export declare function KubeObjectListLayout<K extends KubeObject>(props: KubeObjectListLayoutProps<K>): JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -3,7 +3,11 @@
|
|
|
3
3
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
|
4
4
|
*/
|
|
5
5
|
import type { TabLayoutRoute } from "./tab-layout";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Renders a sidebar item for each route
|
|
8
|
+
*
|
|
9
|
+
* NOTE: this cannot be a component because then the `<SidebarItem>.isExandable`
|
|
10
|
+
* check will always return true because a component that renders to `null` is
|
|
11
|
+
* still a present child to the parent `<SidebarItem>`
|
|
12
|
+
*/
|
|
13
|
+
export declare const renderTabRoutesSidebarItems: (routes: TabLayoutRoute[]) => JSX.Element[];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="@ogre-tools/injectable" />
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) OpenLens Authors. All rights reserved.
|
|
4
|
+
* Licensed under MIT License. See LICENSE in root directory for more information.
|
|
5
|
+
*/
|
|
6
|
+
import React from "react";
|
|
7
|
+
import { IComputedValue } from "mobx";
|
|
8
|
+
import type { StatusBarItemProps } from "./status-bar-registration";
|
|
9
|
+
export interface RegisteredStatusBarItems {
|
|
10
|
+
right: React.ComponentType<StatusBarItemProps>[];
|
|
11
|
+
left: React.ComponentType<StatusBarItemProps>[];
|
|
12
|
+
}
|
|
13
|
+
declare const registeredStatusBarItemsInjectable: import("@ogre-tools/injectable").Injectable<import("@ogre-tools/injectable").InjectionToken<IComputedValue<RegisteredStatusBarItems>, unknown>, IComputedValue<RegisteredStatusBarItems>, unknown>;
|
|
14
|
+
export default registeredStatusBarItemsInjectable;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/// <reference types="@ogre-tools/injectable" />
|
|
2
|
+
declare const statusBarItemsInjectable: import("@ogre-tools/injectable").Injectable<import("@ogre-tools/injectable").InjectionToken<import("mobx").IComputedValue<import("./status-bar-registration").StatusBarRegistration[]>, unknown>, import("mobx").IComputedValue<import("./status-bar-registration").StatusBarRegistration[]>, unknown>;
|
|
3
|
+
export default statusBarItemsInjectable;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) OpenLens Authors. All rights reserved.
|
|
3
|
+
* Licensed under MIT License. See LICENSE in root directory for more information.
|
|
4
|
+
*/
|
|
5
|
+
/// <reference types="react" />
|
|
6
|
+
/**
|
|
7
|
+
* The props for StatusBar item component
|
|
8
|
+
*/
|
|
9
|
+
export interface StatusBarItemProps {
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* The type defining the registration of a status bar item
|
|
13
|
+
*/
|
|
14
|
+
export interface StatusBarComponents {
|
|
15
|
+
/**
|
|
16
|
+
* The component for this registrations
|
|
17
|
+
*/
|
|
18
|
+
Item: React.ComponentType<StatusBarItemProps>;
|
|
19
|
+
/**
|
|
20
|
+
* The side of the bottom bar to place this component.
|
|
21
|
+
*
|
|
22
|
+
* @default "right"
|
|
23
|
+
*/
|
|
24
|
+
position?: "left" | "right";
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* The type for registering status bar items from the LensRendererExtension
|
|
28
|
+
*/
|
|
29
|
+
export interface StatusBarRegistration {
|
|
30
|
+
/**
|
|
31
|
+
* @deprecated use {@link StatusBarRegistration.components} instead
|
|
32
|
+
*/
|
|
33
|
+
item?: React.ReactNode | (() => React.ReactNode);
|
|
34
|
+
/**
|
|
35
|
+
* The newer API, allows for registering a component instead of a ReactNode
|
|
36
|
+
*/
|
|
37
|
+
components?: StatusBarComponents;
|
|
38
|
+
}
|
package/dist/src/renderer/components/{cluster-manager/bottom-bar.d.ts → status-bar/status-bar.d.ts}
RENAMED
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
|
4
4
|
*/
|
|
5
5
|
import React from "react";
|
|
6
|
-
export
|
|
6
|
+
export interface StatusBarProps {
|
|
7
|
+
}
|
|
8
|
+
export declare const StatusBar: React.ForwardRefExoticComponent<StatusBarProps & React.RefAttributes<any> & {
|
|
7
9
|
children?: React.ReactNode;
|
|
8
10
|
}>;
|
|
File without changes
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference types="@ogre-tools/injectable" />
|
|
2
|
-
import type { ClusterModel } from "../../common/cluster-types";
|
|
3
2
|
import { Cluster } from "../../common/cluster/cluster";
|
|
4
|
-
declare const createClusterInjectable: import("@ogre-tools/injectable").Injectable<import("@ogre-tools/injectable").InjectionToken<(model: ClusterModel) => Cluster, void>, (model: ClusterModel) => Cluster, void>;
|
|
3
|
+
declare const createClusterInjectable: import("@ogre-tools/injectable").Injectable<import("@ogre-tools/injectable").InjectionToken<(model: import("../../common/cluster-types").ClusterModel) => Cluster, void>, (model: import("../../common/cluster-types").ClusterModel) => Cluster, void>;
|
|
5
4
|
export default createClusterInjectable;
|
|
@@ -15,7 +15,7 @@ export declare class PortForwardStore extends ItemStore<PortForwardItem> {
|
|
|
15
15
|
private init;
|
|
16
16
|
watch(): import("../../utils").ExtendableDisposer;
|
|
17
17
|
loadAll(): Promise<any>;
|
|
18
|
-
|
|
18
|
+
removeItems(items: PortForwardItem[]): Promise<void>;
|
|
19
19
|
getById(id: string): PortForwardItem;
|
|
20
20
|
/**
|
|
21
21
|
* add a port-forward to the store and optionally start it
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@k8slens/extensions",
|
|
3
3
|
"productName": "OpenLens extensions",
|
|
4
4
|
"description": "OpenLens - Open Source Kubernetes IDE: extensions",
|
|
5
|
-
"version": "5.4.0-git.
|
|
5
|
+
"version": "5.4.0-git.81819dbbe9.0",
|
|
6
6
|
"copyright": "© 2021 OpenLens Authors",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"main": "dist/src/extensions/extension-api.js",
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) OpenLens Authors. All rights reserved.
|
|
3
|
-
* Licensed under MIT License. See LICENSE in root directory for more information.
|
|
4
|
-
*/
|
|
5
|
-
import { ObservableMap } from "mobx";
|
|
6
|
-
export declare function multiSet<T, V>(map: Map<T, V>, newEntries: [T, V][]): void;
|
|
7
|
-
export declare class ExtendedMap<K, V> extends Map<K, V> {
|
|
8
|
-
static new<K, V>(entries?: readonly (readonly [K, V])[] | null): ExtendedMap<K, V>;
|
|
9
|
-
/**
|
|
10
|
-
* Get the value behind `key`. If it was not present, first insert the value returned by `getVal`
|
|
11
|
-
* @param key The key to insert into the map with
|
|
12
|
-
* @param getVal A function that returns a new instance of `V`.
|
|
13
|
-
* @returns The value in the map
|
|
14
|
-
*/
|
|
15
|
-
getOrInsert(key: K, getVal: () => V): V;
|
|
16
|
-
/**
|
|
17
|
-
* Set the value associated with `key` iff there was not a previous value
|
|
18
|
-
* @throws if `key` already in map
|
|
19
|
-
* @returns `this` so that `strictSet` can be chained
|
|
20
|
-
*/
|
|
21
|
-
strictSet(key: K, val: V): this;
|
|
22
|
-
/**
|
|
23
|
-
* Get the value associated with `key`
|
|
24
|
-
* @throws if `key` did not a value associated with it
|
|
25
|
-
*/
|
|
26
|
-
strictGet(key: K): V;
|
|
27
|
-
}
|
|
28
|
-
export declare class ExtendedObservableMap<K, V> extends ObservableMap<K, V> {
|
|
29
|
-
getOrInsert(key: K, getVal: () => V): V;
|
|
30
|
-
}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/// <reference types="@ogre-tools/injectable" />
|
|
2
|
-
import type { StatusBarRegistration } from "./status-bar-registration";
|
|
3
|
-
declare const bottomBarItemsInjectable: import("@ogre-tools/injectable").Injectable<import("@ogre-tools/injectable").InjectionToken<import("mobx").IComputedValue<StatusBarRegistration[]>, unknown>, import("mobx").IComputedValue<StatusBarRegistration[]>, unknown>;
|
|
4
|
-
export default bottomBarItemsInjectable;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
/**
|
|
3
|
-
* Copyright (c) OpenLens Authors. All rights reserved.
|
|
4
|
-
* Licensed under MIT License. See LICENSE in root directory for more information.
|
|
5
|
-
*/
|
|
6
|
-
interface StatusBarComponents {
|
|
7
|
-
Item?: React.ComponentType;
|
|
8
|
-
/**
|
|
9
|
-
* The side of the bottom bar to place this component.
|
|
10
|
-
*
|
|
11
|
-
* @default "right"
|
|
12
|
-
*/
|
|
13
|
-
position?: "left" | "right";
|
|
14
|
-
}
|
|
15
|
-
interface StatusBarRegistrationV2 {
|
|
16
|
-
components?: StatusBarComponents;
|
|
17
|
-
}
|
|
18
|
-
export interface StatusBarRegistration extends StatusBarRegistrationV2 {
|
|
19
|
-
/**
|
|
20
|
-
* @deprecated use components.Item instead
|
|
21
|
-
*/
|
|
22
|
-
item?: React.ReactNode;
|
|
23
|
-
}
|
|
24
|
-
export {};
|