@k8slens/extensions 5.3.0-git.8f65a89ffb.0 → 5.3.0-git.8f84f394fe.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/base-store.d.ts +1 -0
- package/dist/src/common/cluster-store.d.ts +1 -0
- package/dist/src/common/hotbar-store.d.ts +1 -0
- package/dist/src/common/k8s-api/endpoints/job.api.d.ts +0 -1
- package/dist/src/common/k8s-api/kube-api.d.ts +5 -2
- package/dist/src/common/k8s-api/kube-object.d.ts +1 -1
- package/dist/src/common/k8s-api/kube-object.store.d.ts +25 -7
- package/dist/src/common/k8s-api/kube-watch-api.d.ts +29 -8
- package/dist/src/common/user-store/user-store.d.ts +1 -0
- package/dist/src/common/weblink-store.d.ts +1 -0
- package/dist/src/extensions/extension-api.js +196 -161
- package/dist/src/extensions/extension-store.d.ts +1 -0
- package/dist/src/extensions/extensions-store.d.ts +1 -0
- package/dist/src/extensions/main-api/k8s-api.d.ts +1 -1
- package/dist/src/extensions/registries/workloads-overview-detail-registry.d.ts +6 -3
- package/dist/src/extensions/renderer-api/k8s-api.d.ts +1 -1
- package/dist/src/main/extension-filesystem.d.ts +1 -0
- package/dist/src/main/shell-session/shell-session.d.ts +6 -2
- package/dist/src/renderer/api/terminal-api.d.ts +29 -15
- package/dist/src/renderer/api/websocket-api.d.ts +50 -27
- package/dist/src/renderer/bootstrap.d.ts +1 -1
- package/dist/src/renderer/{components/app.d.ts → cluster-frame.d.ts} +6 -4
- package/dist/src/renderer/components/+user-management/{select-options.d.ts → +cluster-role-bindings/__tests__/dialog.test.d.ts} +1 -7
- package/dist/src/renderer/components/+user-management/+cluster-role-bindings/dialog.d.ts +2 -3
- package/dist/src/renderer/components/+user-management/+role-bindings/__tests__/dialog.test.d.ts +21 -0
- package/dist/src/renderer/components/+user-management/+role-bindings/dialog.d.ts +2 -3
- package/dist/src/renderer/components/+workloads-daemonsets/daemonsets.d.ts +0 -1
- package/dist/src/renderer/components/+workloads-overview/overview.d.ts +3 -0
- package/dist/src/renderer/components/badge/badge.d.ts +1 -0
- package/dist/src/renderer/components/cluster-manager/lens-views.d.ts +2 -4
- package/dist/src/renderer/components/dialog/dialog.d.ts +1 -0
- package/dist/src/renderer/components/dock/edit-resource.d.ts +1 -1
- package/dist/src/renderer/components/dock/terminal.d.ts +1 -1
- package/dist/src/renderer/components/item-object-list/item-list-layout.d.ts +6 -0
- package/dist/src/renderer/components/kube-object-list-layout/kube-object-list-layout.d.ts +3 -0
- package/dist/src/renderer/components/table/table-cell.d.ts +1 -0
- package/dist/src/renderer/initializers/kube-object-detail-registry.d.ts +1 -1
- package/dist/src/renderer/{lens-app.d.ts → root-frame.d.ts} +3 -1
- package/package.json +1 -1
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
import { BaseStore } from "../common/base-store";
|
|
22
22
|
import type { LensExtension } from "./lens-extension";
|
|
23
23
|
export declare abstract class ExtensionStore<T> extends BaseStore<T> {
|
|
24
|
+
readonly displayName = "ExtensionStore<T>";
|
|
24
25
|
protected extension: LensExtension;
|
|
25
26
|
loadExtension(extension: LensExtension): void;
|
|
26
27
|
load(): void;
|
|
@@ -28,6 +28,7 @@ export interface LensExtensionState {
|
|
|
28
28
|
name: string;
|
|
29
29
|
}
|
|
30
30
|
export declare class ExtensionsStore extends BaseStore<LensExtensionsStoreModel> {
|
|
31
|
+
readonly displayName = "ExtensionsStore";
|
|
31
32
|
constructor();
|
|
32
33
|
get enabledExtensions(): string[];
|
|
33
34
|
protected state: import("mobx").ObservableMap<string, LensExtensionState>;
|
|
@@ -22,7 +22,7 @@ export { isAllowedResource } from "../../common/utils/allowed-resource";
|
|
|
22
22
|
export { ResourceStack } from "../../common/k8s/resource-stack";
|
|
23
23
|
export { apiManager } from "../../common/k8s-api/api-manager";
|
|
24
24
|
export { KubeApi, forCluster, forRemoteCluster } from "../../common/k8s-api/kube-api";
|
|
25
|
-
export { KubeObject } from "../../common/k8s-api/kube-object";
|
|
25
|
+
export { KubeObject, KubeStatus } from "../../common/k8s-api/kube-object";
|
|
26
26
|
export { KubeObjectStore } from "../../common/k8s-api/kube-object.store";
|
|
27
27
|
export { Pod, podsApi, PodsApi } from "../../common/k8s-api/endpoints/pods.api";
|
|
28
28
|
export { Node, nodesApi, NodesApi } from "../../common/k8s-api/endpoints/nodes.api";
|
|
@@ -21,12 +21,15 @@
|
|
|
21
21
|
import type React from "react";
|
|
22
22
|
import { BaseRegistry } from "./base-registry";
|
|
23
23
|
export interface WorkloadsOverviewDetailComponents {
|
|
24
|
-
Details: React.ComponentType<
|
|
24
|
+
Details: React.ComponentType<{}>;
|
|
25
25
|
}
|
|
26
26
|
export interface WorkloadsOverviewDetailRegistration {
|
|
27
27
|
components: WorkloadsOverviewDetailComponents;
|
|
28
28
|
priority?: number;
|
|
29
29
|
}
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
declare type RegisteredWorkloadsOverviewDetail = Required<WorkloadsOverviewDetailRegistration>;
|
|
31
|
+
export declare class WorkloadsOverviewDetailRegistry extends BaseRegistry<WorkloadsOverviewDetailRegistration, RegisteredWorkloadsOverviewDetail> {
|
|
32
|
+
getItems(): Required<WorkloadsOverviewDetailRegistration>[];
|
|
33
|
+
protected getRegisteredItem(item: WorkloadsOverviewDetailRegistration): RegisteredWorkloadsOverviewDetail;
|
|
32
34
|
}
|
|
35
|
+
export {};
|
|
@@ -23,7 +23,7 @@ export { ResourceStack } from "../../common/k8s/resource-stack";
|
|
|
23
23
|
export { apiManager } from "../../common/k8s-api/api-manager";
|
|
24
24
|
export { KubeObjectStore } from "../../common/k8s-api/kube-object.store";
|
|
25
25
|
export { KubeApi, forCluster, forRemoteCluster } from "../../common/k8s-api/kube-api";
|
|
26
|
-
export { KubeObject } from "../../common/k8s-api/kube-object";
|
|
26
|
+
export { KubeObject, KubeStatus } from "../../common/k8s-api/kube-object";
|
|
27
27
|
export { Pod, podsApi, PodsApi } from "../../common/k8s-api/endpoints";
|
|
28
28
|
export { Node, nodesApi, NodesApi } from "../../common/k8s-api/endpoints";
|
|
29
29
|
export { Deployment, deploymentApi, DeploymentApi } from "../../common/k8s-api/endpoints";
|
|
@@ -23,6 +23,7 @@ interface FSProvisionModel {
|
|
|
23
23
|
extensions: Record<string, string>;
|
|
24
24
|
}
|
|
25
25
|
export declare class FilesystemProvisionerStore extends BaseStore<FSProvisionModel> {
|
|
26
|
+
readonly displayName = "FilesystemProvisionerStore";
|
|
26
27
|
registeredExtensions: import("mobx").ObservableMap<string, string>;
|
|
27
28
|
constructor();
|
|
28
29
|
/**
|
|
@@ -22,6 +22,7 @@ import type { Cluster } from "../cluster";
|
|
|
22
22
|
import { Kubectl } from "../kubectl";
|
|
23
23
|
import type WebSocket from "ws";
|
|
24
24
|
import * as pty from "node-pty";
|
|
25
|
+
import { TerminalMessage } from "../../renderer/api/terminal-api";
|
|
25
26
|
export declare class ShellOpenError extends Error {
|
|
26
27
|
cause: Error;
|
|
27
28
|
constructor(message: string, cause: Error);
|
|
@@ -118,12 +119,15 @@ export declare abstract class ShellSession {
|
|
|
118
119
|
protected kubeconfigPathP: Promise<string>;
|
|
119
120
|
protected readonly terminalId: string;
|
|
120
121
|
protected abstract get cwd(): string | undefined;
|
|
121
|
-
protected ensureShellProcess(shell: string, args: string[], env: Record<string, string>, cwd: string):
|
|
122
|
+
protected ensureShellProcess(shell: string, args: string[], env: Record<string, string>, cwd: string): {
|
|
123
|
+
shellProcess: pty.IPty;
|
|
124
|
+
resume: boolean;
|
|
125
|
+
};
|
|
122
126
|
constructor(websocket: WebSocket, cluster: Cluster, terminalId: string);
|
|
127
|
+
protected send(message: TerminalMessage): void;
|
|
123
128
|
protected openShellProcess(shell: string, args: string[], env: Record<string, any>): Promise<void>;
|
|
124
129
|
protected getPathEntries(): string[];
|
|
125
130
|
protected getCachedShellEnv(): Promise<Record<string, string>>;
|
|
126
131
|
protected getShellEnv(): Promise<Record<string, any>>;
|
|
127
132
|
protected exit(code?: WebSocketCloseEvent): void;
|
|
128
|
-
protected sendResponse(msg: string): void;
|
|
129
133
|
}
|
|
@@ -18,15 +18,28 @@
|
|
|
18
18
|
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
19
19
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
20
20
|
*/
|
|
21
|
-
import {
|
|
22
|
-
import { WebSocketApi } from "./websocket-api";
|
|
21
|
+
import { WebSocketApi, WebSocketEvents } from "./websocket-api";
|
|
23
22
|
export declare enum TerminalChannels {
|
|
24
|
-
STDIN =
|
|
25
|
-
STDOUT =
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
TOKEN = 9
|
|
23
|
+
STDIN = "stdin",
|
|
24
|
+
STDOUT = "stdout",
|
|
25
|
+
CONNECTED = "connected",
|
|
26
|
+
RESIZE = "resize"
|
|
29
27
|
}
|
|
28
|
+
export declare type TerminalMessage = {
|
|
29
|
+
type: TerminalChannels.STDIN;
|
|
30
|
+
data: string;
|
|
31
|
+
} | {
|
|
32
|
+
type: TerminalChannels.STDOUT;
|
|
33
|
+
data: string;
|
|
34
|
+
} | {
|
|
35
|
+
type: TerminalChannels.CONNECTED;
|
|
36
|
+
} | {
|
|
37
|
+
type: TerminalChannels.RESIZE;
|
|
38
|
+
data: {
|
|
39
|
+
width: number;
|
|
40
|
+
height: number;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
30
43
|
declare enum TerminalColor {
|
|
31
44
|
RED = "\u001B[31m",
|
|
32
45
|
GREEN = "\u001B[32m",
|
|
@@ -43,23 +56,24 @@ export declare type TerminalApiQuery = Record<string, string> & {
|
|
|
43
56
|
node?: string;
|
|
44
57
|
type?: string;
|
|
45
58
|
};
|
|
46
|
-
export
|
|
59
|
+
export interface TerminalEvents extends WebSocketEvents {
|
|
60
|
+
ready: () => void;
|
|
61
|
+
connected: () => void;
|
|
62
|
+
}
|
|
63
|
+
export declare class TerminalApi extends WebSocketApi<TerminalEvents> {
|
|
47
64
|
protected query: TerminalApiQuery;
|
|
48
65
|
protected size: {
|
|
49
|
-
|
|
50
|
-
|
|
66
|
+
width: number;
|
|
67
|
+
height: number;
|
|
51
68
|
};
|
|
52
|
-
onReady: EventEmitter<[]>;
|
|
53
69
|
isReady: boolean;
|
|
54
70
|
constructor(query: TerminalApiQuery);
|
|
55
71
|
connect(): Promise<void>;
|
|
56
72
|
destroy(): void;
|
|
57
|
-
removeAllListeners(): void;
|
|
58
|
-
protected _onReady(data: string): boolean;
|
|
59
73
|
reconnect(): void;
|
|
60
|
-
|
|
74
|
+
sendMessage(message: TerminalMessage): void;
|
|
61
75
|
sendTerminalSize(cols: number, rows: number): void;
|
|
62
|
-
protected
|
|
76
|
+
protected _onMessage({ data, ...evt }: MessageEvent<ArrayBuffer>): void;
|
|
63
77
|
protected _onOpen(evt: Event): void;
|
|
64
78
|
protected _onClose(evt: CloseEvent): void;
|
|
65
79
|
protected emitStatus(data: string, options?: {
|
|
@@ -18,19 +18,41 @@
|
|
|
18
18
|
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
19
19
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
20
20
|
*/
|
|
21
|
-
import
|
|
22
|
-
interface
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
import type TypedEventEmitter from "typed-emitter";
|
|
22
|
+
interface WebsocketApiParams {
|
|
23
|
+
/**
|
|
24
|
+
* Flush pending commands on open socket
|
|
25
|
+
*
|
|
26
|
+
* @default true
|
|
27
|
+
*/
|
|
25
28
|
flushOnOpen?: boolean;
|
|
26
|
-
|
|
27
|
-
|
|
29
|
+
/**
|
|
30
|
+
* In case of an error, wait this many seconds before reconnecting.
|
|
31
|
+
*
|
|
32
|
+
* If falsy, don't reconnect
|
|
33
|
+
*
|
|
34
|
+
* @default 10
|
|
35
|
+
*/
|
|
36
|
+
reconnectDelay?: number;
|
|
37
|
+
/**
|
|
38
|
+
* The message for pinging the websocket
|
|
39
|
+
*
|
|
40
|
+
* @default "PING"
|
|
41
|
+
*/
|
|
42
|
+
pingMessage?: string | ArrayBufferLike | Blob | ArrayBufferView;
|
|
43
|
+
/**
|
|
44
|
+
* If set to a number > 0, then the API will ping the socket on that interval.
|
|
45
|
+
*
|
|
46
|
+
* @unit seconds
|
|
47
|
+
*/
|
|
48
|
+
pingInterval?: number;
|
|
49
|
+
/**
|
|
50
|
+
* Whether to show logs in the console
|
|
51
|
+
*
|
|
52
|
+
* @default isDevelopment
|
|
53
|
+
*/
|
|
28
54
|
logging?: boolean;
|
|
29
55
|
}
|
|
30
|
-
interface IMessage {
|
|
31
|
-
id: string;
|
|
32
|
-
data: string;
|
|
33
|
-
}
|
|
34
56
|
export declare enum WebSocketApiState {
|
|
35
57
|
PENDING = "pending",
|
|
36
58
|
OPEN = "open",
|
|
@@ -38,32 +60,33 @@ export declare enum WebSocketApiState {
|
|
|
38
60
|
RECONNECTING = "reconnecting",
|
|
39
61
|
CLOSED = "closed"
|
|
40
62
|
}
|
|
41
|
-
export
|
|
42
|
-
|
|
63
|
+
export interface WebSocketEvents {
|
|
64
|
+
open: () => void;
|
|
65
|
+
data: (message: string) => void;
|
|
66
|
+
close: () => void;
|
|
67
|
+
}
|
|
68
|
+
declare type Defaulted<Params, DefaultParams extends keyof Params> = Required<Pick<Params, DefaultParams>> & Omit<Params, DefaultParams>;
|
|
69
|
+
declare const WebSocketApi_base: new <T>() => TypedEventEmitter<T>;
|
|
70
|
+
export declare class WebSocketApi<Events extends WebSocketEvents> extends WebSocketApi_base<Events> {
|
|
43
71
|
protected socket: WebSocket;
|
|
44
|
-
protected pendingCommands:
|
|
45
|
-
protected reconnectTimer
|
|
46
|
-
protected pingTimer
|
|
47
|
-
protected
|
|
72
|
+
protected pendingCommands: (string | ArrayBufferLike | Blob | ArrayBufferView)[];
|
|
73
|
+
protected reconnectTimer?: any;
|
|
74
|
+
protected pingTimer?: any;
|
|
75
|
+
protected params: Defaulted<WebsocketApiParams, keyof typeof WebSocketApi["defaultParams"]>;
|
|
48
76
|
readyState: WebSocketApiState;
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
onClose: EventEmitter<[]>;
|
|
52
|
-
static defaultParams: Partial<IParams>;
|
|
53
|
-
constructor(params: IParams);
|
|
77
|
+
private static defaultParams;
|
|
78
|
+
constructor(params: WebsocketApiParams);
|
|
54
79
|
get isConnected(): boolean;
|
|
55
80
|
get isOnline(): boolean;
|
|
56
|
-
|
|
57
|
-
connect(url?: string): void;
|
|
81
|
+
connect(url: string): void;
|
|
58
82
|
ping(): void;
|
|
59
83
|
reconnect(): void;
|
|
60
84
|
destroy(): void;
|
|
61
|
-
|
|
62
|
-
send(command: string): void;
|
|
85
|
+
clearAllListeners(): void;
|
|
86
|
+
send(command: string | ArrayBufferLike | Blob | ArrayBufferView): void;
|
|
63
87
|
protected flush(): void;
|
|
64
|
-
protected parseMessage(data: string): string;
|
|
65
88
|
protected _onOpen(evt: Event): void;
|
|
66
|
-
protected _onMessage(
|
|
89
|
+
protected _onMessage({ data }: MessageEvent): void;
|
|
67
90
|
protected _onError(evt: Event): void;
|
|
68
91
|
protected _onClose(evt: CloseEvent): void;
|
|
69
92
|
protected writeLog(...data: any[]): void;
|
|
@@ -27,7 +27,7 @@ import * as ReactRouterDom from "react-router-dom";
|
|
|
27
27
|
import * as LensExtensionsCommonApi from "../extensions/common-api";
|
|
28
28
|
import * as LensExtensionsRendererApi from "../extensions/renderer-api";
|
|
29
29
|
declare type AppComponent = React.ComponentType & {
|
|
30
|
-
init
|
|
30
|
+
init(rootElem: HTMLElement): Promise<void>;
|
|
31
31
|
};
|
|
32
32
|
export declare function bootstrap(comp: () => Promise<AppComponent>): Promise<void>;
|
|
33
33
|
/**
|
|
@@ -19,11 +19,13 @@
|
|
|
19
19
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
20
20
|
*/
|
|
21
21
|
import React from "react";
|
|
22
|
-
import { ClusterPageMenuRegistration } from "
|
|
23
|
-
import { TabLayoutRoute } from "./layout/tab-layout";
|
|
24
|
-
import type { ClusterId } from "
|
|
25
|
-
export declare class
|
|
22
|
+
import { ClusterPageMenuRegistration } from "../extensions/registries";
|
|
23
|
+
import { TabLayoutRoute } from "./components/layout/tab-layout";
|
|
24
|
+
import type { ClusterId } from "../common/cluster-types";
|
|
25
|
+
export declare class ClusterFrame extends React.Component {
|
|
26
26
|
static clusterId: ClusterId;
|
|
27
|
+
static readonly logPrefix = "[CLUSTER-FRAME]:";
|
|
28
|
+
static displayName: string;
|
|
27
29
|
constructor(props: {});
|
|
28
30
|
static init(rootElem: HTMLElement): Promise<void>;
|
|
29
31
|
componentDidMount(): void;
|
|
@@ -18,10 +18,4 @@
|
|
|
18
18
|
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
19
19
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
20
20
|
*/
|
|
21
|
-
|
|
22
|
-
import type { KubeObject } from "../../../common/k8s-api/kube-object";
|
|
23
|
-
import type { SelectOption } from "../select";
|
|
24
|
-
export declare type ServiceAccountOption = SelectOption<string> & {
|
|
25
|
-
account: ServiceAccount;
|
|
26
|
-
};
|
|
27
|
-
export declare function getRoleRefSelectOption<T extends KubeObject>(item: T): SelectOption<T>;
|
|
21
|
+
export {};
|
|
@@ -23,7 +23,6 @@ import React from "react";
|
|
|
23
23
|
import { ClusterRole, ClusterRoleBinding, ClusterRoleBindingSubject, ServiceAccount } from "../../../../common/k8s-api/endpoints";
|
|
24
24
|
import { DialogProps } from "../../dialog";
|
|
25
25
|
import { SelectOption } from "../../select";
|
|
26
|
-
import { ServiceAccountOption } from "../select-options";
|
|
27
26
|
import { ObservableHashSet } from "../../../utils";
|
|
28
27
|
interface Props extends Partial<DialogProps> {
|
|
29
28
|
}
|
|
@@ -46,8 +45,8 @@ export declare class ClusterRoleBindingDialog extends React.Component<Props> {
|
|
|
46
45
|
selectedGroups: import("mobx").ObservableSet<string>;
|
|
47
46
|
get selectedBindings(): ClusterRoleBindingSubject[];
|
|
48
47
|
get clusterRoleRefoptions(): SelectOption<ClusterRole>[];
|
|
49
|
-
get serviceAccountOptions():
|
|
50
|
-
get selectedServiceAccountOptions():
|
|
48
|
+
get serviceAccountOptions(): SelectOption<ServiceAccount>[];
|
|
49
|
+
get selectedServiceAccountOptions(): SelectOption<ServiceAccount>[];
|
|
51
50
|
onOpen: () => void;
|
|
52
51
|
reset: () => void;
|
|
53
52
|
createBindings: () => Promise<void>;
|
package/dist/src/renderer/components/+user-management/+role-bindings/__tests__/dialog.test.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2021 OpenLens Authors
|
|
3
|
+
*
|
|
4
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
5
|
+
* this software and associated documentation files (the "Software"), to deal in
|
|
6
|
+
* the Software without restriction, including without limitation the rights to
|
|
7
|
+
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
8
|
+
* the Software, and to permit persons to whom the Software is furnished to do so,
|
|
9
|
+
* subject to the following conditions:
|
|
10
|
+
*
|
|
11
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
12
|
+
* copies or substantial portions of the Software.
|
|
13
|
+
*
|
|
14
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
15
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
16
|
+
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
17
|
+
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
18
|
+
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
19
|
+
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
20
|
+
*/
|
|
21
|
+
export {};
|
|
@@ -23,7 +23,6 @@ import React from "react";
|
|
|
23
23
|
import { ClusterRole, Role, RoleBinding, RoleBindingSubject, ServiceAccount } from "../../../../common/k8s-api/endpoints";
|
|
24
24
|
import { DialogProps } from "../../dialog";
|
|
25
25
|
import { SelectOption } from "../../select";
|
|
26
|
-
import { ServiceAccountOption } from "../select-options";
|
|
27
26
|
import { ObservableHashSet } from "../../../utils";
|
|
28
27
|
interface Props extends Partial<DialogProps> {
|
|
29
28
|
}
|
|
@@ -46,8 +45,8 @@ export declare class RoleBindingDialog extends React.Component<Props> {
|
|
|
46
45
|
selectedGroups: import("mobx").ObservableSet<string>;
|
|
47
46
|
get selectedBindings(): RoleBindingSubject[];
|
|
48
47
|
get roleRefOptions(): SelectOption<Role | ClusterRole>[];
|
|
49
|
-
get serviceAccountOptions():
|
|
50
|
-
get selectedServiceAccountOptions():
|
|
48
|
+
get serviceAccountOptions(): SelectOption<ServiceAccount>[];
|
|
49
|
+
get selectedServiceAccountOptions(): SelectOption<ServiceAccount>[];
|
|
51
50
|
onOpen: () => void;
|
|
52
51
|
reset: () => void;
|
|
53
52
|
createBindings: () => Promise<void>;
|
|
@@ -27,7 +27,6 @@ interface Props extends RouteComponentProps<DaemonSetsRouteParams> {
|
|
|
27
27
|
}
|
|
28
28
|
export declare class DaemonSets extends React.Component<Props> {
|
|
29
29
|
getPodsLength(daemonSet: DaemonSet): number;
|
|
30
|
-
renderNodeSelector(daemonSet: DaemonSet): JSX.Element[];
|
|
31
30
|
render(): JSX.Element;
|
|
32
31
|
}
|
|
33
32
|
export {};
|
|
@@ -25,7 +25,10 @@ import type { WorkloadsOverviewRouteParams } from "../../../common/routes";
|
|
|
25
25
|
interface Props extends RouteComponentProps<WorkloadsOverviewRouteParams> {
|
|
26
26
|
}
|
|
27
27
|
export declare class WorkloadsOverview extends React.Component<Props> {
|
|
28
|
+
loadErrors: string[];
|
|
29
|
+
constructor(props: Props);
|
|
28
30
|
componentDidMount(): void;
|
|
31
|
+
renderLoadErrors(): JSX.Element;
|
|
29
32
|
render(): JSX.Element;
|
|
30
33
|
}
|
|
31
34
|
export {};
|
|
@@ -26,6 +26,7 @@ export interface BadgeProps extends React.HTMLAttributes<any>, TooltipDecoratorP
|
|
|
26
26
|
label?: React.ReactNode;
|
|
27
27
|
expandable?: boolean;
|
|
28
28
|
disabled?: boolean;
|
|
29
|
+
scrollable?: boolean;
|
|
29
30
|
}
|
|
30
31
|
export declare class Badge extends React.Component<BadgeProps> {
|
|
31
32
|
static defaultProps: Partial<BadgeProps>;
|
|
@@ -26,12 +26,10 @@ export interface LensView {
|
|
|
26
26
|
}
|
|
27
27
|
export declare class ClusterFrameHandler extends Singleton {
|
|
28
28
|
private views;
|
|
29
|
-
private visibleCluster;
|
|
30
29
|
constructor();
|
|
31
30
|
hasLoadedView(clusterId: string): boolean;
|
|
32
31
|
initView(clusterId: ClusterId): void;
|
|
33
|
-
setVisibleCluster(clusterId: ClusterId): void;
|
|
34
|
-
clearVisibleCluster(): void;
|
|
35
32
|
private prevVisibleClusterChange?;
|
|
36
|
-
|
|
33
|
+
setVisibleCluster(clusterId: ClusterId | null): void;
|
|
34
|
+
clearVisibleCluster(): void;
|
|
37
35
|
}
|
|
@@ -36,6 +36,7 @@ interface DialogState {
|
|
|
36
36
|
}
|
|
37
37
|
export declare class Dialog extends React.PureComponent<DialogProps, DialogState> {
|
|
38
38
|
private contentElem;
|
|
39
|
+
ref: React.RefObject<HTMLDivElement>;
|
|
39
40
|
static defaultProps: DialogProps;
|
|
40
41
|
closeOnNavigate: import("mobx").IReactionDisposer;
|
|
41
42
|
state: DialogState;
|
|
@@ -32,7 +32,7 @@ export declare class EditResource extends React.Component<Props> {
|
|
|
32
32
|
get isReadyForEditing(): boolean;
|
|
33
33
|
get resource(): KubeObject | undefined;
|
|
34
34
|
get draft(): string;
|
|
35
|
-
saveDraft(draft: string
|
|
35
|
+
saveDraft(draft: string): void;
|
|
36
36
|
onChange: (draft: string) => void;
|
|
37
37
|
onError: (error?: Error | string) => void;
|
|
38
38
|
save: () => Promise<JSX.Element>;
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
*/
|
|
21
21
|
/// <reference types="lodash" />
|
|
22
22
|
import { TabId } from "./dock.store";
|
|
23
|
-
import
|
|
23
|
+
import { TerminalApi } from "../../api/terminal-api";
|
|
24
24
|
export declare class Terminal {
|
|
25
25
|
tabId: TabId;
|
|
26
26
|
protected api: TerminalApi;
|
|
@@ -70,6 +70,12 @@ export interface ItemListLayoutProps<I extends ItemObject> {
|
|
|
70
70
|
onDetails?: (item: I) => void;
|
|
71
71
|
customizeRemoveDialog?: (selectedItems: I[]) => Partial<ConfirmDialogParams>;
|
|
72
72
|
renderFooter?: (parent: ItemListLayout<I>) => React.ReactNode;
|
|
73
|
+
/**
|
|
74
|
+
* Message to display when a store failed to load
|
|
75
|
+
*
|
|
76
|
+
* @default "Failed to load items"
|
|
77
|
+
*/
|
|
78
|
+
failedToLoadMessage?: React.ReactNode;
|
|
73
79
|
filterCallbacks?: ItemsFilters<I>;
|
|
74
80
|
}
|
|
75
81
|
export declare class ItemListLayout<I extends ItemObject> extends React.Component<ItemListLayoutProps<I>> {
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
19
19
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
20
20
|
*/
|
|
21
|
+
import "./kube-object-list-layout.scss";
|
|
21
22
|
import React from "react";
|
|
22
23
|
import type { KubeObject } from "../../../common/k8s-api/kube-object";
|
|
23
24
|
import { ItemListLayoutProps } from "../item-object-list/item-list-layout";
|
|
@@ -30,7 +31,9 @@ export interface KubeObjectListLayoutProps<K extends KubeObject> extends ItemLis
|
|
|
30
31
|
export declare class KubeObjectListLayout<K extends KubeObject> extends React.Component<KubeObjectListLayoutProps<K>> {
|
|
31
32
|
static defaultProps: object;
|
|
32
33
|
constructor(props: KubeObjectListLayoutProps<K>);
|
|
34
|
+
loadErrors: string[];
|
|
33
35
|
get selectedItem(): K;
|
|
34
36
|
componentDidMount(): void;
|
|
37
|
+
renderLoadErrors(): JSX.Element;
|
|
35
38
|
render(): JSX.Element;
|
|
36
39
|
}
|
|
@@ -18,4 +18,4 @@
|
|
|
18
18
|
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
19
19
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
20
20
|
*/
|
|
21
|
-
export declare function
|
|
21
|
+
export declare function initKubeObjectDetailRegistry(): void;
|
|
@@ -19,7 +19,9 @@
|
|
|
19
19
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
20
20
|
*/
|
|
21
21
|
import React from "react";
|
|
22
|
-
export declare class
|
|
22
|
+
export declare class RootFrame extends React.Component {
|
|
23
|
+
static readonly logPrefix = "[ROOT-FRAME]:";
|
|
24
|
+
static displayName: string;
|
|
23
25
|
static init(rootElem: HTMLElement): Promise<void>;
|
|
24
26
|
constructor(props: {});
|
|
25
27
|
componentDidMount(): void;
|
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.3.0-git.
|
|
5
|
+
"version": "5.3.0-git.8f84f394fe.0",
|
|
6
6
|
"copyright": "© 2021 OpenLens Authors",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"main": "dist/src/extensions/extension-api.js",
|