@dovetail-v2/refine 0.1.9 → 0.1.11-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{MonacoYamlDiffEditor-0f76e977.js → MonacoYamlDiffEditor-adaa32ac.js} +1 -1
- package/dist/{index-aacb414b.js → index-906cb61f.js} +1161 -874
- package/dist/refine.js +208 -203
- package/dist/refine.umd.cjs +954 -667
- package/dist/style.css +44 -44
- package/lib/components/CreateButton/index.d.ts +5 -1
- package/lib/components/DropdownMenuItems/EditNodeTaintDropdownMenuItem.d.ts +12 -0
- package/lib/components/Dropdowns/CronJobDropdown/index.d.ts +9 -0
- package/lib/components/Dropdowns/K8sDropdown/index.d.ts +9 -0
- package/lib/components/Dropdowns/PodDropdown/index.d.ts +9 -0
- package/lib/components/Dropdowns/ReplicasDropdown/index.d.ts +9 -0
- package/lib/components/Dropdowns/WorkloadDropdown/index.d.ts +9 -0
- package/lib/components/EditField/index.d.ts +1 -1
- package/lib/components/EditMetadataForm/EditNodeTaintForm.d.ts +12 -0
- package/lib/components/InternalBaseTable/TableWidgets.d.ts +6 -0
- package/lib/components/InternalBaseTable/index.d.ts +43 -0
- package/lib/components/ListPage/index.d.ts +2 -2
- package/lib/components/NodeTaintsTable/NodeTaintsTable.d.ts +7 -0
- package/lib/components/NodeTaintsTable/index.d.ts +1 -0
- package/lib/components/PVCDistributeStorage/index.d.ts +1 -1
- package/lib/components/ResourceFiledDisplays.d.ts +2 -3
- package/lib/components/ResourceLink/index.d.ts +2 -2
- package/lib/components/ResourceSelect/index.d.ts +2 -2
- package/lib/components/ShowContent/fields.d.ts +2 -0
- package/lib/components/ShowContent/groups.d.ts +4 -2
- package/lib/components/StateTag/StateTag.d.ts +3 -3
- package/lib/components/Table/TableToolBar.d.ts +1 -0
- package/lib/components/Table/index.d.ts +11 -43
- package/lib/components/TableToolbar/index.d.ts +9 -0
- package/lib/components/WorkloadPodsTable/WorkloadPodsTable.d.ts +2 -0
- package/lib/components/index.d.ts +7 -5
- package/lib/constants/state.d.ts +8 -3
- package/lib/contexts/component.d.ts +1 -1
- package/lib/hooks/useEagleTable/columns.d.ts +2 -1
- package/lib/hooks/useEagleTable/useEagleTable.d.ts +3 -4
- package/lib/hooks/useSubmitForm.d.ts +1 -1
- package/lib/hooks/useTableData.d.ts +1 -1
- package/lib/i18n.d.ts +29 -18
- package/lib/locales/zh-CN/index.d.ts +29 -18
- package/lib/models/cronjob-model.d.ts +2 -2
- package/lib/models/daemonset-model.d.ts +2 -2
- package/lib/models/deployment-model.d.ts +2 -2
- package/lib/models/job-model.d.ts +2 -2
- package/lib/models/node-model.d.ts +2 -2
- package/lib/models/persistent-volume-claim.d.ts +2 -0
- package/lib/models/persistent-volume.d.ts +3 -0
- package/lib/models/statefulset-model.d.ts +2 -2
- package/lib/src/App.d.ts +3 -0
- package/lib/src/Dovetail.d.ts +18 -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 +9 -0
- package/lib/src/components/CronjobJobsTable/index.d.ts +8 -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 +9 -0
- package/lib/src/components/DrawerShow/index.d.ts +1 -0
- package/lib/src/components/DurationTime/index.d.ts +6 -0
- package/lib/src/components/EditButton/index.d.ts +2 -0
- package/lib/src/components/EditField/index.d.ts +15 -0
- package/lib/src/components/ErrorContent/index.d.ts +17 -0
- package/lib/src/components/EventsTable/EventsTable.d.ts +6 -0
- package/lib/src/components/EventsTable/index.d.ts +1 -0
- package/lib/src/components/Form/FormModal.d.ts +9 -0
- package/lib/src/components/Form/RefineFormContent.d.ts +12 -0
- package/lib/src/components/Form/RefineFormPage.d.ts +7 -0
- package/lib/src/components/Form/YamlForm.d.ts +29 -0
- package/lib/src/components/Form/index.d.ts +7 -0
- package/lib/src/components/Form/type.d.ts +17 -0
- package/lib/src/components/Form/useFieldsConfig.d.ts +4 -0
- package/lib/src/components/Form/useReactHookForm.d.ts +30 -0
- package/lib/src/components/Form/useRefineForm.d.ts +13 -0
- package/lib/src/components/Form/useYamlForm.d.ts +50 -0
- package/lib/src/components/FormErrorAlert/index.d.ts +9 -0
- package/lib/src/components/FormLayout/index.d.ts +7 -0
- package/lib/src/components/FormWidgets/KeyValueListWidget.d.ts +6 -0
- package/lib/src/components/FormWidgets/MetadataForm.d.ts +2 -0
- package/lib/src/components/FormWidgets/NameInputWidget.d.ts +51 -0
- package/lib/src/components/FormWidgets/NamespaceSelectWidget.d.ts +9 -0
- package/lib/src/components/FormWidgets/index.d.ts +4 -0
- package/lib/src/components/FormWidgets/widget.d.ts +5 -0
- package/lib/src/components/ImageNames/index.d.ts +5 -0
- package/lib/src/components/IngressRulesComponent/index.d.ts +5 -0
- package/lib/src/components/IngressRulesTable/IngressRulesTable.d.ts +7 -0
- package/lib/src/components/IngressRulesTable/index.d.ts +1 -0
- package/lib/src/components/K8sDropdown/index.d.ts +9 -0
- package/lib/src/components/KeyValue/KeyValue.d.ts +7 -0
- package/lib/src/components/KeyValue/KeyValueAnnotation.d.ts +6 -0
- package/lib/src/components/KeyValue/KeyValueSecret.d.ts +5 -0
- package/lib/src/components/KeyValue/index.d.ts +3 -0
- package/lib/src/components/Layout/index.d.ts +3 -0
- package/lib/src/components/LinkFallback/index.d.ts +4 -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 +11 -0
- package/lib/src/components/NetworkPolicyRulesViewer/NetworkPolicyRulesViewer.d.ts +8 -0
- package/lib/src/components/NetworkPolicyRulesViewer/index.d.ts +1 -0
- package/lib/src/components/PVCDistributeStorage/index.d.ts +16 -0
- package/lib/src/components/PageShow/PageShow.d.ts +12 -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/PodDropdown/index.d.ts +9 -0
- package/lib/src/components/PodLog/index.d.ts +6 -0
- package/lib/src/components/PodSelectorTable/index.d.ts +6 -0
- package/lib/src/components/PodShellModal/PodShell.d.ts +18 -0
- package/lib/src/components/PodShellModal/index.d.ts +10 -0
- package/lib/src/components/PortsTable/index.d.ts +7 -0
- package/lib/src/components/ReferenceLink/index.d.ts +8 -0
- package/lib/src/components/ReplicasDropdown/index.d.ts +9 -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 +4 -0
- package/lib/src/components/ResourceCRUD/list/index.d.ts +9 -0
- package/lib/src/components/ResourceCRUD/show/index.d.ts +9 -0
- package/lib/src/components/ResourceFiledDisplays.d.ts +7 -0
- package/lib/src/components/ResourceLink/index.d.ts +8 -0
- package/lib/src/components/ResourceSelect/index.d.ts +12 -0
- package/lib/src/components/ResourceTable/index.d.ts +9 -0
- package/lib/src/components/ResourceUsageBar/index.d.ts +8 -0
- package/lib/src/components/Separator/index.d.ts +2 -0
- package/lib/src/components/ServiceComponents/index.d.ts +10 -0
- package/lib/src/components/Shell/ShellToolbar.d.ts +16 -0
- package/lib/src/components/Shell/index.d.ts +74 -0
- package/lib/src/components/ShowContent/ShowContent.d.ts +18 -0
- package/lib/src/components/ShowContent/fields.d.ts +76 -0
- package/lib/src/components/ShowContent/groups.d.ts +24 -0
- package/lib/src/components/ShowContent/index.d.ts +4 -0
- package/lib/src/components/ShowContent/tabs.d.ts +5 -0
- package/lib/src/components/StateTag/StateTag.d.ts +10 -0
- package/lib/src/components/StateTag/index.d.ts +1 -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 +43 -0
- package/lib/src/components/Tabs/index.d.ts +10 -0
- package/lib/src/components/Tags/index.d.ts +6 -0
- package/lib/src/components/TextTags/index.d.ts +6 -0
- package/lib/src/components/Time/index.d.ts +8 -0
- package/lib/src/components/ValueDisplay/index.d.ts +9 -0
- package/lib/src/components/WorkloadDropdown/index.d.ts +9 -0
- package/lib/src/components/WorkloadPodsTable/WorkloadPodsTable.d.ts +9 -0
- package/lib/src/components/WorkloadPodsTable/index.d.ts +1 -0
- package/lib/src/components/WorkloadReplicas/index.d.ts +17 -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 +27 -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/index.d.ts +49 -0
- package/lib/src/constants/auth.d.ts +5 -0
- package/lib/src/constants/index.d.ts +3 -0
- package/lib/src/constants/k8s.d.ts +522 -0
- package/lib/src/constants/state.d.ts +15 -0
- package/lib/src/contexts/component.d.ts +8 -0
- package/lib/src/contexts/configs.d.ts +4 -0
- package/lib/src/contexts/global-store.d.ts +6 -0
- package/lib/src/contexts/index.d.ts +3 -0
- package/lib/src/hooks/index.d.ts +8 -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/useEagleTable/columns.d.ts +47 -0
- package/lib/src/hooks/useEagleTable/index.d.ts +2 -0
- package/lib/src/hooks/useEagleTable/useEagleTable.d.ts +56 -0
- package/lib/src/hooks/useEdit.d.ts +4 -0
- package/lib/src/hooks/useGlobalStore.d.ts +3 -0
- package/lib/src/hooks/useK8sYamlEditor.d.ts +5 -0
- package/lib/src/hooks/useNamespaceRefineFilter.d.ts +5 -0
- package/lib/src/hooks/useOpenForm.d.ts +8 -0
- package/lib/src/hooks/useSchema.d.ts +21 -0
- package/lib/src/hooks/useSubmitForm.d.ts +14 -0
- package/lib/src/hooks/useTableData.d.ts +20 -0
- package/lib/src/i18n.d.ts +371 -0
- package/lib/src/index.d.ts +12 -0
- package/lib/src/locales/en-US/index.d.ts +175 -0
- package/lib/src/locales/index.d.ts +2 -0
- package/lib/src/locales/zh-CN/index.d.ts +193 -0
- package/lib/src/main.d.ts +3 -0
- package/lib/src/models/cronjob-model.d.ts +15 -0
- package/lib/src/models/daemonset-model.d.ts +15 -0
- package/lib/src/models/deployment-model.d.ts +13 -0
- package/lib/src/models/event-model.d.ts +7 -0
- package/lib/src/models/index.d.ts +19 -0
- package/lib/src/models/ingress-model.d.ts +20 -0
- package/lib/src/models/job-model.d.ts +20 -0
- package/lib/src/models/network-policy-model.d.ts +9 -0
- package/lib/src/models/node-model.d.ts +17 -0
- package/lib/src/models/persistent-volume-claim.d.ts +13 -0
- package/lib/src/models/persistent-volume.d.ts +13 -0
- package/lib/src/models/pod-metrics-model.d.ts +8 -0
- package/lib/src/models/pod-model.d.ts +20 -0
- package/lib/src/models/resource-model.d.ts +21 -0
- package/lib/src/models/service-model.d.ts +24 -0
- package/lib/src/models/statefulset-model.d.ts +13 -0
- package/lib/src/models/storage-class.d.ts +16 -0
- package/lib/src/models/types/index.d.ts +1 -0
- package/lib/src/models/types/metric.d.ts +25 -0
- package/lib/src/models/workload-base-model.d.ts +12 -0
- package/lib/src/models/workload-model.d.ts +18 -0
- package/lib/src/pages/configmaps/index.d.ts +4 -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/index.d.ts +2 -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/ingresses/index.d.ts +4 -0
- package/lib/src/pages/jobs/index.d.ts +4 -0
- package/lib/src/pages/networkPolicies/index.d.ts +4 -0
- package/lib/src/pages/nodes/index.d.ts +2 -0
- package/lib/src/pages/nodes/list/index.d.ts +3 -0
- package/lib/src/pages/nodes/show/index.d.ts +3 -0
- package/lib/src/pages/persistentvolumeclaims/index.d.ts +4 -0
- package/lib/src/pages/persistentvolumes/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 +4 -0
- package/lib/src/pages/services/index.d.ts +4 -0
- package/lib/src/pages/statefulsets/index.d.ts +4 -0
- package/lib/src/pages/storageclasses/form/index.d.ts +9 -0
- package/lib/src/pages/storageclasses/index.d.ts +48 -0
- package/lib/src/plugins/index.d.ts +4 -0
- package/lib/src/plugins/model-plugin.d.ts +13 -0
- package/lib/src/plugins/relation-plugin.d.ts +26 -0
- package/lib/src/plugins/type.d.ts +8 -0
- package/lib/src/providers/index.d.ts +1 -0
- package/lib/src/providers/router-provider/index.d.ts +21 -0
- package/lib/src/styles/button.d.ts +1 -0
- package/lib/src/styles/modal.d.ts +1 -0
- package/lib/src/types/index.d.ts +1 -0
- package/lib/src/types/resource.d.ts +62 -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/form.d.ts +3 -0
- package/lib/src/utils/index.d.ts +1 -0
- package/lib/src/utils/k8s.d.ts +3 -0
- package/lib/src/utils/labels.d.ts +9 -0
- package/lib/src/utils/match-selector.d.ts +3 -0
- package/lib/src/utils/openapi.d.ts +40 -0
- package/lib/src/utils/schema.d.ts +18 -0
- package/lib/src/utils/selector.d.ts +3 -0
- package/lib/src/utils/shell.d.ts +16 -0
- package/lib/src/utils/storage.d.ts +13 -0
- package/lib/src/utils/string.d.ts +1 -0
- package/lib/src/utils/time.d.ts +13 -0
- package/lib/src/utils/unit.d.ts +12 -0
- package/lib/src/utils/yaml.d.ts +2 -0
- package/lib/styles/tag.d.ts +1 -0
- package/lib/types/resource.d.ts +3 -3
- package/lib/vite.config.d.ts +2 -0
- package/package.json +5 -5
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { CrudSorting } from '@refinedev/core';
|
|
3
|
-
import { Column, SorterOrder } from 'src/components/
|
|
3
|
+
import { Column, SorterOrder } from 'src/components/InternalBaseTable';
|
|
4
4
|
type UseTableDataProps<Data extends {
|
|
5
5
|
id: string;
|
|
6
6
|
}> = {
|
package/lib/i18n.d.ts
CHANGED
|
@@ -235,18 +235,18 @@ export declare const resources: {
|
|
|
235
235
|
fetch_schema_fail: string;
|
|
236
236
|
obtain_data_error: string;
|
|
237
237
|
retry: string;
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
238
|
+
ready_state: string;
|
|
239
|
+
updating_state: string;
|
|
240
|
+
completed_state: string;
|
|
241
|
+
abnormal_state: string;
|
|
242
|
+
suspended_state: string;
|
|
243
|
+
running_state: string;
|
|
244
|
+
terminating_state: string;
|
|
245
|
+
succeeded_state: string;
|
|
246
|
+
terminated_state: string;
|
|
247
|
+
unknown_state: string;
|
|
248
|
+
pending_state: string;
|
|
249
|
+
waiting_state: string;
|
|
250
250
|
create_resource: string;
|
|
251
251
|
edit_resource: string;
|
|
252
252
|
sec: string;
|
|
@@ -283,6 +283,7 @@ export declare const resources: {
|
|
|
283
283
|
protocol: string;
|
|
284
284
|
key: string;
|
|
285
285
|
value: string;
|
|
286
|
+
effect: string;
|
|
286
287
|
show_data_value: string;
|
|
287
288
|
hide_data_value: string;
|
|
288
289
|
path_type: string;
|
|
@@ -333,7 +334,7 @@ export declare const resources: {
|
|
|
333
334
|
only_support_one_yaml: string;
|
|
334
335
|
support: string;
|
|
335
336
|
not_support: string;
|
|
336
|
-
|
|
337
|
+
stopped_state: string;
|
|
337
338
|
any_node_ip: string;
|
|
338
339
|
storage_class: string;
|
|
339
340
|
persistent_volume: string;
|
|
@@ -344,11 +345,11 @@ export declare const resources: {
|
|
|
344
345
|
volume_mode: string;
|
|
345
346
|
access_mode: string;
|
|
346
347
|
block: string;
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
348
|
+
available_state: string;
|
|
349
|
+
bound_state: string;
|
|
350
|
+
released_state: string;
|
|
351
|
+
failed_state: string;
|
|
352
|
+
lost_state: string;
|
|
352
353
|
font_size: string;
|
|
353
354
|
download_shell_content: string;
|
|
354
355
|
clear_shell: string;
|
|
@@ -374,6 +375,16 @@ export declare const resources: {
|
|
|
374
375
|
edit_distribute_storage: string;
|
|
375
376
|
edit_distribute_storage_success_toast: string;
|
|
376
377
|
edit_distribute_storage_failed_toast: string;
|
|
378
|
+
edit_node_taint: string;
|
|
379
|
+
edit_node_taint_success_toast: string;
|
|
380
|
+
node_taint_NoSchedule: string;
|
|
381
|
+
node_taint_PreferNoSchedule: string;
|
|
382
|
+
node_taint_NoExecute: string;
|
|
383
|
+
taint: string;
|
|
384
|
+
change_form_mode_alert: string;
|
|
385
|
+
pvc_storage_required: string;
|
|
386
|
+
pvc_storage_min: string;
|
|
387
|
+
pvc_storage_reduce_limit: string;
|
|
377
388
|
};
|
|
378
389
|
};
|
|
379
390
|
};
|
|
@@ -57,18 +57,18 @@ declare const _default: {
|
|
|
57
57
|
fetch_schema_fail: string;
|
|
58
58
|
obtain_data_error: string;
|
|
59
59
|
retry: string;
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
60
|
+
ready_state: string;
|
|
61
|
+
updating_state: string;
|
|
62
|
+
completed_state: string;
|
|
63
|
+
abnormal_state: string;
|
|
64
|
+
suspended_state: string;
|
|
65
|
+
running_state: string;
|
|
66
|
+
terminating_state: string;
|
|
67
|
+
succeeded_state: string;
|
|
68
|
+
terminated_state: string;
|
|
69
|
+
unknown_state: string;
|
|
70
|
+
pending_state: string;
|
|
71
|
+
waiting_state: string;
|
|
72
72
|
create_resource: string;
|
|
73
73
|
edit_resource: string;
|
|
74
74
|
sec: string;
|
|
@@ -105,6 +105,7 @@ declare const _default: {
|
|
|
105
105
|
protocol: string;
|
|
106
106
|
key: string;
|
|
107
107
|
value: string;
|
|
108
|
+
effect: string;
|
|
108
109
|
show_data_value: string;
|
|
109
110
|
hide_data_value: string;
|
|
110
111
|
path_type: string;
|
|
@@ -155,7 +156,7 @@ declare const _default: {
|
|
|
155
156
|
only_support_one_yaml: string;
|
|
156
157
|
support: string;
|
|
157
158
|
not_support: string;
|
|
158
|
-
|
|
159
|
+
stopped_state: string;
|
|
159
160
|
any_node_ip: string;
|
|
160
161
|
storage_class: string;
|
|
161
162
|
persistent_volume: string;
|
|
@@ -166,11 +167,11 @@ declare const _default: {
|
|
|
166
167
|
volume_mode: string;
|
|
167
168
|
access_mode: string;
|
|
168
169
|
block: string;
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
170
|
+
available_state: string;
|
|
171
|
+
bound_state: string;
|
|
172
|
+
released_state: string;
|
|
173
|
+
failed_state: string;
|
|
174
|
+
lost_state: string;
|
|
174
175
|
font_size: string;
|
|
175
176
|
download_shell_content: string;
|
|
176
177
|
clear_shell: string;
|
|
@@ -196,6 +197,16 @@ declare const _default: {
|
|
|
196
197
|
edit_distribute_storage: string;
|
|
197
198
|
edit_distribute_storage_success_toast: string;
|
|
198
199
|
edit_distribute_storage_failed_toast: string;
|
|
200
|
+
edit_node_taint: string;
|
|
201
|
+
edit_node_taint_success_toast: string;
|
|
202
|
+
node_taint_NoSchedule: string;
|
|
203
|
+
node_taint_PreferNoSchedule: string;
|
|
204
|
+
node_taint_NoExecute: string;
|
|
205
|
+
taint: string;
|
|
206
|
+
change_form_mode_alert: string;
|
|
207
|
+
pvc_storage_required: string;
|
|
208
|
+
pvc_storage_min: string;
|
|
209
|
+
pvc_storage_reduce_limit: string;
|
|
199
210
|
};
|
|
200
211
|
};
|
|
201
212
|
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GlobalStore, Unstructured } from 'k8s-api-provider';
|
|
2
2
|
import { CronJob } from 'kubernetes-types/batch/v1';
|
|
3
|
-
import {
|
|
3
|
+
import { ResourceState } from '../constants';
|
|
4
4
|
import { WorkloadBaseModel } from './workload-base-model';
|
|
5
5
|
type RequiredCronJob = Required<CronJob> & Unstructured;
|
|
6
6
|
export declare class CronJobModel extends WorkloadBaseModel {
|
|
@@ -8,7 +8,7 @@ export declare class CronJobModel extends WorkloadBaseModel {
|
|
|
8
8
|
spec?: RequiredCronJob['spec'];
|
|
9
9
|
status?: RequiredCronJob['status'];
|
|
10
10
|
constructor(_rawYaml: RequiredCronJob, _globalStore: GlobalStore);
|
|
11
|
-
get stateDisplay():
|
|
11
|
+
get stateDisplay(): ResourceState.SUSPENDED | ResourceState.RUNNING;
|
|
12
12
|
suspend(): RequiredCronJob;
|
|
13
13
|
resume(): RequiredCronJob;
|
|
14
14
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GlobalStore, Unstructured } from 'k8s-api-provider';
|
|
2
2
|
import { DaemonSet } from 'kubernetes-types/apps/v1';
|
|
3
|
-
import {
|
|
3
|
+
import { ResourceState } from '../constants';
|
|
4
4
|
import { WorkloadModel } from './workload-model';
|
|
5
5
|
type RequiredDaemonSet = Required<DaemonSet> & Unstructured;
|
|
6
6
|
export declare class DaemonSetModel extends WorkloadModel {
|
|
@@ -8,7 +8,7 @@ export declare class DaemonSetModel extends WorkloadModel {
|
|
|
8
8
|
spec?: RequiredDaemonSet['spec'];
|
|
9
9
|
status?: RequiredDaemonSet['status'];
|
|
10
10
|
constructor(_rawYaml: RequiredDaemonSet, _globalStore: GlobalStore);
|
|
11
|
-
get stateDisplay():
|
|
11
|
+
get stateDisplay(): ResourceState.UPDATING | ResourceState.READY;
|
|
12
12
|
get replicas(): number;
|
|
13
13
|
get readyReplicas(): number;
|
|
14
14
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GlobalStore, Unstructured } from 'k8s-api-provider';
|
|
2
2
|
import { Deployment } from 'kubernetes-types/apps/v1';
|
|
3
|
-
import {
|
|
3
|
+
import { ResourceState } from '../constants';
|
|
4
4
|
import { WorkloadModel } from './workload-model';
|
|
5
5
|
type RequiredDeployment = Required<Deployment> & Unstructured;
|
|
6
6
|
export declare class DeploymentModel extends WorkloadModel {
|
|
@@ -8,6 +8,6 @@ export declare class DeploymentModel extends WorkloadModel {
|
|
|
8
8
|
spec?: RequiredDeployment['spec'];
|
|
9
9
|
status?: RequiredDeployment['status'];
|
|
10
10
|
constructor(_rawYaml: RequiredDeployment, _globalStore: GlobalStore);
|
|
11
|
-
get stateDisplay():
|
|
11
|
+
get stateDisplay(): ResourceState.UPDATING | ResourceState.READY | ResourceState.STOPPED;
|
|
12
12
|
}
|
|
13
13
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GlobalStore, Unstructured } from 'k8s-api-provider';
|
|
2
2
|
import { Job } from 'kubernetes-types/batch/v1';
|
|
3
|
-
import {
|
|
3
|
+
import { ResourceState } from '../constants';
|
|
4
4
|
import { WorkloadBaseModel } from './workload-base-model';
|
|
5
5
|
type RequiredJob = Required<Job> & Unstructured;
|
|
6
6
|
export declare class JobModel extends WorkloadBaseModel {
|
|
@@ -15,6 +15,6 @@ export declare class JobModel extends WorkloadBaseModel {
|
|
|
15
15
|
get completionsDisplay(): string;
|
|
16
16
|
get succeeded(): number;
|
|
17
17
|
get completions(): number | undefined;
|
|
18
|
-
get stateDisplay():
|
|
18
|
+
get stateDisplay(): ResourceState.COMPLETED | ResourceState.ABNORMAL | ResourceState.SUSPENDED | ResourceState.RUNNING;
|
|
19
19
|
}
|
|
20
20
|
export {};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { GlobalStore, Unstructured } from 'k8s-api-provider';
|
|
2
2
|
import type { Node } from 'kubernetes-types/core/v1';
|
|
3
|
-
import {
|
|
3
|
+
import { ResourceModel } from './resource-model';
|
|
4
4
|
type RequiredNode = Required<Node> & Unstructured;
|
|
5
5
|
export declare enum NodeRole {
|
|
6
6
|
ControlPlane = "Control Plane",
|
|
7
7
|
Worker = "Worker"
|
|
8
8
|
}
|
|
9
|
-
export declare class NodeModel extends
|
|
9
|
+
export declare class NodeModel extends ResourceModel {
|
|
10
10
|
_rawYaml: RequiredNode;
|
|
11
11
|
constructor(_rawYaml: RequiredNode, _globalStore: GlobalStore);
|
|
12
12
|
get role(): NodeRole;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { GlobalStore, Unstructured } from 'k8s-api-provider';
|
|
2
2
|
import type { PersistentVolumeClaim } from 'kubernetes-types/core/v1';
|
|
3
|
+
import { ResourceState } from 'src/constants';
|
|
3
4
|
import { ResourceModel } from './resource-model';
|
|
4
5
|
type RequiredPersistentClaimVolume = Required<PersistentVolumeClaim> & Unstructured;
|
|
5
6
|
export declare class PersistentVolumeClaimModel extends ResourceModel {
|
|
@@ -8,6 +9,7 @@ export declare class PersistentVolumeClaimModel extends ResourceModel {
|
|
|
8
9
|
constructor(_rawYaml: RequiredPersistentClaimVolume, _globalStore: GlobalStore);
|
|
9
10
|
get phase(): string | undefined;
|
|
10
11
|
get pv(): string | undefined;
|
|
12
|
+
get stateDisplay(): ResourceState.FAILED | ResourceState.PENDING | ResourceState.BOUND | ResourceState.LOST | undefined;
|
|
11
13
|
updateDistributeStorage(distributeStorage: number): Unstructured;
|
|
12
14
|
}
|
|
13
15
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { GlobalStore, Unstructured } from 'k8s-api-provider';
|
|
2
2
|
import type { PersistentVolume } from 'kubernetes-types/core/v1';
|
|
3
|
+
import { ResourceState } from 'src/constants';
|
|
3
4
|
import { ResourceModel } from './resource-model';
|
|
4
5
|
type RequiredPersistentVolume = Required<PersistentVolume> & Unstructured;
|
|
5
6
|
export declare class PersistentVolumeModel extends ResourceModel {
|
|
@@ -7,7 +8,9 @@ export declare class PersistentVolumeModel extends ResourceModel {
|
|
|
7
8
|
spec: PersistentVolume['spec'];
|
|
8
9
|
constructor(_rawYaml: RequiredPersistentVolume, _globalStore: GlobalStore);
|
|
9
10
|
get phase(): string | undefined;
|
|
11
|
+
get stateDisplay(): ResourceState.FAILED | ResourceState.UNKNOWN | ResourceState.PENDING | ResourceState.AVAILABLE | ResourceState.BOUND | ResourceState.RELEASED;
|
|
10
12
|
get csi(): string | undefined;
|
|
11
13
|
get pvc(): string | undefined;
|
|
14
|
+
get pvcNamespace(): string | undefined;
|
|
12
15
|
}
|
|
13
16
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GlobalStore, Unstructured } from 'k8s-api-provider';
|
|
2
2
|
import { StatefulSet } from 'kubernetes-types/apps/v1';
|
|
3
|
-
import {
|
|
3
|
+
import { ResourceState } from '../constants';
|
|
4
4
|
import { WorkloadModel } from './workload-model';
|
|
5
5
|
type RequiredStatefulSet = Required<StatefulSet> & Unstructured;
|
|
6
6
|
export declare class StatefulSetModel extends WorkloadModel {
|
|
@@ -8,6 +8,6 @@ export declare class StatefulSetModel extends WorkloadModel {
|
|
|
8
8
|
spec?: RequiredStatefulSet['spec'];
|
|
9
9
|
status?: RequiredStatefulSet['status'];
|
|
10
10
|
constructor(_rawYaml: RequiredStatefulSet, _globalStore: GlobalStore);
|
|
11
|
-
get stateDisplay():
|
|
11
|
+
get stateDisplay(): ResourceState.UPDATING | ResourceState.READY | ResourceState.STOPPED;
|
|
12
12
|
}
|
|
13
13
|
export {};
|
package/lib/src/App.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { AccessControlProvider } from '@refinedev/core';
|
|
2
|
+
import { History } from 'history';
|
|
3
|
+
import { GlobalStore } from 'k8s-api-provider';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { ResourceConfig } from './types';
|
|
6
|
+
import './styles.css';
|
|
7
|
+
type Props = {
|
|
8
|
+
resourcesConfig: ResourceConfig[];
|
|
9
|
+
useHashUrl?: boolean;
|
|
10
|
+
urlPrefix?: string;
|
|
11
|
+
Layout?: React.FC<unknown>;
|
|
12
|
+
history: History;
|
|
13
|
+
globalStore: GlobalStore;
|
|
14
|
+
accessControlProvider?: AccessControlProvider;
|
|
15
|
+
routerProvider?: any;
|
|
16
|
+
};
|
|
17
|
+
export declare const Dovetail: React.FC<Props>;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ConditionsTable';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CronJobModel } from '../../models';
|
|
3
|
+
import { DropdownSize } from '../K8sDropdown';
|
|
4
|
+
type Props<Model extends CronJobModel> = {
|
|
5
|
+
record: Model;
|
|
6
|
+
size?: DropdownSize;
|
|
7
|
+
};
|
|
8
|
+
export declare function CronJobDropdown<Model extends CronJobModel>(props: Props<Model>): JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ResourceModel } from '../../models';
|
|
3
|
+
import { ShowConfig } from '../ShowContent';
|
|
4
|
+
type Props<Model extends ResourceModel> = {
|
|
5
|
+
showConfig: ShowConfig<Model>;
|
|
6
|
+
formatter?: (r: Model) => Model;
|
|
7
|
+
};
|
|
8
|
+
export declare const DrawerShow: <Model extends ResourceModel<import("k8s-api-provider").Unstructured>>(props: Props<Model>) => JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './DrawerShow';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface EditFieldModalProps {
|
|
3
|
+
title?: string;
|
|
4
|
+
submitting?: boolean;
|
|
5
|
+
errorMsgs?: string[];
|
|
6
|
+
formRef: React.MutableRefObject<{
|
|
7
|
+
submit: () => (Promise<unknown> | undefined);
|
|
8
|
+
} | null>;
|
|
9
|
+
renderContent: () => React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
export declare function EditFieldModal(props: EditFieldModalProps): JSX.Element;
|
|
12
|
+
export interface EditField {
|
|
13
|
+
modalProps: EditFieldModalProps;
|
|
14
|
+
}
|
|
15
|
+
export declare function EditField(props: EditField): JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const ErrorWrapper: import("@linaria/react").StyledComponent<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
3
|
+
export declare const ErrorContent: import("@linaria/react").StyledComponent<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
4
|
+
export declare enum ErrorContentType {
|
|
5
|
+
List = "list",
|
|
6
|
+
Card = "card",
|
|
7
|
+
Widget = "widget"
|
|
8
|
+
}
|
|
9
|
+
export type WidgetErrorContentProps = {
|
|
10
|
+
className?: string;
|
|
11
|
+
style?: React.CSSProperties;
|
|
12
|
+
errorText?: string;
|
|
13
|
+
type?: ErrorContentType;
|
|
14
|
+
refetch?: () => void;
|
|
15
|
+
};
|
|
16
|
+
declare const WidgetErrorContent: React.FunctionComponent<WidgetErrorContentProps>;
|
|
17
|
+
export default WidgetErrorContent;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './EventsTable';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { YamlFormProps } from './YamlForm';
|
|
3
|
+
export type FormModalProps = {
|
|
4
|
+
resource?: string;
|
|
5
|
+
id?: string;
|
|
6
|
+
formProps?: YamlFormProps;
|
|
7
|
+
renderForm?: (props: YamlFormProps) => React.ReactNode;
|
|
8
|
+
};
|
|
9
|
+
export declare function FormModal(props: FormModalProps): JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { UseFormReturnType } from '@refinedev/react-hook-form';
|
|
3
|
+
import { ResourceModel } from '../../models';
|
|
4
|
+
import { ResourceConfig } from '../../types';
|
|
5
|
+
type Props<Model extends ResourceModel> = {
|
|
6
|
+
config?: ResourceConfig<Model>;
|
|
7
|
+
formResult: UseFormReturnType;
|
|
8
|
+
errorMsg?: string;
|
|
9
|
+
resourceId?: string;
|
|
10
|
+
};
|
|
11
|
+
export declare const RefineFormContent: <Model extends ResourceModel<import("k8s-api-provider").Unstructured>>(props: Props<Model>) => JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FormAction } from '@refinedev/core';
|
|
3
|
+
import { Unstructured } from 'k8s-api-provider';
|
|
4
|
+
import useYamlForm from './useYamlForm';
|
|
5
|
+
export declare enum SchemaStrategy {
|
|
6
|
+
Required = "Required",
|
|
7
|
+
Optional = "Optional",
|
|
8
|
+
None = "None"
|
|
9
|
+
}
|
|
10
|
+
export interface YamlFormProps {
|
|
11
|
+
id?: string;
|
|
12
|
+
action?: FormAction;
|
|
13
|
+
initialValues?: Record<string, unknown>;
|
|
14
|
+
schemaStrategy?: SchemaStrategy;
|
|
15
|
+
isShowLayout?: boolean;
|
|
16
|
+
useFormProps?: Parameters<typeof useYamlForm>[0];
|
|
17
|
+
transformInitValues?: (values: Record<string, unknown>) => Record<string, unknown>;
|
|
18
|
+
transformApplyValues?: (values: Unstructured) => Unstructured;
|
|
19
|
+
onSaveButtonPropsChange?: (saveButtonProps: {
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
onClick: () => void;
|
|
22
|
+
loading?: boolean | {
|
|
23
|
+
delay?: number | undefined;
|
|
24
|
+
};
|
|
25
|
+
}) => void;
|
|
26
|
+
onErrorsChange?: (errors: string[]) => void;
|
|
27
|
+
onFinish?: () => void;
|
|
28
|
+
}
|
|
29
|
+
export declare function YamlForm(props: YamlFormProps): JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Control } from 'react-hook-form';
|
|
3
|
+
export type RefineFormValidator = (value: unknown, formValue: unknown) => {
|
|
4
|
+
isValid: boolean;
|
|
5
|
+
errorMsg: string;
|
|
6
|
+
};
|
|
7
|
+
export type RefineFormField = {
|
|
8
|
+
path: string[];
|
|
9
|
+
key: string;
|
|
10
|
+
label: string;
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
helperText?: React.ReactNode;
|
|
13
|
+
type?: 'number';
|
|
14
|
+
validators?: RefineFormValidator[];
|
|
15
|
+
disabledWhenEdit?: boolean;
|
|
16
|
+
render?: (value: unknown, onChange: (event: unknown) => void, formValue: unknown, onBlur: () => void, action: 'edit' | 'create', control: Control) => React.ReactElement;
|
|
17
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ResourceModel } from 'src/models';
|
|
2
|
+
import { ResourceConfig } from 'src/types';
|
|
3
|
+
declare function useFieldsConfig<Model extends ResourceModel>(config?: ResourceConfig<Model>, resourceId?: string): import("./type").RefineFormField[] | undefined;
|
|
4
|
+
export default useFieldsConfig;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { BaseRecord, HttpError, UseFormProps as UseFormCoreProps, UseFormReturnType as UseFormReturnTypeCore } from '@refinedev/core';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { UseFormProps as UseHookFormProps, UseFormReturn, FieldValues } from 'react-hook-form';
|
|
4
|
+
export type UseFormReturnType<TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables extends FieldValues = FieldValues, TContext extends object = object, TData extends BaseRecord = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError> = UseFormReturn<TVariables, TContext> & {
|
|
5
|
+
refineCore: UseFormReturnTypeCore<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError>;
|
|
6
|
+
saveButtonProps: {
|
|
7
|
+
disabled: boolean;
|
|
8
|
+
onClick: (e: React.BaseSyntheticEvent) => void;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export type UseFormProps<TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables extends FieldValues = FieldValues, TContext extends object = object, TData extends BaseRecord = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError> = {
|
|
12
|
+
/**
|
|
13
|
+
* Configuration object for the core of the [useForm](/docs/api-reference/core/hooks/useForm/)
|
|
14
|
+
* @type [`UseFormCoreProps<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError>`](/docs/api-reference/core/hooks/useForm/#properties)
|
|
15
|
+
*/
|
|
16
|
+
refineCoreProps?: UseFormCoreProps<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError>;
|
|
17
|
+
/**
|
|
18
|
+
* When you have unsaved changes and try to leave the current page, **refine** shows a confirmation modal box.
|
|
19
|
+
* @default `false*`
|
|
20
|
+
*/
|
|
21
|
+
warnWhenUnsavedChanges?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Disables server-side validation
|
|
24
|
+
* @default false
|
|
25
|
+
* @see {@link https://refine.dev/docs/advanced-tutorials/forms/server-side-form-validation/}
|
|
26
|
+
*/
|
|
27
|
+
disableServerSideValidation?: boolean;
|
|
28
|
+
transformApplyValues?: (values: TVariables) => TVariables;
|
|
29
|
+
} & UseHookFormProps<TVariables, TContext>;
|
|
30
|
+
export declare const useForm: <TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables extends FieldValues = FieldValues, TContext extends object = object, TData extends BaseRecord = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError>({ refineCoreProps, warnWhenUnsavedChanges: warnWhenUnsavedChangesProp, disableServerSideValidation: disableServerSideValidationProp, transformApplyValues, ...rest }?: UseFormProps<TQueryFnData, TError, TVariables, TContext, TData, TResponse, TResponseError>) => UseFormReturnType<TQueryFnData, TError, TVariables, TContext, TData, TResponse, TResponseError>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ResourceConfig } from '../../types';
|
|
2
|
+
import { UseFormProps } from './useReactHookForm';
|
|
3
|
+
export declare const useRefineForm: (props: {
|
|
4
|
+
config: ResourceConfig;
|
|
5
|
+
id?: string;
|
|
6
|
+
refineProps?: UseFormProps['refineCoreProps'];
|
|
7
|
+
useFormProps?: UseFormProps;
|
|
8
|
+
}) => {
|
|
9
|
+
formResult: import("./useReactHookForm").UseFormReturnType<import("@refinedev/core").BaseRecord, import("@refinedev/core").HttpError, {
|
|
10
|
+
[x: string]: any;
|
|
11
|
+
}, {}, import("@refinedev/core").BaseRecord, import("@refinedev/core").BaseRecord, import("@refinedev/core").HttpError>;
|
|
12
|
+
responseErrorMsg: string;
|
|
13
|
+
};
|