@dovetail-v2/refine 0.0.66 → 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-bcc9a5fe.js → MonacoYamlDiffEditor-e737ae8d.js} +1 -1
- package/dist/{index-4ac6ee9d.js → index-0c7bfb69.js} +597 -454
- package/dist/refine.js +117 -110
- package/dist/refine.umd.cjs +489 -346
- 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 -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/package.json +5 -5
- package/lib/src/App.js +0 -91
- package/lib/src/Dovetail.js +0 -45
- package/lib/src/components/Breadcrumb/index.js +0 -20
- package/lib/src/components/ConditionsTable/ConditionsTable.js +0 -56
- package/lib/src/components/ConditionsTable/index.js +0 -1
- package/lib/src/components/CreateButton/index.js +0 -10
- package/lib/src/components/CronJobDropdown/index.js +0 -26
- package/lib/src/components/CronjobJobsTable/index.js +0 -49
- package/lib/src/components/DeleteButton/index.js +0 -13
- package/lib/src/components/DeleteManyButton/index.js +0 -16
- package/lib/src/components/DrawerShow/DrawerShow.js +0 -13
- package/lib/src/components/DrawerShow/index.js +0 -1
- package/lib/src/components/EditButton/index.js +0 -13
- package/lib/src/components/EditField/index.js +0 -47
- package/lib/src/components/ErrorContent/index.js +0 -36
- package/lib/src/components/EventsTable/EventsTable.js +0 -59
- package/lib/src/components/EventsTable/index.js +0 -1
- package/lib/src/components/Form/KeyValueListWidget.d.ts +0 -6
- package/lib/src/components/Form/KeyValueListWidget.js +0 -56
- package/lib/src/components/Form/MetadataForm.d.ts +0 -2
- package/lib/src/components/Form/MetadataForm.js +0 -9
- package/lib/src/components/Form/NameInputWidget.d.ts +0 -51
- package/lib/src/components/Form/NameInputWidget.js +0 -50
- package/lib/src/components/Form/NamespaceSelectWidget.d.ts +0 -9
- package/lib/src/components/Form/NamespaceSelectWidget.js +0 -21
- package/lib/src/components/Form/index.js +0 -4
- package/lib/src/components/Form/widget.d.ts +0 -5
- package/lib/src/components/Form/widget.js +0 -1
- package/lib/src/components/FormErrorAlert/index.js +0 -8
- package/lib/src/components/FormLayout/index.js +0 -21
- package/lib/src/components/FormModal/index.d.ts +0 -10
- package/lib/src/components/FormModal/index.js +0 -51
- package/lib/src/components/ImageNames/index.js +0 -14
- package/lib/src/components/IngressRulesComponent/index.js +0 -11
- package/lib/src/components/IngressRulesTable/IngressRulesTable.js +0 -51
- package/lib/src/components/IngressRulesTable/index.js +0 -1
- package/lib/src/components/K8sDropdown/index.js +0 -31
- package/lib/src/components/KeyValue/KeyValue.js +0 -27
- package/lib/src/components/KeyValue/index.js +0 -1
- package/lib/src/components/KeyValueData/index.d.ts +0 -6
- package/lib/src/components/KeyValueData/index.js +0 -50
- package/lib/src/components/Layout/index.js +0 -39
- package/lib/src/components/ListPage/index.js +0 -25
- package/lib/src/components/Menu/index.js +0 -36
- package/lib/src/components/NamespacesFilter/index.js +0 -34
- package/lib/src/components/NetworkPolicyRulesTable/NetworkPolicyRulesTable.d.ts +0 -7
- package/lib/src/components/NetworkPolicyRulesTable/NetworkPolicyRulesTable.js +0 -77
- package/lib/src/components/NetworkPolicyRulesTable/index.d.ts +0 -1
- package/lib/src/components/NetworkPolicyRulesTable/index.js +0 -1
- package/lib/src/components/PageShow/PageShow.js +0 -11
- package/lib/src/components/PageShow/index.js +0 -1
- package/lib/src/components/PodContainersTable/PodContainersTable.js +0 -78
- package/lib/src/components/PodContainersTable/index.js +0 -1
- package/lib/src/components/PodLog/index.js +0 -136
- package/lib/src/components/ReferenceLink/index.js +0 -17
- package/lib/src/components/RefineForm/RefineFormContent.d.ts +0 -10
- package/lib/src/components/RefineForm/RefineFormModal.d.ts +0 -8
- package/lib/src/components/RefineForm/RefineFormPage.d.ts +0 -7
- package/lib/src/components/RefineForm/index.d.ts +0 -3
- package/lib/src/components/RefineForm/type.d.ts +0 -20
- package/lib/src/components/RefineForm/useRefineForm.d.ts +0 -10
- package/lib/src/components/ResourceCRUD/ResourceCRUD.js +0 -15
- package/lib/src/components/ResourceCRUD/create/index.js +0 -13
- package/lib/src/components/ResourceCRUD/index.js +0 -4
- package/lib/src/components/ResourceCRUD/list/index.js +0 -19
- package/lib/src/components/ResourceCRUD/show/index.js +0 -6
- package/lib/src/components/ResourceLink/index.js +0 -21
- package/lib/src/components/ResourceUsageBar/index.js +0 -81
- package/lib/src/components/Separator/index.js +0 -11
- package/lib/src/components/ShowContent/ShowContent.js +0 -157
- package/lib/src/components/ShowContent/fields.js +0 -157
- package/lib/src/components/ShowContent/index.js +0 -2
- package/lib/src/components/StateTag/StateTag.js +0 -22
- package/lib/src/components/StateTag/index.js +0 -1
- package/lib/src/components/Table/ErrorContent.d.ts +0 -10
- package/lib/src/components/Table/ErrorContent.js +0 -36
- package/lib/src/components/Table/TableToolBar.js +0 -14
- package/lib/src/components/Table/TableWidgets.js +0 -28
- package/lib/src/components/Table/index.js +0 -69
- package/lib/src/components/Tags/index.js +0 -22
- package/lib/src/components/Time/index.js +0 -14
- package/lib/src/components/WorkloadDropdown/index.js +0 -24
- package/lib/src/components/WorkloadPodsTable/WorkloadPodsTable.js +0 -39
- package/lib/src/components/WorkloadPodsTable/index.js +0 -1
- package/lib/src/components/WorkloadReplicas/index.js +0 -50
- package/lib/src/components/YamlEditor/MonacoYamlDiffEditor.js +0 -34
- package/lib/src/components/YamlEditor/MonacoYamlEditor.js +0 -149
- package/lib/src/components/YamlEditor/YamlEditorComponent.js +0 -90
- package/lib/src/components/YamlEditor/index.js +0 -1
- package/lib/src/components/YamlEditor/style.js +0 -102
- package/lib/src/components/YamlEditor/yaml.worker.js +0 -1
- package/lib/src/components/YamlForm/index.d.ts +0 -21
- package/lib/src/components/YamlForm/index.js +0 -61
- package/lib/src/components/index.js +0 -38
- package/lib/src/constants/index.js +0 -2
- package/lib/src/constants/k8s.js +0 -203
- package/lib/src/constants/state.js +0 -15
- package/lib/src/contexts/component.js +0 -3
- package/lib/src/contexts/configs.js +0 -3
- package/lib/src/contexts/global-store.js +0 -3
- package/lib/src/contexts/index.js +0 -3
- package/lib/src/hooks/index.js +0 -7
- package/lib/src/hooks/useDeleteModal/index.js +0 -1
- package/lib/src/hooks/useDeleteModal/useDeleteManyModal.js +0 -31
- package/lib/src/hooks/useDeleteModal/useDeleteModal.js +0 -38
- package/lib/src/hooks/useDownloadYAML.js +0 -10
- package/lib/src/hooks/useEagleForm.d.ts +0 -47
- package/lib/src/hooks/useEagleForm.js +0 -177
- package/lib/src/hooks/useEagleTable/columns.js +0 -246
- package/lib/src/hooks/useEagleTable/index.js +0 -2
- package/lib/src/hooks/useEagleTable/useEagleTable.js +0 -63
- package/lib/src/hooks/useEdit.js +0 -19
- package/lib/src/hooks/useGlobalStore.js +0 -5
- package/lib/src/hooks/useK8sYamlEditor.js +0 -37
- package/lib/src/hooks/useOpenForm.js +0 -43
- package/lib/src/hooks/useSchema.js +0 -37
- package/lib/src/hooks/useSubmitForm.js +0 -42
- package/lib/src/i18n.js +0 -19
- package/lib/src/index.js +0 -13
- package/lib/src/locales/en-US/dovetail.json +0 -18
- package/lib/src/locales/en-US/index.js +0 -4
- package/lib/src/locales/index.js +0 -6
- package/lib/src/locales/zh-CN/dovetail.json +0 -91
- package/lib/src/locales/zh-CN/index.js +0 -4
- package/lib/src/main.js +0 -12
- package/lib/src/models/cronjob-model.js +0 -32
- package/lib/src/models/daemonset-model.js +0 -17
- package/lib/src/models/deployment-model.js +0 -17
- package/lib/src/models/event-model.js +0 -11
- package/lib/src/models/index.js +0 -14
- package/lib/src/models/ingress-model.js +0 -24
- package/lib/src/models/job-model.js +0 -56
- package/lib/src/models/network-policy-model.js +0 -10
- package/lib/src/models/pod-metrics-model.js +0 -34
- package/lib/src/models/pod-model.js +0 -78
- package/lib/src/models/resource-model.js +0 -34
- package/lib/src/models/server-instance-model.d.ts +0 -10
- package/lib/src/models/service-model.js +0 -17
- package/lib/src/models/statefulset-model.js +0 -17
- package/lib/src/models/types/index.js +0 -1
- package/lib/src/models/types/metric.js +0 -1
- package/lib/src/models/workload-base-model.js +0 -22
- package/lib/src/models/workload-model.js +0 -51
- package/lib/src/pages/configmaps/index.js +0 -15
- package/lib/src/pages/cronjobs/create/index.js +0 -6
- package/lib/src/pages/cronjobs/index.js +0 -3
- package/lib/src/pages/cronjobs/list/index.js +0 -42
- package/lib/src/pages/cronjobs/show/index.js +0 -16
- package/lib/src/pages/daemonsets/create/index.js +0 -6
- package/lib/src/pages/daemonsets/index.js +0 -3
- package/lib/src/pages/daemonsets/list/index.js +0 -32
- package/lib/src/pages/daemonsets/show/index.js +0 -16
- package/lib/src/pages/deployments/create/index.d.ts +0 -3
- package/lib/src/pages/deployments/create/index.js +0 -7
- package/lib/src/pages/deployments/index.js +0 -3
- package/lib/src/pages/deployments/list/index.js +0 -26
- package/lib/src/pages/deployments/show/index.js +0 -16
- package/lib/src/pages/ingresses/index.js +0 -26
- package/lib/src/pages/jobs/index.js +0 -34
- package/lib/src/pages/networkPolicies/index.js +0 -67
- package/lib/src/pages/pods/create/index.js +0 -6
- package/lib/src/pages/pods/index.js +0 -3
- package/lib/src/pages/pods/list/index.js +0 -81
- package/lib/src/pages/pods/show/index.js +0 -54
- package/lib/src/pages/secrets/index.js +0 -15
- package/lib/src/pages/services/index.js +0 -26
- package/lib/src/pages/statefulsets/create/index.d.ts +0 -3
- package/lib/src/pages/statefulsets/create/index.js +0 -6
- package/lib/src/pages/statefulsets/index.js +0 -3
- package/lib/src/pages/statefulsets/list/index.d.ts +0 -3
- package/lib/src/pages/statefulsets/list/index.js +0 -26
- package/lib/src/pages/statefulsets/show/index.d.ts +0 -3
- package/lib/src/pages/statefulsets/show/index.js +0 -16
- package/lib/src/plugins/index.js +0 -3
- package/lib/src/plugins/model-plugin.js +0 -46
- package/lib/src/plugins/relation-plugin.js +0 -81
- package/lib/src/plugins/type.js +0 -1
- package/lib/src/providers/index.js +0 -1
- package/lib/src/providers/router-provider/index.js +0 -100
- package/lib/src/types/index.js +0 -1
- package/lib/src/types/resource.js +0 -12
- package/lib/src/utils/addId.js +0 -8
- package/lib/src/utils/download.js +0 -9
- package/lib/src/utils/error.js +0 -53
- package/lib/src/utils/form.js +0 -9
- package/lib/src/utils/k8s.js +0 -6
- package/lib/src/utils/labels.js +0 -15
- package/lib/src/utils/match-selector.js +0 -12
- package/lib/src/utils/openapi.js +0 -33
- package/lib/src/utils/schema.js +0 -117
- package/lib/src/utils/selector.js +0 -12
- package/lib/src/utils/string.js +0 -6
- package/lib/src/utils/time.js +0 -46
- package/lib/src/utils/unit.js +0 -69
- package/lib/src/utils/yaml.js +0 -44
- package/lib/vite.config.js +0 -60
|
@@ -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 {};
|
|
@@ -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>;
|
|
@@ -38,6 +38,7 @@ export * from './Tags';
|
|
|
38
38
|
export * from './TextTags';
|
|
39
39
|
export * from './PodLog';
|
|
40
40
|
export * from './NetworkPolicyRulesViewer';
|
|
41
|
+
export * from './ResourceFiledDisplays';
|
|
41
42
|
export * from './Tabs';
|
|
42
43
|
export * as ValueDisplay from './ValueDisplay';
|
|
43
44
|
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
|
};
|
|
162
176
|
};
|
|
163
177
|
'zh-CN': {
|
|
@@ -317,10 +331,21 @@ export declare const resources: {
|
|
|
317
331
|
only_support_one_yaml: string;
|
|
318
332
|
not_support: string;
|
|
319
333
|
stopped: string;
|
|
334
|
+
any_node_ip: string;
|
|
320
335
|
storage_class: string;
|
|
321
|
-
|
|
336
|
+
persistent_volume: string;
|
|
322
337
|
provisioner: string;
|
|
323
338
|
file_system: string;
|
|
339
|
+
capacity: string;
|
|
340
|
+
phase: string;
|
|
341
|
+
volume_mode: string;
|
|
342
|
+
access_mode: string;
|
|
343
|
+
block: string;
|
|
344
|
+
pv_phase_available: string;
|
|
345
|
+
pv_phase_bound: string;
|
|
346
|
+
pv_phase_released: string;
|
|
347
|
+
pv_phase_failed: string;
|
|
348
|
+
pv_phase_pending: string;
|
|
324
349
|
};
|
|
325
350
|
};
|
|
326
351
|
};
|
|
@@ -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
|
};
|
|
159
173
|
};
|
|
160
174
|
export default _default;
|
|
@@ -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>;
|
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,8 +10,8 @@
|
|
|
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",
|
|
@@ -69,8 +69,8 @@
|
|
|
69
69
|
"vite-plugin-commonjs": "^0.10.0"
|
|
70
70
|
},
|
|
71
71
|
"peerDependencies": {
|
|
72
|
-
"@cloudtower/eagle": "^0.29.
|
|
73
|
-
"@cloudtower/icons-react": "^0.29.
|
|
72
|
+
"@cloudtower/eagle": "^0.29.29",
|
|
73
|
+
"@cloudtower/icons-react": "^0.29.29",
|
|
74
74
|
"@refinedev/core": "^4.47.2",
|
|
75
75
|
"antd": "4.5.0",
|
|
76
76
|
"i18next": "^23.2.3",
|
package/lib/src/App.js
DELETED
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { createBrowserHistory } from 'history';
|
|
3
|
-
import { GlobalStore } from 'k8s-api-provider';
|
|
4
|
-
import { useMemo } from 'react';
|
|
5
|
-
import { I18nextProvider } from 'react-i18next';
|
|
6
|
-
import { Route, Router } from 'react-router-dom';
|
|
7
|
-
import { Layout } from './components';
|
|
8
|
-
import { CRONJOB_INIT_VALUE, DAEMONSET_INIT_VALUE, STATEFULSET_INIT_VALUE, POD_INIT_VALUE, } from './constants/k8s';
|
|
9
|
-
import { Dovetail } from './Dovetail';
|
|
10
|
-
import i18n from './i18n';
|
|
11
|
-
import { ConfigMapConfig } from './pages/configmaps';
|
|
12
|
-
import { CronJobForm, CronJobList, CronJobShow } from './pages/cronjobs';
|
|
13
|
-
import { DaemonSetForm, DaemonSetList, DaemonSetShow } from './pages/daemonsets';
|
|
14
|
-
import { DeploymentForm, DeploymentList, DeploymentShow } from './pages/deployments';
|
|
15
|
-
import { IngressConfig } from './pages/ingresses';
|
|
16
|
-
import { JobConfig } from './pages/jobs';
|
|
17
|
-
import { NetworkPolicyConfig } from './pages/networkPolicies';
|
|
18
|
-
import { PodShow, PodList, PodForm } from './pages/pods';
|
|
19
|
-
import { SecretsConfig } from './pages/secrets';
|
|
20
|
-
import { ServicesConfig } from './pages/services';
|
|
21
|
-
import { StatefulSetShow, StatefulSetList, StatefulSetForm } from './pages/statefulsets';
|
|
22
|
-
import { ProviderPlugins } from './plugins';
|
|
23
|
-
import { RESOURCE_GROUP, FormType } from './types';
|
|
24
|
-
function App() {
|
|
25
|
-
const histroy = createBrowserHistory();
|
|
26
|
-
const resourcesConfig = useMemo(() => {
|
|
27
|
-
return [
|
|
28
|
-
{
|
|
29
|
-
name: 'cronjobs',
|
|
30
|
-
basePath: '/apis/batch/v1beta1',
|
|
31
|
-
kind: 'CronJob',
|
|
32
|
-
parent: RESOURCE_GROUP.WORKLOAD,
|
|
33
|
-
label: 'CronJobs',
|
|
34
|
-
initValue: CRONJOB_INIT_VALUE,
|
|
35
|
-
isCustom: true,
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
name: 'daemonsets',
|
|
39
|
-
basePath: '/apis/apps/v1',
|
|
40
|
-
kind: 'DaemonSet',
|
|
41
|
-
parent: RESOURCE_GROUP.WORKLOAD,
|
|
42
|
-
label: 'DaemonSets',
|
|
43
|
-
initValue: DAEMONSET_INIT_VALUE,
|
|
44
|
-
isCustom: true,
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
name: 'deployments',
|
|
48
|
-
basePath: '/apis/apps/v1',
|
|
49
|
-
kind: 'Deployment',
|
|
50
|
-
parent: RESOURCE_GROUP.WORKLOAD,
|
|
51
|
-
label: 'Deployments',
|
|
52
|
-
formType: FormType.MODAL,
|
|
53
|
-
FormModal: DeploymentForm,
|
|
54
|
-
isCustom: true,
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
name: 'statefulsets',
|
|
58
|
-
basePath: '/apis/apps/v1',
|
|
59
|
-
kind: 'StatefulSet',
|
|
60
|
-
parent: RESOURCE_GROUP.WORKLOAD,
|
|
61
|
-
label: 'StatefulSets',
|
|
62
|
-
initValue: STATEFULSET_INIT_VALUE,
|
|
63
|
-
isCustom: true,
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
name: 'pods',
|
|
67
|
-
basePath: '/api/v1',
|
|
68
|
-
kind: 'Pod',
|
|
69
|
-
parent: RESOURCE_GROUP.WORKLOAD,
|
|
70
|
-
label: 'Pods',
|
|
71
|
-
initValue: POD_INIT_VALUE,
|
|
72
|
-
isCustom: true,
|
|
73
|
-
},
|
|
74
|
-
JobConfig,
|
|
75
|
-
IngressConfig,
|
|
76
|
-
NetworkPolicyConfig,
|
|
77
|
-
ConfigMapConfig,
|
|
78
|
-
SecretsConfig,
|
|
79
|
-
ServicesConfig,
|
|
80
|
-
];
|
|
81
|
-
}, []);
|
|
82
|
-
const globalStore = useMemo(() => {
|
|
83
|
-
return new GlobalStore({
|
|
84
|
-
apiUrl: '/api/k8s',
|
|
85
|
-
watchWsApiUrl: 'api/sks-ws/k8s',
|
|
86
|
-
prefix: 'default',
|
|
87
|
-
}, ProviderPlugins);
|
|
88
|
-
}, []);
|
|
89
|
-
return (_jsx(I18nextProvider, { i18n: i18n, children: _jsx(Dovetail, { resourcesConfig: resourcesConfig, Layout: Layout, history: histroy, globalStore: globalStore, children: _jsxs(Router, { history: histroy, children: [_jsx(Route, { path: "/cronjobs", exact: true, children: _jsx(CronJobList, {}) }), _jsx(Route, { path: "/cronjobs/show", children: _jsx(CronJobShow, {}) }), _jsx(Route, { path: "/cronjobs/create", children: _jsx(CronJobForm, {}) }), _jsx(Route, { path: "/cronjobs/edit", children: _jsx(CronJobForm, {}) }), _jsx(Route, { path: "/daemonsets", exact: true, children: _jsx(DaemonSetList, {}) }), _jsx(Route, { path: "/daemonsets/show", children: _jsx(DaemonSetShow, {}) }), _jsx(Route, { path: "/daemonsets/create", children: _jsx(DaemonSetForm, {}) }), _jsx(Route, { path: "/daemonsets/edit", children: _jsx(DaemonSetForm, {}) }), _jsx(Route, { path: "/deployments", exact: true, children: _jsx(DeploymentList, {}) }), _jsx(Route, { path: "/deployments/show", children: _jsx(DeploymentShow, {}) }), _jsx(Route, { path: "/statefulsets", exact: true, children: _jsx(StatefulSetList, {}) }), _jsx(Route, { path: "/statefulsets/show", children: _jsx(StatefulSetShow, {}) }), _jsx(Route, { path: "/statefulsets/create", children: _jsx(StatefulSetForm, {}) }), _jsx(Route, { path: "/statefulsets/edit", children: _jsx(StatefulSetForm, {}) }), _jsx(Route, { path: "/pods", exact: true, children: _jsx(PodList, {}) }), _jsx(Route, { path: "/pods/show", children: _jsx(PodShow, {}) }), _jsx(Route, { path: "/pods/create", children: _jsx(PodForm, {}) }), _jsx(Route, { path: "/pods/edit", children: _jsx(PodForm, {}) })] }) }) }));
|
|
90
|
-
}
|
|
91
|
-
export default App;
|
package/lib/src/Dovetail.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { KitStoreProvider, ModalStack } from '@cloudtower/eagle';
|
|
3
|
-
import { Refine } from '@refinedev/core';
|
|
4
|
-
import { dataProvider, liveProvider } from 'k8s-api-provider';
|
|
5
|
-
import { keyBy } from 'lodash-es';
|
|
6
|
-
import { useMemo } from 'react';
|
|
7
|
-
import { Router } from 'react-router-dom';
|
|
8
|
-
import ConfigsContext from 'src/contexts/configs';
|
|
9
|
-
import { ResourceCRUD } from './components/ResourceCRUD';
|
|
10
|
-
import GlobalStoreContext from './contexts/global-store';
|
|
11
|
-
import { routerProvider } from './providers/router-provider';
|
|
12
|
-
import './styles.css';
|
|
13
|
-
export const Dovetail = props => {
|
|
14
|
-
const { resourcesConfig, urlPrefix = '', Layout, history, globalStore } = props;
|
|
15
|
-
const notCustomResources = useMemo(() => {
|
|
16
|
-
return resourcesConfig.filter(c => !c.isCustom);
|
|
17
|
-
}, [resourcesConfig]);
|
|
18
|
-
const content = useMemo(() => {
|
|
19
|
-
const _content = (_jsxs(_Fragment, { children: [_jsx(ModalStack, {}), _jsx(ResourceCRUD, { configs: notCustomResources, urlPrefix: urlPrefix }), props.children] }));
|
|
20
|
-
if (Layout) {
|
|
21
|
-
return _jsx(Layout, { children: _content });
|
|
22
|
-
}
|
|
23
|
-
return _content;
|
|
24
|
-
}, [Layout, notCustomResources, props.children, urlPrefix]);
|
|
25
|
-
return (_jsx(Router, { history: history, children: _jsx(KitStoreProvider, { children: _jsx(GlobalStoreContext.Provider, { value: { globalStore }, children: _jsx(ConfigsContext.Provider, { value: keyBy(resourcesConfig, 'name'), children: _jsx(Refine, { dataProvider: {
|
|
26
|
-
default: dataProvider(globalStore),
|
|
27
|
-
}, routerProvider: routerProvider, liveProvider: liveProvider(globalStore), options: {
|
|
28
|
-
warnWhenUnsavedChanges: true,
|
|
29
|
-
liveMode: 'auto',
|
|
30
|
-
}, resources: resourcesConfig.map(c => {
|
|
31
|
-
return {
|
|
32
|
-
name: c.name,
|
|
33
|
-
meta: {
|
|
34
|
-
resourceBasePath: c.basePath,
|
|
35
|
-
kind: c.kind,
|
|
36
|
-
parent: c.parent,
|
|
37
|
-
label: `${c.kind}s`,
|
|
38
|
-
},
|
|
39
|
-
list: `${urlPrefix}/${c.name}`,
|
|
40
|
-
show: `${urlPrefix}/${c.name}/show`,
|
|
41
|
-
create: `${urlPrefix}/${c.name}/create`,
|
|
42
|
-
edit: `${urlPrefix}/${c.name}/edit`,
|
|
43
|
-
};
|
|
44
|
-
}), children: content }) }) }) }) }));
|
|
45
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { css, cx } from '@linaria/core';
|
|
3
|
-
import { useBreadcrumb } from '@refinedev/core';
|
|
4
|
-
import { Link } from 'react-router-dom';
|
|
5
|
-
const BreadcrumbStyle = css `
|
|
6
|
-
display: flex;
|
|
7
|
-
|
|
8
|
-
.breadcrumb-item {
|
|
9
|
-
&:not(:last-of-type):after {
|
|
10
|
-
content: '>';
|
|
11
|
-
margin: 0 8px;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
`;
|
|
15
|
-
export function Breadcrumb(props) {
|
|
16
|
-
const { breadcrumbs } = useBreadcrumb();
|
|
17
|
-
return (_jsx("ul", { className: cx(BreadcrumbStyle, props.className), children: breadcrumbs.map(breadcrumb => {
|
|
18
|
-
return (_jsx("li", { className: "breadcrumb-item", children: breadcrumb.href ? (_jsx(Link, { to: breadcrumb.href, children: breadcrumb.label })) : (_jsx("span", { children: breadcrumb.label })) }, `breadcrumb-${breadcrumb.label}`));
|
|
19
|
-
}) }));
|
|
20
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useUIKit } from '@cloudtower/eagle';
|
|
3
|
-
import { useD2Translation } from '../../i18n';
|
|
4
|
-
import { addId } from '../../utils/addId';
|
|
5
|
-
import ErrorContent from '../Table/ErrorContent';
|
|
6
|
-
import Time from '../Time';
|
|
7
|
-
export const ConditionsTable = ({ conditions = [] }) => {
|
|
8
|
-
const kit = useUIKit();
|
|
9
|
-
const { t } = useD2Translation();
|
|
10
|
-
const conditionsWithId = addId(conditions, 'type');
|
|
11
|
-
const columns = [
|
|
12
|
-
{
|
|
13
|
-
key: 'type',
|
|
14
|
-
display: true,
|
|
15
|
-
dataIndex: 'type',
|
|
16
|
-
title: t('dovetail.condition'),
|
|
17
|
-
sortable: true,
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
key: 'status',
|
|
21
|
-
display: true,
|
|
22
|
-
dataIndex: 'status',
|
|
23
|
-
title: t('dovetail.status'),
|
|
24
|
-
sortable: true,
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
key: 'reason',
|
|
28
|
-
display: true,
|
|
29
|
-
dataIndex: 'reason',
|
|
30
|
-
title: t('dovetail.reason'),
|
|
31
|
-
sortable: true,
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
key: 'lastUpdateTime',
|
|
35
|
-
display: true,
|
|
36
|
-
dataIndex: 'lastUpdateTime',
|
|
37
|
-
title: t('dovetail.updated_time'),
|
|
38
|
-
sortable: true,
|
|
39
|
-
render: (value, record) => {
|
|
40
|
-
const time = value || record.lastTransitionTime;
|
|
41
|
-
return _jsx(Time, { date: new Date(time) });
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
key: 'message',
|
|
46
|
-
display: true,
|
|
47
|
-
dataIndex: 'message',
|
|
48
|
-
title: t('dovetail.message'),
|
|
49
|
-
sortable: true,
|
|
50
|
-
},
|
|
51
|
-
];
|
|
52
|
-
if (conditionsWithId.length === 0) {
|
|
53
|
-
return _jsx(ErrorContent, { errorText: t('dovetail.empty'), style: { padding: '15px 0' } });
|
|
54
|
-
}
|
|
55
|
-
return (_jsx(kit.table, { loading: false, dataSource: conditionsWithId, columns: columns, rowKey: "type", empty: t('dovetail.empty') }));
|
|
56
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './ConditionsTable';
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useUIKit } from '@cloudtower/eagle';
|
|
3
|
-
import { useOpenForm } from 'src/hooks/useOpenForm';
|
|
4
|
-
import { useD2Translation } from '../../i18n';
|
|
5
|
-
export function CreateButton() {
|
|
6
|
-
const kit = useUIKit();
|
|
7
|
-
const { t } = useD2Translation();
|
|
8
|
-
const openForm = useOpenForm();
|
|
9
|
-
return (_jsx(kit.button, { type: "primary", onClick: openForm, children: t('dovetail.create') }));
|
|
10
|
-
}
|