@dovetail-v2/refine 0.0.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/README.MD +49 -0
- package/dist/MonacoYamlDiffEditor.15cce01f.js +54 -0
- package/dist/assets/yaml.worker.bb17811d.js +39447 -0
- package/dist/favicon.ico +0 -0
- package/dist/images/flags/de.svg +1 -0
- package/dist/images/flags/en.svg +1 -0
- package/dist/index.cbb145c9.js +9820 -0
- package/dist/locales/de/common.json +167 -0
- package/dist/locales/en/common.json +167 -0
- package/dist/refine.js +30 -0
- package/dist/refine.umd.cjs +9874 -0
- package/dist/style.css +32634 -0
- package/lib/src/App.d.ts +6 -0
- package/lib/src/Dovetail.d.ts +10 -0
- package/lib/src/components/Breadcrumb/index.d.ts +6 -0
- package/lib/src/components/ConditionsTable/ConditionsTable.d.ts +7 -0
- package/lib/src/components/ConditionsTable/index.d.ts +1 -0
- package/lib/src/components/CreateButton/index.d.ts +2 -0
- package/lib/src/components/CronJobDropdown/index.d.ts +7 -0
- package/lib/src/components/CronjobJobsTable/index.d.ts +7 -0
- package/lib/src/components/DeleteButton/index.d.ts +2 -0
- package/lib/src/components/DeleteManyButton/index.d.ts +4 -0
- package/lib/src/components/DrawerShow/DrawerShow.d.ts +10 -0
- package/lib/src/components/DrawerShow/index.d.ts +1 -0
- package/lib/src/components/EditButton/index.d.ts +2 -0
- package/lib/src/components/Form/KeyValueListWidget.d.ts +6 -0
- package/lib/src/components/Form/MetadataForm.d.ts +2 -0
- package/lib/src/components/Form/NameInputWidget.d.ts +51 -0
- package/lib/src/components/Form/NamespaceSelectWidget.d.ts +9 -0
- package/lib/src/components/Form/index.d.ts +4 -0
- package/lib/src/components/Form/widget.d.ts +5 -0
- package/lib/src/components/FormLayout/index.d.ts +3 -0
- package/lib/src/components/ImageNames/index.d.ts +4 -0
- package/lib/src/components/K8sDropdown/index.d.ts +7 -0
- package/lib/src/components/KeyValue/KeyValue.d.ts +6 -0
- package/lib/src/components/KeyValue/index.d.ts +1 -0
- package/lib/src/components/Layout/index.d.ts +3 -0
- package/lib/src/components/ListPage/index.d.ts +10 -0
- package/lib/src/components/Menu/index.d.ts +2 -0
- package/lib/src/components/NamespacesFilter/index.d.ts +7 -0
- package/lib/src/components/PageShow/PageShow.d.ts +13 -0
- package/lib/src/components/PageShow/index.d.ts +1 -0
- package/lib/src/components/PodContainersTable/PodContainersTable.d.ts +8 -0
- package/lib/src/components/PodContainersTable/index.d.ts +1 -0
- package/lib/src/components/ResourceCRUD/ResourceCRUD.d.ts +8 -0
- package/lib/src/components/ResourceCRUD/create/index.d.ts +8 -0
- package/lib/src/components/ResourceCRUD/index.d.ts +1 -0
- package/lib/src/components/ResourceCRUD/list/index.d.ts +14 -0
- package/lib/src/components/ResourceCRUD/show/index.d.ts +14 -0
- package/lib/src/components/Separator/index.d.ts +2 -0
- package/lib/src/components/ShowContent/ShowContent.d.ts +13 -0
- package/lib/src/components/ShowContent/fields.d.ts +16 -0
- package/lib/src/components/ShowContent/index.d.ts +2 -0
- package/lib/src/components/StateTag/StateTag.d.ts +6 -0
- package/lib/src/components/StateTag/index.d.ts +1 -0
- package/lib/src/components/Table/ErrorContent.d.ts +10 -0
- package/lib/src/components/Table/TableToolBar.d.ts +8 -0
- package/lib/src/components/Table/TableWidgets.d.ts +6 -0
- package/lib/src/components/Table/index.d.ts +28 -0
- package/lib/src/components/Tags/index.d.ts +6 -0
- package/lib/src/components/Time/index.d.ts +9 -0
- package/lib/src/components/WorkloadDropdown/index.d.ts +7 -0
- package/lib/src/components/WorkloadPodsTable/WorkloadPodsTable.d.ts +5 -0
- package/lib/src/components/WorkloadPodsTable/index.d.ts +1 -0
- package/lib/src/components/WorkloadReplicas/index.d.ts +5 -0
- package/lib/src/components/YamlEditor/MonacoYamlDiffEditor.d.ts +9 -0
- package/lib/src/components/YamlEditor/MonacoYamlEditor.d.ts +19 -0
- package/lib/src/components/YamlEditor/YamlEditorComponent.d.ts +26 -0
- package/lib/src/components/YamlEditor/index.d.ts +1 -0
- package/lib/src/components/YamlEditor/style.d.ts +11 -0
- package/lib/src/components/YamlEditor/yaml.worker.d.ts +1 -0
- package/lib/src/components/YamlForm/index.d.ts +6 -0
- package/lib/src/constants/k8s.d.ts +204 -0
- package/lib/src/hooks/index.d.ts +2 -0
- package/lib/src/hooks/useDeleteModal/index.d.ts +1 -0
- package/lib/src/hooks/useDeleteModal/useDeleteManyModal.d.ts +8 -0
- package/lib/src/hooks/useDeleteModal/useDeleteModal.d.ts +7 -0
- package/lib/src/hooks/useDownloadYAML.d.ts +7 -0
- package/lib/src/hooks/useEagleForm.d.ts +39 -0
- package/lib/src/hooks/useEagleTable/columns.d.ts +15 -0
- package/lib/src/hooks/useEagleTable/index.d.ts +52 -0
- package/lib/src/hooks/useEdit.d.ts +4 -0
- package/lib/src/hooks/useSchema.d.ts +7 -0
- package/lib/src/i18n.d.ts +72 -0
- package/lib/src/index.d.ts +6 -0
- package/lib/src/locales/en-US/index.d.ts +15 -0
- package/lib/src/locales/index.d.ts +2 -0
- package/lib/src/locales/zh-CN/index.d.ts +55 -0
- package/lib/src/main.d.ts +1 -0
- package/lib/src/model/cronjob-model.d.ts +9 -0
- package/lib/src/model/index.d.ts +5 -0
- package/lib/src/model/job-model.d.ts +10 -0
- package/lib/src/model/pod-model.d.ts +10 -0
- package/lib/src/model/resource-model.d.ts +17 -0
- package/lib/src/model/workload-model.d.ts +17 -0
- package/lib/src/pages/configmaps/index.d.ts +3 -0
- package/lib/src/pages/cronjobs/create/index.d.ts +3 -0
- package/lib/src/pages/cronjobs/index.d.ts +3 -0
- package/lib/src/pages/cronjobs/list/index.d.ts +3 -0
- package/lib/src/pages/cronjobs/show/index.d.ts +3 -0
- package/lib/src/pages/daemonsets/create/index.d.ts +3 -0
- package/lib/src/pages/daemonsets/index.d.ts +3 -0
- package/lib/src/pages/daemonsets/list/index.d.ts +3 -0
- package/lib/src/pages/daemonsets/show/index.d.ts +3 -0
- package/lib/src/pages/deployments/create/index.d.ts +3 -0
- package/lib/src/pages/deployments/index.d.ts +3 -0
- package/lib/src/pages/deployments/list/index.d.ts +3 -0
- package/lib/src/pages/deployments/show/index.d.ts +3 -0
- package/lib/src/pages/jobs/index.d.ts +4 -0
- package/lib/src/pages/pods/create/index.d.ts +3 -0
- package/lib/src/pages/pods/index.d.ts +3 -0
- package/lib/src/pages/pods/list/index.d.ts +3 -0
- package/lib/src/pages/pods/show/index.d.ts +3 -0
- package/lib/src/pages/secrets/index.d.ts +3 -0
- package/lib/src/pages/statefulsets/create/index.d.ts +3 -0
- package/lib/src/pages/statefulsets/index.d.ts +3 -0
- package/lib/src/pages/statefulsets/list/index.d.ts +3 -0
- package/lib/src/pages/statefulsets/show/index.d.ts +3 -0
- package/lib/src/providers/index.d.ts +1 -0
- package/lib/src/providers/router-provider/index.d.ts +21 -0
- package/lib/src/types/index.d.ts +1 -0
- package/lib/src/types/resource.d.ts +39 -0
- package/lib/src/utils/addId.d.ts +3 -0
- package/lib/src/utils/download.d.ts +1 -0
- package/lib/src/utils/error.d.ts +20 -0
- package/lib/src/utils/k8s.d.ts +3 -0
- package/lib/src/utils/labels.d.ts +9 -0
- package/lib/src/utils/openapi.d.ts +45 -0
- package/lib/src/utils/schema.d.ts +17 -0
- package/lib/src/utils/string.d.ts +1 -0
- package/lib/src/utils/time.d.ts +8 -0
- package/lib/src/utils/yaml.d.ts +2 -0
- package/lib/vite.config.d.ts +2 -0
- package/package.json +90 -0
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
export declare const BASE_INIT_VALUE: {
|
|
2
|
+
metadata: {
|
|
3
|
+
name: string;
|
|
4
|
+
namespace: string;
|
|
5
|
+
annotations: {};
|
|
6
|
+
labels: {};
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
export declare const DEPLOYMENT_INIT_VALUE: {
|
|
10
|
+
spec: {
|
|
11
|
+
replicas: number;
|
|
12
|
+
selector: {
|
|
13
|
+
matchLabels: {
|
|
14
|
+
"sks.user.kubesmart.smtx.io/app": string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
template: {
|
|
18
|
+
metadata: {
|
|
19
|
+
labels: {
|
|
20
|
+
"sks.user.kubesmart.smtx.io/app": string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
spec: {
|
|
24
|
+
affinity: {};
|
|
25
|
+
imagePullSecrets: never[];
|
|
26
|
+
initContainers: never[];
|
|
27
|
+
volumes: never[];
|
|
28
|
+
containers: {
|
|
29
|
+
name: string;
|
|
30
|
+
imagePullPolicy: string;
|
|
31
|
+
image: string;
|
|
32
|
+
}[];
|
|
33
|
+
restartPolicy: string;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
metadata: {
|
|
38
|
+
name: string;
|
|
39
|
+
namespace: string;
|
|
40
|
+
annotations: {};
|
|
41
|
+
labels: {};
|
|
42
|
+
};
|
|
43
|
+
apiVersion: string;
|
|
44
|
+
kind: string;
|
|
45
|
+
};
|
|
46
|
+
export declare const CRONJOB_INIT_VALUE: {
|
|
47
|
+
spec: {
|
|
48
|
+
schedule: string;
|
|
49
|
+
jobTemplate: {
|
|
50
|
+
metadata: {
|
|
51
|
+
labels: {};
|
|
52
|
+
};
|
|
53
|
+
spec: {
|
|
54
|
+
template: {
|
|
55
|
+
spec: {
|
|
56
|
+
affinity: {};
|
|
57
|
+
imagePullSecrets: never[];
|
|
58
|
+
initContainers: never[];
|
|
59
|
+
volumes: never[];
|
|
60
|
+
containers: {
|
|
61
|
+
name: string;
|
|
62
|
+
imagePullPolicy: string;
|
|
63
|
+
image: string;
|
|
64
|
+
}[];
|
|
65
|
+
restartPolicy: string;
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
metadata: {
|
|
72
|
+
name: string;
|
|
73
|
+
namespace: string;
|
|
74
|
+
annotations: {};
|
|
75
|
+
labels: {};
|
|
76
|
+
};
|
|
77
|
+
apiVersion: string;
|
|
78
|
+
kind: string;
|
|
79
|
+
};
|
|
80
|
+
export declare const DAEMONSET_INIT_VALUE: {
|
|
81
|
+
spec: {
|
|
82
|
+
replicas: number;
|
|
83
|
+
selector: {
|
|
84
|
+
matchLabels: {
|
|
85
|
+
"sks.user.kubesmart.smtx.io/app": string;
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
template: {
|
|
89
|
+
metadata: {
|
|
90
|
+
labels: {
|
|
91
|
+
"sks.user.kubesmart.smtx.io/app": string;
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
spec: {
|
|
95
|
+
affinity: {};
|
|
96
|
+
imagePullSecrets: never[];
|
|
97
|
+
initContainers: never[];
|
|
98
|
+
volumes: never[];
|
|
99
|
+
containers: {
|
|
100
|
+
name: string;
|
|
101
|
+
imagePullPolicy: string;
|
|
102
|
+
image: string;
|
|
103
|
+
}[];
|
|
104
|
+
restartPolicy: string;
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
metadata: {
|
|
109
|
+
name: string;
|
|
110
|
+
namespace: string;
|
|
111
|
+
annotations: {};
|
|
112
|
+
labels: {};
|
|
113
|
+
};
|
|
114
|
+
apiVersion: string;
|
|
115
|
+
kind: string;
|
|
116
|
+
};
|
|
117
|
+
export declare const JOB_INIT_VALUE: {
|
|
118
|
+
spec: {
|
|
119
|
+
replicas: number;
|
|
120
|
+
selector: {
|
|
121
|
+
matchLabels: {};
|
|
122
|
+
};
|
|
123
|
+
template: {
|
|
124
|
+
metadata: {
|
|
125
|
+
labels: {};
|
|
126
|
+
};
|
|
127
|
+
spec: {
|
|
128
|
+
affinity: {};
|
|
129
|
+
imagePullSecrets: never[];
|
|
130
|
+
initContainers: never[];
|
|
131
|
+
volumes: never[];
|
|
132
|
+
containers: {
|
|
133
|
+
name: string;
|
|
134
|
+
imagePullPolicy: string;
|
|
135
|
+
image: string;
|
|
136
|
+
}[];
|
|
137
|
+
restartPolicy: string;
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
};
|
|
141
|
+
metadata: {
|
|
142
|
+
name: string;
|
|
143
|
+
namespace: string;
|
|
144
|
+
annotations: {};
|
|
145
|
+
labels: {};
|
|
146
|
+
};
|
|
147
|
+
apiVersion: string;
|
|
148
|
+
kind: string;
|
|
149
|
+
};
|
|
150
|
+
export declare const STATEFULSET_INIT_VALUE: {
|
|
151
|
+
spec: {
|
|
152
|
+
replicas: number;
|
|
153
|
+
selector: {
|
|
154
|
+
matchLabels: {
|
|
155
|
+
"sks.user.kubesmart.smtx.io/app": string;
|
|
156
|
+
};
|
|
157
|
+
};
|
|
158
|
+
template: {
|
|
159
|
+
metadata: {
|
|
160
|
+
labels: {
|
|
161
|
+
"sks.user.kubesmart.smtx.io/app": string;
|
|
162
|
+
};
|
|
163
|
+
};
|
|
164
|
+
spec: {
|
|
165
|
+
affinity: {};
|
|
166
|
+
imagePullSecrets: never[];
|
|
167
|
+
initContainers: never[];
|
|
168
|
+
volumes: never[];
|
|
169
|
+
containers: {
|
|
170
|
+
name: string;
|
|
171
|
+
imagePullPolicy: string;
|
|
172
|
+
image: string;
|
|
173
|
+
}[];
|
|
174
|
+
restartPolicy: string;
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
};
|
|
178
|
+
metadata: {
|
|
179
|
+
name: string;
|
|
180
|
+
namespace: string;
|
|
181
|
+
annotations: {};
|
|
182
|
+
labels: {};
|
|
183
|
+
};
|
|
184
|
+
apiVersion: string;
|
|
185
|
+
kind: string;
|
|
186
|
+
};
|
|
187
|
+
export declare const POD_INIT_VALUE: {
|
|
188
|
+
spec: {
|
|
189
|
+
containers: {
|
|
190
|
+
name: string;
|
|
191
|
+
imagePullPolicy: string;
|
|
192
|
+
image: string;
|
|
193
|
+
}[];
|
|
194
|
+
};
|
|
195
|
+
metadata: {
|
|
196
|
+
name: string;
|
|
197
|
+
namespace: string;
|
|
198
|
+
annotations: {};
|
|
199
|
+
labels: {};
|
|
200
|
+
};
|
|
201
|
+
apiVersion: string;
|
|
202
|
+
kind: string;
|
|
203
|
+
};
|
|
204
|
+
export declare const TIMESTAMP_LABEL = "sks.user.kubesmart.smtx.io/timestamp";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './useDeleteModal';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ModalProps } from '@cloudtower/eagle';
|
|
3
|
+
import { BaseKey } from '@refinedev/core';
|
|
4
|
+
export declare const useDeleteManyModal: (resource: string, ids: BaseKey[]) => {
|
|
5
|
+
modalProps: ModalProps;
|
|
6
|
+
visible: boolean;
|
|
7
|
+
setVisible: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
8
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
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 React from 'react';
|
|
6
|
+
import { type YamlEditorHandle } from 'src/components/YamlEditor';
|
|
7
|
+
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> & {
|
|
8
|
+
submitOnEnter?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Shows notification when unsaved changes exist
|
|
11
|
+
*/
|
|
12
|
+
warnWhenUnsavedChanges?: boolean;
|
|
13
|
+
editorOptions?: {
|
|
14
|
+
isGenerateAnnotations?: boolean;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
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> & {
|
|
18
|
+
form: FormInstance;
|
|
19
|
+
formProps: FormProps;
|
|
20
|
+
saveButtonProps: ButtonProps & {
|
|
21
|
+
onClick: () => void;
|
|
22
|
+
};
|
|
23
|
+
editorProps: {
|
|
24
|
+
ref: React.RefObject<YamlEditorHandle>;
|
|
25
|
+
defaultValue: string;
|
|
26
|
+
schema: JSONSchema7 | null;
|
|
27
|
+
id: string;
|
|
28
|
+
};
|
|
29
|
+
enableEditor: boolean;
|
|
30
|
+
errorResponseBody?: Record<string, unknown> | null;
|
|
31
|
+
switchEditor: () => void;
|
|
32
|
+
onFinish: (values?: TVariables) => Promise<CreateResponse<TResponse> | UpdateResponse<TResponse> | void>;
|
|
33
|
+
};
|
|
34
|
+
declare const useEagleForm: <TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables extends {
|
|
35
|
+
[prop: string]: unknown;
|
|
36
|
+
} = {
|
|
37
|
+
[prop: string]: unknown;
|
|
38
|
+
}, TData extends BaseRecord = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError>({ action, 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, }?: UseFormProps<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError>) => UseFormReturnType<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError>;
|
|
39
|
+
export default useEagleForm;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { i18n } from 'i18next';
|
|
2
|
+
import { Column } from '../../components/Table';
|
|
3
|
+
import { JobModel, PodModel, ResourceModel } from '../../model';
|
|
4
|
+
import { WorkloadModel } from '../../model/workload-model';
|
|
5
|
+
export declare const CommonSorter: (dataIndex: string[]) => (a: unknown, b: unknown) => 1 | -1 | 0;
|
|
6
|
+
export declare const NameColumnRenderer: <Model extends ResourceModel>(i18n: i18n, resource?: string) => Column<Model>;
|
|
7
|
+
export declare const NameSpaceColumnRenderer: <Model extends ResourceModel>(i18n: i18n) => Column<Model>;
|
|
8
|
+
export declare const PhaseColumnRenderer: <Model extends ResourceModel>(i18n: i18n) => Column<Model>;
|
|
9
|
+
export declare const WorkloadImageColumnRenderer: <Model extends ResourceModel>(i18n: i18n) => Column<Model>;
|
|
10
|
+
export declare const ReplicasColumnRenderer: <Model extends WorkloadModel<import("kubernetes-types/apps/v1").Deployment | import("kubernetes-types/apps/v1").StatefulSet | import("kubernetes-types/batch/v1").Job | import("kubernetes-types/apps/v1").DaemonSet | import("kubernetes-types/batch/v1").CronJob | import("kubernetes-types/core/v1").Pod>>(i18n: i18n) => Column<Model>;
|
|
11
|
+
export declare const AgeColumnRenderer: <Model extends ResourceModel>(i18n: i18n) => Column<Model>;
|
|
12
|
+
export declare const NodeNameColumnRenderer: <Model extends PodModel>(i18n: i18n) => Column<Model>;
|
|
13
|
+
export declare const RestartCountColumnRenderer: <Model extends PodModel>(i18n: i18n) => Column<Model>;
|
|
14
|
+
export declare const CompletionsCountColumnRenderer: <Model extends JobModel>(i18n: i18n) => Column<Model>;
|
|
15
|
+
export declare const DurationColumnRenderer: <Model extends JobModel>(i18n: i18n) => Column<Model>;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { useTable } from '@refinedev/core';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Column, TableProps } from '../../components/Table';
|
|
4
|
+
import { ResourceModel } from '../../model';
|
|
5
|
+
import { Resource } from '../../types';
|
|
6
|
+
type Params<Raw extends Resource, Model extends ResourceModel> = {
|
|
7
|
+
useTableParams: Parameters<typeof useTable<Raw>>[0];
|
|
8
|
+
columns: Column<Model>[];
|
|
9
|
+
tableProps?: Partial<TableProps<Model>>;
|
|
10
|
+
formatter: (d: Raw) => Model;
|
|
11
|
+
Dropdown?: React.FC<{
|
|
12
|
+
data: Model;
|
|
13
|
+
}>;
|
|
14
|
+
};
|
|
15
|
+
export declare enum ColumnKeys {
|
|
16
|
+
age = "age",
|
|
17
|
+
name = "name",
|
|
18
|
+
namespace = "namespace",
|
|
19
|
+
phase = "phase",
|
|
20
|
+
replicas = "replicas",
|
|
21
|
+
deploymentImage = "deploymentImage",
|
|
22
|
+
podImage = "podImage"
|
|
23
|
+
}
|
|
24
|
+
export declare const useEagleTable: <Raw extends Resource, Model extends ResourceModel>(params: Params<Raw, Model>) => {
|
|
25
|
+
tableQueryResult: import("@tanstack/query-core").QueryObserverResult<import("@refinedev/core").GetListResponse<Raw>, import("@refinedev/core").HttpError>;
|
|
26
|
+
sorter: import("@refinedev/core").CrudSorting;
|
|
27
|
+
sorters: import("@refinedev/core").CrudSorting;
|
|
28
|
+
setSorter: (sorter: import("@refinedev/core").CrudSorting) => void;
|
|
29
|
+
setSorters: (sorter: import("@refinedev/core").CrudSorting) => void;
|
|
30
|
+
filters: import("@refinedev/core").CrudFilters;
|
|
31
|
+
setFilters: ((filters: import("@refinedev/core").CrudFilters, behavior?: ("replace" | "merge") | undefined) => void) & ((setter: (prevFilters: import("@refinedev/core").CrudFilters) => import("@refinedev/core").CrudFilters) => void);
|
|
32
|
+
createLinkForSyncWithLocation: (params: {
|
|
33
|
+
pagination: {
|
|
34
|
+
current?: number | undefined;
|
|
35
|
+
pageSize?: number | undefined;
|
|
36
|
+
};
|
|
37
|
+
sorter?: import("@refinedev/core").CrudSorting | undefined;
|
|
38
|
+
sorters: import("@refinedev/core").CrudSorting;
|
|
39
|
+
filters: import("@refinedev/core").CrudFilters;
|
|
40
|
+
}) => string;
|
|
41
|
+
current: number;
|
|
42
|
+
setCurrent: (value: React.SetStateAction<number>) => void;
|
|
43
|
+
pageSize: number;
|
|
44
|
+
setPageSize: (value: React.SetStateAction<number>) => void;
|
|
45
|
+
pageCount: number;
|
|
46
|
+
overtime: {
|
|
47
|
+
elapsedTime?: number | undefined;
|
|
48
|
+
};
|
|
49
|
+
tableProps: TableProps<Model>;
|
|
50
|
+
selectedKeys: string[];
|
|
51
|
+
};
|
|
52
|
+
export {};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import i18n from 'i18next';
|
|
2
|
+
export declare const resources: {
|
|
3
|
+
'en-US': {
|
|
4
|
+
dovetail: {
|
|
5
|
+
copy: string;
|
|
6
|
+
reset_arguments: string;
|
|
7
|
+
view_changes: string;
|
|
8
|
+
back_to_edit: string;
|
|
9
|
+
configure_file: string;
|
|
10
|
+
yaml_format_wrong: string;
|
|
11
|
+
yaml_value_wrong: string;
|
|
12
|
+
edit_yaml: string;
|
|
13
|
+
copied: string;
|
|
14
|
+
already_reset: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
'zh-CN': {
|
|
18
|
+
dovetail: {
|
|
19
|
+
copy: string;
|
|
20
|
+
reset_arguments: string;
|
|
21
|
+
view_changes: string;
|
|
22
|
+
back_to_edit: string;
|
|
23
|
+
configure_file: string;
|
|
24
|
+
yaml_format_wrong: string;
|
|
25
|
+
yaml_value_wrong: string;
|
|
26
|
+
edit_yaml: string;
|
|
27
|
+
copied: string;
|
|
28
|
+
already_reset: string;
|
|
29
|
+
cancel: string;
|
|
30
|
+
delete: string;
|
|
31
|
+
create: string;
|
|
32
|
+
confirm_delete_text: string;
|
|
33
|
+
edit: string;
|
|
34
|
+
namespace: string;
|
|
35
|
+
name: string;
|
|
36
|
+
state: string;
|
|
37
|
+
status: string;
|
|
38
|
+
phase: string;
|
|
39
|
+
image: string;
|
|
40
|
+
replicas: string;
|
|
41
|
+
created_time: string;
|
|
42
|
+
label: string;
|
|
43
|
+
annotation: string;
|
|
44
|
+
type: string;
|
|
45
|
+
condition: string;
|
|
46
|
+
download_yaml: string;
|
|
47
|
+
detail: string;
|
|
48
|
+
node_name: string;
|
|
49
|
+
restarts: string;
|
|
50
|
+
updated_time: string;
|
|
51
|
+
message: string;
|
|
52
|
+
save: string;
|
|
53
|
+
more: string;
|
|
54
|
+
workload: string;
|
|
55
|
+
all_namespaces: string;
|
|
56
|
+
empty: string;
|
|
57
|
+
schedule: string;
|
|
58
|
+
lastScheduleTime: string;
|
|
59
|
+
duration: string;
|
|
60
|
+
completions: string;
|
|
61
|
+
started: string;
|
|
62
|
+
ready: string;
|
|
63
|
+
init_container: string;
|
|
64
|
+
container: string;
|
|
65
|
+
redeploy: string;
|
|
66
|
+
data: string;
|
|
67
|
+
suspend: string;
|
|
68
|
+
resume: string;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
export default i18n;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
dovetail: {
|
|
3
|
+
copy: string;
|
|
4
|
+
reset_arguments: string;
|
|
5
|
+
view_changes: string;
|
|
6
|
+
back_to_edit: string;
|
|
7
|
+
configure_file: string;
|
|
8
|
+
yaml_format_wrong: string;
|
|
9
|
+
yaml_value_wrong: string;
|
|
10
|
+
edit_yaml: string;
|
|
11
|
+
copied: string;
|
|
12
|
+
already_reset: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export default _default;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
dovetail: {
|
|
3
|
+
copy: string;
|
|
4
|
+
reset_arguments: string;
|
|
5
|
+
view_changes: string;
|
|
6
|
+
back_to_edit: string;
|
|
7
|
+
configure_file: string;
|
|
8
|
+
yaml_format_wrong: string;
|
|
9
|
+
yaml_value_wrong: string;
|
|
10
|
+
edit_yaml: string;
|
|
11
|
+
copied: string;
|
|
12
|
+
already_reset: string;
|
|
13
|
+
cancel: string;
|
|
14
|
+
delete: string;
|
|
15
|
+
create: string;
|
|
16
|
+
confirm_delete_text: string;
|
|
17
|
+
edit: string;
|
|
18
|
+
namespace: string;
|
|
19
|
+
name: string;
|
|
20
|
+
state: string;
|
|
21
|
+
status: string;
|
|
22
|
+
phase: string;
|
|
23
|
+
image: string;
|
|
24
|
+
replicas: string;
|
|
25
|
+
created_time: string;
|
|
26
|
+
label: string;
|
|
27
|
+
annotation: string;
|
|
28
|
+
type: string;
|
|
29
|
+
condition: string;
|
|
30
|
+
download_yaml: string;
|
|
31
|
+
detail: string;
|
|
32
|
+
node_name: string;
|
|
33
|
+
restarts: string;
|
|
34
|
+
updated_time: string;
|
|
35
|
+
message: string;
|
|
36
|
+
save: string;
|
|
37
|
+
more: string;
|
|
38
|
+
workload: string;
|
|
39
|
+
all_namespaces: string;
|
|
40
|
+
empty: string;
|
|
41
|
+
schedule: string;
|
|
42
|
+
lastScheduleTime: string;
|
|
43
|
+
duration: string;
|
|
44
|
+
completions: string;
|
|
45
|
+
started: string;
|
|
46
|
+
ready: string;
|
|
47
|
+
init_container: string;
|
|
48
|
+
container: string;
|
|
49
|
+
redeploy: string;
|
|
50
|
+
data: string;
|
|
51
|
+
suspend: string;
|
|
52
|
+
resume: string;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './i18n';
|
|
@@ -0,0 +1,9 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
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
|
+
data: WithId<Job>;
|
|
6
|
+
constructor(data: WithId<Job>);
|
|
7
|
+
get duration(): number;
|
|
8
|
+
get durationDisplay(): string | undefined;
|
|
9
|
+
get completionsDisplay(): string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Pod } from 'kubernetes-types/core/v1';
|
|
2
|
+
import { WithId } from '../types';
|
|
3
|
+
import { WorkloadModel } from './workload-model';
|
|
4
|
+
export declare class PodModel extends WorkloadModel<Pod> {
|
|
5
|
+
data: WithId<Pod>;
|
|
6
|
+
constructor(data: WithId<Pod>);
|
|
7
|
+
get imageNames(): string[];
|
|
8
|
+
get restartCount(): number;
|
|
9
|
+
get readyDisplay(): string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Resource } from '../types';
|
|
2
|
+
export declare class ResourceModel implements Resource {
|
|
3
|
+
data: Resource;
|
|
4
|
+
id: Resource['id'];
|
|
5
|
+
apiVersion: Resource['apiVersion'];
|
|
6
|
+
kind: Resource['kind'];
|
|
7
|
+
metadata: Resource['metadata'];
|
|
8
|
+
constructor(data: 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
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
data: WithId<T>;
|
|
9
|
+
constructor(data: 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 {};
|