@dovetail-v2/refine 0.0.66-pod-exec.0 → 0.1.0-test.1
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/{MonacoYamlDiffEditor-6b799b64.js → MonacoYamlDiffEditor-e737ae8d.js} +1 -1
- package/dist/{index-c07bed15.js → index-0c7bfb69.js} +5800 -19551
- package/dist/refine.js +162 -161
- package/dist/refine.umd.cjs +4780 -18531
- package/dist/style.css +11 -229
- package/lib/src/components/Form/FormModal.d.ts +0 -1
- package/lib/src/components/ListPage/index.d.ts +1 -0
- package/lib/src/components/ResourceFiledDisplays.d.ts +7 -0
- package/lib/src/components/ShowContent/fields.d.ts +7 -2
- package/lib/src/components/index.d.ts +1 -3
- package/lib/src/hooks/useEagleTable/columns.d.ts +6 -6
- package/lib/src/i18n.d.ts +26 -2
- package/lib/src/locales/en-US/index.d.ts +14 -1
- package/lib/src/locales/zh-CN/index.d.ts +12 -1
- package/lib/src/models/cronjob-model.d.ts +0 -1
- package/lib/src/models/daemonset-model.d.ts +0 -1
- package/lib/src/models/deployment-model.d.ts +0 -1
- package/lib/src/models/event-model.d.ts +0 -1
- package/lib/src/models/ingress-model.d.ts +0 -1
- package/lib/src/models/job-model.d.ts +0 -1
- package/lib/src/models/network-policy-model.d.ts +0 -1
- package/lib/src/models/node-model.d.ts +0 -1
- package/lib/src/models/persistent-volume-claim.d.ts +0 -1
- package/lib/src/models/persistent-volume.d.ts +0 -1
- package/lib/src/models/pod-metrics-model.d.ts +0 -1
- package/lib/src/models/pod-model.d.ts +0 -1
- package/lib/src/models/resource-model.d.ts +1 -1
- package/lib/src/models/service-model.d.ts +0 -1
- package/lib/src/models/statefulset-model.d.ts +0 -1
- package/lib/src/models/storage-class.d.ts +0 -1
- package/lib/src/models/workload-base-model.d.ts +0 -1
- package/lib/src/models/workload-model.d.ts +0 -1
- package/lib/src/pages/persistentvolumeclaims/index.d.ts +4 -0
- package/lib/src/pages/persistentvolumes/index.d.ts +3 -18
- package/package.json +5 -14
- package/lib/src/components/Form/KeyValueListWidget.d.ts +0 -6
- package/lib/src/components/Form/MetadataForm.d.ts +0 -2
- package/lib/src/components/Form/NameInputWidget.d.ts +0 -51
- package/lib/src/components/Form/NamespaceSelectWidget.d.ts +0 -9
- package/lib/src/components/Form/widget.d.ts +0 -5
- package/lib/src/components/FormModal/index.d.ts +0 -10
- package/lib/src/components/KeyValueData/index.d.ts +0 -6
- package/lib/src/components/ModalContextProvider/index.d.ts +0 -12
- package/lib/src/components/NetworkPolicyRulesTable/NetworkPolicyRulesTable.d.ts +0 -8
- package/lib/src/components/NetworkPolicyRulesTable/index.d.ts +0 -1
- package/lib/src/components/PodDropdown/index.d.ts +0 -9
- package/lib/src/components/PodShellModal/PodShell.d.ts +0 -18
- package/lib/src/components/PodShellModal/index.d.ts +0 -10
- package/lib/src/components/Shell/index.d.ts +0 -50
- package/lib/src/components/Shell/zmodem/index.d.ts +0 -51
- package/lib/src/components/Table/ErrorContent.d.ts +0 -10
- package/lib/src/components/YamlForm/index.d.ts +0 -25
- package/lib/src/hooks/useEagleForm.d.ts +0 -48
- package/lib/src/hooks/useModal.d.ts +0 -0
- package/lib/src/hooks/useNamespaceFilter.d.ts +0 -5
- package/lib/src/model/cronjob-model.d.ts +0 -9
- package/lib/src/model/index.d.ts +0 -6
- package/lib/src/model/job-model.d.ts +0 -10
- package/lib/src/model/pod-metrics-model.d.ts +0 -7
- package/lib/src/model/pod-model.d.ts +0 -15
- package/lib/src/model/resource-model.d.ts +0 -17
- package/lib/src/model/workload-model.d.ts +0 -17
- package/lib/src/pages/deployments/create/index.d.ts +0 -3
- package/lib/src/pages/nodes/hooks/useNodeMetrics.d.ts +0 -17
- package/lib/src/pages/statefulsets/create/index.d.ts +0 -3
- package/lib/src/pages/statefulsets/list/index.d.ts +0 -3
- package/lib/src/pages/statefulsets/show/index.d.ts +0 -3
- package/lib/src/pages/storageclasses/list/index.d.ts +0 -3
- package/lib/src/pages/storageclasses/show/index.d.ts +0 -3
- package/lib/src/types/metric.d.ts +0 -25
- package/lib/src/utils/shell.d.ts +0 -16
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dovetail-v2/refine",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0-test.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -10,23 +10,14 @@
|
|
|
10
10
|
"module": "./dist/refine.js",
|
|
11
11
|
"types": "./lib/src/index.d.ts",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@cloudtower/eagle": "^0.29.
|
|
14
|
-
"@cloudtower/icons-react": "^0.29.
|
|
13
|
+
"@cloudtower/eagle": "^0.29.29",
|
|
14
|
+
"@cloudtower/icons-react": "^0.29.29",
|
|
15
15
|
"@patternfly/react-core": "^5.1.1",
|
|
16
16
|
"@patternfly/react-log-viewer": "^5.0.0",
|
|
17
17
|
"@refinedev/core": "^4.47.2",
|
|
18
18
|
"@refinedev/inferencer": "^4.5.20",
|
|
19
19
|
"@refinedev/react-hook-form": "^4.8.14",
|
|
20
|
-
"@xterm/addon-attach": "^0.11.0",
|
|
21
|
-
"@xterm/addon-canvas": "^0.7.0",
|
|
22
|
-
"@xterm/addon-fit": "^0.10.0",
|
|
23
|
-
"@xterm/addon-search": "^0.15.0",
|
|
24
|
-
"@xterm/addon-web-links": "^0.11.0",
|
|
25
|
-
"@xterm/addon-webgl": "^0.18.0",
|
|
26
|
-
"@xterm/xterm": "^5.5.0",
|
|
27
20
|
"antd": "4.5.0",
|
|
28
|
-
"buffer": "^6.0.3",
|
|
29
|
-
"copy-to-clipboard": "^3.3.3",
|
|
30
21
|
"dayjs": "^1.11.10",
|
|
31
22
|
"i18next": "^23.2.3",
|
|
32
23
|
"js-yaml": "^4.1.0",
|
|
@@ -78,8 +69,8 @@
|
|
|
78
69
|
"vite-plugin-commonjs": "^0.10.0"
|
|
79
70
|
},
|
|
80
71
|
"peerDependencies": {
|
|
81
|
-
"@cloudtower/eagle": "^0.29.
|
|
82
|
-
"@cloudtower/icons-react": "^0.29.
|
|
72
|
+
"@cloudtower/eagle": "^0.29.29",
|
|
73
|
+
"@cloudtower/icons-react": "^0.29.29",
|
|
83
74
|
"@refinedev/core": "^4.47.2",
|
|
84
75
|
"antd": "4.5.0",
|
|
85
76
|
"i18next": "^23.2.3",
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import type { FormWidgetProps } from './widget';
|
|
3
|
-
export type KeyValueListWidgetProps = FormWidgetProps<Record<string, string>> & {
|
|
4
|
-
disabled?: boolean;
|
|
5
|
-
};
|
|
6
|
-
export declare function KeyValueListWidget(props: KeyValueListWidgetProps): JSX.Element;
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { AntdInputProps } from '@cloudtower/eagle';
|
|
3
|
-
export declare function NameInputWidget(props: AntdInputProps): JSX.Element;
|
|
4
|
-
export declare const dnsSubDomainRules: ({
|
|
5
|
-
required: boolean;
|
|
6
|
-
message: string;
|
|
7
|
-
pattern?: undefined;
|
|
8
|
-
max?: undefined;
|
|
9
|
-
} | {
|
|
10
|
-
pattern: RegExp;
|
|
11
|
-
message: string;
|
|
12
|
-
required?: undefined;
|
|
13
|
-
max?: undefined;
|
|
14
|
-
} | {
|
|
15
|
-
max: number;
|
|
16
|
-
message: string;
|
|
17
|
-
required?: undefined;
|
|
18
|
-
pattern?: undefined;
|
|
19
|
-
})[];
|
|
20
|
-
export declare const rfc1123LabelRules: ({
|
|
21
|
-
required: boolean;
|
|
22
|
-
message: string;
|
|
23
|
-
pattern?: undefined;
|
|
24
|
-
max?: undefined;
|
|
25
|
-
} | {
|
|
26
|
-
pattern: RegExp;
|
|
27
|
-
message: string;
|
|
28
|
-
required?: undefined;
|
|
29
|
-
max?: undefined;
|
|
30
|
-
} | {
|
|
31
|
-
max: number;
|
|
32
|
-
message: string;
|
|
33
|
-
required?: undefined;
|
|
34
|
-
pattern?: undefined;
|
|
35
|
-
})[];
|
|
36
|
-
export declare const rfc1035LabelRules: ({
|
|
37
|
-
required: boolean;
|
|
38
|
-
message: string;
|
|
39
|
-
pattern?: undefined;
|
|
40
|
-
max?: undefined;
|
|
41
|
-
} | {
|
|
42
|
-
pattern: RegExp;
|
|
43
|
-
message: string;
|
|
44
|
-
required?: undefined;
|
|
45
|
-
max?: undefined;
|
|
46
|
-
} | {
|
|
47
|
-
max: number;
|
|
48
|
-
message: string;
|
|
49
|
-
required?: undefined;
|
|
50
|
-
pattern?: undefined;
|
|
51
|
-
})[];
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import type { FormWidgetProps } from './widget';
|
|
3
|
-
type NamespaceSelectProps = FormWidgetProps<string | string[]>;
|
|
4
|
-
export declare function NamespaceSelectWidget(props: NamespaceSelectProps): JSX.Element;
|
|
5
|
-
export declare const namespaceRules: {
|
|
6
|
-
required: boolean;
|
|
7
|
-
message: string;
|
|
8
|
-
}[];
|
|
9
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { YamlFormProps } from 'src/components/YamlForm';
|
|
3
|
-
export type FormModalProps = {
|
|
4
|
-
resource?: string;
|
|
5
|
-
id?: string;
|
|
6
|
-
formProps?: YamlFormProps;
|
|
7
|
-
renderForm?: (props: YamlFormProps) => React.ReactNode;
|
|
8
|
-
};
|
|
9
|
-
export declare function FormModal(props: FormModalProps): JSX.Element;
|
|
10
|
-
export default FormModal;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
interface ModalInfo {
|
|
3
|
-
resource: string;
|
|
4
|
-
id?: string;
|
|
5
|
-
}
|
|
6
|
-
type ModalContextValue = ModalInfo & {
|
|
7
|
-
open: (info: ModalInfo) => void;
|
|
8
|
-
close: () => void;
|
|
9
|
-
};
|
|
10
|
-
export declare const ModalContext: React.Context<ModalContextValue>;
|
|
11
|
-
declare function ModalContextProvider(props: React.PropsWithChildren<Record<string, unknown>>): JSX.Element;
|
|
12
|
-
export default ModalContextProvider;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { NetworkPolicyIngressRule, NetworkPolicyEgressRule } from 'kubernetes-types/networking/v1';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
type Props = {
|
|
4
|
-
ingressOrEgress: NetworkPolicyIngressRule[] | NetworkPolicyEgressRule[];
|
|
5
|
-
kind?: string;
|
|
6
|
-
};
|
|
7
|
-
export declare const NetworkPolicyRulesViewer: React.FC<Props>;
|
|
8
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './NetworkPolicyRulesTable';
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { PodModel } from '../../models';
|
|
3
|
-
import { DropdownSize } from '../K8sDropdown';
|
|
4
|
-
type Props<Model extends PodModel> = {
|
|
5
|
-
record: Model;
|
|
6
|
-
size?: DropdownSize;
|
|
7
|
-
};
|
|
8
|
-
export declare function PodDropdown<Model extends PodModel>(props: React.PropsWithChildren<Props<Model>>): JSX.Element;
|
|
9
|
-
export {};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { SocketStatus } from 'src/components/Shell';
|
|
3
|
-
import '@xterm/xterm/css/xterm.css';
|
|
4
|
-
import { PodModel } from 'src/models/pod-model';
|
|
5
|
-
export declare enum OS {
|
|
6
|
-
Linux = "linux",
|
|
7
|
-
Windows = "windows"
|
|
8
|
-
}
|
|
9
|
-
interface PodShellProps {
|
|
10
|
-
pod: PodModel;
|
|
11
|
-
basePath: string;
|
|
12
|
-
onSocketStatusChange?: (socketStatus: SocketStatus) => void;
|
|
13
|
-
}
|
|
14
|
-
interface PodShellHandler {
|
|
15
|
-
getAllTerminalContents: () => string[];
|
|
16
|
-
}
|
|
17
|
-
export declare const PodShell: React.ForwardRefExoticComponent<PodShellProps & React.RefAttributes<PodShellHandler>>;
|
|
18
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { SocketStatus } from 'src/components/Shell';
|
|
3
|
-
import { PodModel } from 'src/models';
|
|
4
|
-
import { PodShell } from './PodShell';
|
|
5
|
-
interface PodShellModalProps {
|
|
6
|
-
pod: PodModel;
|
|
7
|
-
onSocketStatusChange?: (socketStatus: SocketStatus) => void;
|
|
8
|
-
}
|
|
9
|
-
export declare function PodShellModal(props: PodShellModalProps): JSX.Element;
|
|
10
|
-
export { PodShell };
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { Terminal } from '@xterm/xterm';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import '@xterm/xterm/css/xterm.css';
|
|
4
|
-
export declare enum SocketStatus {
|
|
5
|
-
Opening = "Opening",
|
|
6
|
-
Open = "Open",
|
|
7
|
-
Disconnected = "Disconnected"
|
|
8
|
-
}
|
|
9
|
-
export type ShellProps = React.PropsWithChildren<{
|
|
10
|
-
url: string;
|
|
11
|
-
protocols?: string;
|
|
12
|
-
encode: (input: string) => string | ArrayBufferLike | Blob | ArrayBufferView;
|
|
13
|
-
decode?: (output: string | ArrayBufferLike | Blob | ArrayBufferView) => string | ArrayBuffer;
|
|
14
|
-
fit?: (layout: {
|
|
15
|
-
rows: number;
|
|
16
|
-
cols: number;
|
|
17
|
-
}) => void;
|
|
18
|
-
onSocketInit?: (socket: WebSocket) => void;
|
|
19
|
-
onTermInit?: (term: Terminal) => void;
|
|
20
|
-
onSocketMessage?: (e: MessageEvent, socket: WebSocket, term: Terminal | null) => void;
|
|
21
|
-
onSocketOpen?: (socket: WebSocket) => void;
|
|
22
|
-
onSocketClose?: (socket: WebSocket, term: Terminal | null) => void;
|
|
23
|
-
onSocketStatusChange?: (socketStatus: SocketStatus) => void;
|
|
24
|
-
}>;
|
|
25
|
-
export interface ShellHandler {
|
|
26
|
-
clear: () => void;
|
|
27
|
-
send: (data: string | ArrayBufferLike | Blob | ArrayBufferView) => void;
|
|
28
|
-
getAllTerminalContents: () => string[];
|
|
29
|
-
setSocketStatus: React.Dispatch<React.SetStateAction<SocketStatus>>;
|
|
30
|
-
searchNext: (search: string) => void;
|
|
31
|
-
searchPrevious: (search: string) => void;
|
|
32
|
-
}
|
|
33
|
-
export declare const Shell: React.ForwardRefExoticComponent<{
|
|
34
|
-
url: string;
|
|
35
|
-
protocols?: string | undefined;
|
|
36
|
-
encode: (input: string) => string | ArrayBufferLike | Blob | ArrayBufferView;
|
|
37
|
-
decode?: ((output: string | ArrayBufferLike | Blob | ArrayBufferView) => string | ArrayBuffer) | undefined;
|
|
38
|
-
fit?: ((layout: {
|
|
39
|
-
rows: number;
|
|
40
|
-
cols: number;
|
|
41
|
-
}) => void) | undefined;
|
|
42
|
-
onSocketInit?: ((socket: WebSocket) => void) | undefined;
|
|
43
|
-
onTermInit?: ((term: Terminal) => void) | undefined;
|
|
44
|
-
onSocketMessage?: ((e: MessageEvent, socket: WebSocket, term: Terminal | null) => void) | undefined;
|
|
45
|
-
onSocketOpen?: ((socket: WebSocket) => void) | undefined;
|
|
46
|
-
onSocketClose?: ((socket: WebSocket, term: Terminal | null) => void) | undefined;
|
|
47
|
-
onSocketStatusChange?: ((socketStatus: SocketStatus) => void) | undefined;
|
|
48
|
-
} & {
|
|
49
|
-
children?: React.ReactNode;
|
|
50
|
-
} & React.RefAttributes<ShellHandler>>;
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { ITerminalAddon, Terminal } from '@xterm/xterm';
|
|
2
|
-
import { Component } from 'react';
|
|
3
|
-
export interface FlowControl {
|
|
4
|
-
limit: number;
|
|
5
|
-
highWater: number;
|
|
6
|
-
lowWater: number;
|
|
7
|
-
pause: () => void;
|
|
8
|
-
resume: () => void;
|
|
9
|
-
}
|
|
10
|
-
interface Props {
|
|
11
|
-
sender: (data: ArrayLike<number>) => void;
|
|
12
|
-
control: FlowControl;
|
|
13
|
-
modalDownload: boolean;
|
|
14
|
-
modalUpload: boolean;
|
|
15
|
-
change: (v: string) => void;
|
|
16
|
-
hideDownload: (v: boolean) => void;
|
|
17
|
-
hideUpload: (v: boolean) => void;
|
|
18
|
-
}
|
|
19
|
-
interface State {
|
|
20
|
-
value: string;
|
|
21
|
-
}
|
|
22
|
-
export declare class ZmodemAddon extends Component<Props, State> implements ITerminalAddon {
|
|
23
|
-
private terminal;
|
|
24
|
-
private keyDispose;
|
|
25
|
-
private sentry;
|
|
26
|
-
private session;
|
|
27
|
-
private written;
|
|
28
|
-
private pending;
|
|
29
|
-
constructor(props: Props);
|
|
30
|
-
render(): JSX.Element;
|
|
31
|
-
state: {
|
|
32
|
-
value: string;
|
|
33
|
-
};
|
|
34
|
-
onInput: (ev: any) => void;
|
|
35
|
-
onSubmit: (ev: any) => void;
|
|
36
|
-
componentWillUnmount(): Promise<void>;
|
|
37
|
-
activate(terminal: Terminal): void;
|
|
38
|
-
dispose(): void;
|
|
39
|
-
consume(data: ArrayBuffer): void;
|
|
40
|
-
private handleError;
|
|
41
|
-
private zmodemInit;
|
|
42
|
-
private zmodemReset;
|
|
43
|
-
private zmodemWrite;
|
|
44
|
-
private zmodemSend;
|
|
45
|
-
private zmodemDetect;
|
|
46
|
-
private sendFile;
|
|
47
|
-
private receiveFile;
|
|
48
|
-
private writeProgress;
|
|
49
|
-
private bytesHuman;
|
|
50
|
-
}
|
|
51
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export declare const ErrorWrapper: import("@linaria/core").LinariaClassName;
|
|
3
|
-
export declare const ErrorContent: import("@linaria/core").LinariaClassName;
|
|
4
|
-
export type WidgetErrorContentProps = {
|
|
5
|
-
errorText?: string;
|
|
6
|
-
style?: React.CSSProperties;
|
|
7
|
-
refetch?: () => void;
|
|
8
|
-
};
|
|
9
|
-
declare const WidgetErrorContent: React.FunctionComponent<WidgetErrorContentProps>;
|
|
10
|
-
export default WidgetErrorContent;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { FormAction } from '@refinedev/core';
|
|
3
|
-
import useEagleForm from 'src/hooks/useEagleForm';
|
|
4
|
-
export declare enum SchemaStrategy {
|
|
5
|
-
Required = "Required",
|
|
6
|
-
Optional = "Optional",
|
|
7
|
-
None = "None"
|
|
8
|
-
}
|
|
9
|
-
export interface YamlFormProps {
|
|
10
|
-
id?: string;
|
|
11
|
-
action?: FormAction;
|
|
12
|
-
initialValues?: Record<string, unknown>;
|
|
13
|
-
transformValues?: (values: Record<string, unknown>) => Record<string, unknown>;
|
|
14
|
-
schemaStrategy?: SchemaStrategy;
|
|
15
|
-
isShowLayout?: boolean;
|
|
16
|
-
useFormProps?: Parameters<typeof useEagleForm>[0];
|
|
17
|
-
onSaveButtonPropsChange?: (saveButtonProps: {
|
|
18
|
-
disabled?: boolean;
|
|
19
|
-
onClick: () => void;
|
|
20
|
-
}) => void;
|
|
21
|
-
onErrorsChange?: (errors: string[]) => void;
|
|
22
|
-
onFinish?: () => void;
|
|
23
|
-
}
|
|
24
|
-
declare function YamlForm(props: YamlFormProps): JSX.Element;
|
|
25
|
-
export default YamlForm;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { HttpError, BaseRecord, UseFormReturnType as UseFormReturnTypeCore, UseFormProps as UseFormPropsCore, CreateResponse, UpdateResponse } from '@refinedev/core';
|
|
2
|
-
import { ButtonProps } from 'antd/lib/button';
|
|
3
|
-
import { FormInstance, FormProps } from 'antd/lib/form';
|
|
4
|
-
import { JSONSchema7 } from 'json-schema';
|
|
5
|
-
import { Unstructured } from 'k8s-api-provider';
|
|
6
|
-
import React from 'react';
|
|
7
|
-
import { type YamlEditorHandle, type YamlEditorProps } from 'src/components/YamlEditor';
|
|
8
|
-
type EditorProps = Omit<YamlEditorProps, 'schema'> & {
|
|
9
|
-
ref: React.RefObject<YamlEditorHandle>;
|
|
10
|
-
schema: JSONSchema7 | null;
|
|
11
|
-
};
|
|
12
|
-
export type UseFormProps<TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables extends object = object, TData extends BaseRecord = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError> = UseFormPropsCore<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError> & {
|
|
13
|
-
submitOnEnter?: boolean;
|
|
14
|
-
/**
|
|
15
|
-
* Shows notification when unsaved changes exist
|
|
16
|
-
*/
|
|
17
|
-
warnWhenUnsavedChanges?: boolean;
|
|
18
|
-
editorOptions?: {
|
|
19
|
-
isGenerateAnnotations?: boolean;
|
|
20
|
-
isSkipSchema?: boolean;
|
|
21
|
-
};
|
|
22
|
-
initialValuesForCreate?: Record<string, unknown>;
|
|
23
|
-
transformValues?: (values: Record<string, unknown>) => Record<string, unknown>;
|
|
24
|
-
};
|
|
25
|
-
export type UseFormReturnType<TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables extends object = object, TData extends BaseRecord = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError> = UseFormReturnTypeCore<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError> & {
|
|
26
|
-
form: FormInstance;
|
|
27
|
-
formProps: FormProps;
|
|
28
|
-
saveButtonProps: ButtonProps & {
|
|
29
|
-
onClick: () => void;
|
|
30
|
-
};
|
|
31
|
-
editorProps: EditorProps;
|
|
32
|
-
schema: JSONSchema7 | null;
|
|
33
|
-
isLoadingSchema: boolean;
|
|
34
|
-
loadSchemaError: Error | null;
|
|
35
|
-
fetchSchema: () => void;
|
|
36
|
-
enableEditor: boolean;
|
|
37
|
-
errorResponseBody?: Record<string, unknown> | null;
|
|
38
|
-
switchEditor: () => void;
|
|
39
|
-
onFinish: (values?: TVariables) => Promise<CreateResponse<TResponse> | UpdateResponse<TResponse> | void>;
|
|
40
|
-
};
|
|
41
|
-
declare const useEagleForm: <TQueryFnData extends Unstructured = Unstructured & {
|
|
42
|
-
id: string;
|
|
43
|
-
}, TError extends HttpError = HttpError, TVariables extends {
|
|
44
|
-
[prop: string]: unknown;
|
|
45
|
-
} = {
|
|
46
|
-
[prop: string]: unknown;
|
|
47
|
-
}, TData extends Unstructured = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError>({ action: actionFromProps, resource, onMutationSuccess: onMutationSuccessProp, onMutationError, submitOnEnter, warnWhenUnsavedChanges: warnWhenUnsavedChangesProp, redirect, successNotification, errorNotification, meta, metaData, queryMeta, mutationMeta, liveMode, liveParams, mutationMode, dataProviderName, onLiveEvent, invalidates, undoableTimeout, queryOptions, createMutationOptions, updateMutationOptions, id: idFromProps, overtimeOptions, editorOptions, initialValuesForCreate, transformValues, }?: UseFormProps<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError>) => UseFormReturnType<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError>;
|
|
48
|
-
export default useEagleForm;
|
|
File without changes
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { CronJob } from 'kubernetes-types/batch/v1';
|
|
2
|
-
import { WithId } from '../types';
|
|
3
|
-
import { WorkloadModel } from './workload-model';
|
|
4
|
-
export declare class CronJobModel extends WorkloadModel<CronJob> {
|
|
5
|
-
data: WithId<CronJob>;
|
|
6
|
-
constructor(data: WithId<CronJob>);
|
|
7
|
-
suspend(): WithId<CronJob>;
|
|
8
|
-
resume(): WithId<CronJob>;
|
|
9
|
-
}
|
package/lib/src/model/index.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Job } from 'kubernetes-types/batch/v1';
|
|
2
|
-
import { WithId } from '../types';
|
|
3
|
-
import { WorkloadModel } from './workload-model';
|
|
4
|
-
export declare class JobModel extends WorkloadModel<Job> {
|
|
5
|
-
rawYaml: WithId<Job>;
|
|
6
|
-
constructor(rawYaml: WithId<Job>);
|
|
7
|
-
get duration(): number;
|
|
8
|
-
get durationDisplay(): string | undefined;
|
|
9
|
-
get completionsDisplay(): string;
|
|
10
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { Pod } from 'kubernetes-types/core/v1';
|
|
2
|
-
import { ResourceQuantity } from 'src/types/metric';
|
|
3
|
-
import { WithId } from '../types';
|
|
4
|
-
import { WorkloadModel } from './workload-model';
|
|
5
|
-
export declare class PodModel extends WorkloadModel<Pod> {
|
|
6
|
-
rawYaml: WithId<Pod>;
|
|
7
|
-
request: ResourceQuantity;
|
|
8
|
-
limit: ResourceQuantity;
|
|
9
|
-
constructor(rawYaml: WithId<Pod>);
|
|
10
|
-
get imageNames(): string[];
|
|
11
|
-
get restartCount(): number;
|
|
12
|
-
get readyDisplay(): string;
|
|
13
|
-
get readyContainerCount(): number | undefined;
|
|
14
|
-
get containerCount(): number | undefined;
|
|
15
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Resource } from '../types';
|
|
2
|
-
export declare class ResourceModel implements Resource {
|
|
3
|
-
rawYaml: Resource;
|
|
4
|
-
id: Resource['id'];
|
|
5
|
-
apiVersion: Resource['apiVersion'];
|
|
6
|
-
kind: Resource['kind'];
|
|
7
|
-
metadata: Resource['metadata'];
|
|
8
|
-
constructor(rawYaml: Resource);
|
|
9
|
-
get name(): string | undefined;
|
|
10
|
-
get namespace(): string | undefined;
|
|
11
|
-
get labels(): {
|
|
12
|
-
[name: string]: string;
|
|
13
|
-
} | undefined;
|
|
14
|
-
get annotations(): {
|
|
15
|
-
[name: string]: string;
|
|
16
|
-
} | undefined;
|
|
17
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { DaemonSet, Deployment, StatefulSet } from 'kubernetes-types/apps/v1';
|
|
2
|
-
import type { CronJob, Job } from 'kubernetes-types/batch/v1';
|
|
3
|
-
import { Pod } from 'kubernetes-types/core/v1';
|
|
4
|
-
import { WithId } from '../types';
|
|
5
|
-
import { ResourceModel } from './resource-model';
|
|
6
|
-
type WorkloadTypes = Deployment | StatefulSet | Job | DaemonSet | CronJob | Pod;
|
|
7
|
-
export declare class WorkloadModel<T extends WorkloadTypes = WorkloadTypes> extends ResourceModel {
|
|
8
|
-
rawYaml: WithId<T>;
|
|
9
|
-
constructor(rawYaml: WithId<T>);
|
|
10
|
-
get status(): T['status'];
|
|
11
|
-
get spec(): T['spec'];
|
|
12
|
-
get imageNames(): string[];
|
|
13
|
-
get restartCount(): number;
|
|
14
|
-
redeploy(): WithId<T>;
|
|
15
|
-
scale(value: number): WithId<T>;
|
|
16
|
-
}
|
|
17
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
type MetricMap = Record<string, string>;
|
|
2
|
-
type NodeMetrics = {
|
|
3
|
-
cpuUsed: MetricMap | null;
|
|
4
|
-
cpuUsage: MetricMap | null;
|
|
5
|
-
};
|
|
6
|
-
export interface PrometheusResponse {
|
|
7
|
-
data: {
|
|
8
|
-
result: {
|
|
9
|
-
metric: Record<string, string>;
|
|
10
|
-
value: [number, string];
|
|
11
|
-
}[];
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
export declare function transformMetricResult(response: PrometheusResponse, metricName?: string): Record<string, string>;
|
|
15
|
-
export declare function getMonitorDatas(queries: string[], modelName?: string): Promise<Record<string, string>[]>;
|
|
16
|
-
export declare function useNodeMetrics(): NodeMetrics;
|
|
17
|
-
export {};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { Resource } from './resource';
|
|
2
|
-
type Quantity = string;
|
|
3
|
-
export type ContainerMetrics = {
|
|
4
|
-
name: string;
|
|
5
|
-
usage: {
|
|
6
|
-
cpu?: Quantity;
|
|
7
|
-
memory?: Quantity;
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
export type PodMetrics = {
|
|
11
|
-
timestamp: string;
|
|
12
|
-
window: string;
|
|
13
|
-
containers: ContainerMetrics[];
|
|
14
|
-
} & Resource;
|
|
15
|
-
export type ResourceQuantity = {
|
|
16
|
-
cpu: {
|
|
17
|
-
si: string;
|
|
18
|
-
value: number;
|
|
19
|
-
};
|
|
20
|
-
memory: {
|
|
21
|
-
si: string;
|
|
22
|
-
value: number;
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
export {};
|
package/lib/src/utils/shell.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { Buffer } from 'buffer';
|
|
3
|
-
export type QueryParams = {
|
|
4
|
-
[key: string]: string | string[];
|
|
5
|
-
};
|
|
6
|
-
export declare const stdin: (characters: string) => Buffer;
|
|
7
|
-
export declare function addParam(url: string, key: string, val: string | string[]): string;
|
|
8
|
-
export declare function addParams(url: string, params: QueryParams): string;
|
|
9
|
-
declare enum Alphabet {
|
|
10
|
-
NORMAL = "normal",
|
|
11
|
-
URL = "url"
|
|
12
|
-
}
|
|
13
|
-
export declare function base64Encode(str: string, alphabet?: Alphabet): string;
|
|
14
|
-
export declare function base64DecodeToBuffer(str: string): Buffer;
|
|
15
|
-
export declare function base64Decode(str: string): string;
|
|
16
|
-
export {};
|