@k8slens/extensions 5.3.1-git.7ce4a87ac8.0 → 5.3.1-git.9ce91884c2.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/daemon-set.api.d.ts +2 -5
- package/dist/src/common/k8s-api/endpoints/deployment.api.d.ts +2 -5
- package/dist/src/common/k8s-api/endpoints/job.api.d.ts +2 -5
- package/dist/src/common/k8s-api/endpoints/network-policy.api.d.ts +72 -32
- package/dist/src/common/k8s-api/endpoints/nodes.api.d.ts +6 -6
- package/dist/src/common/k8s-api/endpoints/persistent-volume-claims.api.d.ts +3 -16
- package/dist/src/common/k8s-api/endpoints/poddisruptionbudget.api.d.ts +2 -6
- package/dist/src/common/k8s-api/endpoints/replica-set.api.d.ts +2 -5
- package/dist/src/common/k8s-api/endpoints/stateful-set.api.d.ts +2 -5
- package/dist/src/common/k8s-api/kube-object.d.ts +22 -0
- package/dist/src/extensions/extension-api.js +10 -10
- package/dist/src/main/context-handler.d.ts +8 -1
- package/dist/src/renderer/components/+network-policies/__tests__/network-policy-details.test.d.ts +21 -0
- package/dist/src/renderer/components/+network-policies/network-policy-details.d.ts +5 -4
- package/dist/src/renderer/components/+nodes/nodes.d.ts +2 -1
- package/dist/src/renderer/components/avatar/__tests__/avatar.test.d.ts +21 -0
- package/dist/src/renderer/components/avatar/avatar.d.ts +7 -8
- package/dist/src/renderer/components/avatar/index.d.ts +21 -0
- package/dist/src/renderer/components/hotbar/hotbar-entity-icon.d.ts +3 -3
- package/dist/src/renderer/components/hotbar/hotbar-icon.d.ts +3 -10
- package/package.json +1 -1
|
@@ -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 {};
|
package/dist/src/renderer/components/+network-policies/__tests__/network-policy-details.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 {};
|
|
@@ -18,15 +18,16 @@
|
|
|
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 "./network-policy-details.scss";
|
|
22
21
|
import React from "react";
|
|
23
|
-
import {
|
|
22
|
+
import { IPolicyIpBlock, IPolicySelector, NetworkPolicy, NetworkPolicyPeer, NetworkPolicyPort } from "../../../common/k8s-api/endpoints/network-policy.api";
|
|
24
23
|
import type { KubeObjectDetailsProps } from "../kube-object-details";
|
|
25
24
|
interface Props extends KubeObjectDetailsProps<NetworkPolicy> {
|
|
26
25
|
}
|
|
27
26
|
export declare class NetworkPolicyDetails extends React.Component<Props> {
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
renderIPolicyIpBlock(ipBlock: IPolicyIpBlock | undefined): JSX.Element;
|
|
28
|
+
renderIPolicySelector(name: string, selector: IPolicySelector | undefined): JSX.Element;
|
|
29
|
+
renderNetworkPolicyPeers(name: string, peers: NetworkPolicyPeer[] | undefined): JSX.Element;
|
|
30
|
+
renderNetworkPolicyPorts(ports: NetworkPolicyPort[] | undefined): JSX.Element;
|
|
30
31
|
render(): JSX.Element;
|
|
31
32
|
}
|
|
32
33
|
export {};
|
|
@@ -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
|
}
|
|
@@ -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";
|
|
@@ -18,16 +18,15 @@
|
|
|
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
|
-
|
|
23
|
-
interface Props extends DOMAttributes<HTMLElement>, Partial<AvatarTypeMap> {
|
|
21
|
+
import { HTMLAttributes, ImgHTMLAttributes } from "react";
|
|
22
|
+
export interface AvatarProps extends HTMLAttributes<HTMLElement> {
|
|
24
23
|
title: string;
|
|
25
24
|
colorHash?: string;
|
|
26
|
-
|
|
27
|
-
height?: number;
|
|
25
|
+
size?: number;
|
|
28
26
|
src?: string;
|
|
29
|
-
className?: string;
|
|
30
27
|
background?: string;
|
|
28
|
+
variant?: "circle" | "rounded" | "square";
|
|
29
|
+
imgProps?: ImgHTMLAttributes<HTMLImageElement>;
|
|
30
|
+
disabled?: boolean;
|
|
31
31
|
}
|
|
32
|
-
export declare function Avatar(props:
|
|
33
|
-
export {};
|
|
32
|
+
export declare function Avatar(props: AvatarProps): JSX.Element;
|
|
@@ -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 * from "./avatar";
|
|
@@ -18,13 +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 React, {
|
|
21
|
+
import React, { HTMLAttributes } from "react";
|
|
22
22
|
import type { CatalogEntity } from "../../../common/catalog";
|
|
23
23
|
import { IClassName } from "../../utils";
|
|
24
|
-
interface Props extends
|
|
24
|
+
interface Props extends HTMLAttributes<HTMLElement> {
|
|
25
25
|
entity: CatalogEntity;
|
|
26
26
|
index: number;
|
|
27
|
-
className?: IClassName;
|
|
28
27
|
errorClass?: IClassName;
|
|
29
28
|
add: (item: CatalogEntity, index: number) => void;
|
|
30
29
|
remove: (uid: string) => void;
|
|
@@ -36,6 +35,7 @@ export declare class HotbarEntityIcon extends React.Component<Props> {
|
|
|
36
35
|
get kindIcon(): JSX.Element;
|
|
37
36
|
get ledIcon(): JSX.Element;
|
|
38
37
|
isActive(item: CatalogEntity): boolean;
|
|
38
|
+
onMenuOpen(): Promise<void>;
|
|
39
39
|
render(): JSX.Element;
|
|
40
40
|
}
|
|
41
41
|
export {};
|
|
@@ -18,23 +18,16 @@
|
|
|
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 "./hotbar-icon.scss";
|
|
22
|
-
import { DOMAttributes } from "react";
|
|
23
21
|
import type { CatalogEntityContextMenu } from "../../../common/catalog";
|
|
24
|
-
import {
|
|
25
|
-
export interface
|
|
22
|
+
import { AvatarProps } from "../avatar";
|
|
23
|
+
export interface Props extends AvatarProps {
|
|
26
24
|
uid: string;
|
|
27
|
-
title: string;
|
|
28
25
|
source: string;
|
|
29
|
-
src?: string;
|
|
30
26
|
material?: string;
|
|
31
27
|
onMenuOpen?: () => void;
|
|
32
|
-
className?: IClassName;
|
|
33
28
|
active?: boolean;
|
|
34
29
|
menuItems?: CatalogEntityContextMenu[];
|
|
35
30
|
disabled?: boolean;
|
|
36
|
-
size?: number;
|
|
37
|
-
background?: string;
|
|
38
31
|
tooltip?: string;
|
|
39
32
|
}
|
|
40
|
-
export declare const HotbarIcon: ({ menuItems, size, tooltip, ...props }:
|
|
33
|
+
export declare const HotbarIcon: ({ menuItems, size, tooltip, ...props }: Props) => JSX.Element;
|
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.9ce91884c2.0",
|
|
6
6
|
"copyright": "© 2021 OpenLens Authors",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"main": "dist/src/extensions/extension-api.js",
|