@k8slens/extensions 5.3.1-git.bb30bdc750.0 → 5.3.1-git.cd2f5094dc.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/ipc/update-available.ipc.d.ts +2 -0
- package/dist/src/common/k8s-api/endpoints/nodes.api.d.ts +6 -6
- package/dist/src/common/k8s-api/kube-api.d.ts +26 -25
- package/dist/src/extensions/extension-api.js +16 -16
- package/dist/src/main/cluster.d.ts +3 -7
- package/dist/src/main/context-handler.d.ts +8 -1
- package/dist/src/main/kube-auth-proxy.d.ts +5 -7
- package/dist/src/main/kubeconfig-manager.d.ts +16 -4
- package/dist/src/renderer/components/+nodes/nodes.d.ts +2 -1
- package/dist/src/renderer/components/drawer/drawer.d.ts +14 -3
- package/dist/src/renderer/components/resizing-anchor/resizing-anchor.d.ts +3 -1
- package/package.json +1 -1
|
@@ -40,8 +40,8 @@ export declare class Cluster implements ClusterModel, ClusterState {
|
|
|
40
40
|
* @internal
|
|
41
41
|
*/
|
|
42
42
|
contextHandler: ContextHandler;
|
|
43
|
-
protected
|
|
44
|
-
protected
|
|
43
|
+
protected proxyKubeconfigManager: KubeconfigManager;
|
|
44
|
+
protected eventsDisposer: import("../common/utils").ExtendableDisposer;
|
|
45
45
|
protected activated: boolean;
|
|
46
46
|
private resourceAccessStatuses;
|
|
47
47
|
get whenReady(): Promise<void> & {
|
|
@@ -198,11 +198,7 @@ export declare class Cluster implements ClusterModel, ClusterState {
|
|
|
198
198
|
/**
|
|
199
199
|
* @internal
|
|
200
200
|
*/
|
|
201
|
-
recreateProxyKubeconfig(): Promise<void>;
|
|
202
|
-
/**
|
|
203
|
-
* internal
|
|
204
|
-
*/
|
|
205
|
-
protected unbindEvents(): void;
|
|
201
|
+
protected recreateProxyKubeconfig(): Promise<void>;
|
|
206
202
|
/**
|
|
207
203
|
* @param force force activation
|
|
208
204
|
* @internal
|
|
@@ -29,13 +29,19 @@ export interface PrometheusDetails {
|
|
|
29
29
|
prometheusPath: string;
|
|
30
30
|
provider: PrometheusProvider;
|
|
31
31
|
}
|
|
32
|
+
interface PrometheusServicePreferences {
|
|
33
|
+
namespace: string;
|
|
34
|
+
service: string;
|
|
35
|
+
port: number;
|
|
36
|
+
prefix: string;
|
|
37
|
+
}
|
|
32
38
|
export declare class ContextHandler {
|
|
33
39
|
protected cluster: Cluster;
|
|
34
40
|
clusterUrl: UrlWithStringQuery;
|
|
35
41
|
protected kubeAuthProxy?: KubeAuthProxy;
|
|
36
42
|
protected apiTarget?: httpProxy.ServerOptions;
|
|
37
43
|
protected prometheusProvider?: string;
|
|
38
|
-
protected
|
|
44
|
+
protected prometheus?: PrometheusServicePreferences;
|
|
39
45
|
constructor(cluster: Cluster);
|
|
40
46
|
setupPrometheus(preferences?: ClusterPrometheusPreferences): void;
|
|
41
47
|
getPrometheusDetails(): Promise<PrometheusDetails>;
|
|
@@ -49,3 +55,4 @@ export declare class ContextHandler {
|
|
|
49
55
|
ensureServer(): Promise<void>;
|
|
50
56
|
stopServer(): void;
|
|
51
57
|
}
|
|
58
|
+
export {};
|
|
@@ -21,18 +21,16 @@
|
|
|
21
21
|
/// <reference types="node" />
|
|
22
22
|
import { ChildProcess } from "child_process";
|
|
23
23
|
import type { Cluster } from "./cluster";
|
|
24
|
-
import { Kubectl } from "./kubectl";
|
|
25
24
|
export declare class KubeAuthProxy {
|
|
25
|
+
protected readonly cluster: Cluster;
|
|
26
|
+
protected readonly env: NodeJS.ProcessEnv;
|
|
26
27
|
readonly apiPrefix: string;
|
|
27
28
|
get port(): number;
|
|
28
|
-
protected _port
|
|
29
|
-
protected
|
|
30
|
-
protected
|
|
31
|
-
protected proxyProcess: ChildProcess;
|
|
32
|
-
protected kubectl: Kubectl;
|
|
29
|
+
protected _port: number;
|
|
30
|
+
protected proxyProcess?: ChildProcess;
|
|
31
|
+
protected readonly acceptHosts: string;
|
|
33
32
|
protected ready: boolean;
|
|
34
33
|
constructor(cluster: Cluster, env: NodeJS.ProcessEnv);
|
|
35
|
-
get acceptHosts(): string;
|
|
36
34
|
get whenReady(): Promise<void> & {
|
|
37
35
|
cancel(): void;
|
|
38
36
|
};
|
|
@@ -23,13 +23,25 @@ import type { ContextHandler } from "./context-handler";
|
|
|
23
23
|
export declare class KubeconfigManager {
|
|
24
24
|
protected cluster: Cluster;
|
|
25
25
|
protected contextHandler: ContextHandler;
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
/**
|
|
27
|
+
* The path to the temp config file
|
|
28
|
+
*
|
|
29
|
+
* - if `string` then path
|
|
30
|
+
* - if `null` then not yet created
|
|
31
|
+
* - if `undefined` then unlinked by calling `clear()`
|
|
32
|
+
*/
|
|
33
|
+
protected tempFilePath: string | null | undefined;
|
|
28
34
|
constructor(cluster: Cluster, contextHandler: ContextHandler);
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @returns The path to the temporary kubeconfig
|
|
38
|
+
*/
|
|
29
39
|
getPath(): Promise<string>;
|
|
40
|
+
/**
|
|
41
|
+
* Deletes the temporary kubeconfig file
|
|
42
|
+
*/
|
|
30
43
|
clear(): Promise<void>;
|
|
31
|
-
|
|
32
|
-
protected init(): Promise<void>;
|
|
44
|
+
protected ensureFile(): Promise<void>;
|
|
33
45
|
get resolveProxyUrl(): string;
|
|
34
46
|
/**
|
|
35
47
|
* Creates new "temporary" kubeconfig that point to the kubectl-proxy.
|
|
@@ -32,9 +32,10 @@ export declare class Nodes extends React.Component<Props> {
|
|
|
32
32
|
componentDidMount(): Promise<void>;
|
|
33
33
|
componentWillUnmount(): void;
|
|
34
34
|
getLastMetricValues(node: Node, metricNames: string[]): number[];
|
|
35
|
+
private renderUsage;
|
|
35
36
|
renderCpuUsage(node: Node): JSX.Element;
|
|
36
37
|
renderMemoryUsage(node: Node): JSX.Element;
|
|
37
|
-
renderDiskUsage(node: Node):
|
|
38
|
+
renderDiskUsage(node: Node): JSX.Element;
|
|
38
39
|
renderConditions(node: Node): JSX.Element[];
|
|
39
40
|
render(): JSX.Element;
|
|
40
41
|
}
|
|
@@ -21,31 +21,42 @@
|
|
|
21
21
|
import "./drawer.scss";
|
|
22
22
|
import React from "react";
|
|
23
23
|
import { AnimateName } from "../animate";
|
|
24
|
+
export declare type DrawerPosition = "top" | "left" | "right" | "bottom";
|
|
24
25
|
export interface DrawerProps {
|
|
25
26
|
open: boolean;
|
|
26
27
|
title: React.ReactNode;
|
|
28
|
+
/**
|
|
29
|
+
* The width or heigh (depending on `position`) of the Drawer.
|
|
30
|
+
*
|
|
31
|
+
* If not set then the Drawer will be resizable.
|
|
32
|
+
*/
|
|
27
33
|
size?: string;
|
|
28
34
|
usePortal?: boolean;
|
|
29
35
|
className?: string | object;
|
|
30
36
|
contentClass?: string | object;
|
|
31
|
-
position?:
|
|
37
|
+
position?: DrawerPosition;
|
|
32
38
|
animation?: AnimateName;
|
|
33
39
|
onClose?: () => void;
|
|
34
40
|
toolbar?: React.ReactNode;
|
|
35
41
|
}
|
|
36
42
|
interface State {
|
|
37
43
|
isCopied: boolean;
|
|
44
|
+
width: number;
|
|
38
45
|
}
|
|
39
|
-
export declare class Drawer extends React.Component<DrawerProps> {
|
|
46
|
+
export declare class Drawer extends React.Component<DrawerProps, State> {
|
|
40
47
|
static defaultProps: object;
|
|
41
48
|
private mouseDownTarget;
|
|
42
49
|
private contentElem;
|
|
43
50
|
private scrollElem;
|
|
44
51
|
private scrollPos;
|
|
45
52
|
private stopListenLocation;
|
|
46
|
-
state:
|
|
53
|
+
state: {
|
|
54
|
+
isCopied: boolean;
|
|
55
|
+
width: number;
|
|
56
|
+
};
|
|
47
57
|
componentDidMount(): void;
|
|
48
58
|
componentWillUnmount(): void;
|
|
59
|
+
resizeWidth: (width: number) => void;
|
|
49
60
|
fixUpTripleClick: (ev: MouseEvent) => void;
|
|
50
61
|
saveScrollPos: () => void;
|
|
51
62
|
restoreScrollPos: () => void;
|
|
@@ -97,7 +97,9 @@ interface Position {
|
|
|
97
97
|
}
|
|
98
98
|
export declare class ResizingAnchor extends React.PureComponent<Props> {
|
|
99
99
|
lastMouseEvent?: MouseEvent;
|
|
100
|
-
ref
|
|
100
|
+
ref: React.RefObject<HTMLDivElement>;
|
|
101
|
+
isDragging: boolean;
|
|
102
|
+
wasDragging: boolean;
|
|
101
103
|
static defaultProps: {
|
|
102
104
|
onStart: typeof noop;
|
|
103
105
|
onDrag: typeof noop;
|
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.1-git.
|
|
5
|
+
"version": "5.3.1-git.cd2f5094dc.0",
|
|
6
6
|
"copyright": "© 2021 OpenLens Authors",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"main": "dist/src/extensions/extension-api.js",
|