@k8slens/extensions 5.3.0-git.fa32402979.0 → 5.3.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/__mocks__/electron.ts +2 -2
- package/dist/src/{renderer/components/+user-management/select-options.d.ts → common/__tests__/base-store.test.d.ts} +1 -7
- package/dist/src/common/__tests__/system-ca.test.d.ts +1 -0
- package/dist/src/common/base-store.d.ts +3 -2
- package/dist/src/common/cluster-store.d.ts +2 -3
- package/dist/src/common/cluster-types.d.ts +7 -1
- package/dist/src/common/hotbar-store.d.ts +1 -0
- package/dist/src/common/k8s-api/endpoints/cluster-role-binding.api.d.ts +1 -1
- package/dist/src/common/k8s-api/endpoints/cluster-role.api.d.ts +1 -1
- package/dist/src/common/k8s-api/endpoints/cluster.api.d.ts +1 -1
- package/dist/src/common/k8s-api/endpoints/configmap.api.d.ts +1 -1
- package/dist/src/common/k8s-api/endpoints/crd.api.d.ts +1 -1
- package/dist/src/common/k8s-api/endpoints/cron-job.api.d.ts +1 -1
- package/dist/src/common/k8s-api/endpoints/daemon-set.api.d.ts +1 -1
- package/dist/src/common/k8s-api/endpoints/deployment.api.d.ts +1 -1
- package/dist/src/common/k8s-api/endpoints/endpoint.api.d.ts +1 -1
- package/dist/src/common/k8s-api/endpoints/events.api.d.ts +1 -1
- package/dist/src/common/k8s-api/endpoints/hpa.api.d.ts +1 -1
- package/dist/src/common/k8s-api/endpoints/ingress.api.d.ts +11 -8
- package/dist/src/common/k8s-api/endpoints/job.api.d.ts +1 -2
- package/dist/src/common/k8s-api/endpoints/limit-range.api.d.ts +1 -1
- package/dist/src/common/k8s-api/endpoints/namespaces.api.d.ts +1 -1
- package/dist/src/common/k8s-api/endpoints/network-policy.api.d.ts +1 -1
- package/dist/src/common/k8s-api/endpoints/nodes.api.d.ts +1 -1
- package/dist/src/common/k8s-api/endpoints/persistent-volume-claims.api.d.ts +1 -1
- package/dist/src/common/k8s-api/endpoints/persistent-volume.api.d.ts +1 -1
- package/dist/src/common/k8s-api/endpoints/pod-metrics.api.d.ts +1 -1
- package/dist/src/common/k8s-api/endpoints/poddisruptionbudget.api.d.ts +1 -1
- package/dist/src/common/k8s-api/endpoints/pods.api.d.ts +29 -33
- package/dist/src/common/k8s-api/endpoints/podsecuritypolicy.api.d.ts +1 -1
- package/dist/src/common/k8s-api/endpoints/replica-set.api.d.ts +1 -1
- package/dist/src/common/k8s-api/endpoints/resource-quota.api.d.ts +1 -1
- package/dist/src/common/k8s-api/endpoints/role-binding.api.d.ts +1 -1
- package/dist/src/common/k8s-api/endpoints/role.api.d.ts +1 -1
- package/dist/src/common/k8s-api/endpoints/secret.api.d.ts +1 -1
- package/dist/src/common/k8s-api/endpoints/selfsubjectrulesreviews.api.d.ts +1 -1
- package/dist/src/common/k8s-api/endpoints/service-accounts.api.d.ts +1 -1
- package/dist/src/common/k8s-api/endpoints/service.api.d.ts +2 -2
- package/dist/src/common/k8s-api/endpoints/stateful-set.api.d.ts +1 -1
- package/dist/src/common/k8s-api/endpoints/storage-class.api.d.ts +1 -1
- package/dist/src/common/k8s-api/index.d.ts +1 -1
- package/dist/src/common/k8s-api/kube-api.d.ts +12 -3
- package/dist/src/common/k8s-api/kube-json-api.d.ts +2 -0
- package/dist/src/common/k8s-api/kube-object.d.ts +9 -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/system-ca.d.ts +20 -1
- package/dist/src/common/user-store/preferences-helpers.d.ts +2 -6
- package/dist/src/common/user-store/user-store.d.ts +3 -7
- package/dist/src/common/utils/base64.d.ts +12 -4
- package/dist/src/common/utils/index.d.ts +2 -2
- package/dist/src/common/utils/paths.d.ts +1 -0
- package/dist/src/{main → common/utils}/promise-exec.d.ts +0 -0
- package/dist/src/common/weblink-store.d.ts +1 -0
- package/dist/src/extensions/0.extension-api.js +15 -0
- package/dist/src/extensions/1.extension-api.js +15 -0
- package/dist/src/extensions/10.extension-api.js +15 -0
- package/dist/src/extensions/11.extension-api.js +15 -0
- package/dist/src/extensions/12.extension-api.js +15 -0
- package/dist/src/extensions/13.extension-api.js +15 -0
- package/dist/src/extensions/14.extension-api.js +15 -0
- package/dist/src/extensions/15.extension-api.js +15 -0
- package/dist/src/extensions/16.extension-api.js +15 -0
- package/dist/src/extensions/17.extension-api.js +15 -0
- package/dist/src/extensions/18.extension-api.js +15 -0
- package/dist/src/extensions/19.extension-api.js +15 -0
- package/dist/src/extensions/2.extension-api.js +543 -0
- package/dist/src/extensions/20.extension-api.js +15 -0
- package/dist/src/extensions/21.extension-api.js +15 -0
- package/dist/src/extensions/22.extension-api.js +15 -0
- package/dist/src/extensions/23.extension-api.js +15 -0
- package/dist/src/extensions/24.extension-api.js +15 -0
- package/dist/src/extensions/25.extension-api.js +15 -0
- package/dist/src/extensions/26.extension-api.js +15 -0
- package/dist/src/extensions/27.extension-api.js +15 -0
- package/dist/src/extensions/28.extension-api.js +15 -0
- package/dist/src/extensions/29.extension-api.js +15 -0
- package/dist/src/extensions/3.extension-api.js +423 -0
- package/dist/src/extensions/30.extension-api.js +15 -0
- package/dist/src/extensions/31.extension-api.js +15 -0
- package/dist/src/extensions/32.extension-api.js +15 -0
- package/dist/src/extensions/33.extension-api.js +15 -0
- package/dist/src/extensions/34.extension-api.js +15 -0
- package/dist/src/extensions/35.extension-api.js +15 -0
- package/dist/src/extensions/36.extension-api.js +15 -0
- package/dist/src/extensions/37.extension-api.js +15 -0
- package/dist/src/extensions/38.extension-api.js +15 -0
- package/dist/src/extensions/39.extension-api.js +15 -0
- package/dist/src/extensions/4.extension-api.js +363 -0
- package/dist/src/extensions/40.extension-api.js +15 -0
- package/dist/src/extensions/41.extension-api.js +15 -0
- package/dist/src/extensions/42.extension-api.js +15 -0
- package/dist/src/extensions/43.extension-api.js +15 -0
- package/dist/src/extensions/44.extension-api.js +15 -0
- package/dist/src/extensions/45.extension-api.js +15 -0
- package/dist/src/extensions/46.extension-api.js +15 -0
- package/dist/src/extensions/47.extension-api.js +15 -0
- package/dist/src/extensions/48.extension-api.js +15 -0
- package/dist/src/extensions/49.extension-api.js +15 -0
- package/dist/src/extensions/5.extension-api.js +51 -0
- package/dist/src/extensions/50.extension-api.js +15 -0
- package/dist/src/extensions/51.extension-api.js +15 -0
- package/dist/src/extensions/52.extension-api.js +15 -0
- package/dist/src/extensions/53.extension-api.js +15 -0
- package/dist/src/extensions/54.extension-api.js +15 -0
- package/dist/src/extensions/55.extension-api.js +15 -0
- package/dist/src/extensions/56.extension-api.js +15 -0
- package/dist/src/extensions/57.extension-api.js +15 -0
- package/dist/src/extensions/58.extension-api.js +15 -0
- package/dist/src/extensions/59.extension-api.js +15 -0
- package/dist/src/extensions/6.extension-api.js +27 -0
- package/dist/src/extensions/60.extension-api.js +15 -0
- package/dist/src/extensions/61.extension-api.js +15 -0
- package/dist/src/extensions/62.extension-api.js +15 -0
- package/dist/src/extensions/63.extension-api.js +15 -0
- package/dist/src/extensions/64.extension-api.js +15 -0
- package/dist/src/extensions/65.extension-api.js +15 -0
- package/dist/src/extensions/66.extension-api.js +15 -0
- package/dist/src/extensions/67.extension-api.js +15 -0
- package/dist/src/extensions/68.extension-api.js +15 -0
- package/dist/src/extensions/69.extension-api.js +15 -0
- package/dist/src/extensions/7.extension-api.js +15 -0
- package/dist/src/extensions/70.extension-api.js +15 -0
- package/dist/src/extensions/71.extension-api.js +15 -0
- package/dist/src/extensions/72.extension-api.js +15 -0
- package/dist/src/extensions/73.extension-api.js +15 -0
- package/dist/src/extensions/74.extension-api.js +15 -0
- package/dist/src/extensions/75.extension-api.js +15 -0
- package/dist/src/extensions/76.extension-api.js +15 -0
- package/dist/src/extensions/77.extension-api.js +15 -0
- package/dist/src/extensions/78.extension-api.js +15 -0
- package/dist/src/extensions/79.extension-api.js +15 -0
- package/dist/src/extensions/8.extension-api.js +15 -0
- package/dist/src/extensions/9.extension-api.js +15 -0
- package/dist/src/extensions/common-api/app.d.ts +2 -0
- package/dist/src/extensions/common-api/index.d.ts +1 -1
- package/dist/src/{common/utils/makeCss.d.ts → extensions/common-api/user-preferences.d.ts} +2 -7
- package/dist/src/extensions/extension-api.js +5869 -1677
- 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/catalog/catalog-entity-registry.d.ts +2 -2
- package/dist/src/main/cluster-manager.d.ts +2 -0
- package/dist/src/main/cluster.d.ts +5 -10
- package/dist/src/main/context-handler.d.ts +8 -5
- package/dist/src/main/extension-filesystem.d.ts +1 -0
- package/dist/src/main/index.d.ts +0 -1
- package/dist/src/main/kube-auth-proxy.d.ts +1 -8
- package/dist/src/main/kubectl.d.ts +1 -1
- package/dist/src/main/lens-proxy.d.ts +1 -1
- package/dist/src/main/prometheus/helm.d.ts +1 -1
- package/dist/src/main/prometheus/lens.d.ts +1 -1
- package/dist/src/main/prometheus/operator.d.ts +1 -1
- package/dist/src/main/prometheus/provider-registry.d.ts +2 -1
- package/dist/src/main/prometheus/stacklight.d.ts +1 -1
- package/dist/src/main/proxy-functions/kube-api-request.d.ts +1 -1
- package/dist/src/main/proxy-functions/shell-api-request.d.ts +14 -0
- package/dist/src/main/proxy-functions/types.d.ts +2 -0
- package/dist/src/main/shell-session/node-shell-session.d.ts +4 -4
- package/dist/src/main/shell-session/shell-session.d.ts +95 -8
- package/dist/src/main/utils/shell-env.d.ts +1 -3
- package/dist/src/migrations/user-store/index.d.ts +1 -1
- package/dist/src/preload.d.ts +1 -1
- package/dist/src/renderer/api/terminal-api.d.ts +33 -20
- package/dist/src/renderer/api/websocket-api.d.ts +55 -32
- 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/+add-cluster/add-cluster.d.ts +0 -1
- package/dist/src/renderer/components/+apps-helm-charts/helm-chart-details.d.ts +3 -3
- package/dist/src/renderer/components/+catalog/catalog-add-button.d.ts +7 -1
- package/dist/src/renderer/components/+catalog/catalog.d.ts +0 -1
- package/dist/src/renderer/components/+user-management/+cluster-role-bindings/__tests__/dialog.test.d.ts +21 -0
- 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-deployments/deployment-scale-dialog.d.ts +1 -0
- package/dist/src/renderer/components/+workloads-overview/overview.d.ts +3 -0
- package/dist/src/renderer/components/+workloads-pods/pod-details-affinities.d.ts +1 -2
- package/dist/src/renderer/components/+workloads-replicasets/replicaset-scale-dialog.d.ts +1 -0
- package/dist/src/renderer/components/+workloads-statefulsets/statefulset-scale-dialog.d.ts +1 -0
- package/dist/src/renderer/components/animate/animate.d.ts +3 -2
- package/dist/src/renderer/components/badge/badge.d.ts +1 -0
- package/dist/src/renderer/components/cluster-manager/cluster-status.d.ts +6 -7
- package/dist/src/renderer/components/cluster-manager/lens-views.d.ts +12 -8
- package/dist/src/renderer/components/cluster-settings/components/__tests__/cluster-local-terminal-settings.test.d.ts +21 -0
- package/dist/src/renderer/components/cluster-settings/components/{cluster-home-dir-setting.d.ts → cluster-local-terminal-settings.d.ts} +1 -12
- package/dist/src/renderer/components/cluster-settings/components/index.d.ts +1 -1
- package/dist/src/renderer/components/dialog/dialog.d.ts +1 -0
- package/dist/src/renderer/components/dock/create-resource.d.ts +2 -2
- package/dist/src/renderer/components/dock/dock.store.d.ts +20 -2
- package/dist/src/renderer/components/dock/edit-resource.d.ts +3 -3
- package/dist/src/renderer/components/dock/editor-panel.d.ts +11 -17
- package/dist/src/renderer/components/dock/install-chart.d.ts +6 -5
- package/dist/src/renderer/components/dock/terminal-window.d.ts +2 -3
- package/dist/src/renderer/components/dock/terminal.d.ts +7 -11
- package/dist/src/renderer/components/dock/upgrade-chart.d.ts +2 -1
- package/dist/src/renderer/components/drawer/drawer.d.ts +1 -0
- 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 +4 -0
- package/dist/src/renderer/components/kubeconfig-dialog/kubeconfig-dialog.d.ts +0 -1
- package/dist/src/renderer/components/layout/__tests__/sidebar-cluster.test.d.ts +21 -0
- package/dist/src/renderer/components/layout/sidebar-cluster.d.ts +24 -0
- package/dist/src/renderer/components/layout/sidebar.d.ts +2 -5
- package/dist/src/renderer/components/list/list.d.ts +1 -1
- package/dist/src/renderer/components/menu/menu.d.ts +1 -0
- package/dist/src/renderer/components/monaco-editor/index.d.ts +23 -0
- package/dist/src/renderer/components/monaco-editor/monaco-editor.d.ts +93 -0
- package/dist/src/renderer/components/monaco-editor/monaco-themes.d.ts +29 -0
- package/dist/src/renderer/components/monaco-editor/monaco-validators.d.ts +9 -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/port-forward/index.d.ts +1 -0
- package/dist/src/renderer/port-forward/port-forward-notify.d.ts +21 -0
- package/dist/src/renderer/{lens-app.d.ts → root-frame.d.ts} +4 -2
- package/dist/src/renderer/theme.store.d.ts +4 -15
- package/package.json +1 -1
- package/dist/src/renderer/components/dock/monaco-model-manager.d.ts +0 -42
|
@@ -19,28 +19,24 @@
|
|
|
19
19
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
20
20
|
*/
|
|
21
21
|
/// <reference types="lodash" />
|
|
22
|
-
import { Terminal as XTerm } from "xterm";
|
|
23
|
-
import { FitAddon } from "xterm-addon-fit";
|
|
24
22
|
import { TabId } from "./dock.store";
|
|
25
|
-
import
|
|
23
|
+
import { TerminalApi } from "../../api/terminal-api";
|
|
26
24
|
export declare class Terminal {
|
|
27
25
|
tabId: TabId;
|
|
28
26
|
protected api: TerminalApi;
|
|
29
|
-
static spawningPool:
|
|
30
|
-
static init(): void;
|
|
27
|
+
static readonly spawningPool: HTMLDivElement;
|
|
31
28
|
static preloadFonts(): Promise<void>;
|
|
32
|
-
xterm
|
|
33
|
-
fitAddon
|
|
34
|
-
scrollPos
|
|
35
|
-
|
|
29
|
+
private xterm;
|
|
30
|
+
private readonly fitAddon;
|
|
31
|
+
private scrollPos;
|
|
32
|
+
private disposer;
|
|
36
33
|
protected setTheme(colors: Record<string, string>): void;
|
|
37
34
|
get elem(): HTMLElement;
|
|
38
35
|
get viewport(): Element;
|
|
39
|
-
constructor(tabId: TabId, api: TerminalApi);
|
|
40
36
|
get isActive(): boolean;
|
|
41
37
|
attachTo(parentElem: HTMLElement): void;
|
|
42
38
|
detach(): void;
|
|
43
|
-
|
|
39
|
+
constructor(tabId: TabId, api: TerminalApi);
|
|
44
40
|
destroy(): void;
|
|
45
41
|
fit: () => void;
|
|
46
42
|
fitLazy: import("lodash").DebouncedFunc<() => void>;
|
|
@@ -38,7 +38,8 @@ export declare class UpgradeChart extends React.Component<Props> {
|
|
|
38
38
|
get release(): HelmRelease;
|
|
39
39
|
get value(): string;
|
|
40
40
|
loadVersions(): Promise<void>;
|
|
41
|
-
onChange: (value: string
|
|
41
|
+
onChange: (value: string) => void;
|
|
42
|
+
onError: (error: Error | string) => void;
|
|
42
43
|
upgrade: () => Promise<JSX.Element>;
|
|
43
44
|
formatVersionLabel: ({ value }: SelectOption<IChartVersion>) => string;
|
|
44
45
|
render(): JSX.Element;
|
|
@@ -46,6 +46,7 @@ export declare class Drawer extends React.Component<DrawerProps> {
|
|
|
46
46
|
state: State;
|
|
47
47
|
componentDidMount(): void;
|
|
48
48
|
componentWillUnmount(): void;
|
|
49
|
+
fixUpTripleClick: (ev: MouseEvent) => void;
|
|
49
50
|
saveScrollPos: () => void;
|
|
50
51
|
restoreScrollPos: () => void;
|
|
51
52
|
onEscapeKey: (evt: KeyboardEvent) => void;
|
|
@@ -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";
|
|
@@ -25,11 +26,14 @@ import type { KubeObjectStore } from "../../../common/k8s-api/kube-object.store"
|
|
|
25
26
|
export interface KubeObjectListLayoutProps<K extends KubeObject> extends ItemListLayoutProps<K> {
|
|
26
27
|
store: KubeObjectStore<K>;
|
|
27
28
|
dependentStores?: KubeObjectStore<KubeObject>[];
|
|
29
|
+
subscribeStores?: boolean;
|
|
28
30
|
}
|
|
29
31
|
export declare class KubeObjectListLayout<K extends KubeObject> extends React.Component<KubeObjectListLayoutProps<K>> {
|
|
30
32
|
static defaultProps: object;
|
|
31
33
|
constructor(props: KubeObjectListLayoutProps<K>);
|
|
34
|
+
loadErrors: string[];
|
|
32
35
|
get selectedItem(): K;
|
|
33
36
|
componentDidMount(): void;
|
|
37
|
+
renderLoadErrors(): JSX.Element;
|
|
34
38
|
render(): JSX.Element;
|
|
35
39
|
}
|
|
@@ -18,7 +18,6 @@
|
|
|
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 "./kubeconfig-dialog.scss";
|
|
22
21
|
import React from "react";
|
|
23
22
|
import type { ServiceAccount } from "../../../common/k8s-api/endpoints";
|
|
24
23
|
import { DialogProps } from "../dialog";
|
|
@@ -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
|
+
import "@testing-library/jest-dom/extend-expect";
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
import type { CatalogEntity } from "../../api/catalog-entity";
|
|
22
|
+
export declare function SidebarCluster({ clusterEntity }: {
|
|
23
|
+
clusterEntity: CatalogEntity;
|
|
24
|
+
}): JSX.Element;
|
|
@@ -26,15 +26,12 @@ interface Props {
|
|
|
26
26
|
}
|
|
27
27
|
export declare class Sidebar extends React.Component<Props> {
|
|
28
28
|
static displayName: string;
|
|
29
|
-
|
|
30
|
-
constructor(props: Props);
|
|
31
|
-
componentDidMount(): Promise<void>;
|
|
29
|
+
componentDidMount(): void;
|
|
32
30
|
renderCustomResources(): JSX.Element | JSX.Element[];
|
|
33
31
|
renderTreeFromTabRoutes(tabRoutes?: TabLayoutRoute[]): React.ReactNode;
|
|
34
32
|
getTabLayoutRoutes(menu: ClusterPageMenuRegistration): TabLayoutRoute[];
|
|
35
33
|
renderRegisteredMenus(): JSX.Element[];
|
|
36
|
-
|
|
37
|
-
get clusterEntity(): import("../../../common/catalog").CatalogEntity<import("../../../common/catalog").CatalogEntityMetadata, import("../../../common/catalog").CatalogEntityStatus, import("../../../common/catalog").CatalogEntitySpec>;
|
|
34
|
+
get clusterEntity(): import("../../api/catalog-entity").CatalogEntity<import("../../../common/catalog").CatalogEntityMetadata, import("../../../common/catalog").CatalogEntityStatus, import("../../../common/catalog").CatalogEntitySpec>;
|
|
38
35
|
render(): JSX.Element;
|
|
39
36
|
}
|
|
40
37
|
export {};
|
|
@@ -26,5 +26,5 @@ interface Props extends UseTableOptions<any> {
|
|
|
26
26
|
filters: SearchFilter[];
|
|
27
27
|
title?: React.ReactNode;
|
|
28
28
|
}
|
|
29
|
-
export declare function List({ columns, data, title, items, filters
|
|
29
|
+
export declare function List({ columns, data, title, items, filters }: Props): JSX.Element;
|
|
30
30
|
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
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 * from "./monaco-editor";
|
|
22
|
+
export * from "./monaco-validators";
|
|
23
|
+
export * from "./monaco-themes";
|
|
@@ -0,0 +1,93 @@
|
|
|
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
|
+
/// <reference types="lodash" />
|
|
22
|
+
import React from "react";
|
|
23
|
+
import { editor, Uri } from "monaco-editor";
|
|
24
|
+
import { MonacoTheme } from "./index";
|
|
25
|
+
export declare type MonacoEditorId = string;
|
|
26
|
+
export interface MonacoEditorProps {
|
|
27
|
+
id?: MonacoEditorId;
|
|
28
|
+
className?: string;
|
|
29
|
+
style?: React.CSSProperties;
|
|
30
|
+
autoFocus?: boolean;
|
|
31
|
+
readOnly?: boolean;
|
|
32
|
+
theme?: MonacoTheme;
|
|
33
|
+
language?: "yaml" | "json";
|
|
34
|
+
options?: Partial<editor.IStandaloneEditorConstructionOptions>;
|
|
35
|
+
value?: string;
|
|
36
|
+
onChange?(value: string, evt: editor.IModelContentChangedEvent): void;
|
|
37
|
+
onError?(error?: Error | unknown): void;
|
|
38
|
+
onDidLayoutChange?(info: editor.EditorLayoutInfo): void;
|
|
39
|
+
onDidContentSizeChange?(evt: editor.IContentSizeChangedEvent): void;
|
|
40
|
+
onModelChange?(model: editor.ITextModel, prev?: editor.ITextModel): void;
|
|
41
|
+
}
|
|
42
|
+
export declare const defaultEditorProps: Partial<MonacoEditorProps>;
|
|
43
|
+
export declare class MonacoEditor extends React.Component<MonacoEditorProps> {
|
|
44
|
+
static defaultProps: object;
|
|
45
|
+
static viewStates: WeakMap<Uri, editor.ICodeEditorViewState>;
|
|
46
|
+
static createUri(id: MonacoEditorId): Uri;
|
|
47
|
+
staticId: string;
|
|
48
|
+
dispose: import("../../utils").ExtendableDisposer;
|
|
49
|
+
logger: Console;
|
|
50
|
+
containerElem: HTMLElement;
|
|
51
|
+
editor: editor.IStandaloneCodeEditor;
|
|
52
|
+
dimensions: {
|
|
53
|
+
width?: number;
|
|
54
|
+
height?: number;
|
|
55
|
+
};
|
|
56
|
+
unmounting: boolean;
|
|
57
|
+
constructor(props: MonacoEditorProps);
|
|
58
|
+
get id(): string;
|
|
59
|
+
get model(): editor.ITextModel;
|
|
60
|
+
get options(): editor.IStandaloneEditorConstructionOptions;
|
|
61
|
+
get logMetadata(): {
|
|
62
|
+
editorId: string;
|
|
63
|
+
model: editor.ITextModel;
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* Monitor editor's dom container element box-size and sync with monaco's dimensions
|
|
67
|
+
* @private
|
|
68
|
+
*/
|
|
69
|
+
private bindResizeObserver;
|
|
70
|
+
onModelChange: (model: editor.ITextModel, oldModel?: editor.ITextModel) => void;
|
|
71
|
+
/**
|
|
72
|
+
* Save current view-model state in the editor.
|
|
73
|
+
* This will allow restore cursor position, selected text, etc.
|
|
74
|
+
* @param {editor.ITextModel} model
|
|
75
|
+
*/
|
|
76
|
+
private saveViewState;
|
|
77
|
+
private restoreViewState;
|
|
78
|
+
componentDidMount(): void;
|
|
79
|
+
componentWillUnmount(): void;
|
|
80
|
+
private createEditor;
|
|
81
|
+
destroy(): void;
|
|
82
|
+
setDimensions(width: number, height: number): void;
|
|
83
|
+
setValue(value?: string): void;
|
|
84
|
+
getValue(opts?: {
|
|
85
|
+
preserveBOM: boolean;
|
|
86
|
+
lineEnding: string;
|
|
87
|
+
}): string;
|
|
88
|
+
focus(): void;
|
|
89
|
+
validate: (value?: string) => void;
|
|
90
|
+
validateLazy: import("lodash").DebouncedFunc<(value?: string) => void>;
|
|
91
|
+
bindRef: (elem: HTMLElement) => HTMLElement;
|
|
92
|
+
render(): JSX.Element;
|
|
93
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
+
import { editor } from "monaco-editor";
|
|
22
|
+
export declare type MonacoTheme = "vs" | "vs-dark" | "hc-black" | MonacoCustomTheme;
|
|
23
|
+
export declare type MonacoCustomTheme = "clouds-midnight";
|
|
24
|
+
export interface MonacoThemeData extends editor.IStandaloneThemeData {
|
|
25
|
+
name?: string;
|
|
26
|
+
}
|
|
27
|
+
export declare const customThemes: Partial<Record<MonacoCustomTheme, MonacoThemeData>>;
|
|
28
|
+
export declare function registerCustomThemes(): void;
|
|
29
|
+
export declare function loadCustomTheme(name: string): Promise<MonacoThemeData>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface MonacoValidator {
|
|
2
|
+
(value: string): void;
|
|
3
|
+
}
|
|
4
|
+
export declare function yamlValidator(value: string): void;
|
|
5
|
+
export declare function jsonValidator(value: string): void;
|
|
6
|
+
export declare const monacoValidators: {
|
|
7
|
+
yaml: typeof yamlValidator;
|
|
8
|
+
json: typeof jsonValidator;
|
|
9
|
+
};
|
|
@@ -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;
|
|
@@ -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 declare function aboutPortForwarding(): void;
|
|
@@ -18,10 +18,12 @@
|
|
|
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 "../common/system-ca";
|
|
22
21
|
import React from "react";
|
|
23
|
-
export declare class
|
|
22
|
+
export declare class RootFrame extends React.Component {
|
|
23
|
+
static readonly logPrefix = "[ROOT-FRAME]:";
|
|
24
|
+
static displayName: string;
|
|
24
25
|
static init(rootElem: HTMLElement): Promise<void>;
|
|
26
|
+
constructor(props: {});
|
|
25
27
|
componentDidMount(): void;
|
|
26
28
|
render(): JSX.Element;
|
|
27
29
|
}
|
|
@@ -20,31 +20,20 @@
|
|
|
20
20
|
*/
|
|
21
21
|
import { Singleton } from "./utils";
|
|
22
22
|
import type { SelectOption } from "./components/select";
|
|
23
|
+
import type { MonacoEditorProps } from "./components/monaco-editor";
|
|
23
24
|
export declare type ThemeId = string;
|
|
24
|
-
export declare enum MonacoTheme {
|
|
25
|
-
DARK = "clouds-midnight",
|
|
26
|
-
LIGHT = "vs"
|
|
27
|
-
}
|
|
28
|
-
export declare enum ThemeType {
|
|
29
|
-
DARK = "dark",
|
|
30
|
-
LIGHT = "light"
|
|
31
|
-
}
|
|
32
25
|
export interface Theme {
|
|
33
|
-
type: ThemeType;
|
|
34
26
|
name: string;
|
|
27
|
+
type: "dark" | "light";
|
|
35
28
|
colors: Record<string, string>;
|
|
36
29
|
description: string;
|
|
37
30
|
author: string;
|
|
38
|
-
monacoTheme:
|
|
39
|
-
}
|
|
40
|
-
export interface ThemeItems extends Theme {
|
|
41
|
-
id: string;
|
|
31
|
+
monacoTheme: MonacoEditorProps["theme"];
|
|
42
32
|
}
|
|
43
33
|
export declare class ThemeStore extends Singleton {
|
|
44
34
|
static readonly defaultTheme = "lens-dark";
|
|
45
35
|
protected styles: HTMLStyleElement;
|
|
46
|
-
private
|
|
47
|
-
get themes(): ThemeItems[];
|
|
36
|
+
private themes;
|
|
48
37
|
get activeThemeId(): string;
|
|
49
38
|
get activeTheme(): Theme;
|
|
50
39
|
get themeOptions(): SelectOption<string>[];
|
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
|
|
5
|
+
"version": "5.3.0",
|
|
6
6
|
"copyright": "© 2021 OpenLens Authors",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"main": "dist/src/extensions/extension-api.js",
|
|
@@ -1,42 +0,0 @@
|
|
|
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
|
-
import { monaco } from "react-monaco-editor";
|
|
22
|
-
export declare type TabId = string;
|
|
23
|
-
interface ModelEntry {
|
|
24
|
-
id?: TabId;
|
|
25
|
-
modelUri?: monaco.Uri;
|
|
26
|
-
lang?: string;
|
|
27
|
-
}
|
|
28
|
-
export interface ModelsState {
|
|
29
|
-
models: ModelEntry[];
|
|
30
|
-
}
|
|
31
|
-
export declare class MonacoModelsManager implements ModelsState {
|
|
32
|
-
models: ModelEntry[];
|
|
33
|
-
addModel(tabId: string, { value, lang }?: {
|
|
34
|
-
value?: string;
|
|
35
|
-
lang?: string;
|
|
36
|
-
}): void;
|
|
37
|
-
getModel(tabId: string): monaco.editor.ITextModel;
|
|
38
|
-
getUri(tabId: string): monaco.Uri;
|
|
39
|
-
removeModel(tabId: string): void;
|
|
40
|
-
}
|
|
41
|
-
export declare const monacoModelsManager: MonacoModelsManager;
|
|
42
|
-
export {};
|