@k8slens/extensions 5.4.0-git.76f48df56b.0 → 5.4.0-git.81e6dc5d8e.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-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 +1 -0
- package/dist/src/extensions/common-api/registrations.d.ts +1 -1
- package/dist/src/extensions/extension-api.js +22 -10
- 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/cluster-manager.d.ts +20 -2
- package/dist/src/main/create-cluster/create-cluster.injectable.d.ts +1 -2
- package/dist/src/renderer/components/+catalog/custom-category-columns.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/item-object-list/content.d.ts +1 -1
- package/dist/src/renderer/components/item-object-list/list-layout.d.ts +1 -2
- 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/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
|
@@ -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;
|
|
@@ -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;
|
|
@@ -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;
|
|
@@ -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>>;
|
|
@@ -77,7 +76,7 @@ declare class NonInjectedItemListLayout<I extends ItemObject> extends React.Comp
|
|
|
77
76
|
private loadStores;
|
|
78
77
|
get showFilters(): boolean;
|
|
79
78
|
set showFilters(showFilters: boolean);
|
|
80
|
-
get filters(): Filter[];
|
|
79
|
+
get filters(): import("./page-filters.store").Filter[];
|
|
81
80
|
toggleFilters(): void;
|
|
82
81
|
get isReady(): boolean;
|
|
83
82
|
renderFilters(): JSX.Element;
|
|
@@ -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.81e6dc5d8e.0",
|
|
6
6
|
"copyright": "© 2021 OpenLens Authors",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"main": "dist/src/extensions/extension-api.js",
|
|
@@ -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 {};
|