@k8slens/extensions 6.0.1-git.723ae25801.0 → 6.0.1-git.7ad7c89061.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/behaviours/pod-logs/download-logs.test.d.ts +5 -0
- package/dist/src/common/vars/package-json.injectable.d.ts +3 -0
- package/dist/src/extensions/extension-api.js +38 -214
- package/dist/src/extensions/renderer-api/theming.d.ts +7 -1
- package/dist/src/features/cluster/workload-overview.test.d.ts +5 -0
- package/dist/src/main/prometheus/helm.d.ts +3 -3
- package/dist/src/renderer/components/+helm-releases/release-details/release-details-model/release-details-model.injectable.d.ts +3 -3
- package/dist/src/renderer/components/+workloads-overview/overview-workload-status.d.ts +19 -1
- package/dist/src/renderer/components/+workloads-overview/workloads/workload-injection-token.d.ts +2 -1
- package/dist/src/renderer/components/chart/chart.d.ts +1 -0
- package/dist/src/renderer/components/dock/logs/controls.d.ts +1 -3
- package/dist/src/renderer/components/dock/logs/download-all-logs.injectable.d.ts +4 -0
- package/dist/src/renderer/components/dock/logs/download-logs-dropdown.d.ts +10 -0
- package/dist/src/renderer/components/dock/logs/download-logs.injectable.d.ts +2 -0
- package/dist/src/renderer/components/dock/logs/get-random-id-for-pod-logs-tab.injectable.d.ts +2 -0
- package/dist/src/renderer/components/dock/logs/logs-view-model.d.ts +6 -1
- package/dist/src/renderer/components/dropdown/dropdown.d.ts +11 -0
- package/dist/src/renderer/components/switch/form-switcher.d.ts +9 -2
- package/dist/src/renderer/components/switch/switcher.d.ts +7 -8
- package/dist/src/renderer/components/test-utils/get-application-builder.d.ts +1 -0
- package/dist/src/renderer/themes/active.injectable.d.ts +2 -0
- package/dist/src/renderer/themes/lens-dark.d.ts +2 -2
- package/dist/src/renderer/themes/lens-light.d.ts +2 -2
- package/dist/src/renderer/themes/store.d.ts +4 -4
- package/package.json +1 -1
|
@@ -2,4 +2,10 @@
|
|
|
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
|
-
|
|
5
|
+
import type { LensTheme } from "../../renderer/themes/store";
|
|
6
|
+
export declare const activeTheme: import("mobx").IComputedValue<LensTheme>;
|
|
7
|
+
/**
|
|
8
|
+
* @deprecated This hides the reactivity of active theme, use {@link activeTheme} instead
|
|
9
|
+
*/
|
|
10
|
+
export declare function getActiveTheme(): LensTheme;
|
|
11
|
+
export type { LensTheme };
|
|
@@ -2,13 +2,13 @@
|
|
|
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
|
-
import { PrometheusLens } from "./lens";
|
|
6
5
|
import type { CoreV1Api } from "@kubernetes/client-node";
|
|
7
|
-
import type
|
|
8
|
-
export declare class PrometheusHelm extends
|
|
6
|
+
import { PrometheusProvider, type PrometheusService } from "./provider-registry";
|
|
7
|
+
export declare class PrometheusHelm extends PrometheusProvider {
|
|
9
8
|
readonly id: string;
|
|
10
9
|
readonly name: string;
|
|
11
10
|
readonly rateAccuracy: string;
|
|
12
11
|
readonly isConfigurable: boolean;
|
|
13
12
|
getPrometheusService(client: CoreV1Api): Promise<PrometheusService>;
|
|
13
|
+
getQuery(opts: Record<string, string>, queryName: string): string;
|
|
14
14
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { IObservableValue } from "mobx";
|
|
1
|
+
import type { IComputedValue, IObservableValue } from "mobx";
|
|
2
2
|
import type { TargetHelmRelease } from "../target-helm-release.injectable";
|
|
3
3
|
import type { CallForHelmRelease } from "./call-for-helm-release/call-for-helm-release.injectable";
|
|
4
|
-
import type {
|
|
4
|
+
import type { LensTheme } from "../../../../themes/store";
|
|
5
5
|
import type { CallForHelmReleaseConfiguration } from "./call-for-helm-release-configuration/call-for-helm-release-configuration.injectable";
|
|
6
6
|
import type { GetResourceDetailsUrl } from "./get-resource-details-url.injectable";
|
|
7
7
|
import type { CallForHelmReleaseUpdate } from "../../update-release/call-for-helm-release-update/call-for-helm-release-update.injectable";
|
|
@@ -25,7 +25,7 @@ export interface ConfigurationInput {
|
|
|
25
25
|
interface Dependencies {
|
|
26
26
|
callForHelmRelease: CallForHelmRelease;
|
|
27
27
|
targetRelease: TargetHelmRelease;
|
|
28
|
-
|
|
28
|
+
activeTheme: IComputedValue<LensTheme>;
|
|
29
29
|
callForHelmReleaseConfiguration: CallForHelmReleaseConfiguration;
|
|
30
30
|
getResourceDetailsUrl: GetResourceDetailsUrl;
|
|
31
31
|
updateRelease: CallForHelmReleaseUpdate;
|
|
@@ -4,7 +4,25 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import "./overview-workload-status.scss";
|
|
6
6
|
import React from "react";
|
|
7
|
+
import type { PascalCase } from "type-fest";
|
|
8
|
+
import type { Workload } from "./workloads/workload-injection-token";
|
|
9
|
+
export declare type LowercaseOrPascalCase<T extends string> = Lowercase<T> | PascalCase<T>;
|
|
10
|
+
export declare type WorkloadStatus = Partial<Record<LowercaseOrPascalCase<keyof typeof statusBackgroundColorMapping>, number>>;
|
|
7
11
|
export interface OverviewWorkloadStatusProps {
|
|
8
|
-
|
|
12
|
+
workload: Workload;
|
|
9
13
|
}
|
|
14
|
+
declare const statusBackgroundColorMapping: {
|
|
15
|
+
readonly running: "colorOk";
|
|
16
|
+
readonly scheduled: "colorOk";
|
|
17
|
+
readonly pending: "colorWarning";
|
|
18
|
+
readonly suspended: "colorWarning";
|
|
19
|
+
readonly evicted: "colorError";
|
|
20
|
+
readonly succeeded: "colorSuccess";
|
|
21
|
+
readonly failed: "colorError";
|
|
22
|
+
readonly terminated: "colorTerminated";
|
|
23
|
+
readonly terminating: "colorTerminated";
|
|
24
|
+
readonly unknown: "colorVague";
|
|
25
|
+
readonly complete: "colorSuccess";
|
|
26
|
+
};
|
|
10
27
|
export declare const OverviewWorkloadStatus: React.FunctionComponent<OverviewWorkloadStatusProps>;
|
|
28
|
+
export {};
|
package/dist/src/renderer/components/+workloads-overview/workloads/workload-injection-token.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { IComputedValue } from "mobx";
|
|
2
|
+
import type { WorkloadStatus } from "../overview-workload-status";
|
|
2
3
|
export interface Workload {
|
|
3
4
|
resourceName: string;
|
|
4
5
|
open: () => void;
|
|
5
6
|
amountOfItems: IComputedValue<number>;
|
|
6
|
-
status: IComputedValue<
|
|
7
|
+
status: IComputedValue<WorkloadStatus>;
|
|
7
8
|
title: string;
|
|
8
9
|
orderNumber: number;
|
|
9
10
|
}
|
|
@@ -2,10 +2,8 @@
|
|
|
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
|
-
import "./controls.scss";
|
|
6
|
-
import React from "react";
|
|
7
5
|
import type { LogTabViewModel } from "./logs-view-model";
|
|
8
6
|
export interface LogControlsProps {
|
|
9
7
|
model: LogTabViewModel;
|
|
10
8
|
}
|
|
11
|
-
export declare const LogControls:
|
|
9
|
+
export declare const LogControls: ({ model }: LogControlsProps) => JSX.Element | null;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { PodLogsQuery } from "../../../../common/k8s-api/endpoints";
|
|
2
|
+
import type { ResourceDescriptor } from "../../../../common/k8s-api/kube-api";
|
|
3
|
+
declare const downloadAllLogsInjectable: import("@ogre-tools/injectable").Injectable<(params: ResourceDescriptor, query: PodLogsQuery) => Promise<void>, unknown, void>;
|
|
4
|
+
export default downloadAllLogsInjectable;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) OpenLens Authors. All rights reserved.
|
|
3
|
+
* Licensed under MIT License. See LICENSE in root directory for more information.
|
|
4
|
+
*/
|
|
5
|
+
interface DownloadLogsDropdownProps {
|
|
6
|
+
downloadVisibleLogs: () => void;
|
|
7
|
+
downloadAllLogs: () => Promise<void> | undefined;
|
|
8
|
+
}
|
|
9
|
+
export declare function DownloadLogsDropdown({ downloadAllLogs, downloadVisibleLogs }: DownloadLogsDropdownProps): JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -6,10 +6,11 @@ import type { LogTabData } from "./tab-store";
|
|
|
6
6
|
import type { IComputedValue } from "mobx";
|
|
7
7
|
import type { TabId } from "../dock/store";
|
|
8
8
|
import type { SearchStore } from "../../../search-store/search-store";
|
|
9
|
-
import type { Pod } from "../../../../common/k8s-api/endpoints";
|
|
9
|
+
import type { Pod, PodLogsQuery } from "../../../../common/k8s-api/endpoints";
|
|
10
10
|
import type { GetPodById } from "../../+workloads-pods/get-pod-by-id.injectable";
|
|
11
11
|
import type { GetPodsByOwnerId } from "../../+workloads-pods/get-pods-by-owner-id.injectable";
|
|
12
12
|
import type { LoadLogs } from "./load-logs.injectable";
|
|
13
|
+
import type { ResourceDescriptor } from "../../../../common/k8s-api/kube-api";
|
|
13
14
|
export interface LogTabViewModelDependencies {
|
|
14
15
|
getLogs: (tabId: TabId) => string[];
|
|
15
16
|
getLogsWithoutTimestamps: (tabId: TabId) => string[];
|
|
@@ -23,6 +24,8 @@ export interface LogTabViewModelDependencies {
|
|
|
23
24
|
getPodById: GetPodById;
|
|
24
25
|
getPodsByOwnerId: GetPodsByOwnerId;
|
|
25
26
|
areLogsPresent: (tabId: TabId) => boolean;
|
|
27
|
+
downloadLogs: (filename: string, logs: string[]) => void;
|
|
28
|
+
downloadAllLogs: (params: ResourceDescriptor, query: PodLogsQuery) => Promise<void>;
|
|
26
29
|
searchStore: SearchStore;
|
|
27
30
|
}
|
|
28
31
|
export declare class LogTabViewModel {
|
|
@@ -42,4 +45,6 @@ export declare class LogTabViewModel {
|
|
|
42
45
|
reloadLogs: () => Promise<void>;
|
|
43
46
|
renameTab: (title: string) => void;
|
|
44
47
|
stopLoadingLogs: () => void;
|
|
48
|
+
downloadLogs: () => void;
|
|
49
|
+
downloadAllLogs: () => Promise<void> | undefined;
|
|
45
50
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) OpenLens Authors. All rights reserved.
|
|
3
|
+
* Licensed under MIT License. See LICENSE in root directory for more information.
|
|
4
|
+
*/
|
|
5
|
+
import type { HTMLAttributes } from "react";
|
|
6
|
+
import React from "react";
|
|
7
|
+
interface DropdownProps extends HTMLAttributes<HTMLDivElement> {
|
|
8
|
+
contentForToggle: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export declare function Dropdown(props: DropdownProps): JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -2,8 +2,15 @@
|
|
|
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
|
-
import
|
|
5
|
+
import React from "react";
|
|
6
|
+
interface FormControlLabelProps {
|
|
7
|
+
control: React.ReactElement<any, any>;
|
|
8
|
+
label: React.ReactNode;
|
|
9
|
+
}
|
|
6
10
|
/**
|
|
7
11
|
* @deprecated Use <Switch/> instead from "../switch.tsx".
|
|
8
12
|
*/
|
|
9
|
-
export declare function FormSwitch(props: FormControlLabelProps
|
|
13
|
+
export declare function FormSwitch(props: FormControlLabelProps & {
|
|
14
|
+
children?: React.ReactNode;
|
|
15
|
+
}): React.FunctionComponentElement<any>;
|
|
16
|
+
export {};
|
|
@@ -3,15 +3,14 @@
|
|
|
3
3
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
|
4
4
|
*/
|
|
5
5
|
import React from "react";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
export interface SwitcherProps {
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
checked?: boolean;
|
|
10
|
+
onChange?: (event: React.ChangeEvent<HTMLInputElement>, checked: boolean) => void;
|
|
11
|
+
name?: string;
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
14
|
* @deprecated Use <Switch/> instead from "../switch.tsx".
|
|
15
15
|
*/
|
|
16
|
-
export declare
|
|
17
|
-
export {};
|
|
16
|
+
export declare function Switcher({ disabled, checked, onChange, name, children }: SwitcherProps): JSX.Element;
|
|
@@ -2,6 +2,6 @@
|
|
|
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
|
-
import type {
|
|
6
|
-
declare const lensDarkTheme:
|
|
5
|
+
import type { LensTheme } from "./store";
|
|
6
|
+
declare const lensDarkTheme: LensTheme;
|
|
7
7
|
export default lensDarkTheme;
|
|
@@ -2,6 +2,6 @@
|
|
|
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
|
-
import type {
|
|
6
|
-
declare const lensLightTheme:
|
|
5
|
+
import type { LensTheme } from "./store";
|
|
6
|
+
declare const lensLightTheme: LensTheme;
|
|
7
7
|
export default lensLightTheme;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import type { MonacoTheme } from "../components/monaco-editor";
|
|
6
6
|
import type { IpcRenderer } from "electron";
|
|
7
7
|
export declare type ThemeId = string;
|
|
8
|
-
export interface
|
|
8
|
+
export interface LensTheme {
|
|
9
9
|
name: string;
|
|
10
10
|
type: "dark" | "light";
|
|
11
11
|
colors: Record<string, string>;
|
|
@@ -30,13 +30,13 @@ export declare class ThemeStore {
|
|
|
30
30
|
private get activeThemeId();
|
|
31
31
|
private get terminalThemeId();
|
|
32
32
|
private readonly defaultTheme;
|
|
33
|
-
get activeTheme():
|
|
33
|
+
get activeTheme(): LensTheme;
|
|
34
34
|
private get terminalColors();
|
|
35
35
|
get xtermColors(): Record<string, string>;
|
|
36
|
-
get themes(): import("type-fest/source/readonly-deep").ReadonlyMapDeep<string,
|
|
36
|
+
get themes(): import("type-fest/source/readonly-deep").ReadonlyMapDeep<string, LensTheme>;
|
|
37
37
|
constructor(dependencies: Dependencies);
|
|
38
38
|
init(): Promise<void>;
|
|
39
|
-
getThemeById(themeId: ThemeId):
|
|
39
|
+
getThemeById(themeId: ThemeId): LensTheme | undefined;
|
|
40
40
|
protected applyActiveTheme(): void;
|
|
41
41
|
}
|
|
42
42
|
export {};
|
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": "6.0.1-git.
|
|
5
|
+
"version": "6.0.1-git.7ad7c89061.0",
|
|
6
6
|
"copyright": "© 2022 OpenLens Authors",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"main": "dist/src/extensions/extension-api.js",
|