@dovetail-v2/refine 0.0.66-pod-exec.0 → 0.0.66-pod-exec.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-f07df2b6.js} +1 -1
- package/dist/{index-c07bed15.js → index-ea6dd427.js} +334 -168
- package/dist/refine.js +122 -115
- package/dist/refine.umd.cjs +221 -55
- package/lib/App.d.ts +2 -0
- package/lib/Dovetail.d.ts +18 -0
- package/lib/components/Breadcrumb/index.d.ts +5 -0
- package/lib/components/ConditionsTable/ConditionsTable.d.ts +7 -0
- package/lib/components/ConditionsTable/index.d.ts +1 -0
- package/lib/components/CreateButton/index.d.ts +1 -0
- package/lib/components/CronJobDropdown/index.d.ts +8 -0
- package/lib/components/CronjobJobsTable/index.d.ts +8 -0
- package/lib/components/DeleteButton/index.d.ts +2 -0
- package/lib/components/DeleteManyButton/index.d.ts +4 -0
- package/lib/components/DrawerShow/DrawerShow.d.ts +8 -0
- package/lib/components/DrawerShow/index.d.ts +1 -0
- package/lib/components/DurationTime/index.d.ts +5 -0
- package/lib/components/EditButton/index.d.ts +2 -0
- package/lib/components/EditField/index.d.ts +15 -0
- package/lib/components/ErrorContent/index.d.ts +17 -0
- package/lib/components/EventsTable/EventsTable.d.ts +6 -0
- package/lib/components/EventsTable/index.d.ts +1 -0
- package/lib/{src/components/FormModal/index.d.ts → components/Form/FormModal.d.ts} +2 -2
- package/lib/components/Form/RefineFormContent.d.ts +11 -0
- package/lib/components/Form/RefineFormPage.d.ts +6 -0
- package/lib/{src/components/YamlForm/index.d.ts → components/Form/YamlForm.d.ts} +9 -6
- package/lib/components/Form/index.d.ts +7 -0
- package/lib/components/Form/type.d.ts +17 -0
- package/lib/components/Form/useReactHookForm.d.ts +29 -0
- package/lib/components/Form/useRefineForm.d.ts +13 -0
- package/lib/{src/hooks/useEagleForm.d.ts → components/Form/useYamlForm.d.ts} +8 -5
- package/lib/components/FormErrorAlert/index.d.ts +9 -0
- package/lib/components/FormLayout/index.d.ts +7 -0
- package/lib/{src/components/Form → components/FormWidgets}/KeyValueListWidget.d.ts +0 -1
- package/lib/{src/components/Form → components/FormWidgets}/MetadataForm.d.ts +0 -1
- package/lib/{src/components/Form → components/FormWidgets}/NameInputWidget.d.ts +0 -1
- package/lib/{src/components/Form → components/FormWidgets}/NamespaceSelectWidget.d.ts +0 -1
- package/lib/components/FormWidgets/index.d.ts +4 -0
- package/lib/components/ImageNames/index.d.ts +5 -0
- package/lib/components/IngressRulesComponent/index.d.ts +5 -0
- package/lib/components/IngressRulesTable/IngressRulesTable.d.ts +7 -0
- package/lib/components/IngressRulesTable/index.d.ts +1 -0
- package/lib/components/K8sDropdown/index.d.ts +9 -0
- package/lib/components/KeyValue/KeyValue.d.ts +7 -0
- package/lib/components/KeyValue/KeyValueAnnotation.d.ts +5 -0
- package/lib/components/KeyValue/KeyValueSecret.d.ts +4 -0
- package/lib/components/KeyValue/index.d.ts +3 -0
- package/lib/components/Layout/index.d.ts +3 -0
- package/lib/components/LinkFallback/index.d.ts +3 -0
- package/lib/components/ListPage/index.d.ts +9 -0
- package/lib/components/Menu/index.d.ts +1 -0
- package/lib/components/NamespacesFilter/index.d.ts +11 -0
- package/lib/components/NetworkPolicyRulesViewer/index.d.ts +1 -0
- package/lib/components/PageShow/PageShow.d.ts +12 -0
- package/lib/components/PageShow/index.d.ts +1 -0
- package/lib/components/PodContainersTable/PodContainersTable.d.ts +8 -0
- package/lib/components/PodContainersTable/index.d.ts +1 -0
- package/lib/components/PodDropdown/index.d.ts +9 -0
- package/lib/components/PodLog/index.d.ts +6 -0
- package/lib/components/PodSelectorTable/index.d.ts +6 -0
- package/lib/components/PodShellModal/PodShell.d.ts +18 -0
- package/lib/components/PodShellModal/index.d.ts +9 -0
- package/lib/components/PortsTable/index.d.ts +7 -0
- package/lib/components/ReferenceLink/index.d.ts +8 -0
- package/lib/components/ReplicasDropdown/index.d.ts +9 -0
- package/lib/components/ResourceCRUD/ResourceCRUD.d.ts +7 -0
- package/lib/components/ResourceCRUD/create/index.d.ts +7 -0
- package/lib/components/ResourceCRUD/index.d.ts +4 -0
- package/lib/components/ResourceCRUD/list/index.d.ts +8 -0
- package/lib/components/ResourceCRUD/show/index.d.ts +8 -0
- package/lib/components/ResourceFiledDisplays.d.ts +6 -0
- package/lib/components/ResourceLink/index.d.ts +8 -0
- package/lib/components/ResourceSelect/index.d.ts +11 -0
- package/lib/components/ResourceUsageBar/index.d.ts +8 -0
- package/lib/components/Separator/index.d.ts +2 -0
- package/lib/components/ServiceComponents/index.d.ts +10 -0
- package/lib/components/Shell/index.d.ts +54 -0
- package/lib/components/ShowContent/ShowContent.d.ts +18 -0
- package/lib/components/ShowContent/fields.d.ts +68 -0
- package/lib/components/ShowContent/groups.d.ts +23 -0
- package/lib/components/ShowContent/index.d.ts +4 -0
- package/lib/components/ShowContent/tabs.d.ts +5 -0
- package/lib/components/StateTag/StateTag.d.ts +10 -0
- package/lib/components/StateTag/index.d.ts +1 -0
- package/lib/components/Table/TableToolBar.d.ts +8 -0
- package/lib/components/Table/TableWidgets.d.ts +6 -0
- package/lib/components/Table/index.d.ts +43 -0
- package/lib/components/Tabs/index.d.ts +10 -0
- package/lib/components/Tags/index.d.ts +6 -0
- package/lib/components/TextTags/index.d.ts +6 -0
- package/lib/components/Time/index.d.ts +8 -0
- package/lib/components/ValueDisplay/index.d.ts +9 -0
- package/lib/components/WorkloadDropdown/index.d.ts +9 -0
- package/lib/components/WorkloadPodsTable/WorkloadPodsTable.d.ts +9 -0
- package/lib/components/WorkloadPodsTable/index.d.ts +1 -0
- package/lib/components/WorkloadReplicas/index.d.ts +17 -0
- package/lib/components/YamlEditor/MonacoYamlDiffEditor.d.ts +9 -0
- package/lib/components/YamlEditor/MonacoYamlEditor.d.ts +19 -0
- package/lib/components/YamlEditor/YamlEditorComponent.d.ts +27 -0
- package/lib/components/YamlEditor/index.d.ts +1 -0
- package/lib/components/YamlEditor/style.d.ts +11 -0
- package/lib/components/YamlEditor/yaml.worker.d.ts +1 -0
- package/lib/components/index.d.ts +47 -0
- package/lib/constants/auth.d.ts +5 -0
- package/lib/constants/index.d.ts +3 -0
- package/lib/constants/k8s.d.ts +487 -0
- package/lib/constants/state.d.ts +15 -0
- package/lib/contexts/component.d.ts +7 -0
- package/lib/contexts/configs.d.ts +3 -0
- package/lib/contexts/global-store.d.ts +5 -0
- package/lib/contexts/index.d.ts +3 -0
- package/lib/hooks/index.d.ts +8 -0
- package/lib/hooks/useDeleteModal/index.d.ts +1 -0
- package/lib/hooks/useDeleteModal/useDeleteManyModal.d.ts +7 -0
- package/lib/hooks/useDeleteModal/useDeleteModal.d.ts +7 -0
- package/lib/hooks/useDownloadYAML.d.ts +7 -0
- package/lib/hooks/useEagleTable/columns.d.ts +41 -0
- package/lib/hooks/useEagleTable/index.d.ts +2 -0
- package/lib/hooks/useEagleTable/useEagleTable.d.ts +55 -0
- package/lib/hooks/useEdit.d.ts +4 -0
- package/lib/hooks/useGlobalStore.d.ts +3 -0
- package/lib/hooks/useK8sYamlEditor.d.ts +5 -0
- package/lib/hooks/useOpenForm.d.ts +7 -0
- package/lib/hooks/useSchema.d.ts +14 -0
- package/lib/hooks/useSubmitForm.d.ts +14 -0
- package/lib/hooks/useTableData.d.ts +19 -0
- package/lib/i18n.d.ts +353 -0
- package/lib/index.d.ts +11 -0
- package/lib/locales/en-US/index.d.ts +175 -0
- package/lib/locales/index.d.ts +2 -0
- package/lib/locales/zh-CN/index.d.ts +175 -0
- package/lib/main.d.ts +3 -0
- package/lib/models/cronjob-model.d.ts +15 -0
- package/lib/models/daemonset-model.d.ts +15 -0
- package/lib/models/deployment-model.d.ts +13 -0
- package/lib/models/event-model.d.ts +7 -0
- package/lib/models/index.d.ts +19 -0
- package/lib/models/ingress-model.d.ts +20 -0
- package/lib/models/job-model.d.ts +20 -0
- package/lib/models/network-policy-model.d.ts +9 -0
- package/lib/models/node-model.d.ts +17 -0
- package/lib/models/persistent-volume-claim.d.ts +9 -0
- package/lib/models/persistent-volume.d.ts +9 -0
- package/lib/models/pod-metrics-model.d.ts +8 -0
- package/lib/models/pod-model.d.ts +20 -0
- package/lib/models/resource-model.d.ts +21 -0
- package/lib/models/service-model.d.ts +24 -0
- package/lib/models/statefulset-model.d.ts +13 -0
- package/lib/models/storage-class.d.ts +12 -0
- package/lib/models/types/index.d.ts +1 -0
- package/lib/{src → models}/types/metric.d.ts +2 -2
- package/lib/models/workload-base-model.d.ts +12 -0
- package/lib/models/workload-model.d.ts +18 -0
- package/lib/pages/configmaps/index.d.ts +4 -0
- package/lib/{src/pages/statefulsets → pages/cronjobs}/create/index.d.ts +1 -1
- package/lib/pages/cronjobs/index.d.ts +3 -0
- package/lib/{src/pages/statefulsets → pages/cronjobs}/list/index.d.ts +1 -1
- package/lib/{src/pages/statefulsets → pages/cronjobs}/show/index.d.ts +1 -1
- package/lib/pages/daemonsets/create/index.d.ts +3 -0
- package/lib/pages/daemonsets/index.d.ts +3 -0
- package/lib/{src/pages/storageclasses → pages/daemonsets}/list/index.d.ts +1 -1
- package/lib/{src/pages/storageclasses → pages/daemonsets}/show/index.d.ts +1 -1
- package/lib/pages/deployments/index.d.ts +2 -0
- package/lib/pages/deployments/list/index.d.ts +3 -0
- package/lib/pages/deployments/show/index.d.ts +3 -0
- package/lib/pages/ingresses/index.d.ts +4 -0
- package/lib/pages/jobs/index.d.ts +4 -0
- package/lib/pages/networkPolicies/index.d.ts +4 -0
- package/lib/pages/nodes/index.d.ts +2 -0
- package/lib/pages/nodes/list/index.d.ts +3 -0
- package/lib/pages/nodes/show/index.d.ts +3 -0
- package/lib/pages/persistentvolumeclaims/index.d.ts +4 -0
- package/lib/pages/persistentvolumes/index.d.ts +4 -0
- package/lib/pages/pods/create/index.d.ts +3 -0
- package/lib/pages/pods/index.d.ts +3 -0
- package/lib/pages/pods/list/index.d.ts +3 -0
- package/lib/pages/pods/show/index.d.ts +3 -0
- package/lib/pages/secrets/index.d.ts +4 -0
- package/lib/pages/services/index.d.ts +4 -0
- package/lib/pages/statefulsets/index.d.ts +4 -0
- package/lib/pages/storageclasses/form/index.d.ts +9 -0
- package/lib/pages/storageclasses/index.d.ts +44 -0
- package/lib/plugins/index.d.ts +4 -0
- package/lib/plugins/model-plugin.d.ts +13 -0
- package/lib/plugins/relation-plugin.d.ts +26 -0
- package/lib/plugins/type.d.ts +8 -0
- package/lib/providers/index.d.ts +1 -0
- package/lib/providers/router-provider/index.d.ts +21 -0
- package/lib/src/components/ListPage/index.d.ts +1 -0
- package/lib/src/components/ResourceFiledDisplays.d.ts +7 -0
- package/lib/src/components/Shell/index.d.ts +4 -0
- package/lib/src/components/ShowContent/fields.d.ts +7 -2
- package/lib/src/components/index.d.ts +1 -0
- package/lib/src/hooks/useEagleTable/columns.d.ts +6 -6
- package/lib/src/i18n.d.ts +26 -1
- package/lib/src/locales/en-US/index.d.ts +14 -0
- 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/lib/types/index.d.ts +1 -0
- package/lib/types/resource.d.ts +62 -0
- package/lib/utils/addId.d.ts +3 -0
- package/lib/utils/download.d.ts +1 -0
- package/lib/utils/error.d.ts +20 -0
- package/lib/utils/form.d.ts +3 -0
- package/lib/utils/k8s.d.ts +3 -0
- package/lib/utils/labels.d.ts +9 -0
- package/lib/utils/match-selector.d.ts +3 -0
- package/lib/utils/openapi.d.ts +45 -0
- package/lib/utils/schema.d.ts +17 -0
- package/lib/utils/selector.d.ts +3 -0
- package/lib/utils/shell.d.ts +15 -0
- package/lib/utils/string.d.ts +1 -0
- package/lib/utils/time.d.ts +13 -0
- package/lib/utils/unit.d.ts +12 -0
- package/lib/utils/yaml.d.ts +2 -0
- package/package.json +5 -5
- 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/index.d.ts +0 -1
- package/lib/src/components/Shell/zmodem/index.d.ts +0 -51
- package/lib/src/components/Table/ErrorContent.d.ts +0 -10
- package/lib/src/hooks/useModal.d.ts +0 -0
- 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/components/Form → components/FormWidgets}/widget.d.ts +0 -0
- /package/lib/{src/components/NetworkPolicyRulesTable/NetworkPolicyRulesTable.d.ts → components/NetworkPolicyRulesViewer/NetworkPolicyRulesViewer.d.ts} +0 -0
- /package/lib/{src/hooks/useNamespaceFilter.d.ts → hooks/useNamespaceRefineFilter.d.ts} +0 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ResourceModel } from 'src/models';
|
|
2
|
+
import { ResourceConfig } from 'src/types';
|
|
3
|
+
type GenerateStorageClassFormConfig = {
|
|
4
|
+
isEnabledZbs?: boolean;
|
|
5
|
+
isEnabledElf?: boolean;
|
|
6
|
+
isVmKsc?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare function generateStorageClassFormConfig(options: GenerateStorageClassFormConfig): ResourceConfig<ResourceModel>['formConfig'];
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { i18n as I18n } from 'i18next';
|
|
2
|
+
import { RESOURCE_GROUP } from 'src/types';
|
|
3
|
+
export declare const StorageClassConfig: (i18n: I18n) => {
|
|
4
|
+
name: string;
|
|
5
|
+
basePath: string;
|
|
6
|
+
kind: string;
|
|
7
|
+
parent: RESOURCE_GROUP;
|
|
8
|
+
label: string;
|
|
9
|
+
initValue: {
|
|
10
|
+
apiVersion: string;
|
|
11
|
+
kind: string;
|
|
12
|
+
metadata: {
|
|
13
|
+
name: string;
|
|
14
|
+
namespace: string;
|
|
15
|
+
};
|
|
16
|
+
spec: {};
|
|
17
|
+
};
|
|
18
|
+
formConfig: {
|
|
19
|
+
fields?: ((props: {
|
|
20
|
+
record?: import("../..").ResourceModel<import("k8s-api-provider").Unstructured> | undefined;
|
|
21
|
+
records: import("../..").ResourceModel<import("k8s-api-provider").Unstructured>[];
|
|
22
|
+
action: "create" | "edit";
|
|
23
|
+
}) => import("../../components").RefineFormField[]) | undefined;
|
|
24
|
+
saveButtonText?: string;
|
|
25
|
+
renderForm?: (props: import("../../components").YamlFormProps) => React.ReactNode;
|
|
26
|
+
formType?: import("src/types").FormType;
|
|
27
|
+
transformInitValues?: (values: import("k8s-api-provider").Unstructured) => import("k8s-api-provider").Unstructured;
|
|
28
|
+
transformApplyValues?: (values: import("k8s-api-provider").Unstructured) => import("k8s-api-provider").Unstructured;
|
|
29
|
+
formTitle?: string | ((action: "create" | "edit") => string);
|
|
30
|
+
formDesc?: string | ((action: "create" | "edit") => string);
|
|
31
|
+
formatError?: (errorBody: any) => string;
|
|
32
|
+
refineCoreProps?: import("@refinedev/react-hook-form").UseFormProps["refineCoreProps"];
|
|
33
|
+
useFormProps?: import("@refinedev/react-hook-form").UseFormProps;
|
|
34
|
+
} | undefined;
|
|
35
|
+
columns: () => (import("../../components").Column<import("../..").ResourceModel<import("k8s-api-provider").Unstructured>> | import("../../components").Column<import("../..").StorageClassModel>)[];
|
|
36
|
+
showConfig: () => {
|
|
37
|
+
tabs: {
|
|
38
|
+
title: string;
|
|
39
|
+
key: string;
|
|
40
|
+
groups: import("../../components").ShowGroup<import("../..").StorageClassModel>[];
|
|
41
|
+
}[];
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
export * from './form';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { GlobalStore, Unstructured, UnstructuredList, IProviderPlugin, DataList } from 'k8s-api-provider';
|
|
2
|
+
import { ResourceModel } from '../models';
|
|
3
|
+
export declare class ModelPlugin implements IProviderPlugin<ResourceModel> {
|
|
4
|
+
_globalStore?: GlobalStore;
|
|
5
|
+
private ModelMap;
|
|
6
|
+
init(globalStore: GlobalStore): void;
|
|
7
|
+
processData(res: UnstructuredList): Promise<DataList<ResourceModel<Unstructured>>>;
|
|
8
|
+
processItem(item: Unstructured): Promise<ResourceModel>;
|
|
9
|
+
restoreData(res: DataList<ResourceModel>): UnstructuredList;
|
|
10
|
+
restoreItem(item: ResourceModel): Unstructured;
|
|
11
|
+
setModelMap(key: string, model: ResourceModel): void;
|
|
12
|
+
}
|
|
13
|
+
export declare const modelPlugin: ModelPlugin;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { GlobalStore, Unstructured, UnstructuredList } from 'k8s-api-provider';
|
|
2
|
+
import { LabelSelector, ObjectMeta } from 'kubernetes-types/meta/v1';
|
|
3
|
+
import { ResourceModel } from '../models';
|
|
4
|
+
export type Relation = {
|
|
5
|
+
kind: string;
|
|
6
|
+
apiVersion: string;
|
|
7
|
+
type: 'creates' | 'uses' | 'applies' | 'owner' | 'selects';
|
|
8
|
+
inbound: boolean;
|
|
9
|
+
name?: string;
|
|
10
|
+
namespace?: string;
|
|
11
|
+
selector?: LabelSelector;
|
|
12
|
+
};
|
|
13
|
+
export type ExtendObjectMeta = ObjectMeta & {
|
|
14
|
+
relations?: Relation[];
|
|
15
|
+
};
|
|
16
|
+
export declare class RelationPlugin {
|
|
17
|
+
private globalStore?;
|
|
18
|
+
init(globalStore: GlobalStore): void;
|
|
19
|
+
processData(res: UnstructuredList): Promise<UnstructuredList>;
|
|
20
|
+
processItem(item: Unstructured): Promise<ResourceModel>;
|
|
21
|
+
restoreData(res: UnstructuredList): UnstructuredList;
|
|
22
|
+
restoreItem(item: Unstructured): Unstructured;
|
|
23
|
+
private processPodSelector;
|
|
24
|
+
private appendRelation;
|
|
25
|
+
}
|
|
26
|
+
export declare const relationPlugin: RelationPlugin;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Unstructured } from 'k8s-api-provider';
|
|
2
|
+
import { ListMeta } from 'kubernetes-types/meta/v1';
|
|
3
|
+
export type DataList<Output extends Unstructured = Unstructured> = {
|
|
4
|
+
apiVersion: string;
|
|
5
|
+
kind: string;
|
|
6
|
+
metadata: ListMeta;
|
|
7
|
+
items: Array<Unstructured & Output>;
|
|
8
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { routerProvider } from './router-provider';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { GoConfig, ParseResponse } from '@refinedev/core';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export declare const stringifyConfig: {
|
|
4
|
+
addQueryPrefix: boolean;
|
|
5
|
+
skipNulls: boolean;
|
|
6
|
+
arrayFormat: "indices";
|
|
7
|
+
encode: boolean;
|
|
8
|
+
encodeValuesOnly: boolean;
|
|
9
|
+
};
|
|
10
|
+
export declare const convertToNumberIfPossible: (value: string | undefined) => string | number | undefined;
|
|
11
|
+
export declare const routerProvider: {
|
|
12
|
+
go: () => ({ to, type, query, hash, options: { keepQuery, keepHash } }: GoConfig) => string | void;
|
|
13
|
+
back: () => () => void;
|
|
14
|
+
parse: () => () => ParseResponse;
|
|
15
|
+
Link: React.ForwardRefExoticComponent<Pick<{
|
|
16
|
+
[prop: string]: any;
|
|
17
|
+
to: string;
|
|
18
|
+
} & {
|
|
19
|
+
children?: React.ReactNode | undefined;
|
|
20
|
+
}, string | number> & React.RefAttributes<HTMLAnchorElement>>;
|
|
21
|
+
};
|
|
@@ -4,6 +4,7 @@ import { ResourceModel } from '../../models';
|
|
|
4
4
|
interface ListPageProps<T extends ResourceModel> {
|
|
5
5
|
selectedKeys: string[];
|
|
6
6
|
tableProps: TableProps<T>;
|
|
7
|
+
contentClassName?: string;
|
|
7
8
|
}
|
|
8
9
|
export declare function ListPage<T extends ResourceModel>(props: ListPageProps<T>): JSX.Element;
|
|
9
10
|
export {};
|
|
@@ -9,6 +9,7 @@ export declare enum SocketStatus {
|
|
|
9
9
|
export type ShellProps = React.PropsWithChildren<{
|
|
10
10
|
url: string;
|
|
11
11
|
protocols?: string;
|
|
12
|
+
className?: string;
|
|
12
13
|
encode: (input: string) => string | ArrayBufferLike | Blob | ArrayBufferView;
|
|
13
14
|
decode?: (output: string | ArrayBufferLike | Blob | ArrayBufferView) => string | ArrayBuffer;
|
|
14
15
|
fit?: (layout: {
|
|
@@ -25,14 +26,17 @@ export type ShellProps = React.PropsWithChildren<{
|
|
|
25
26
|
export interface ShellHandler {
|
|
26
27
|
clear: () => void;
|
|
27
28
|
send: (data: string | ArrayBufferLike | Blob | ArrayBufferView) => void;
|
|
29
|
+
fit: () => void;
|
|
28
30
|
getAllTerminalContents: () => string[];
|
|
29
31
|
setSocketStatus: React.Dispatch<React.SetStateAction<SocketStatus>>;
|
|
30
32
|
searchNext: (search: string) => void;
|
|
31
33
|
searchPrevious: (search: string) => void;
|
|
34
|
+
setOptions: (options: Record<string, unknown>) => void;
|
|
32
35
|
}
|
|
33
36
|
export declare const Shell: React.ForwardRefExoticComponent<{
|
|
34
37
|
url: string;
|
|
35
38
|
protocols?: string | undefined;
|
|
39
|
+
className?: string | undefined;
|
|
36
40
|
encode: (input: string) => string | ArrayBufferLike | Blob | ArrayBufferView;
|
|
37
41
|
decode?: ((output: string | ArrayBufferLike | Blob | ArrayBufferView) => string | ArrayBuffer) | undefined;
|
|
38
42
|
fit?: ((layout: {
|
|
@@ -2,7 +2,7 @@ import { i18n as I18nType } from 'i18next';
|
|
|
2
2
|
import { Unstructured } from 'k8s-api-provider';
|
|
3
3
|
import { NetworkPolicy } from 'kubernetes-types/networking/v1';
|
|
4
4
|
import React from 'react';
|
|
5
|
-
import { JobModel, ResourceModel, WorkloadModel, WorkloadBaseModel, CronJobModel, IngressModel, ServiceModel, StorageClassModel } from '../../models';
|
|
5
|
+
import { JobModel, ResourceModel, WorkloadModel, WorkloadBaseModel, CronJobModel, IngressModel, ServiceModel, StorageClassModel, PersistentVolumeModel, PersistentVolumeClaimModel } from '../../models';
|
|
6
6
|
export type ShowField<Model extends ResourceModel> = {
|
|
7
7
|
key: string;
|
|
8
8
|
title?: React.ReactNode;
|
|
@@ -59,5 +59,10 @@ export declare const PodSelectorField: <Model extends ResourceModel<Required<Uns
|
|
|
59
59
|
export declare const PortsTableField: <Model extends ServiceModel>() => ShowField<Model>;
|
|
60
60
|
export declare const DurationField: <Model extends JobModel | CronJobModel>(i18n: I18nType) => ShowField<Model>;
|
|
61
61
|
export declare const StorageClassProvisionerField: <Model extends StorageClassModel>(i18n: I18nType) => ShowField<Model>;
|
|
62
|
-
export declare const StorageClassFsTypeField: <Model extends StorageClassModel>(i18n: I18nType) => ShowField<Model>;
|
|
63
62
|
export declare const StorageClassPvField: <Model extends StorageClassModel>() => ShowField<Model>;
|
|
63
|
+
export declare const PVCapacityField: <Model extends PersistentVolumeModel>(i18n: I18nType) => ShowField<Model>;
|
|
64
|
+
export declare const PVCStorageField: <Model extends PersistentVolumeClaimModel>(i18n: I18nType) => ShowField<Model>;
|
|
65
|
+
export declare const PVStorageClassField: <Model extends PersistentVolumeModel | PersistentVolumeClaimModel>(i18n: I18nType) => ShowField<Model>;
|
|
66
|
+
export declare const PVPhaseField: <Model extends PersistentVolumeModel | PersistentVolumeClaimModel>(i18n: I18nType) => ShowField<Model>;
|
|
67
|
+
export declare const PVVolumeModeField: <Model extends PersistentVolumeModel | PersistentVolumeClaimModel>(i18n: I18nType) => ShowField<Model>;
|
|
68
|
+
export declare const PVAccessModeField: <Model extends PersistentVolumeModel | PersistentVolumeClaimModel>(i18n: I18nType) => ShowField<Model>;
|
|
@@ -39,6 +39,7 @@ export * from './Tags';
|
|
|
39
39
|
export * from './TextTags';
|
|
40
40
|
export * from './PodLog';
|
|
41
41
|
export * from './NetworkPolicyRulesViewer';
|
|
42
|
+
export * from './ResourceFiledDisplays';
|
|
42
43
|
export * from './Tabs';
|
|
43
44
|
export * as ValueDisplay from './ValueDisplay';
|
|
44
45
|
export * from './ResourceSelect';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { i18n as I18nType } from 'i18next';
|
|
3
3
|
import { Column } from '../../components/Table';
|
|
4
|
-
import { JobModel, PodModel, ResourceModel, WorkloadModel, WorkloadBaseModel, CronJobModel, IngressModel, ServiceModel, DaemonSetModel, StorageClassModel, PersistentVolumeModel } from '../../models';
|
|
4
|
+
import { JobModel, PodModel, ResourceModel, WorkloadModel, WorkloadBaseModel, CronJobModel, IngressModel, ServiceModel, DaemonSetModel, StorageClassModel, PersistentVolumeModel, PersistentVolumeClaimModel } from '../../models';
|
|
5
5
|
export declare const CommonSorter: (dataIndex: string[]) => (a: unknown, b: unknown) => 0 | 1 | -1;
|
|
6
6
|
export declare const NameColumnRenderer: <Model extends ResourceModel<import("k8s-api-provider").Unstructured>>(i18n: I18nType, resource?: string) => Column<Model>;
|
|
7
7
|
export declare const PlainTextNameColumnRenderer: <Model extends ResourceModel<import("k8s-api-provider").Unstructured>>(i18n: I18nType) => Column<Model>;
|
|
@@ -34,9 +34,9 @@ export declare const PodContainersNumColumnRenderer: <Model extends PodModel>(i1
|
|
|
34
34
|
export declare const DataKeysColumnRenderer: <Model extends ResourceModel<import("k8s-api-provider").Unstructured>>(i18n: I18nType) => Column<Model>;
|
|
35
35
|
export declare const PortMappingColumnRenderer: <Model extends ServiceModel>(i18n: I18nType, clusterVip: string) => Column<Model>;
|
|
36
36
|
export declare const ProvisionerColumnRenderer: <Model extends StorageClassModel>(i18n: I18nType) => Column<Model>;
|
|
37
|
-
export declare const FsTypeColumnRenderer: <Model extends StorageClassModel>(i18n: I18nType) => Column<Model>;
|
|
38
37
|
export declare const PVCapacityColumnRenderer: <Model extends PersistentVolumeModel>(i18n: I18nType) => Column<Model>;
|
|
39
|
-
export declare const
|
|
40
|
-
export declare const
|
|
41
|
-
export declare const
|
|
42
|
-
export declare const
|
|
38
|
+
export declare const PVCStorageColumnRenderer: <Model extends PersistentVolumeClaimModel>(i18n: I18nType) => Column<Model>;
|
|
39
|
+
export declare const PVStorageClassColumnRenderer: <Model extends PersistentVolumeModel | PersistentVolumeClaimModel>(i18n: I18nType) => Column<Model>;
|
|
40
|
+
export declare const PVPhaseColumnRenderer: <Model extends PersistentVolumeModel | PersistentVolumeClaimModel>(i18n: I18nType) => Column<Model>;
|
|
41
|
+
export declare const PVVolumeModeColumnRenderer: <Model extends PersistentVolumeModel | PersistentVolumeClaimModel>(i18n: I18nType) => Column<Model>;
|
|
42
|
+
export declare const PVAccessModeColumnRenderer: <Model extends PersistentVolumeModel | PersistentVolumeClaimModel>(i18n: I18nType) => Column<Model>;
|
package/lib/src/i18n.d.ts
CHANGED
|
@@ -158,6 +158,20 @@ export declare const resources: {
|
|
|
158
158
|
not_support: string;
|
|
159
159
|
stopped: string;
|
|
160
160
|
any_node_ip: string;
|
|
161
|
+
storage_class: string;
|
|
162
|
+
persistent_volume: string;
|
|
163
|
+
provisioner: string;
|
|
164
|
+
file_system: string;
|
|
165
|
+
capacity: string;
|
|
166
|
+
phase: string;
|
|
167
|
+
volume_mode: string;
|
|
168
|
+
access_mode: string;
|
|
169
|
+
block: string;
|
|
170
|
+
pv_phase_available: string;
|
|
171
|
+
pv_phase_bound: string;
|
|
172
|
+
pv_phase_released: string;
|
|
173
|
+
pv_phase_failed: string;
|
|
174
|
+
pv_phase_pending: string;
|
|
161
175
|
exec_pod: string;
|
|
162
176
|
};
|
|
163
177
|
};
|
|
@@ -318,10 +332,21 @@ export declare const resources: {
|
|
|
318
332
|
only_support_one_yaml: string;
|
|
319
333
|
not_support: string;
|
|
320
334
|
stopped: string;
|
|
335
|
+
any_node_ip: string;
|
|
321
336
|
storage_class: string;
|
|
322
|
-
|
|
337
|
+
persistent_volume: string;
|
|
323
338
|
provisioner: string;
|
|
324
339
|
file_system: string;
|
|
340
|
+
capacity: string;
|
|
341
|
+
phase: string;
|
|
342
|
+
volume_mode: string;
|
|
343
|
+
access_mode: string;
|
|
344
|
+
block: string;
|
|
345
|
+
pv_phase_available: string;
|
|
346
|
+
pv_phase_bound: string;
|
|
347
|
+
pv_phase_released: string;
|
|
348
|
+
pv_phase_failed: string;
|
|
349
|
+
pv_phase_pending: string;
|
|
325
350
|
};
|
|
326
351
|
};
|
|
327
352
|
};
|
|
@@ -155,6 +155,20 @@ declare const _default: {
|
|
|
155
155
|
not_support: string;
|
|
156
156
|
stopped: string;
|
|
157
157
|
any_node_ip: string;
|
|
158
|
+
storage_class: string;
|
|
159
|
+
persistent_volume: string;
|
|
160
|
+
provisioner: string;
|
|
161
|
+
file_system: string;
|
|
162
|
+
capacity: string;
|
|
163
|
+
phase: string;
|
|
164
|
+
volume_mode: string;
|
|
165
|
+
access_mode: string;
|
|
166
|
+
block: string;
|
|
167
|
+
pv_phase_available: string;
|
|
168
|
+
pv_phase_bound: string;
|
|
169
|
+
pv_phase_released: string;
|
|
170
|
+
pv_phase_failed: string;
|
|
171
|
+
pv_phase_pending: string;
|
|
158
172
|
exec_pod: string;
|
|
159
173
|
};
|
|
160
174
|
};
|
|
@@ -155,10 +155,21 @@ declare const _default: {
|
|
|
155
155
|
only_support_one_yaml: string;
|
|
156
156
|
not_support: string;
|
|
157
157
|
stopped: string;
|
|
158
|
+
any_node_ip: string;
|
|
158
159
|
storage_class: string;
|
|
159
|
-
|
|
160
|
+
persistent_volume: string;
|
|
160
161
|
provisioner: string;
|
|
161
162
|
file_system: string;
|
|
163
|
+
capacity: string;
|
|
164
|
+
phase: string;
|
|
165
|
+
volume_mode: string;
|
|
166
|
+
access_mode: string;
|
|
167
|
+
block: string;
|
|
168
|
+
pv_phase_available: string;
|
|
169
|
+
pv_phase_bound: string;
|
|
170
|
+
pv_phase_released: string;
|
|
171
|
+
pv_phase_failed: string;
|
|
172
|
+
pv_phase_pending: string;
|
|
162
173
|
};
|
|
163
174
|
};
|
|
164
175
|
export default _default;
|
|
@@ -5,7 +5,6 @@ import { WorkloadBaseModel } from './workload-base-model';
|
|
|
5
5
|
type RequiredCronJob = Required<CronJob> & Unstructured;
|
|
6
6
|
export declare class CronJobModel extends WorkloadBaseModel {
|
|
7
7
|
_rawYaml: RequiredCronJob;
|
|
8
|
-
_globalStore: GlobalStore;
|
|
9
8
|
spec?: RequiredCronJob['spec'];
|
|
10
9
|
status?: RequiredCronJob['status'];
|
|
11
10
|
constructor(_rawYaml: RequiredCronJob, _globalStore: GlobalStore);
|
|
@@ -5,7 +5,6 @@ import { WorkloadModel } from './workload-model';
|
|
|
5
5
|
type RequiredDaemonSet = Required<DaemonSet> & Unstructured;
|
|
6
6
|
export declare class DaemonSetModel extends WorkloadModel {
|
|
7
7
|
_rawYaml: RequiredDaemonSet;
|
|
8
|
-
_globalStore: GlobalStore;
|
|
9
8
|
spec?: RequiredDaemonSet['spec'];
|
|
10
9
|
status?: RequiredDaemonSet['status'];
|
|
11
10
|
constructor(_rawYaml: RequiredDaemonSet, _globalStore: GlobalStore);
|
|
@@ -5,7 +5,6 @@ import { WorkloadModel } from './workload-model';
|
|
|
5
5
|
type RequiredDeployment = Required<Deployment> & Unstructured;
|
|
6
6
|
export declare class DeploymentModel extends WorkloadModel {
|
|
7
7
|
_rawYaml: RequiredDeployment;
|
|
8
|
-
_globalStore: GlobalStore;
|
|
9
8
|
spec?: RequiredDeployment['spec'];
|
|
10
9
|
status?: RequiredDeployment['status'];
|
|
11
10
|
constructor(_rawYaml: RequiredDeployment, _globalStore: GlobalStore);
|
|
@@ -3,6 +3,5 @@ import { Event } from 'kubernetes-types/core/v1';
|
|
|
3
3
|
import { ResourceModel } from './resource-model';
|
|
4
4
|
export declare class EventModel extends ResourceModel {
|
|
5
5
|
_rawYaml: Unstructured & Event;
|
|
6
|
-
_globalStore: GlobalStore;
|
|
7
6
|
constructor(_rawYaml: Unstructured & Event, _globalStore: GlobalStore);
|
|
8
7
|
}
|
|
@@ -12,7 +12,6 @@ export type RuleItem = {
|
|
|
12
12
|
};
|
|
13
13
|
export declare class IngressModel extends ResourceModel<IngressTypes> {
|
|
14
14
|
_rawYaml: IngressTypes;
|
|
15
|
-
_globalStore: GlobalStore;
|
|
16
15
|
flattenedRules: RuleItem[];
|
|
17
16
|
constructor(_rawYaml: IngressTypes, _globalStore: GlobalStore);
|
|
18
17
|
init(): Promise<void>;
|
|
@@ -5,7 +5,6 @@ import { WorkloadBaseModel } from './workload-base-model';
|
|
|
5
5
|
type RequiredJob = Required<Job> & Unstructured;
|
|
6
6
|
export declare class JobModel extends WorkloadBaseModel {
|
|
7
7
|
_rawYaml: RequiredJob;
|
|
8
|
-
_globalStore: GlobalStore;
|
|
9
8
|
restarts: number;
|
|
10
9
|
spec?: RequiredJob['spec'];
|
|
11
10
|
status?: RequiredJob['status'];
|
|
@@ -4,7 +4,6 @@ import { ResourceModel } from './resource-model';
|
|
|
4
4
|
type NetworkPolicyTypes = Required<NetworkPolicy> & Unstructured;
|
|
5
5
|
export declare class NetworkPolicyModel extends ResourceModel<NetworkPolicyTypes> {
|
|
6
6
|
_rawYaml: NetworkPolicyTypes;
|
|
7
|
-
_globalStore: GlobalStore;
|
|
8
7
|
constructor(_rawYaml: NetworkPolicyTypes, _globalStore: GlobalStore);
|
|
9
8
|
}
|
|
10
9
|
export {};
|
|
@@ -8,7 +8,6 @@ export declare enum NodeRole {
|
|
|
8
8
|
}
|
|
9
9
|
export declare class NodeModel extends WorkloadBaseModel {
|
|
10
10
|
_rawYaml: RequiredNode;
|
|
11
|
-
_globalStore: GlobalStore;
|
|
12
11
|
constructor(_rawYaml: RequiredNode, _globalStore: GlobalStore);
|
|
13
12
|
get role(): NodeRole;
|
|
14
13
|
get ip(): string | undefined;
|
|
@@ -4,7 +4,6 @@ import { ResourceModel } from './resource-model';
|
|
|
4
4
|
type RequiredPersistentClaimVolume = Required<PersistentVolumeClaim> & Unstructured;
|
|
5
5
|
export declare class PersistentVolumeClaimModel extends ResourceModel {
|
|
6
6
|
_rawYaml: RequiredPersistentClaimVolume;
|
|
7
|
-
_globalStore: GlobalStore;
|
|
8
7
|
constructor(_rawYaml: RequiredPersistentClaimVolume, _globalStore: GlobalStore);
|
|
9
8
|
}
|
|
10
9
|
export {};
|
|
@@ -4,7 +4,6 @@ import { ResourceModel } from './resource-model';
|
|
|
4
4
|
type RequiredPersistentVolume = Required<PersistentVolume> & Unstructured;
|
|
5
5
|
export declare class PersistentVolumeModel extends ResourceModel {
|
|
6
6
|
_rawYaml: RequiredPersistentVolume;
|
|
7
|
-
_globalStore: GlobalStore;
|
|
8
7
|
constructor(_rawYaml: RequiredPersistentVolume, _globalStore: GlobalStore);
|
|
9
8
|
}
|
|
10
9
|
export {};
|
|
@@ -3,7 +3,6 @@ import { ResourceModel } from './resource-model';
|
|
|
3
3
|
import { PodMetrics, ResourceQuantity } from './types/metric';
|
|
4
4
|
export declare class PodMetricsModel extends ResourceModel<PodMetrics> {
|
|
5
5
|
_rawYaml: PodMetrics;
|
|
6
|
-
_globalStore: GlobalStore;
|
|
7
6
|
usage: ResourceQuantity;
|
|
8
7
|
constructor(_rawYaml: PodMetrics, _globalStore: GlobalStore);
|
|
9
8
|
}
|
|
@@ -5,7 +5,6 @@ import { WorkloadBaseModel } from './workload-base-model';
|
|
|
5
5
|
type RequiredPod = Required<Pod> & Unstructured;
|
|
6
6
|
export declare class PodModel extends WorkloadBaseModel {
|
|
7
7
|
_rawYaml: RequiredPod;
|
|
8
|
-
_globalStore: GlobalStore;
|
|
9
8
|
request: ResourceQuantity;
|
|
10
9
|
limit: ResourceQuantity;
|
|
11
10
|
spec?: RequiredPod['spec'];
|
|
@@ -2,11 +2,11 @@ import { GlobalStore, Unstructured } from 'k8s-api-provider';
|
|
|
2
2
|
export type IResourceModel = Unstructured & ResourceModel;
|
|
3
3
|
export declare class ResourceModel<T extends Unstructured = Unstructured> {
|
|
4
4
|
_rawYaml: T;
|
|
5
|
-
_globalStore: GlobalStore;
|
|
6
5
|
id: string;
|
|
7
6
|
apiVersion: T['apiVersion'];
|
|
8
7
|
kind: T['kind'];
|
|
9
8
|
metadata: T['metadata'];
|
|
9
|
+
_globalStore: GlobalStore;
|
|
10
10
|
constructor(_rawYaml: T, _globalStore: GlobalStore);
|
|
11
11
|
init(): Promise<void>;
|
|
12
12
|
get name(): string | undefined;
|
|
@@ -11,7 +11,6 @@ export declare enum ServiceTypeEnum {
|
|
|
11
11
|
}
|
|
12
12
|
export declare class ServiceModel extends ResourceModel<ServiceType> {
|
|
13
13
|
_rawYaml: ServiceType;
|
|
14
|
-
_globalStore: GlobalStore;
|
|
15
14
|
constructor(_rawYaml: ServiceType, _globalStore: GlobalStore);
|
|
16
15
|
get displayType(): string | undefined;
|
|
17
16
|
get dnsRecord(): string;
|
|
@@ -5,7 +5,6 @@ import { WorkloadModel } from './workload-model';
|
|
|
5
5
|
type RequiredStatefulSet = Required<StatefulSet> & Unstructured;
|
|
6
6
|
export declare class StatefulSetModel extends WorkloadModel {
|
|
7
7
|
_rawYaml: RequiredStatefulSet;
|
|
8
|
-
_globalStore: GlobalStore;
|
|
9
8
|
spec?: RequiredStatefulSet['spec'];
|
|
10
9
|
status?: RequiredStatefulSet['status'];
|
|
11
10
|
constructor(_rawYaml: RequiredStatefulSet, _globalStore: GlobalStore);
|
|
@@ -5,7 +5,6 @@ import { ResourceModel } from './resource-model';
|
|
|
5
5
|
type RequiredStorageClass = Required<StorageClass> & Unstructured;
|
|
6
6
|
export declare class StorageClassModel extends ResourceModel {
|
|
7
7
|
_rawYaml: RequiredStorageClass;
|
|
8
|
-
_globalStore: GlobalStore;
|
|
9
8
|
pvs: PersistentVolumeModel[];
|
|
10
9
|
constructor(_rawYaml: RequiredStorageClass, _globalStore: GlobalStore);
|
|
11
10
|
init(): Promise<void>;
|
|
@@ -6,7 +6,6 @@ import { ResourceModel } from './resource-model';
|
|
|
6
6
|
type WorkloadBaseTypes = Required<Deployment | StatefulSet | Job | DaemonSet | CronJob | Pod | Node> & Unstructured;
|
|
7
7
|
export declare class WorkloadBaseModel extends ResourceModel<WorkloadBaseTypes> {
|
|
8
8
|
_rawYaml: WorkloadBaseTypes;
|
|
9
|
-
_globalStore: GlobalStore;
|
|
10
9
|
constructor(_rawYaml: WorkloadBaseTypes, _globalStore: GlobalStore);
|
|
11
10
|
get imageNames(): string[];
|
|
12
11
|
}
|
|
@@ -4,7 +4,6 @@ import { WorkloadBaseModel } from './workload-base-model';
|
|
|
4
4
|
type WorkloadTypes = Required<Deployment | StatefulSet | DaemonSet> & Unstructured;
|
|
5
5
|
export declare class WorkloadModel extends WorkloadBaseModel {
|
|
6
6
|
_rawYaml: WorkloadTypes;
|
|
7
|
-
_globalStore: GlobalStore;
|
|
8
7
|
restarts: number;
|
|
9
8
|
spec?: WorkloadTypes['spec'];
|
|
10
9
|
status?: WorkloadTypes['status'];
|
|
@@ -1,19 +1,4 @@
|
|
|
1
1
|
import { i18n as I18n } from 'i18next';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
basePath: string;
|
|
6
|
-
apiVersion: string;
|
|
7
|
-
kind: string;
|
|
8
|
-
parent: RESOURCE_GROUP;
|
|
9
|
-
label: string;
|
|
10
|
-
initValue: {};
|
|
11
|
-
columns: () => (import("../..").Column<import("../..").ResourceModel<import("k8s-api-provider").Unstructured>> | import("../..").Column<import("../..").PersistentVolumeModel>)[];
|
|
12
|
-
showConfig: () => {
|
|
13
|
-
tabs: {
|
|
14
|
-
title: string;
|
|
15
|
-
key: string;
|
|
16
|
-
groups: import("../..").ShowGroup<import("../..").ResourceModel<import("k8s-api-provider").Unstructured>>[];
|
|
17
|
-
}[];
|
|
18
|
-
};
|
|
19
|
-
};
|
|
2
|
+
import { ResourceConfig } from 'src/types';
|
|
3
|
+
import { PersistentVolumeModel } from '../../models';
|
|
4
|
+
export declare const PersistentVolumeConfig: (i18n: I18n) => ResourceConfig<PersistentVolumeModel>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './resource';
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { UseFormProps } from '@refinedev/react-hook-form';
|
|
2
|
+
import { Unstructured } from 'k8s-api-provider';
|
|
3
|
+
import { YamlFormProps } from '../components';
|
|
4
|
+
import { RefineFormField } from '../components/Form';
|
|
5
|
+
import { ShowConfig } from '../components/ShowContent';
|
|
6
|
+
import { Column, TableProps } from '../components/Table';
|
|
7
|
+
import { ResourceModel } from '../models';
|
|
8
|
+
export declare enum RESOURCE_GROUP {
|
|
9
|
+
WORKLOAD = "WORKLOAD",
|
|
10
|
+
STORAGE = "STORAGE",
|
|
11
|
+
NETWORK = "NETWORK",
|
|
12
|
+
CLUSTER = "CLUSTER",
|
|
13
|
+
SERVICE = "SERVICE",
|
|
14
|
+
SERVICE_AND_NETWORK = "SERVICE_AND_NETWORK",
|
|
15
|
+
CONFIG = "CONFIG",
|
|
16
|
+
NODE_MANAGEMENT = "NODE_MANAGEMENT"
|
|
17
|
+
}
|
|
18
|
+
export declare enum FormType {
|
|
19
|
+
PAGE = "PAGE",
|
|
20
|
+
MODAL = "MODAL"
|
|
21
|
+
}
|
|
22
|
+
export type WithId<T> = T & {
|
|
23
|
+
id: string;
|
|
24
|
+
};
|
|
25
|
+
export type ResourceConfig<Model extends ResourceModel = ResourceModel> = {
|
|
26
|
+
name: string;
|
|
27
|
+
kind: string;
|
|
28
|
+
basePath: string;
|
|
29
|
+
apiVersion: string;
|
|
30
|
+
label: string;
|
|
31
|
+
hideListToolBar?: boolean;
|
|
32
|
+
hideNamespacesFilter?: boolean;
|
|
33
|
+
description?: string;
|
|
34
|
+
parent?: RESOURCE_GROUP;
|
|
35
|
+
formatter?: (v: Model) => Model;
|
|
36
|
+
initValue?: Record<string, unknown>;
|
|
37
|
+
columns?: () => Column<Model>[];
|
|
38
|
+
noShow?: boolean;
|
|
39
|
+
showConfig?: () => ShowConfig<Model>;
|
|
40
|
+
Dropdown?: React.FC<{
|
|
41
|
+
record: Model;
|
|
42
|
+
}>;
|
|
43
|
+
tableProps?: Partial<TableProps<Model>>;
|
|
44
|
+
isCustom?: boolean;
|
|
45
|
+
formConfig?: {
|
|
46
|
+
fields?: (props: {
|
|
47
|
+
record?: Model;
|
|
48
|
+
records: Model[];
|
|
49
|
+
action: 'create' | 'edit';
|
|
50
|
+
}) => RefineFormField[];
|
|
51
|
+
saveButtonText?: string;
|
|
52
|
+
renderForm?: (props: YamlFormProps) => React.ReactNode;
|
|
53
|
+
formType?: FormType;
|
|
54
|
+
transformInitValues?: (values: Unstructured) => Unstructured;
|
|
55
|
+
transformApplyValues?: (values: Unstructured) => Unstructured;
|
|
56
|
+
formTitle?: string | ((action: 'create' | 'edit') => string);
|
|
57
|
+
formDesc?: string | ((action: 'create' | 'edit') => string);
|
|
58
|
+
formatError?: (errorBody: any) => string;
|
|
59
|
+
refineCoreProps?: UseFormProps['refineCoreProps'];
|
|
60
|
+
useFormProps?: UseFormProps;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function download(filename: string, content: string): void;
|