@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
package/dist/refine.umd.cjs
CHANGED
|
@@ -1027,8 +1027,8 @@ var __publicField = (obj, key, value) => {
|
|
|
1027
1027
|
const fetch_schema_fail$1 = "获取 schema 失败。";
|
|
1028
1028
|
const obtain_data_error$1 = "Having trouble getting data.";
|
|
1029
1029
|
const retry$1 = "Retry";
|
|
1030
|
-
const create_resource$1 = "Create
|
|
1031
|
-
const edit_resource$1 = "Edit
|
|
1030
|
+
const create_resource$1 = "Create{{resource}}";
|
|
1031
|
+
const edit_resource$1 = "Edit{{resource}}";
|
|
1032
1032
|
const state$1 = "Status";
|
|
1033
1033
|
const name$1 = "Name";
|
|
1034
1034
|
const pod$1 = "Pod";
|
|
@@ -1062,18 +1062,18 @@ var __publicField = (obj, key, value) => {
|
|
|
1062
1062
|
const resume$1 = "Resume";
|
|
1063
1063
|
const sessionAffinity$1 = "Session Affinity";
|
|
1064
1064
|
const log$1 = "Log";
|
|
1065
|
-
const ready
|
|
1066
|
-
const updating
|
|
1067
|
-
const completed
|
|
1068
|
-
const failed
|
|
1069
|
-
const suspended
|
|
1070
|
-
const running
|
|
1071
|
-
const terminating
|
|
1072
|
-
const terminated
|
|
1073
|
-
const succeeded
|
|
1074
|
-
const unknown
|
|
1075
|
-
const pending
|
|
1076
|
-
const waiting
|
|
1065
|
+
const ready = "Ready";
|
|
1066
|
+
const updating = "Updating";
|
|
1067
|
+
const completed = "Completed";
|
|
1068
|
+
const failed = "Failed";
|
|
1069
|
+
const suspended = "Suspended";
|
|
1070
|
+
const running = "Running";
|
|
1071
|
+
const terminating = "Terminating";
|
|
1072
|
+
const terminated = "Terminated";
|
|
1073
|
+
const succeeded = "Succeeded";
|
|
1074
|
+
const unknown = "Unknown";
|
|
1075
|
+
const pending = "Pending";
|
|
1076
|
+
const waiting = "Waiting";
|
|
1077
1077
|
const expand$1 = "Expand";
|
|
1078
1078
|
const fold$1 = "Collapse";
|
|
1079
1079
|
const rule$1 = "Rule";
|
|
@@ -1164,7 +1164,7 @@ var __publicField = (obj, key, value) => {
|
|
|
1164
1164
|
const path_type$1 = "Path type";
|
|
1165
1165
|
const only_support_one_yaml$1 = "Only one YAML configuration is supported at a time.";
|
|
1166
1166
|
const not_support$1 = "Not supported";
|
|
1167
|
-
const stopped
|
|
1167
|
+
const stopped = "Stopped";
|
|
1168
1168
|
const any_node_ip$1 = "Any node IP";
|
|
1169
1169
|
const storage_class$1 = "Storage class";
|
|
1170
1170
|
const persistent_volume$1 = "Persistent volume";
|
|
@@ -1174,11 +1174,11 @@ var __publicField = (obj, key, value) => {
|
|
|
1174
1174
|
const volume_mode$1 = "Volume mode";
|
|
1175
1175
|
const access_mode$1 = "Access mode";
|
|
1176
1176
|
const block$1 = "Block";
|
|
1177
|
-
const pv_phase_available
|
|
1178
|
-
const pv_phase_bound
|
|
1179
|
-
const pv_phase_released
|
|
1180
|
-
const pv_phase_failed
|
|
1181
|
-
const pv_phase_pending
|
|
1177
|
+
const pv_phase_available = "Available";
|
|
1178
|
+
const pv_phase_bound = "Bound";
|
|
1179
|
+
const pv_phase_released = "Released";
|
|
1180
|
+
const pv_phase_failed = "Failed";
|
|
1181
|
+
const pv_phase_pending = "Pending";
|
|
1182
1182
|
const exec_pod = "Execute shell";
|
|
1183
1183
|
const search$1 = "Search";
|
|
1184
1184
|
const edit_label$1 = "Edit label";
|
|
@@ -1232,18 +1232,18 @@ var __publicField = (obj, key, value) => {
|
|
|
1232
1232
|
resume: resume$1,
|
|
1233
1233
|
sessionAffinity: sessionAffinity$1,
|
|
1234
1234
|
log: log$1,
|
|
1235
|
-
ready
|
|
1236
|
-
updating
|
|
1237
|
-
completed
|
|
1238
|
-
failed
|
|
1239
|
-
suspended
|
|
1240
|
-
running
|
|
1241
|
-
terminating
|
|
1242
|
-
terminated
|
|
1243
|
-
succeeded
|
|
1244
|
-
unknown
|
|
1245
|
-
pending
|
|
1246
|
-
waiting
|
|
1235
|
+
ready,
|
|
1236
|
+
updating,
|
|
1237
|
+
completed,
|
|
1238
|
+
failed,
|
|
1239
|
+
suspended,
|
|
1240
|
+
running,
|
|
1241
|
+
terminating,
|
|
1242
|
+
terminated,
|
|
1243
|
+
succeeded,
|
|
1244
|
+
unknown,
|
|
1245
|
+
pending,
|
|
1246
|
+
waiting,
|
|
1247
1247
|
expand: expand$1,
|
|
1248
1248
|
fold: fold$1,
|
|
1249
1249
|
rule: rule$1,
|
|
@@ -1336,7 +1336,7 @@ var __publicField = (obj, key, value) => {
|
|
|
1336
1336
|
path_type: path_type$1,
|
|
1337
1337
|
only_support_one_yaml: only_support_one_yaml$1,
|
|
1338
1338
|
not_support: not_support$1,
|
|
1339
|
-
stopped
|
|
1339
|
+
stopped,
|
|
1340
1340
|
any_node_ip: any_node_ip$1,
|
|
1341
1341
|
storage_class: storage_class$1,
|
|
1342
1342
|
persistent_volume: persistent_volume$1,
|
|
@@ -1346,11 +1346,11 @@ var __publicField = (obj, key, value) => {
|
|
|
1346
1346
|
volume_mode: volume_mode$1,
|
|
1347
1347
|
access_mode: access_mode$1,
|
|
1348
1348
|
block: block$1,
|
|
1349
|
-
pv_phase_available
|
|
1350
|
-
pv_phase_bound
|
|
1351
|
-
pv_phase_released
|
|
1352
|
-
pv_phase_failed
|
|
1353
|
-
pv_phase_pending
|
|
1349
|
+
pv_phase_available,
|
|
1350
|
+
pv_phase_bound,
|
|
1351
|
+
pv_phase_released,
|
|
1352
|
+
pv_phase_failed,
|
|
1353
|
+
pv_phase_pending,
|
|
1354
1354
|
exec_pod,
|
|
1355
1355
|
search: search$1,
|
|
1356
1356
|
edit_label: edit_label$1
|
|
@@ -1414,20 +1414,20 @@ var __publicField = (obj, key, value) => {
|
|
|
1414
1414
|
const fetch_schema_fail = "获取 schema 失败。";
|
|
1415
1415
|
const obtain_data_error = "获取数据时遇到问题。";
|
|
1416
1416
|
const retry = "重试";
|
|
1417
|
-
const
|
|
1418
|
-
const
|
|
1419
|
-
const
|
|
1420
|
-
const
|
|
1421
|
-
const
|
|
1422
|
-
const
|
|
1423
|
-
const
|
|
1424
|
-
const
|
|
1425
|
-
const
|
|
1426
|
-
const
|
|
1427
|
-
const
|
|
1428
|
-
const
|
|
1429
|
-
const create_resource = "创建
|
|
1430
|
-
const edit_resource = "编辑
|
|
1417
|
+
const ready_state = "已就绪";
|
|
1418
|
+
const updating_state = "更新中";
|
|
1419
|
+
const completed_state = "已完成";
|
|
1420
|
+
const abnormal_state = "异常";
|
|
1421
|
+
const suspended_state = "已挂起";
|
|
1422
|
+
const running_state = "运行中";
|
|
1423
|
+
const terminating_state = "终止中";
|
|
1424
|
+
const succeeded_state = "已成功终止";
|
|
1425
|
+
const terminated_state = "已终止";
|
|
1426
|
+
const unknown_state = "未知";
|
|
1427
|
+
const pending_state = "待处理";
|
|
1428
|
+
const waiting_state = "等待中";
|
|
1429
|
+
const create_resource = "创建{{resource}}";
|
|
1430
|
+
const edit_resource = "编辑{{resource}}";
|
|
1431
1431
|
const sec = "秒";
|
|
1432
1432
|
const min = "分";
|
|
1433
1433
|
const hr = "小时";
|
|
@@ -1462,6 +1462,7 @@ var __publicField = (obj, key, value) => {
|
|
|
1462
1462
|
const protocol = "协议";
|
|
1463
1463
|
const key = "键";
|
|
1464
1464
|
const value = "值";
|
|
1465
|
+
const effect = "效果";
|
|
1465
1466
|
const show_data_value = "显示数值";
|
|
1466
1467
|
const hide_data_value = "隐藏数值";
|
|
1467
1468
|
const path_type = "路径类型";
|
|
@@ -1510,7 +1511,7 @@ var __publicField = (obj, key, value) => {
|
|
|
1510
1511
|
const only_support_one_yaml = "一次仅支持输入一个 YAML 配置。";
|
|
1511
1512
|
const support = "支持";
|
|
1512
1513
|
const not_support = "不支持";
|
|
1513
|
-
const
|
|
1514
|
+
const stopped_state = "已停止";
|
|
1514
1515
|
const any_node_ip = "任意节点 IP";
|
|
1515
1516
|
const storage_class = "存储类";
|
|
1516
1517
|
const persistent_volume = "持久卷";
|
|
@@ -1521,11 +1522,11 @@ var __publicField = (obj, key, value) => {
|
|
|
1521
1522
|
const volume_mode = "卷模式";
|
|
1522
1523
|
const access_mode = "访问模式";
|
|
1523
1524
|
const block = "块";
|
|
1524
|
-
const
|
|
1525
|
-
const
|
|
1526
|
-
const
|
|
1527
|
-
const
|
|
1528
|
-
const
|
|
1525
|
+
const available_state = "可用";
|
|
1526
|
+
const bound_state = "已绑定";
|
|
1527
|
+
const released_state = "已释放";
|
|
1528
|
+
const failed_state = "失败";
|
|
1529
|
+
const lost_state = "卷不可用";
|
|
1529
1530
|
const font_size = "字体大小";
|
|
1530
1531
|
const download_shell_content = "下载控制台日志";
|
|
1531
1532
|
const clear_shell = "清空命令行";
|
|
@@ -1551,6 +1552,16 @@ var __publicField = (obj, key, value) => {
|
|
|
1551
1552
|
const edit_distribute_storage = "编辑分配量";
|
|
1552
1553
|
const edit_distribute_storage_success_toast = "编辑分配量成功";
|
|
1553
1554
|
const edit_distribute_storage_failed_toast = "编辑分配量失败";
|
|
1555
|
+
const edit_node_taint = "编辑节点污点";
|
|
1556
|
+
const edit_node_taint_success_toast = "编辑节点 {{name}} 的污点成功";
|
|
1557
|
+
const node_taint_NoSchedule = "仅阻止调度";
|
|
1558
|
+
const node_taint_PreferNoSchedule = "尽可能阻止调度";
|
|
1559
|
+
const node_taint_NoExecute = "阻止调度并驱逐 Pod";
|
|
1560
|
+
const taint = "污点";
|
|
1561
|
+
const change_form_mode_alert = "从编辑 YAML 切回表单编辑,将无法保留对 YAML 文件做出的所有更改。";
|
|
1562
|
+
const pvc_storage_required = "请填写分配量。";
|
|
1563
|
+
const pvc_storage_min = "请输入正整数。";
|
|
1564
|
+
const pvc_storage_reduce_limit = "输入值不得小于当前数值。";
|
|
1554
1565
|
const dovetail = {
|
|
1555
1566
|
copy: copy$1,
|
|
1556
1567
|
reset_arguments,
|
|
@@ -1609,18 +1620,18 @@ var __publicField = (obj, key, value) => {
|
|
|
1609
1620
|
fetch_schema_fail,
|
|
1610
1621
|
obtain_data_error,
|
|
1611
1622
|
retry,
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1623
|
+
ready_state,
|
|
1624
|
+
updating_state,
|
|
1625
|
+
completed_state,
|
|
1626
|
+
abnormal_state,
|
|
1627
|
+
suspended_state,
|
|
1628
|
+
running_state,
|
|
1629
|
+
terminating_state,
|
|
1630
|
+
succeeded_state,
|
|
1631
|
+
terminated_state,
|
|
1632
|
+
unknown_state,
|
|
1633
|
+
pending_state,
|
|
1634
|
+
waiting_state,
|
|
1624
1635
|
create_resource,
|
|
1625
1636
|
edit_resource,
|
|
1626
1637
|
sec,
|
|
@@ -1657,6 +1668,7 @@ var __publicField = (obj, key, value) => {
|
|
|
1657
1668
|
protocol,
|
|
1658
1669
|
key,
|
|
1659
1670
|
value,
|
|
1671
|
+
effect,
|
|
1660
1672
|
show_data_value,
|
|
1661
1673
|
hide_data_value,
|
|
1662
1674
|
path_type,
|
|
@@ -1707,7 +1719,7 @@ var __publicField = (obj, key, value) => {
|
|
|
1707
1719
|
only_support_one_yaml,
|
|
1708
1720
|
support,
|
|
1709
1721
|
not_support,
|
|
1710
|
-
|
|
1722
|
+
stopped_state,
|
|
1711
1723
|
any_node_ip,
|
|
1712
1724
|
storage_class,
|
|
1713
1725
|
persistent_volume,
|
|
@@ -1718,11 +1730,11 @@ var __publicField = (obj, key, value) => {
|
|
|
1718
1730
|
volume_mode,
|
|
1719
1731
|
access_mode,
|
|
1720
1732
|
block,
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1733
|
+
available_state,
|
|
1734
|
+
bound_state,
|
|
1735
|
+
released_state,
|
|
1736
|
+
failed_state,
|
|
1737
|
+
lost_state,
|
|
1726
1738
|
font_size,
|
|
1727
1739
|
download_shell_content,
|
|
1728
1740
|
clear_shell,
|
|
@@ -1747,7 +1759,17 @@ var __publicField = (obj, key, value) => {
|
|
|
1747
1759
|
allow_expand,
|
|
1748
1760
|
edit_distribute_storage,
|
|
1749
1761
|
edit_distribute_storage_success_toast,
|
|
1750
|
-
edit_distribute_storage_failed_toast
|
|
1762
|
+
edit_distribute_storage_failed_toast,
|
|
1763
|
+
edit_node_taint,
|
|
1764
|
+
edit_node_taint_success_toast,
|
|
1765
|
+
node_taint_NoSchedule,
|
|
1766
|
+
node_taint_PreferNoSchedule,
|
|
1767
|
+
node_taint_NoExecute,
|
|
1768
|
+
taint,
|
|
1769
|
+
change_form_mode_alert,
|
|
1770
|
+
pvc_storage_required,
|
|
1771
|
+
pvc_storage_min,
|
|
1772
|
+
pvc_storage_reduce_limit
|
|
1751
1773
|
};
|
|
1752
1774
|
const ZH = {
|
|
1753
1775
|
dovetail
|
|
@@ -8850,15 +8872,15 @@ var __publicField = (obj, key, value) => {
|
|
|
8850
8872
|
})
|
|
8851
8873
|
});
|
|
8852
8874
|
};
|
|
8853
|
-
const
|
|
8875
|
+
const TableWidgets_zbqkvj = "";
|
|
8854
8876
|
const AuxiliaryLine = /* @__PURE__ */ styled_default("div")({
|
|
8855
8877
|
name: "AuxiliaryLine",
|
|
8856
|
-
class: "
|
|
8878
|
+
class: "a60f3dj",
|
|
8857
8879
|
propsAsIs: false
|
|
8858
8880
|
});
|
|
8859
|
-
const
|
|
8860
|
-
const TableContainerStyle = "
|
|
8861
|
-
function Table(props) {
|
|
8881
|
+
const index_17chkj7 = "";
|
|
8882
|
+
const TableContainerStyle = "t47xc8k";
|
|
8883
|
+
function Table$1(props) {
|
|
8862
8884
|
const {
|
|
8863
8885
|
t: t2
|
|
8864
8886
|
} = useTranslation();
|
|
@@ -8975,7 +8997,7 @@ var __publicField = (obj, key, value) => {
|
|
|
8975
8997
|
const PodSelectorTable = ({ podSelectors = {} }) => {
|
|
8976
8998
|
const { t: t2 } = useTranslation();
|
|
8977
8999
|
const component = React.useContext(ComponentContext);
|
|
8978
|
-
const
|
|
9000
|
+
const Table2 = component.Table || Table$1;
|
|
8979
9001
|
const currentSize = 10;
|
|
8980
9002
|
const datas = Object.keys(podSelectors).map((key2) => ({
|
|
8981
9003
|
id: key2,
|
|
@@ -9020,7 +9042,7 @@ var __publicField = (obj, key, value) => {
|
|
|
9020
9042
|
);
|
|
9021
9043
|
}
|
|
9022
9044
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
9023
|
-
|
|
9045
|
+
Table2,
|
|
9024
9046
|
{
|
|
9025
9047
|
tableKey: "podSelector",
|
|
9026
9048
|
loading: false,
|
|
@@ -9040,7 +9062,7 @@ var __publicField = (obj, key, value) => {
|
|
|
9040
9062
|
const PortsTable = ({ service }) => {
|
|
9041
9063
|
const { t: t2 } = useTranslation();
|
|
9042
9064
|
const component = React.useContext(ComponentContext);
|
|
9043
|
-
const
|
|
9065
|
+
const Table2 = component.Table || Table$1;
|
|
9044
9066
|
const currentSize = 10;
|
|
9045
9067
|
const columns = [
|
|
9046
9068
|
{
|
|
@@ -9108,7 +9130,7 @@ var __publicField = (obj, key, value) => {
|
|
|
9108
9130
|
);
|
|
9109
9131
|
}
|
|
9110
9132
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
9111
|
-
|
|
9133
|
+
Table2,
|
|
9112
9134
|
{
|
|
9113
9135
|
tableKey: "ports",
|
|
9114
9136
|
loading: false,
|
|
@@ -9125,6 +9147,409 @@ var __publicField = (obj, key, value) => {
|
|
|
9125
9147
|
}
|
|
9126
9148
|
);
|
|
9127
9149
|
};
|
|
9150
|
+
function FormErrorAlert(props) {
|
|
9151
|
+
const { title, errorMsgs, style, className, isEdit } = props;
|
|
9152
|
+
const { i18n: i18n2 } = useTranslation();
|
|
9153
|
+
return errorMsgs.length ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
9154
|
+
eagle.Alert,
|
|
9155
|
+
{
|
|
9156
|
+
message: /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
9157
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: title || i18n2.t(isEdit ? "dovetail.save_failed_tip" : "dovetail.create_failed_tip") }),
|
|
9158
|
+
errorMsgs.length > 1 ? /* @__PURE__ */ jsxRuntimeExports.jsx("ul", { children: errorMsgs.map((errorMsg, index2) => /* @__PURE__ */ jsxRuntimeExports.jsxs("li", { children: [
|
|
9159
|
+
index2 + 1 + ". ",
|
|
9160
|
+
" ",
|
|
9161
|
+
errorMsg
|
|
9162
|
+
] }, errorMsg)) }) : lodashEs.first(errorMsgs)
|
|
9163
|
+
] }),
|
|
9164
|
+
type: "error",
|
|
9165
|
+
style,
|
|
9166
|
+
className
|
|
9167
|
+
}
|
|
9168
|
+
) : null;
|
|
9169
|
+
}
|
|
9170
|
+
var AccessControlAuth = /* @__PURE__ */ ((AccessControlAuth2) => {
|
|
9171
|
+
AccessControlAuth2["Edit"] = "Edit";
|
|
9172
|
+
AccessControlAuth2["Delete"] = "Delete";
|
|
9173
|
+
AccessControlAuth2["Create"] = "Create";
|
|
9174
|
+
return AccessControlAuth2;
|
|
9175
|
+
})(AccessControlAuth || {});
|
|
9176
|
+
function getCommonErrors(responseBody, i18n2) {
|
|
9177
|
+
var _a;
|
|
9178
|
+
if (!((responseBody == null ? void 0 : responseBody.message) || (responseBody == null ? void 0 : responseBody.code) || (responseBody == null ? void 0 : responseBody.reason) || (responseBody == null ? void 0 : responseBody.details) || (responseBody == null ? void 0 : responseBody.graphQLErrors))) {
|
|
9179
|
+
return [];
|
|
9180
|
+
}
|
|
9181
|
+
const causes = ((_a = responseBody.details) == null ? void 0 : _a.causes) || responseBody.graphQLErrors || [];
|
|
9182
|
+
if (causes.length) {
|
|
9183
|
+
return causes.map((cause) => {
|
|
9184
|
+
let params = {};
|
|
9185
|
+
let message2 = cause.message;
|
|
9186
|
+
try {
|
|
9187
|
+
const info = JSON.parse(cause.message);
|
|
9188
|
+
params = info.params;
|
|
9189
|
+
message2 = info.message;
|
|
9190
|
+
} catch {
|
|
9191
|
+
return i18n2.t(
|
|
9192
|
+
[
|
|
9193
|
+
`error.${cause.reason}`,
|
|
9194
|
+
`error.${cause.code}`,
|
|
9195
|
+
`${cause.field ? `${cause.field}: ` : ""}${message2}`
|
|
9196
|
+
],
|
|
9197
|
+
{
|
|
9198
|
+
...params,
|
|
9199
|
+
fallbackLng: ""
|
|
9200
|
+
}
|
|
9201
|
+
);
|
|
9202
|
+
}
|
|
9203
|
+
return i18n2.t(
|
|
9204
|
+
[
|
|
9205
|
+
`error.${cause.reason}`,
|
|
9206
|
+
`error.${cause.code}`,
|
|
9207
|
+
`${cause.field ? `${cause.field}: ` : ""}${message2}`
|
|
9208
|
+
],
|
|
9209
|
+
{
|
|
9210
|
+
...params,
|
|
9211
|
+
fallbackLng: ""
|
|
9212
|
+
}
|
|
9213
|
+
);
|
|
9214
|
+
});
|
|
9215
|
+
}
|
|
9216
|
+
return [
|
|
9217
|
+
i18n2.t(
|
|
9218
|
+
[`error.${responseBody.code}`, `error.${responseBody.reason}`, responseBody.message || ""],
|
|
9219
|
+
{ fallbackLng: "" }
|
|
9220
|
+
)
|
|
9221
|
+
];
|
|
9222
|
+
}
|
|
9223
|
+
function useSubmitForm(options) {
|
|
9224
|
+
const { formRef, onSubmitSuccess } = options;
|
|
9225
|
+
const { i18n: i18n2 } = useTranslation();
|
|
9226
|
+
const [submitting, setSubmitting] = React.useState(false);
|
|
9227
|
+
const [errorMsgs, setErrorMsgs] = React.useState([]);
|
|
9228
|
+
const reset = React.useCallback(() => {
|
|
9229
|
+
setSubmitting(false);
|
|
9230
|
+
setErrorMsgs([]);
|
|
9231
|
+
}, []);
|
|
9232
|
+
const onSubmit = React.useCallback(async () => {
|
|
9233
|
+
var _a;
|
|
9234
|
+
try {
|
|
9235
|
+
setSubmitting(true);
|
|
9236
|
+
const isFalsy = await ((_a = formRef.current) == null ? void 0 : _a.submit()) === false;
|
|
9237
|
+
if (isFalsy) {
|
|
9238
|
+
return;
|
|
9239
|
+
}
|
|
9240
|
+
onSubmitSuccess == null ? void 0 : onSubmitSuccess();
|
|
9241
|
+
reset();
|
|
9242
|
+
} catch (error) {
|
|
9243
|
+
if (error instanceof Object) {
|
|
9244
|
+
if ("response" in error && error.response instanceof Response) {
|
|
9245
|
+
const response = error.response;
|
|
9246
|
+
const body = await response.json();
|
|
9247
|
+
setErrorMsgs(getCommonErrors(body, i18n2));
|
|
9248
|
+
} else if ("message" in error && typeof error.message === "string") {
|
|
9249
|
+
setErrorMsgs([error.message]);
|
|
9250
|
+
}
|
|
9251
|
+
}
|
|
9252
|
+
} finally {
|
|
9253
|
+
setSubmitting(false);
|
|
9254
|
+
}
|
|
9255
|
+
}, [formRef, i18n2, reset, onSubmitSuccess]);
|
|
9256
|
+
return {
|
|
9257
|
+
submitting,
|
|
9258
|
+
errorMsgs,
|
|
9259
|
+
reset,
|
|
9260
|
+
onSubmit
|
|
9261
|
+
};
|
|
9262
|
+
}
|
|
9263
|
+
const index_10dq51k = "";
|
|
9264
|
+
const EditButtonStyle = "esoz3jw";
|
|
9265
|
+
function EditFieldModal(props) {
|
|
9266
|
+
const {
|
|
9267
|
+
title,
|
|
9268
|
+
formRef: form2,
|
|
9269
|
+
renderContent,
|
|
9270
|
+
fullscreen
|
|
9271
|
+
} = props;
|
|
9272
|
+
const {
|
|
9273
|
+
i18n: i18n2
|
|
9274
|
+
} = useTranslation();
|
|
9275
|
+
const popModal = eagle.usePopModal();
|
|
9276
|
+
const {
|
|
9277
|
+
submitting,
|
|
9278
|
+
errorMsgs,
|
|
9279
|
+
reset,
|
|
9280
|
+
onSubmit
|
|
9281
|
+
} = useSubmitForm({
|
|
9282
|
+
formRef: form2,
|
|
9283
|
+
onSubmitSuccess: () => {
|
|
9284
|
+
popModal();
|
|
9285
|
+
}
|
|
9286
|
+
});
|
|
9287
|
+
const close = React.useCallback(() => {
|
|
9288
|
+
popModal();
|
|
9289
|
+
reset();
|
|
9290
|
+
}, [reset]);
|
|
9291
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(eagle.Modal, {
|
|
9292
|
+
className: fullscreen ? FullscreenModalStyle : SmallModalStyle,
|
|
9293
|
+
title: title || i18n2.t("dovetail.edit"),
|
|
9294
|
+
confirmLoading: submitting,
|
|
9295
|
+
onOk: onSubmit,
|
|
9296
|
+
onCancel: close,
|
|
9297
|
+
okText: i18n2.t("dovetail.save"),
|
|
9298
|
+
normal: true,
|
|
9299
|
+
destroyOnClose: true,
|
|
9300
|
+
fullscreen,
|
|
9301
|
+
children: [renderContent(), /* @__PURE__ */ jsxRuntimeExports.jsx(FormErrorAlert, {
|
|
9302
|
+
style: {
|
|
9303
|
+
marginTop: 16
|
|
9304
|
+
},
|
|
9305
|
+
errorMsgs,
|
|
9306
|
+
isEdit: true
|
|
9307
|
+
})]
|
|
9308
|
+
});
|
|
9309
|
+
}
|
|
9310
|
+
function EditField(props) {
|
|
9311
|
+
const {
|
|
9312
|
+
modalProps
|
|
9313
|
+
} = props;
|
|
9314
|
+
const {
|
|
9315
|
+
i18n: i18n2
|
|
9316
|
+
} = useTranslation();
|
|
9317
|
+
const {
|
|
9318
|
+
resource
|
|
9319
|
+
} = core.useResource();
|
|
9320
|
+
const pushModal = eagle.usePushModal();
|
|
9321
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(core.CanAccess, {
|
|
9322
|
+
resource: resource == null ? void 0 : resource.name,
|
|
9323
|
+
action: AccessControlAuth.Edit,
|
|
9324
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Button, {
|
|
9325
|
+
className: cx_default(EditButtonStyle, eagle.Typo.Label.l4_regular_title),
|
|
9326
|
+
type: "link",
|
|
9327
|
+
onClick: () => {
|
|
9328
|
+
pushModal({
|
|
9329
|
+
component: EditFieldModal,
|
|
9330
|
+
props: modalProps
|
|
9331
|
+
});
|
|
9332
|
+
},
|
|
9333
|
+
children: i18n2.t("dovetail.edit")
|
|
9334
|
+
})
|
|
9335
|
+
});
|
|
9336
|
+
}
|
|
9337
|
+
var StorageUnit = /* @__PURE__ */ ((StorageUnit2) => {
|
|
9338
|
+
StorageUnit2["Pi"] = "Pi";
|
|
9339
|
+
StorageUnit2["PiB"] = "PiB";
|
|
9340
|
+
StorageUnit2["Ti"] = "Ti";
|
|
9341
|
+
StorageUnit2["TiB"] = "TiB";
|
|
9342
|
+
StorageUnit2["Gi"] = "Gi";
|
|
9343
|
+
StorageUnit2["GiB"] = "GiB";
|
|
9344
|
+
StorageUnit2["Mi"] = "Mi";
|
|
9345
|
+
StorageUnit2["MiB"] = "MiB";
|
|
9346
|
+
StorageUnit2["Ki"] = "Ki";
|
|
9347
|
+
StorageUnit2["KiB"] = "KiB";
|
|
9348
|
+
return StorageUnit2;
|
|
9349
|
+
})(StorageUnit || {});
|
|
9350
|
+
const UNIT_FACTORS = {
|
|
9351
|
+
Pi: 1024 ** 5,
|
|
9352
|
+
PiB: 1024 ** 5,
|
|
9353
|
+
Ti: 1024 ** 4,
|
|
9354
|
+
TiB: 1024 ** 4,
|
|
9355
|
+
Gi: 1024 ** 3,
|
|
9356
|
+
GiB: 1024 ** 3,
|
|
9357
|
+
Mi: 1024 ** 2,
|
|
9358
|
+
MiB: 1024 ** 2,
|
|
9359
|
+
Ki: 1024,
|
|
9360
|
+
KiB: 1024,
|
|
9361
|
+
B: 1
|
|
9362
|
+
};
|
|
9363
|
+
function transformStorageUnit(value2, toUnit = "Gi") {
|
|
9364
|
+
const num = parseFloat(value2);
|
|
9365
|
+
const unit = Object.values(StorageUnit).find((u) => value2.includes(u)) || "Ki";
|
|
9366
|
+
return num / UNIT_FACTORS[unit] * UNIT_FACTORS[toUnit];
|
|
9367
|
+
}
|
|
9368
|
+
const UNITS = ["", "K", "M", "G", "T", "P"];
|
|
9369
|
+
const FRACTIONAL = ["", "m", "u", "n", "p", "f"];
|
|
9370
|
+
function formatSi(inValue, options) {
|
|
9371
|
+
const {
|
|
9372
|
+
increment = 1e3,
|
|
9373
|
+
suffix = null,
|
|
9374
|
+
firstSuffix = null,
|
|
9375
|
+
startingExponent = 0,
|
|
9376
|
+
minExponent = 0,
|
|
9377
|
+
maxPrecision = 2,
|
|
9378
|
+
atLeastOne = true
|
|
9379
|
+
} = options || {};
|
|
9380
|
+
let val = inValue;
|
|
9381
|
+
let exp = startingExponent;
|
|
9382
|
+
while (val >= increment && exp + 1 < UNITS.length || exp < minExponent) {
|
|
9383
|
+
val = val / increment;
|
|
9384
|
+
exp++;
|
|
9385
|
+
}
|
|
9386
|
+
let out = 0;
|
|
9387
|
+
if (val < 10 && maxPrecision >= 2) {
|
|
9388
|
+
out = Math.round(val * 100) / 100;
|
|
9389
|
+
} else if (val < 100 && maxPrecision >= 1) {
|
|
9390
|
+
out = Math.round(val * 10) / 10;
|
|
9391
|
+
} else {
|
|
9392
|
+
out = Math.round(val);
|
|
9393
|
+
}
|
|
9394
|
+
if (atLeastOne && out === 0) {
|
|
9395
|
+
out = 1;
|
|
9396
|
+
}
|
|
9397
|
+
let outStr = String(out);
|
|
9398
|
+
if (exp === 0 && firstSuffix !== null) {
|
|
9399
|
+
outStr += `${firstSuffix}`;
|
|
9400
|
+
} else {
|
|
9401
|
+
outStr += `${UNITS[exp]}${suffix}` || "";
|
|
9402
|
+
}
|
|
9403
|
+
return outStr;
|
|
9404
|
+
}
|
|
9405
|
+
function parseSi(inValue, increment = null, allowFractional = true) {
|
|
9406
|
+
if (!inValue || typeof inValue !== "string" || !inValue.length) {
|
|
9407
|
+
return NaN;
|
|
9408
|
+
}
|
|
9409
|
+
inValue = inValue.replace(/,/g, "");
|
|
9410
|
+
let [, valStr, unit, incStr] = inValue.match(/^([0-9.-]+)\s*([^0-9.-]?)([^0-9.-]?)/) || [];
|
|
9411
|
+
const val = parseFloat(valStr);
|
|
9412
|
+
if (!unit) {
|
|
9413
|
+
return val;
|
|
9414
|
+
}
|
|
9415
|
+
if (unit.charCodeAt(0) === 181) {
|
|
9416
|
+
unit = "u";
|
|
9417
|
+
}
|
|
9418
|
+
const divide = FRACTIONAL.includes(unit);
|
|
9419
|
+
const multiply = UNITS.includes(unit.toUpperCase());
|
|
9420
|
+
if (increment === null) {
|
|
9421
|
+
if ((multiply || divide) && incStr === "i") {
|
|
9422
|
+
increment = 1024;
|
|
9423
|
+
} else {
|
|
9424
|
+
increment = 1e3;
|
|
9425
|
+
}
|
|
9426
|
+
}
|
|
9427
|
+
if (divide && allowFractional) {
|
|
9428
|
+
const exp = FRACTIONAL.indexOf(unit);
|
|
9429
|
+
return val / Math.pow(increment, exp);
|
|
9430
|
+
}
|
|
9431
|
+
if (multiply) {
|
|
9432
|
+
const exp = UNITS.indexOf(unit.toUpperCase());
|
|
9433
|
+
return val * Math.pow(increment, exp);
|
|
9434
|
+
}
|
|
9435
|
+
return val;
|
|
9436
|
+
}
|
|
9437
|
+
const DistributeStorageForm = React.forwardRef(function DistributeStorageForm2(props, ref) {
|
|
9438
|
+
const { defaultValue, pvc: pvc2 } = props;
|
|
9439
|
+
const { resource } = core.useResource();
|
|
9440
|
+
const { mutateAsync } = core.useUpdate();
|
|
9441
|
+
const { t: t2 } = useTranslation();
|
|
9442
|
+
const [distributeStorage, setDistributeStorage] = React.useState(defaultValue);
|
|
9443
|
+
const [validateResult, setValidateResult] = React.useState({
|
|
9444
|
+
distributeStorage: ""
|
|
9445
|
+
});
|
|
9446
|
+
const validators = React.useMemo(() => {
|
|
9447
|
+
return {
|
|
9448
|
+
distributeStorage(value2) {
|
|
9449
|
+
if (lodashEs.isNil(value2)) {
|
|
9450
|
+
return t2("dovetail.pvc_storage_required");
|
|
9451
|
+
} else if (value2 < 1) {
|
|
9452
|
+
return t2("dovetail.pvc_storage_min");
|
|
9453
|
+
} else if (value2 < defaultValue) {
|
|
9454
|
+
return t2("dovetail.pvc_storage_reduce_limit");
|
|
9455
|
+
}
|
|
9456
|
+
return "";
|
|
9457
|
+
}
|
|
9458
|
+
};
|
|
9459
|
+
}, [t2, defaultValue]);
|
|
9460
|
+
const submit = React.useCallback(() => {
|
|
9461
|
+
const isInvalid = !!validators.distributeStorage(distributeStorage);
|
|
9462
|
+
if (isInvalid) {
|
|
9463
|
+
return false;
|
|
9464
|
+
}
|
|
9465
|
+
const v = pvc2.updateDistributeStorage(distributeStorage);
|
|
9466
|
+
const id = pvc2.id;
|
|
9467
|
+
pruneBeforeEdit(v);
|
|
9468
|
+
return mutateAsync({
|
|
9469
|
+
id,
|
|
9470
|
+
resource: (resource == null ? void 0 : resource.name) || "",
|
|
9471
|
+
values: v,
|
|
9472
|
+
successNotification() {
|
|
9473
|
+
return {
|
|
9474
|
+
message: t2("dovetail.edit_distribute_storage_success_toast", {
|
|
9475
|
+
kind: pvc2.kind,
|
|
9476
|
+
name: pvc2.id,
|
|
9477
|
+
interpolation: {
|
|
9478
|
+
escapeValue: false
|
|
9479
|
+
}
|
|
9480
|
+
}),
|
|
9481
|
+
type: "success"
|
|
9482
|
+
};
|
|
9483
|
+
},
|
|
9484
|
+
errorNotification: false
|
|
9485
|
+
});
|
|
9486
|
+
}, [pvc2, distributeStorage, resource == null ? void 0 : resource.name, validators, mutateAsync, t2]);
|
|
9487
|
+
React.useImperativeHandle(ref, () => ({
|
|
9488
|
+
submit
|
|
9489
|
+
}), [submit]);
|
|
9490
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
9491
|
+
eagle.Form.Item,
|
|
9492
|
+
{
|
|
9493
|
+
label: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { style: { width: "134px" }, children: t2("dovetail.distributed") }),
|
|
9494
|
+
colon: false,
|
|
9495
|
+
help: validateResult.distributeStorage,
|
|
9496
|
+
validateStatus: validateResult.distributeStorage ? "error" : "",
|
|
9497
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
9498
|
+
eagle.Fields.Integer,
|
|
9499
|
+
{
|
|
9500
|
+
style: { width: "142px" },
|
|
9501
|
+
input: {
|
|
9502
|
+
name: "distributeStorage",
|
|
9503
|
+
value: distributeStorage,
|
|
9504
|
+
onChange: (value2) => {
|
|
9505
|
+
const v = Number(value2);
|
|
9506
|
+
setDistributeStorage(v);
|
|
9507
|
+
setValidateResult({
|
|
9508
|
+
distributeStorage: validators.distributeStorage(v)
|
|
9509
|
+
});
|
|
9510
|
+
},
|
|
9511
|
+
onBlur: () => {
|
|
9512
|
+
},
|
|
9513
|
+
onFocus: () => {
|
|
9514
|
+
}
|
|
9515
|
+
},
|
|
9516
|
+
min: 1,
|
|
9517
|
+
meta: {},
|
|
9518
|
+
suffix: "GiB",
|
|
9519
|
+
controls: true
|
|
9520
|
+
}
|
|
9521
|
+
)
|
|
9522
|
+
}
|
|
9523
|
+
);
|
|
9524
|
+
});
|
|
9525
|
+
function PVCDistributeStorage({ pvc: pvc2, editable }) {
|
|
9526
|
+
var _a, _b;
|
|
9527
|
+
const { t: t2 } = useTranslation();
|
|
9528
|
+
const formRef = React.useRef(null);
|
|
9529
|
+
const value2 = (_b = (_a = pvc2.spec.resources) == null ? void 0 : _a.requests) == null ? void 0 : _b.storage;
|
|
9530
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
9531
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Units.Byte, { rawValue: parseSi(value2), decimals: 1 }),
|
|
9532
|
+
editable && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
9533
|
+
EditField,
|
|
9534
|
+
{
|
|
9535
|
+
modalProps: {
|
|
9536
|
+
formRef,
|
|
9537
|
+
title: t2("dovetail.edit_replicas"),
|
|
9538
|
+
renderContent() {
|
|
9539
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
9540
|
+
DistributeStorageForm,
|
|
9541
|
+
{
|
|
9542
|
+
ref: formRef,
|
|
9543
|
+
defaultValue: value2 ? transformStorageUnit(value2, StorageUnit.Gi) : 0,
|
|
9544
|
+
pvc: pvc2
|
|
9545
|
+
}
|
|
9546
|
+
);
|
|
9547
|
+
}
|
|
9548
|
+
}
|
|
9549
|
+
}
|
|
9550
|
+
)
|
|
9551
|
+
] });
|
|
9552
|
+
}
|
|
9128
9553
|
class ResourceModel {
|
|
9129
9554
|
constructor(_rawYaml, _globalStore) {
|
|
9130
9555
|
__publicField(this, "id");
|
|
@@ -9806,28 +10231,27 @@ var __publicField = (obj, key, value) => {
|
|
|
9806
10231
|
"storageClassName": "example"
|
|
9807
10232
|
}
|
|
9808
10233
|
};
|
|
9809
|
-
var
|
|
9810
|
-
|
|
9811
|
-
|
|
9812
|
-
|
|
9813
|
-
|
|
9814
|
-
|
|
9815
|
-
|
|
9816
|
-
|
|
9817
|
-
|
|
9818
|
-
|
|
9819
|
-
|
|
9820
|
-
|
|
9821
|
-
|
|
9822
|
-
|
|
9823
|
-
|
|
9824
|
-
|
|
9825
|
-
|
|
9826
|
-
|
|
9827
|
-
|
|
9828
|
-
|
|
9829
|
-
|
|
9830
|
-
})(AccessControlAuth || {});
|
|
10234
|
+
var ResourceState = /* @__PURE__ */ ((ResourceState2) => {
|
|
10235
|
+
ResourceState2["TERMINATED"] = "terminated";
|
|
10236
|
+
ResourceState2["UPDATING"] = "updating";
|
|
10237
|
+
ResourceState2["READY"] = "ready";
|
|
10238
|
+
ResourceState2["COMPLETED"] = "completed";
|
|
10239
|
+
ResourceState2["ABNORMAL"] = "abnormal";
|
|
10240
|
+
ResourceState2["FAILED"] = "failed";
|
|
10241
|
+
ResourceState2["SUSPENDED"] = "suspended";
|
|
10242
|
+
ResourceState2["RUNNING"] = "running";
|
|
10243
|
+
ResourceState2["SUCCEEDED"] = "succeeded";
|
|
10244
|
+
ResourceState2["UNKNOWN"] = "unknown";
|
|
10245
|
+
ResourceState2["TERMINATING"] = "terminating";
|
|
10246
|
+
ResourceState2["PENDING"] = "pending";
|
|
10247
|
+
ResourceState2["WAITING"] = "waiting";
|
|
10248
|
+
ResourceState2["STOPPED"] = "stopped";
|
|
10249
|
+
ResourceState2["AVAILABLE"] = "available";
|
|
10250
|
+
ResourceState2["BOUND"] = "bound";
|
|
10251
|
+
ResourceState2["RELEASED"] = "released";
|
|
10252
|
+
ResourceState2["LOST"] = "lost";
|
|
10253
|
+
return ResourceState2;
|
|
10254
|
+
})(ResourceState || {});
|
|
9831
10255
|
function matchSelector(pod2, selector, namespace2 = "default") {
|
|
9832
10256
|
var _a, _b, _c;
|
|
9833
10257
|
let match = true;
|
|
@@ -9913,18 +10337,18 @@ var __publicField = (obj, key, value) => {
|
|
|
9913
10337
|
get stateDisplay() {
|
|
9914
10338
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
9915
10339
|
if (!((_a = this.spec) == null ? void 0 : _a.completions) && !((_b = this.status) == null ? void 0 : _b.succeeded)) {
|
|
9916
|
-
return
|
|
10340
|
+
return ResourceState.RUNNING;
|
|
9917
10341
|
}
|
|
9918
10342
|
if (((_c = this.spec) == null ? void 0 : _c.completions) === ((_d = this.status) == null ? void 0 : _d.succeeded) || ((_f = (_e = this.status) == null ? void 0 : _e.conditions) == null ? void 0 : _f.some((c2) => c2.type === "Complete" && c2.status === "True"))) {
|
|
9919
|
-
return
|
|
10343
|
+
return ResourceState.COMPLETED;
|
|
9920
10344
|
}
|
|
9921
10345
|
if ((_h = (_g = this.status) == null ? void 0 : _g.conditions) == null ? void 0 : _h.some((c2) => c2.type === "Failed" && c2.status === "True")) {
|
|
9922
|
-
return
|
|
10346
|
+
return ResourceState.ABNORMAL;
|
|
9923
10347
|
}
|
|
9924
10348
|
if ((_j = (_i = this.status) == null ? void 0 : _i.conditions) == null ? void 0 : _j.some((c2) => c2.type === "Suspended" && c2.status === "True")) {
|
|
9925
|
-
return
|
|
10349
|
+
return ResourceState.SUSPENDED;
|
|
9926
10350
|
}
|
|
9927
|
-
return
|
|
10351
|
+
return ResourceState.RUNNING;
|
|
9928
10352
|
}
|
|
9929
10353
|
}
|
|
9930
10354
|
class WorkloadModel extends WorkloadBaseModel {
|
|
@@ -9976,75 +10400,6 @@ var __publicField = (obj, key, value) => {
|
|
|
9976
10400
|
return newOne;
|
|
9977
10401
|
}
|
|
9978
10402
|
}
|
|
9979
|
-
const UNITS = ["", "K", "M", "G", "T", "P"];
|
|
9980
|
-
const FRACTIONAL = ["", "m", "u", "n", "p", "f"];
|
|
9981
|
-
function formatSi(inValue, options) {
|
|
9982
|
-
const {
|
|
9983
|
-
increment = 1e3,
|
|
9984
|
-
suffix = null,
|
|
9985
|
-
firstSuffix = null,
|
|
9986
|
-
startingExponent = 0,
|
|
9987
|
-
minExponent = 0,
|
|
9988
|
-
maxPrecision = 2,
|
|
9989
|
-
atLeastOne = true
|
|
9990
|
-
} = options || {};
|
|
9991
|
-
let val = inValue;
|
|
9992
|
-
let exp = startingExponent;
|
|
9993
|
-
while (val >= increment && exp + 1 < UNITS.length || exp < minExponent) {
|
|
9994
|
-
val = val / increment;
|
|
9995
|
-
exp++;
|
|
9996
|
-
}
|
|
9997
|
-
let out = 0;
|
|
9998
|
-
if (val < 10 && maxPrecision >= 2) {
|
|
9999
|
-
out = Math.round(val * 100) / 100;
|
|
10000
|
-
} else if (val < 100 && maxPrecision >= 1) {
|
|
10001
|
-
out = Math.round(val * 10) / 10;
|
|
10002
|
-
} else {
|
|
10003
|
-
out = Math.round(val);
|
|
10004
|
-
}
|
|
10005
|
-
if (atLeastOne && out === 0) {
|
|
10006
|
-
out = 1;
|
|
10007
|
-
}
|
|
10008
|
-
let outStr = String(out);
|
|
10009
|
-
if (exp === 0 && firstSuffix !== null) {
|
|
10010
|
-
outStr += `${firstSuffix}`;
|
|
10011
|
-
} else {
|
|
10012
|
-
outStr += `${UNITS[exp]}${suffix}` || "";
|
|
10013
|
-
}
|
|
10014
|
-
return outStr;
|
|
10015
|
-
}
|
|
10016
|
-
function parseSi(inValue, increment = null, allowFractional = true) {
|
|
10017
|
-
if (!inValue || typeof inValue !== "string" || !inValue.length) {
|
|
10018
|
-
return NaN;
|
|
10019
|
-
}
|
|
10020
|
-
inValue = inValue.replace(/,/g, "");
|
|
10021
|
-
let [, valStr, unit, incStr] = inValue.match(/^([0-9.-]+)\s*([^0-9.-]?)([^0-9.-]?)/) || [];
|
|
10022
|
-
const val = parseFloat(valStr);
|
|
10023
|
-
if (!unit) {
|
|
10024
|
-
return val;
|
|
10025
|
-
}
|
|
10026
|
-
if (unit.charCodeAt(0) === 181) {
|
|
10027
|
-
unit = "u";
|
|
10028
|
-
}
|
|
10029
|
-
const divide = FRACTIONAL.includes(unit);
|
|
10030
|
-
const multiply = UNITS.includes(unit.toUpperCase());
|
|
10031
|
-
if (increment === null) {
|
|
10032
|
-
if ((multiply || divide) && incStr === "i") {
|
|
10033
|
-
increment = 1024;
|
|
10034
|
-
} else {
|
|
10035
|
-
increment = 1e3;
|
|
10036
|
-
}
|
|
10037
|
-
}
|
|
10038
|
-
if (divide && allowFractional) {
|
|
10039
|
-
const exp = FRACTIONAL.indexOf(unit);
|
|
10040
|
-
return val / Math.pow(increment, exp);
|
|
10041
|
-
}
|
|
10042
|
-
if (multiply) {
|
|
10043
|
-
const exp = UNITS.indexOf(unit.toUpperCase());
|
|
10044
|
-
return val * Math.pow(increment, exp);
|
|
10045
|
-
}
|
|
10046
|
-
return val;
|
|
10047
|
-
}
|
|
10048
10403
|
class PodModel extends WorkloadBaseModel {
|
|
10049
10404
|
constructor(_rawYaml, _globalStore) {
|
|
10050
10405
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
@@ -10122,9 +10477,9 @@ var __publicField = (obj, key, value) => {
|
|
|
10122
10477
|
get stateDisplay() {
|
|
10123
10478
|
var _a, _b;
|
|
10124
10479
|
if (this.metadata.deletionTimestamp) {
|
|
10125
|
-
return
|
|
10480
|
+
return ResourceState.TERMINATING;
|
|
10126
10481
|
}
|
|
10127
|
-
return ((_b = (_a = this.status) == null ? void 0 : _a.phase) == null ? void 0 : _b.toLowerCase()) ||
|
|
10482
|
+
return ((_b = (_a = this.status) == null ? void 0 : _a.phase) == null ? void 0 : _b.toLowerCase()) || ResourceState.UNKNOWN;
|
|
10128
10483
|
}
|
|
10129
10484
|
}
|
|
10130
10485
|
class PodMetricsModel extends ResourceModel {
|
|
@@ -10164,9 +10519,9 @@ var __publicField = (obj, key, value) => {
|
|
|
10164
10519
|
get stateDisplay() {
|
|
10165
10520
|
var _a;
|
|
10166
10521
|
if ((_a = this.spec) == null ? void 0 : _a.suspend) {
|
|
10167
|
-
return
|
|
10522
|
+
return ResourceState.SUSPENDED;
|
|
10168
10523
|
}
|
|
10169
|
-
return
|
|
10524
|
+
return ResourceState.RUNNING;
|
|
10170
10525
|
}
|
|
10171
10526
|
suspend() {
|
|
10172
10527
|
const newOne = lodashExports.cloneDeep(this._rawYaml);
|
|
@@ -10187,7 +10542,12 @@ var __publicField = (obj, key, value) => {
|
|
|
10187
10542
|
constructor(_rawYaml, _globalStore) {
|
|
10188
10543
|
super(_rawYaml, _globalStore);
|
|
10189
10544
|
this._rawYaml = _rawYaml;
|
|
10190
|
-
this
|
|
10545
|
+
Object.defineProperty(this, "id", {
|
|
10546
|
+
get() {
|
|
10547
|
+
return _rawYaml.metadata.uid || _rawYaml.id;
|
|
10548
|
+
},
|
|
10549
|
+
enumerable: true
|
|
10550
|
+
});
|
|
10191
10551
|
}
|
|
10192
10552
|
}
|
|
10193
10553
|
class DeploymentModel extends WorkloadModel {
|
|
@@ -10198,11 +10558,11 @@ var __publicField = (obj, key, value) => {
|
|
|
10198
10558
|
get stateDisplay() {
|
|
10199
10559
|
var _a, _b, _c;
|
|
10200
10560
|
if (((_a = this.spec) == null ? void 0 : _a.replicas) === 0) {
|
|
10201
|
-
return
|
|
10561
|
+
return ResourceState.STOPPED;
|
|
10202
10562
|
} else if (((_b = this.spec) == null ? void 0 : _b.replicas) !== ((_c = this.status) == null ? void 0 : _c.readyReplicas)) {
|
|
10203
|
-
return
|
|
10563
|
+
return ResourceState.UPDATING;
|
|
10204
10564
|
}
|
|
10205
|
-
return
|
|
10565
|
+
return ResourceState.READY;
|
|
10206
10566
|
}
|
|
10207
10567
|
}
|
|
10208
10568
|
class DaemonSetModel extends WorkloadModel {
|
|
@@ -10213,9 +10573,9 @@ var __publicField = (obj, key, value) => {
|
|
|
10213
10573
|
get stateDisplay() {
|
|
10214
10574
|
var _a, _b;
|
|
10215
10575
|
if (((_a = this.status) == null ? void 0 : _a.desiredNumberScheduled) !== ((_b = this.status) == null ? void 0 : _b.numberReady)) {
|
|
10216
|
-
return
|
|
10576
|
+
return ResourceState.UPDATING;
|
|
10217
10577
|
}
|
|
10218
|
-
return
|
|
10578
|
+
return ResourceState.READY;
|
|
10219
10579
|
}
|
|
10220
10580
|
get replicas() {
|
|
10221
10581
|
return this.status && "desiredNumberScheduled" in this.status ? this.status.desiredNumberScheduled : 0;
|
|
@@ -10232,11 +10592,11 @@ var __publicField = (obj, key, value) => {
|
|
|
10232
10592
|
get stateDisplay() {
|
|
10233
10593
|
var _a, _b, _c;
|
|
10234
10594
|
if (((_a = this.spec) == null ? void 0 : _a.replicas) === 0) {
|
|
10235
|
-
return
|
|
10595
|
+
return ResourceState.STOPPED;
|
|
10236
10596
|
} else if (((_b = this.spec) == null ? void 0 : _b.replicas) !== ((_c = this.status) == null ? void 0 : _c.readyReplicas)) {
|
|
10237
|
-
return
|
|
10597
|
+
return ResourceState.UPDATING;
|
|
10238
10598
|
}
|
|
10239
|
-
return
|
|
10599
|
+
return ResourceState.READY;
|
|
10240
10600
|
}
|
|
10241
10601
|
}
|
|
10242
10602
|
var ServiceTypeEnum = /* @__PURE__ */ ((ServiceTypeEnum2) => {
|
|
@@ -10285,7 +10645,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10285
10645
|
NodeRole2["Worker"] = "Worker";
|
|
10286
10646
|
return NodeRole2;
|
|
10287
10647
|
})(NodeRole || {});
|
|
10288
|
-
class NodeModel extends
|
|
10648
|
+
class NodeModel extends ResourceModel {
|
|
10289
10649
|
constructor(_rawYaml, _globalStore) {
|
|
10290
10650
|
super(_rawYaml, _globalStore);
|
|
10291
10651
|
this._rawYaml = _rawYaml;
|
|
@@ -10343,6 +10703,22 @@ var __publicField = (obj, key, value) => {
|
|
|
10343
10703
|
get phase() {
|
|
10344
10704
|
return this._rawYaml.status.phase;
|
|
10345
10705
|
}
|
|
10706
|
+
get stateDisplay() {
|
|
10707
|
+
switch (this.phase) {
|
|
10708
|
+
case "Pending":
|
|
10709
|
+
return ResourceState.PENDING;
|
|
10710
|
+
case "Bound":
|
|
10711
|
+
return ResourceState.BOUND;
|
|
10712
|
+
case "Failed":
|
|
10713
|
+
return ResourceState.FAILED;
|
|
10714
|
+
case "Available":
|
|
10715
|
+
return ResourceState.AVAILABLE;
|
|
10716
|
+
case "Released":
|
|
10717
|
+
return ResourceState.RELEASED;
|
|
10718
|
+
default:
|
|
10719
|
+
return ResourceState.UNKNOWN;
|
|
10720
|
+
}
|
|
10721
|
+
}
|
|
10346
10722
|
get csi() {
|
|
10347
10723
|
var _a;
|
|
10348
10724
|
return (_a = this._rawYaml.spec.csi) == null ? void 0 : _a.driver;
|
|
@@ -10351,6 +10727,10 @@ var __publicField = (obj, key, value) => {
|
|
|
10351
10727
|
var _a;
|
|
10352
10728
|
return (_a = this._rawYaml.spec.claimRef) == null ? void 0 : _a.name;
|
|
10353
10729
|
}
|
|
10730
|
+
get pvcNamespace() {
|
|
10731
|
+
var _a;
|
|
10732
|
+
return (_a = this._rawYaml.spec.claimRef) == null ? void 0 : _a.namespace;
|
|
10733
|
+
}
|
|
10354
10734
|
}
|
|
10355
10735
|
class PersistentVolumeClaimModel extends ResourceModel {
|
|
10356
10736
|
constructor(_rawYaml, _globalStore) {
|
|
@@ -10363,6 +10743,18 @@ var __publicField = (obj, key, value) => {
|
|
|
10363
10743
|
get pv() {
|
|
10364
10744
|
return this._rawYaml.spec.volumeName;
|
|
10365
10745
|
}
|
|
10746
|
+
get stateDisplay() {
|
|
10747
|
+
switch (this.phase) {
|
|
10748
|
+
case "Pending":
|
|
10749
|
+
return ResourceState.PENDING;
|
|
10750
|
+
case "Bound":
|
|
10751
|
+
return ResourceState.BOUND;
|
|
10752
|
+
case "Lost":
|
|
10753
|
+
return ResourceState.LOST;
|
|
10754
|
+
case "Failed":
|
|
10755
|
+
return ResourceState.FAILED;
|
|
10756
|
+
}
|
|
10757
|
+
}
|
|
10366
10758
|
updateDistributeStorage(distributeStorage) {
|
|
10367
10759
|
const yaml2 = lodashEs.cloneDeep(this._globalStore.restoreItem(this));
|
|
10368
10760
|
return lodashEs.set(yaml2, "spec.resources.requests.storage", `${distributeStorage}Gi`);
|
|
@@ -10474,38 +10866,8 @@ var __publicField = (obj, key, value) => {
|
|
|
10474
10866
|
children: tags
|
|
10475
10867
|
});
|
|
10476
10868
|
};
|
|
10477
|
-
const
|
|
10478
|
-
const StateTagStyle = "
|
|
10479
|
-
const StateTag = ({
|
|
10480
|
-
state: state2 = WorkloadState.UPDATING,
|
|
10481
|
-
hideBackground,
|
|
10482
|
-
className
|
|
10483
|
-
}) => {
|
|
10484
|
-
const {
|
|
10485
|
-
t: t2
|
|
10486
|
-
} = useTranslation();
|
|
10487
|
-
const statusMap = {
|
|
10488
|
-
updating: "loading",
|
|
10489
|
-
ready: "green",
|
|
10490
|
-
completed: "gray",
|
|
10491
|
-
failed: "red",
|
|
10492
|
-
suspended: "warning",
|
|
10493
|
-
running: "green",
|
|
10494
|
-
succeeded: "blue",
|
|
10495
|
-
unknown: "gray",
|
|
10496
|
-
terminating: "loading",
|
|
10497
|
-
pending: "warning",
|
|
10498
|
-
waiting: "warning",
|
|
10499
|
-
terminated: "red",
|
|
10500
|
-
stopped: "gray"
|
|
10501
|
-
};
|
|
10502
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.StatusCapsule, {
|
|
10503
|
-
className: cx_default(className, StateTagStyle, hideBackground && "no-background"),
|
|
10504
|
-
color: statusMap[state2] !== "loading" ? statusMap[state2] : void 0,
|
|
10505
|
-
loading: statusMap[state2] === "loading",
|
|
10506
|
-
children: t2(`dovetail.${state2 || "updating"}`)
|
|
10507
|
-
});
|
|
10508
|
-
};
|
|
10869
|
+
const tag_how7no = "";
|
|
10870
|
+
const StateTagStyle = "s82411";
|
|
10509
10871
|
function addId(arr, idKey) {
|
|
10510
10872
|
return arr.map((e2) => {
|
|
10511
10873
|
return {
|
|
@@ -10623,7 +10985,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10623
10985
|
const ConditionsTable = ({ conditions = [] }) => {
|
|
10624
10986
|
const { t: t2 } = useTranslation();
|
|
10625
10987
|
const component = React.useContext(ComponentContext);
|
|
10626
|
-
const
|
|
10988
|
+
const Table2 = component.Table || Table$1;
|
|
10627
10989
|
const conditionsWithId = addId(conditions, "type");
|
|
10628
10990
|
const columns = [
|
|
10629
10991
|
{
|
|
@@ -10699,7 +11061,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10699
11061
|
);
|
|
10700
11062
|
}
|
|
10701
11063
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10702
|
-
|
|
11064
|
+
Table2,
|
|
10703
11065
|
{
|
|
10704
11066
|
tableKey: "condition",
|
|
10705
11067
|
loading: false,
|
|
@@ -10816,184 +11178,6 @@ var __publicField = (obj, key, value) => {
|
|
|
10816
11178
|
}
|
|
10817
11179
|
};
|
|
10818
11180
|
}
|
|
10819
|
-
function FormErrorAlert(props) {
|
|
10820
|
-
const { title, errorMsgs, style, className, isEdit } = props;
|
|
10821
|
-
const { i18n: i18n2 } = useTranslation();
|
|
10822
|
-
return errorMsgs.length ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10823
|
-
eagle.Alert,
|
|
10824
|
-
{
|
|
10825
|
-
message: /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
10826
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: title || i18n2.t(isEdit ? "dovetail.save_failed_tip" : "dovetail.create_failed_tip") }),
|
|
10827
|
-
errorMsgs.length > 1 ? /* @__PURE__ */ jsxRuntimeExports.jsx("ul", { children: errorMsgs.map((errorMsg, index2) => /* @__PURE__ */ jsxRuntimeExports.jsxs("li", { children: [
|
|
10828
|
-
index2 + 1 + ". ",
|
|
10829
|
-
" ",
|
|
10830
|
-
errorMsg
|
|
10831
|
-
] }, errorMsg)) }) : lodashEs.first(errorMsgs)
|
|
10832
|
-
] }),
|
|
10833
|
-
type: "error",
|
|
10834
|
-
style,
|
|
10835
|
-
className
|
|
10836
|
-
}
|
|
10837
|
-
) : null;
|
|
10838
|
-
}
|
|
10839
|
-
function getCommonErrors(responseBody, i18n2) {
|
|
10840
|
-
var _a;
|
|
10841
|
-
if (!((responseBody == null ? void 0 : responseBody.message) || (responseBody == null ? void 0 : responseBody.code) || (responseBody == null ? void 0 : responseBody.reason) || (responseBody == null ? void 0 : responseBody.details) || (responseBody == null ? void 0 : responseBody.graphQLErrors))) {
|
|
10842
|
-
return [];
|
|
10843
|
-
}
|
|
10844
|
-
const causes = ((_a = responseBody.details) == null ? void 0 : _a.causes) || responseBody.graphQLErrors || [];
|
|
10845
|
-
if (causes.length) {
|
|
10846
|
-
return causes.map((cause) => {
|
|
10847
|
-
let params = {};
|
|
10848
|
-
let message2 = cause.message;
|
|
10849
|
-
try {
|
|
10850
|
-
const info = JSON.parse(cause.message);
|
|
10851
|
-
params = info.params;
|
|
10852
|
-
message2 = info.message;
|
|
10853
|
-
} catch {
|
|
10854
|
-
return i18n2.t(
|
|
10855
|
-
[
|
|
10856
|
-
`error.${cause.reason}`,
|
|
10857
|
-
`error.${cause.code}`,
|
|
10858
|
-
`${cause.field ? `${cause.field}: ` : ""}${message2}`
|
|
10859
|
-
],
|
|
10860
|
-
{
|
|
10861
|
-
...params,
|
|
10862
|
-
fallbackLng: ""
|
|
10863
|
-
}
|
|
10864
|
-
);
|
|
10865
|
-
}
|
|
10866
|
-
return i18n2.t(
|
|
10867
|
-
[
|
|
10868
|
-
`error.${cause.reason}`,
|
|
10869
|
-
`error.${cause.code}`,
|
|
10870
|
-
`${cause.field ? `${cause.field}: ` : ""}${message2}`
|
|
10871
|
-
],
|
|
10872
|
-
{
|
|
10873
|
-
...params,
|
|
10874
|
-
fallbackLng: ""
|
|
10875
|
-
}
|
|
10876
|
-
);
|
|
10877
|
-
});
|
|
10878
|
-
}
|
|
10879
|
-
return [
|
|
10880
|
-
i18n2.t(
|
|
10881
|
-
[`error.${responseBody.code}`, `error.${responseBody.reason}`, responseBody.message || ""],
|
|
10882
|
-
{ fallbackLng: "" }
|
|
10883
|
-
)
|
|
10884
|
-
];
|
|
10885
|
-
}
|
|
10886
|
-
function useSubmitForm(options) {
|
|
10887
|
-
const { formRef, onSubmitSuccess } = options;
|
|
10888
|
-
const { i18n: i18n2 } = useTranslation();
|
|
10889
|
-
const [submitting, setSubmitting] = React.useState(false);
|
|
10890
|
-
const [errorMsgs, setErrorMsgs] = React.useState([]);
|
|
10891
|
-
const reset = React.useCallback(() => {
|
|
10892
|
-
setSubmitting(false);
|
|
10893
|
-
setErrorMsgs([]);
|
|
10894
|
-
}, []);
|
|
10895
|
-
const onSubmit = React.useCallback(async () => {
|
|
10896
|
-
var _a;
|
|
10897
|
-
try {
|
|
10898
|
-
setSubmitting(true);
|
|
10899
|
-
await ((_a = formRef.current) == null ? void 0 : _a.submit());
|
|
10900
|
-
onSubmitSuccess == null ? void 0 : onSubmitSuccess();
|
|
10901
|
-
reset();
|
|
10902
|
-
} catch (error) {
|
|
10903
|
-
if (error instanceof Object) {
|
|
10904
|
-
if ("response" in error && error.response instanceof Response) {
|
|
10905
|
-
const response = error.response;
|
|
10906
|
-
const body = await response.json();
|
|
10907
|
-
setErrorMsgs(getCommonErrors(body, i18n2));
|
|
10908
|
-
} else if ("message" in error && typeof error.message === "string") {
|
|
10909
|
-
setErrorMsgs([error.message]);
|
|
10910
|
-
}
|
|
10911
|
-
}
|
|
10912
|
-
} finally {
|
|
10913
|
-
setSubmitting(false);
|
|
10914
|
-
}
|
|
10915
|
-
}, [formRef, i18n2, reset, onSubmitSuccess]);
|
|
10916
|
-
return {
|
|
10917
|
-
submitting,
|
|
10918
|
-
errorMsgs,
|
|
10919
|
-
reset,
|
|
10920
|
-
onSubmit
|
|
10921
|
-
};
|
|
10922
|
-
}
|
|
10923
|
-
const index_130sdg8 = "";
|
|
10924
|
-
const EditButtonStyle = "esoz3jw";
|
|
10925
|
-
function EditFieldModal(props) {
|
|
10926
|
-
const {
|
|
10927
|
-
title,
|
|
10928
|
-
formRef: form2,
|
|
10929
|
-
renderContent,
|
|
10930
|
-
fullscreen
|
|
10931
|
-
} = props;
|
|
10932
|
-
const {
|
|
10933
|
-
i18n: i18n2
|
|
10934
|
-
} = useTranslation();
|
|
10935
|
-
const popModal = eagle.usePopModal();
|
|
10936
|
-
const {
|
|
10937
|
-
submitting,
|
|
10938
|
-
errorMsgs,
|
|
10939
|
-
reset,
|
|
10940
|
-
onSubmit
|
|
10941
|
-
} = useSubmitForm({
|
|
10942
|
-
formRef: form2,
|
|
10943
|
-
onSubmitSuccess: () => {
|
|
10944
|
-
popModal();
|
|
10945
|
-
}
|
|
10946
|
-
});
|
|
10947
|
-
const close = React.useCallback(() => {
|
|
10948
|
-
popModal();
|
|
10949
|
-
reset();
|
|
10950
|
-
}, [reset]);
|
|
10951
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(eagle.Modal, {
|
|
10952
|
-
className: fullscreen ? FullscreenModalStyle : SmallModalStyle,
|
|
10953
|
-
title: title || i18n2.t("dovetail.edit"),
|
|
10954
|
-
confirmLoading: submitting,
|
|
10955
|
-
onOk: onSubmit,
|
|
10956
|
-
onCancel: close,
|
|
10957
|
-
okText: i18n2.t("dovetail.save"),
|
|
10958
|
-
normal: true,
|
|
10959
|
-
destroyOnClose: true,
|
|
10960
|
-
fullscreen,
|
|
10961
|
-
children: [renderContent(), /* @__PURE__ */ jsxRuntimeExports.jsx(FormErrorAlert, {
|
|
10962
|
-
style: {
|
|
10963
|
-
marginTop: 16
|
|
10964
|
-
},
|
|
10965
|
-
errorMsgs,
|
|
10966
|
-
isEdit: true
|
|
10967
|
-
})]
|
|
10968
|
-
});
|
|
10969
|
-
}
|
|
10970
|
-
function EditField(props) {
|
|
10971
|
-
const {
|
|
10972
|
-
modalProps
|
|
10973
|
-
} = props;
|
|
10974
|
-
const {
|
|
10975
|
-
i18n: i18n2
|
|
10976
|
-
} = useTranslation();
|
|
10977
|
-
const {
|
|
10978
|
-
resource
|
|
10979
|
-
} = core.useResource();
|
|
10980
|
-
const pushModal = eagle.usePushModal();
|
|
10981
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(core.CanAccess, {
|
|
10982
|
-
resource: resource == null ? void 0 : resource.name,
|
|
10983
|
-
action: AccessControlAuth.Edit,
|
|
10984
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Button, {
|
|
10985
|
-
className: EditButtonStyle,
|
|
10986
|
-
type: "link",
|
|
10987
|
-
onClick: () => {
|
|
10988
|
-
pushModal({
|
|
10989
|
-
component: EditFieldModal,
|
|
10990
|
-
props: modalProps
|
|
10991
|
-
});
|
|
10992
|
-
},
|
|
10993
|
-
children: i18n2.t("dovetail.edit")
|
|
10994
|
-
})
|
|
10995
|
-
});
|
|
10996
|
-
}
|
|
10997
11181
|
const EditLabelForm = React.forwardRef(
|
|
10998
11182
|
function EditLabelForm2(props, ref) {
|
|
10999
11183
|
var _a;
|
|
@@ -11054,12 +11238,12 @@ var __publicField = (obj, key, value) => {
|
|
|
11054
11238
|
columns: [
|
|
11055
11239
|
{
|
|
11056
11240
|
key: "key",
|
|
11057
|
-
title: "
|
|
11241
|
+
title: t2("dovetail.key"),
|
|
11058
11242
|
type: "input"
|
|
11059
11243
|
},
|
|
11060
11244
|
{
|
|
11061
11245
|
key: "value",
|
|
11062
|
-
title: "
|
|
11246
|
+
title: t2("dovetail.value"),
|
|
11063
11247
|
type: "input"
|
|
11064
11248
|
}
|
|
11065
11249
|
],
|
|
@@ -11126,7 +11310,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11126
11310
|
value2.forEach(({ key: key2, value: value22 }) => {
|
|
11127
11311
|
newAnnotations[key2] = value22;
|
|
11128
11312
|
});
|
|
11129
|
-
const newYaml = resourceModel.
|
|
11313
|
+
const newYaml = resourceModel.updateAnnotation(newAnnotations);
|
|
11130
11314
|
pruneBeforeEdit(newYaml);
|
|
11131
11315
|
return mutateAsync({
|
|
11132
11316
|
id: resourceModel.id,
|
|
@@ -11167,12 +11351,12 @@ var __publicField = (obj, key, value) => {
|
|
|
11167
11351
|
columns: [
|
|
11168
11352
|
{
|
|
11169
11353
|
key: "key",
|
|
11170
|
-
title: "
|
|
11354
|
+
title: t2("dovetail.key"),
|
|
11171
11355
|
type: "input"
|
|
11172
11356
|
},
|
|
11173
11357
|
{
|
|
11174
11358
|
key: "value",
|
|
11175
|
-
title: "
|
|
11359
|
+
title: t2("dovetail.value"),
|
|
11176
11360
|
type: "input"
|
|
11177
11361
|
}
|
|
11178
11362
|
],
|
|
@@ -11221,6 +11405,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11221
11405
|
);
|
|
11222
11406
|
}
|
|
11223
11407
|
function K8sDropdown(props) {
|
|
11408
|
+
var _a;
|
|
11224
11409
|
const { record, size = "normal" } = props;
|
|
11225
11410
|
const { globalStore } = useGlobalStore();
|
|
11226
11411
|
const useResourceResult = core.useResource();
|
|
@@ -11240,6 +11425,8 @@ var __publicField = (obj, key, value) => {
|
|
|
11240
11425
|
resource: resource == null ? void 0 : resource.name,
|
|
11241
11426
|
action: AccessControlAuth.Delete
|
|
11242
11427
|
});
|
|
11428
|
+
const configs = React.useContext(ConfigsContext);
|
|
11429
|
+
const config = configs[(resource == null ? void 0 : resource.name) || ""];
|
|
11243
11430
|
const formRef = React.useRef(null);
|
|
11244
11431
|
const editLabelMenuItem = (canEditData == null ? void 0 : canEditData.can) !== false ? /* @__PURE__ */ jsxRuntimeExports.jsx(EditLabelDropdownMenuItem, { formRef, resourceModel: record }) : null;
|
|
11245
11432
|
const editAnnotationMenuItem = (canEditData == null ? void 0 : canEditData.can) !== false ? /* @__PURE__ */ jsxRuntimeExports.jsx(EditAnnotationDropdownMenuItem, { formRef, resourceModel: record }) : null;
|
|
@@ -11248,15 +11435,15 @@ var __publicField = (obj, key, value) => {
|
|
|
11248
11435
|
eagle.Dropdown,
|
|
11249
11436
|
{
|
|
11250
11437
|
overlay: /* @__PURE__ */ jsxRuntimeExports.jsxs(eagle.Menu, { children: [
|
|
11251
|
-
isInShowPage || (canEditData == null ? void 0 : canEditData.can) === false ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Menu.Item, { onClick: openForm, children: /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Icon, { src: iconsReact.EditPen16PrimaryIcon, children: t2("dovetail.edit_yaml") }) }),
|
|
11438
|
+
isInShowPage || (canEditData == null ? void 0 : canEditData.can) === false ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Menu.Item, { onClick: openForm, children: /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Icon, { src: iconsReact.EditPen16PrimaryIcon, children: ((_a = config.formConfig) == null ? void 0 : _a.fields) ? t2("dovetail.edit") : t2("dovetail.edit_yaml") }) }),
|
|
11252
11439
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11253
11440
|
eagle.Menu.Item,
|
|
11254
11441
|
{
|
|
11255
11442
|
onClick: () => {
|
|
11256
|
-
var
|
|
11443
|
+
var _a2;
|
|
11257
11444
|
if (record.id) {
|
|
11258
11445
|
download2({
|
|
11259
|
-
name: ((
|
|
11446
|
+
name: ((_a2 = record.metadata) == null ? void 0 : _a2.name) || record.kind || "",
|
|
11260
11447
|
item: lodashEs.omit((globalStore == null ? void 0 : globalStore.restoreItem(record)) || record, "id")
|
|
11261
11448
|
});
|
|
11262
11449
|
}
|
|
@@ -11325,22 +11512,23 @@ var __publicField = (obj, key, value) => {
|
|
|
11325
11512
|
}));
|
|
11326
11513
|
}
|
|
11327
11514
|
const useEagleTable = (params) => {
|
|
11328
|
-
var _a, _b;
|
|
11329
|
-
const { columns, tableProps, formatter, Dropdown = K8sDropdown
|
|
11515
|
+
var _a, _b, _c;
|
|
11516
|
+
const { columns, tableProps, formatter, Dropdown = K8sDropdown } = params;
|
|
11330
11517
|
const [selectedKeys, setSelectedKeys] = React.useState([]);
|
|
11331
11518
|
const [currentPage, setCurrentPage] = React.useState((tableProps == null ? void 0 : tableProps.currentPage) || 1);
|
|
11332
11519
|
const { resource } = core.useResource();
|
|
11333
11520
|
const currentSize = (tableProps == null ? void 0 : tableProps.defaultSize) || 10;
|
|
11334
11521
|
const useTableParams = React.useMemo(() => {
|
|
11522
|
+
var _a2;
|
|
11335
11523
|
const mergedParams = lodashEs.merge(params.useTableParams, {
|
|
11336
11524
|
pagination: {
|
|
11337
11525
|
pageSize: currentSize,
|
|
11338
11526
|
mode: "server"
|
|
11339
11527
|
},
|
|
11340
|
-
resource:
|
|
11528
|
+
resource: ((_a2 = params.useTableParams) == null ? void 0 : _a2.resource) || (resource == null ? void 0 : resource.name)
|
|
11341
11529
|
});
|
|
11342
11530
|
return mergedParams;
|
|
11343
|
-
}, [params.useTableParams, currentSize,
|
|
11531
|
+
}, [params.useTableParams, currentSize, resource]);
|
|
11344
11532
|
const finalColumns = React.useMemo(
|
|
11345
11533
|
() => addDefaultRenderToColumns(columns),
|
|
11346
11534
|
[columns]
|
|
@@ -11370,7 +11558,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11370
11558
|
const total = ((_b = table.tableQueryResult.data) == null ? void 0 : _b.total) || 0;
|
|
11371
11559
|
const finalDataSource = formatter ? data2 == null ? void 0 : data2.map(formatter) : data2;
|
|
11372
11560
|
const finalProps = {
|
|
11373
|
-
tableKey:
|
|
11561
|
+
tableKey: ((_c = params.useTableParams) == null ? void 0 : _c.resource) || (resource == null ? void 0 : resource.name) || "table",
|
|
11374
11562
|
loading: table.tableQueryResult.isLoading,
|
|
11375
11563
|
data: finalDataSource || [],
|
|
11376
11564
|
columns: finalColumns,
|
|
@@ -11395,18 +11583,19 @@ var __publicField = (obj, key, value) => {
|
|
|
11395
11583
|
}, []);
|
|
11396
11584
|
return { tableProps: finalProps, selectedKeys, ...table };
|
|
11397
11585
|
};
|
|
11398
|
-
function CreateButton() {
|
|
11586
|
+
function CreateButton(props) {
|
|
11399
11587
|
var _a;
|
|
11400
11588
|
const { t: t2 } = useTranslation();
|
|
11401
11589
|
const openForm = useOpenForm();
|
|
11402
11590
|
const { resource } = core.useResource();
|
|
11591
|
+
const label2 = props.label || ((_a = resource == null ? void 0 : resource.meta) == null ? void 0 : _a.kind);
|
|
11403
11592
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11404
11593
|
eagle.Button,
|
|
11405
11594
|
{
|
|
11406
11595
|
prefixIcon: /* @__PURE__ */ jsxRuntimeExports.jsx(iconsReact.PlusAddCreateNew16BoldOntintIcon, {}),
|
|
11407
11596
|
type: "primary",
|
|
11408
11597
|
onClick: openForm,
|
|
11409
|
-
children: t2("dovetail.create_resource", { resource: (
|
|
11598
|
+
children: t2("dovetail.create_resource", { resource: /^[a-zA-Z]/.test(label2) ? ` ${label2}` : label2 })
|
|
11410
11599
|
}
|
|
11411
11600
|
);
|
|
11412
11601
|
}
|
|
@@ -11453,12 +11642,13 @@ var __publicField = (obj, key, value) => {
|
|
|
11453
11642
|
visible ? /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Modal, { ...modalProps }) : null
|
|
11454
11643
|
] });
|
|
11455
11644
|
};
|
|
11456
|
-
const
|
|
11457
|
-
const ToolbarWrapperStyle = "
|
|
11458
|
-
const ToolbarStyle$3 = "
|
|
11459
|
-
const TitleStyle$2 = "
|
|
11460
|
-
const DescriptionStyle = "
|
|
11645
|
+
const index_1wo1wv1 = "";
|
|
11646
|
+
const ToolbarWrapperStyle = "t1908hhn";
|
|
11647
|
+
const ToolbarStyle$3 = "t1ym1gqo";
|
|
11648
|
+
const TitleStyle$2 = "t38ugwl";
|
|
11649
|
+
const DescriptionStyle = "d13nfex0";
|
|
11461
11650
|
const TableToolBar = ({
|
|
11651
|
+
title,
|
|
11462
11652
|
description,
|
|
11463
11653
|
selectedKeys,
|
|
11464
11654
|
hideCreate
|
|
@@ -11473,14 +11663,16 @@ var __publicField = (obj, key, value) => {
|
|
|
11473
11663
|
className: ToolbarStyle$3,
|
|
11474
11664
|
children: [/* @__PURE__ */ jsxRuntimeExports.jsx("span", {
|
|
11475
11665
|
className: cx_default(eagle.Typo.Display.d2_regular_title, TitleStyle$2),
|
|
11476
|
-
children: (_a = resource == null ? void 0 : resource.meta) == null ? void 0 : _a.kind
|
|
11666
|
+
children: title || ((_a = resource == null ? void 0 : resource.meta) == null ? void 0 : _a.kind)
|
|
11477
11667
|
}), /* @__PURE__ */ jsxRuntimeExports.jsxs(eagle.Space, {
|
|
11478
11668
|
children: [selectedKeys.length > 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx(DeleteManyButton, {
|
|
11479
11669
|
ids: selectedKeys
|
|
11480
11670
|
}) : void 0, /* @__PURE__ */ jsxRuntimeExports.jsx(core.CanAccess, {
|
|
11481
11671
|
resource: resource == null ? void 0 : resource.name,
|
|
11482
11672
|
action: AccessControlAuth.Create,
|
|
11483
|
-
children: !hideCreate ? /* @__PURE__ */ jsxRuntimeExports.jsx(CreateButton, {
|
|
11673
|
+
children: !hideCreate ? /* @__PURE__ */ jsxRuntimeExports.jsx(CreateButton, {
|
|
11674
|
+
label: title
|
|
11675
|
+
}) : null
|
|
11484
11676
|
})]
|
|
11485
11677
|
})]
|
|
11486
11678
|
}), description ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
@@ -11511,7 +11703,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11511
11703
|
} = useTranslation();
|
|
11512
11704
|
const [selectedKeys] = React.useState([]);
|
|
11513
11705
|
const component = React.useContext(ComponentContext);
|
|
11514
|
-
const
|
|
11706
|
+
const Table2 = component.Table || Table$1;
|
|
11515
11707
|
const columns = React.useMemo(() => [NameColumnRenderer(i18n2, "jobs"), StateDisplayColumnRenderer(i18n2), NameSpaceColumnRenderer(i18n2), {
|
|
11516
11708
|
...WorkloadImageColumnRenderer(i18n2),
|
|
11517
11709
|
width: 238
|
|
@@ -11552,7 +11744,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11552
11744
|
children: [hideToolBar ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(TableToolBar, {
|
|
11553
11745
|
selectedKeys,
|
|
11554
11746
|
hideCreate: true
|
|
11555
|
-
}), /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11747
|
+
}), /* @__PURE__ */ jsxRuntimeExports.jsx(Table2, {
|
|
11556
11748
|
...tableProps,
|
|
11557
11749
|
tableKey: "cronjobs",
|
|
11558
11750
|
showMenuColumn: false
|
|
@@ -11626,7 +11818,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11626
11818
|
}), [columns, uid]);
|
|
11627
11819
|
const { tableProps } = useEagleTable(params);
|
|
11628
11820
|
const component = React.useContext(ComponentContext);
|
|
11629
|
-
const
|
|
11821
|
+
const Table2 = component.Table || Table$1;
|
|
11630
11822
|
if (!((_a = tableProps.data) == null ? void 0 : _a.length) && !tableProps.loading) {
|
|
11631
11823
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11632
11824
|
WidgetErrorContent,
|
|
@@ -11636,7 +11828,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11636
11828
|
);
|
|
11637
11829
|
}
|
|
11638
11830
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11639
|
-
|
|
11831
|
+
Table2,
|
|
11640
11832
|
{
|
|
11641
11833
|
...tableProps,
|
|
11642
11834
|
tableKey: "events",
|
|
@@ -11679,9 +11871,9 @@ var __publicField = (obj, key, value) => {
|
|
|
11679
11871
|
const LinkStyle = "l1vnw9x0";
|
|
11680
11872
|
const ResourceLink = (props) => {
|
|
11681
11873
|
const {
|
|
11682
|
-
resourceName,
|
|
11874
|
+
resourceKind: resourceName,
|
|
11683
11875
|
namespace: namespace2,
|
|
11684
|
-
resourceId
|
|
11876
|
+
name: resourceId
|
|
11685
11877
|
} = props;
|
|
11686
11878
|
const navigation = core.useNavigation();
|
|
11687
11879
|
const go = core.useGo();
|
|
@@ -11708,7 +11900,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11708
11900
|
return addId(ingress.flattenedRules || [], "fullPath");
|
|
11709
11901
|
}, [ingress.flattenedRules]);
|
|
11710
11902
|
const component = React.useContext(ComponentContext);
|
|
11711
|
-
const
|
|
11903
|
+
const Table2 = component.Table || Table$1;
|
|
11712
11904
|
const currentSize = 10;
|
|
11713
11905
|
const columns = [
|
|
11714
11906
|
{
|
|
@@ -11741,9 +11933,9 @@ var __publicField = (obj, key, value) => {
|
|
|
11741
11933
|
return record.serviceName ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11742
11934
|
ResourceLink,
|
|
11743
11935
|
{
|
|
11744
|
-
|
|
11936
|
+
resourceKind: "services",
|
|
11745
11937
|
namespace: ingress.metadata.namespace || "default",
|
|
11746
|
-
|
|
11938
|
+
name: serviceName
|
|
11747
11939
|
}
|
|
11748
11940
|
) : record.resourceName;
|
|
11749
11941
|
}
|
|
@@ -11768,9 +11960,9 @@ var __publicField = (obj, key, value) => {
|
|
|
11768
11960
|
return secretName ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11769
11961
|
ResourceLink,
|
|
11770
11962
|
{
|
|
11771
|
-
|
|
11963
|
+
resourceKind: "secrets",
|
|
11772
11964
|
namespace: ingress.metadata.namespace || "default",
|
|
11773
|
-
|
|
11965
|
+
name: secretName
|
|
11774
11966
|
}
|
|
11775
11967
|
) : /* @__PURE__ */ jsxRuntimeExports.jsx(ValueDisplay, { value: "" });
|
|
11776
11968
|
},
|
|
@@ -11797,7 +11989,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11797
11989
|
);
|
|
11798
11990
|
}
|
|
11799
11991
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11800
|
-
|
|
11992
|
+
Table2,
|
|
11801
11993
|
{
|
|
11802
11994
|
tableKey: "ingressRules",
|
|
11803
11995
|
loading: false,
|
|
@@ -11814,7 +12006,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11814
12006
|
}
|
|
11815
12007
|
);
|
|
11816
12008
|
};
|
|
11817
|
-
const
|
|
12009
|
+
const KeyValue_1cqk7i8 = "";
|
|
11818
12010
|
const ContentBlockStyle = "c8jy7dc";
|
|
11819
12011
|
const KeyStyle = "k2sddxl";
|
|
11820
12012
|
const ValueStyle$2 = "v16vicsr";
|
|
@@ -11894,6 +12086,40 @@ var __publicField = (obj, key, value) => {
|
|
|
11894
12086
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.TabsTabPane, { tab: tab.title, children: tab.children }, tab.title);
|
|
11895
12087
|
}) });
|
|
11896
12088
|
}
|
|
12089
|
+
const StateTag = (props) => {
|
|
12090
|
+
const { state: state2 = ResourceState.UPDATING, hideBackground, className, resourceKind } = props;
|
|
12091
|
+
const { t: t2 } = useTranslation();
|
|
12092
|
+
const defaultStateMap = {
|
|
12093
|
+
[ResourceState.UPDATING]: "loading",
|
|
12094
|
+
[ResourceState.READY]: "green",
|
|
12095
|
+
[ResourceState.COMPLETED]: "gray",
|
|
12096
|
+
[ResourceState.FAILED]: "red",
|
|
12097
|
+
[ResourceState.SUSPENDED]: "warning",
|
|
12098
|
+
[ResourceState.RUNNING]: "green",
|
|
12099
|
+
[ResourceState.SUCCEEDED]: "blue",
|
|
12100
|
+
[ResourceState.UNKNOWN]: "gray",
|
|
12101
|
+
[ResourceState.TERMINATING]: "loading",
|
|
12102
|
+
[ResourceState.PENDING]: "warning",
|
|
12103
|
+
[ResourceState.WAITING]: "warning",
|
|
12104
|
+
[ResourceState.TERMINATED]: "red",
|
|
12105
|
+
[ResourceState.STOPPED]: "gray",
|
|
12106
|
+
[ResourceState.AVAILABLE]: "blue",
|
|
12107
|
+
[ResourceState.BOUND]: "green",
|
|
12108
|
+
[ResourceState.RELEASED]: "gray",
|
|
12109
|
+
[ResourceState.LOST]: "red"
|
|
12110
|
+
};
|
|
12111
|
+
const resourceStateMap = {};
|
|
12112
|
+
const finalStateMap = resourceStateMap[resourceKind || ""] || defaultStateMap;
|
|
12113
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
12114
|
+
eagle.StatusCapsule,
|
|
12115
|
+
{
|
|
12116
|
+
className: cx_default(className, StateTagStyle, hideBackground && "no-background"),
|
|
12117
|
+
color: finalStateMap[state2] !== "loading" ? finalStateMap[state2] : void 0,
|
|
12118
|
+
loading: finalStateMap[state2] === "loading",
|
|
12119
|
+
children: t2(`dovetail.${state2 || "updating"}_state`)
|
|
12120
|
+
}
|
|
12121
|
+
);
|
|
12122
|
+
};
|
|
11897
12123
|
const ShowContent_11g4jr2 = "";
|
|
11898
12124
|
const ShowContentWrapperStyle = "s9agep2";
|
|
11899
12125
|
const BackButton = "bo89gfi";
|
|
@@ -11926,7 +12152,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11926
12152
|
});
|
|
11927
12153
|
}
|
|
11928
12154
|
const ShowContent = (props) => {
|
|
11929
|
-
var _a, _b, _c, _d;
|
|
12155
|
+
var _a, _b, _c, _d, _e, _f;
|
|
11930
12156
|
const {
|
|
11931
12157
|
showConfig,
|
|
11932
12158
|
formatter,
|
|
@@ -11955,6 +12181,8 @@ var __publicField = (obj, key, value) => {
|
|
|
11955
12181
|
id
|
|
11956
12182
|
});
|
|
11957
12183
|
const Component = React.useContext(ComponentContext);
|
|
12184
|
+
const configs = React.useContext(ConfigsContext);
|
|
12185
|
+
const config = configs[(resource == null ? void 0 : resource.name) || ""];
|
|
11958
12186
|
const Tabs$1 = Component.Tabs || Tabs;
|
|
11959
12187
|
if (!(data2 == null ? void 0 : data2.data)) {
|
|
11960
12188
|
return null;
|
|
@@ -12026,7 +12254,7 @@ var __publicField = (obj, key, value) => {
|
|
|
12026
12254
|
},
|
|
12027
12255
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
|
|
12028
12256
|
className: "button-text",
|
|
12029
|
-
children: (_b = resource == null ? void 0 : resource.meta) == null ? void 0 : _b.kind
|
|
12257
|
+
children: (config == null ? void 0 : config.displayName) || ((_b = resource == null ? void 0 : resource.meta) == null ? void 0 : _b.kind)
|
|
12030
12258
|
})
|
|
12031
12259
|
})
|
|
12032
12260
|
}), /* @__PURE__ */ jsxRuntimeExports.jsxs(eagle.Space, {
|
|
@@ -12039,10 +12267,11 @@ var __publicField = (obj, key, value) => {
|
|
|
12039
12267
|
className: cx_default(eagle.Typo.Display.d2_regular_title, NameStyle),
|
|
12040
12268
|
children: (_c = record == null ? void 0 : record.metadata) == null ? void 0 : _c.name
|
|
12041
12269
|
}), stateDisplay ? /* @__PURE__ */ jsxRuntimeExports.jsx(StateTag, {
|
|
12042
|
-
state: stateDisplay
|
|
12270
|
+
state: stateDisplay,
|
|
12271
|
+
resourceKind: (_d = resource == null ? void 0 : resource.meta) == null ? void 0 : _d.kind
|
|
12043
12272
|
}) : void 0]
|
|
12044
12273
|
}), /* @__PURE__ */ jsxRuntimeExports.jsxs(eagle.Space, {
|
|
12045
|
-
children: [(
|
|
12274
|
+
children: [(_e = showConfig.renderExtraButton) == null ? void 0 : _e.call(showConfig, record), !showConfig.hideEditYamlButton ? /* @__PURE__ */ jsxRuntimeExports.jsx(core.CanAccess, {
|
|
12046
12275
|
resource: resource == null ? void 0 : resource.name,
|
|
12047
12276
|
action: AccessControlAuth.Edit,
|
|
12048
12277
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Button, {
|
|
@@ -12050,8 +12279,7 @@ var __publicField = (obj, key, value) => {
|
|
|
12050
12279
|
marginRight: 8
|
|
12051
12280
|
},
|
|
12052
12281
|
onClick: openForm,
|
|
12053
|
-
|
|
12054
|
-
children: t2("dovetail.edit_yaml")
|
|
12282
|
+
children: ((_f = config.formConfig) == null ? void 0 : _f.fields) ? t2("dovetail.edit") : t2("dovetail.edit_yaml")
|
|
12055
12283
|
})
|
|
12056
12284
|
}) : null, /* @__PURE__ */ jsxRuntimeExports.jsx(Dropdown, {
|
|
12057
12285
|
record,
|
|
@@ -12139,18 +12367,84 @@ var __publicField = (obj, key, value) => {
|
|
|
12139
12367
|
})
|
|
12140
12368
|
});
|
|
12141
12369
|
}
|
|
12142
|
-
|
|
12143
|
-
const {
|
|
12144
|
-
const
|
|
12145
|
-
const
|
|
12146
|
-
|
|
12147
|
-
|
|
12148
|
-
|
|
12149
|
-
|
|
12150
|
-
|
|
12151
|
-
|
|
12152
|
-
|
|
12153
|
-
|
|
12370
|
+
const NodeTaintsTable = ({ taints = [] }) => {
|
|
12371
|
+
const { t: t2 } = useTranslation();
|
|
12372
|
+
const component = React.useContext(ComponentContext);
|
|
12373
|
+
const Table2 = component.Table || Table$1;
|
|
12374
|
+
const taintsWithId = addId(taints, "key");
|
|
12375
|
+
const columns = [
|
|
12376
|
+
{
|
|
12377
|
+
key: "key",
|
|
12378
|
+
display: true,
|
|
12379
|
+
dataIndex: "key",
|
|
12380
|
+
title: t2("dovetail.key"),
|
|
12381
|
+
width: 120,
|
|
12382
|
+
sortable: true
|
|
12383
|
+
},
|
|
12384
|
+
{
|
|
12385
|
+
key: "value",
|
|
12386
|
+
display: true,
|
|
12387
|
+
dataIndex: "value",
|
|
12388
|
+
title: t2("dovetail.value"),
|
|
12389
|
+
width: 120,
|
|
12390
|
+
sortable: true
|
|
12391
|
+
},
|
|
12392
|
+
{
|
|
12393
|
+
key: "effect",
|
|
12394
|
+
display: true,
|
|
12395
|
+
dataIndex: "effect",
|
|
12396
|
+
title: t2("dovetail.effect"),
|
|
12397
|
+
width: 120,
|
|
12398
|
+
sortable: true,
|
|
12399
|
+
render: (value2) => {
|
|
12400
|
+
return t2(`dovetail.node_taint_${value2}`);
|
|
12401
|
+
}
|
|
12402
|
+
}
|
|
12403
|
+
];
|
|
12404
|
+
const {
|
|
12405
|
+
data: finalData,
|
|
12406
|
+
currentPage,
|
|
12407
|
+
onPageChange,
|
|
12408
|
+
onSorterChange
|
|
12409
|
+
} = useTableData({
|
|
12410
|
+
data: taintsWithId,
|
|
12411
|
+
columns,
|
|
12412
|
+
defaultSorters: [
|
|
12413
|
+
{
|
|
12414
|
+
field: "lastUpdateTime",
|
|
12415
|
+
order: "desc"
|
|
12416
|
+
}
|
|
12417
|
+
]
|
|
12418
|
+
});
|
|
12419
|
+
const currentSize = 10;
|
|
12420
|
+
if (taintsWithId.length === 0) {
|
|
12421
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
12422
|
+
WidgetErrorContent,
|
|
12423
|
+
{
|
|
12424
|
+
errorText: t2("dovetail.no_resource", { kind: t2("dovetail.taint") }),
|
|
12425
|
+
style: { padding: "15px 0" },
|
|
12426
|
+
type: ErrorContentType.Card
|
|
12427
|
+
}
|
|
12428
|
+
);
|
|
12429
|
+
}
|
|
12430
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
12431
|
+
Table2,
|
|
12432
|
+
{
|
|
12433
|
+
tableKey: "condition",
|
|
12434
|
+
loading: false,
|
|
12435
|
+
data: finalData,
|
|
12436
|
+
total: taintsWithId.length,
|
|
12437
|
+
columns: addDefaultRenderToColumns(columns),
|
|
12438
|
+
rowKey: "key",
|
|
12439
|
+
empty: t2("dovetail.empty"),
|
|
12440
|
+
defaultSize: currentSize,
|
|
12441
|
+
currentPage,
|
|
12442
|
+
onPageChange,
|
|
12443
|
+
onSorterChange,
|
|
12444
|
+
showMenuColumn: false
|
|
12445
|
+
}
|
|
12446
|
+
);
|
|
12447
|
+
};
|
|
12154
12448
|
function PVVolumeModeDisplay(props) {
|
|
12155
12449
|
const { value: value2 } = props;
|
|
12156
12450
|
const i18n2 = useTranslation();
|
|
@@ -12160,18 +12454,42 @@ var __publicField = (obj, key, value) => {
|
|
|
12160
12454
|
};
|
|
12161
12455
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: map[value2] || value2 });
|
|
12162
12456
|
}
|
|
12163
|
-
|
|
12457
|
+
const GlobalStoreContext = React.createContext({});
|
|
12458
|
+
function Table(props) {
|
|
12164
12459
|
var _a;
|
|
12460
|
+
const { tableProps, displayName, errorContentProps } = props;
|
|
12461
|
+
const { Table: TableComponent } = React.useContext(ComponentContext);
|
|
12462
|
+
const Table2 = TableComponent || Table$1;
|
|
12463
|
+
const { i18n: i18n2 } = useTranslation();
|
|
12464
|
+
const resourceType = /^[a-zA-Z]/.test(displayName) ? ` ${displayName}` : displayName;
|
|
12465
|
+
if (!((_a = tableProps.data) == null ? void 0 : _a.length) && !tableProps.loading) {
|
|
12466
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
12467
|
+
WidgetErrorContent,
|
|
12468
|
+
{
|
|
12469
|
+
errorText: tableProps.empty || i18n2.t("dovetail.no_resource", { kind: resourceType }),
|
|
12470
|
+
...errorContentProps
|
|
12471
|
+
}
|
|
12472
|
+
);
|
|
12473
|
+
}
|
|
12474
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
12475
|
+
Table2,
|
|
12476
|
+
{
|
|
12477
|
+
...tableProps,
|
|
12478
|
+
empty: tableProps.empty || i18n2.t("dovetail.no_resource", { kind: resourceType }),
|
|
12479
|
+
className: cx_default(tableProps.className)
|
|
12480
|
+
}
|
|
12481
|
+
);
|
|
12482
|
+
}
|
|
12483
|
+
function ResourceTable(props) {
|
|
12165
12484
|
const { resource, useTableParams } = props;
|
|
12166
12485
|
const configs = React.useContext(ConfigsContext);
|
|
12167
12486
|
const config = configs[resource];
|
|
12168
12487
|
const { formatter, columns, Dropdown, noShow } = config;
|
|
12169
12488
|
const { i18n: i18n2 } = useTranslation();
|
|
12170
|
-
const { Table: TableComponent } = React.useContext(ComponentContext);
|
|
12171
|
-
const Table$1 = TableComponent || Table;
|
|
12172
12489
|
const nameRenderer = noShow ? PlainTextNameColumnRenderer(i18n2) : NameColumnRenderer(i18n2);
|
|
12173
12490
|
const { tableProps } = useEagleTable({
|
|
12174
12491
|
useTableParams: {
|
|
12492
|
+
resource,
|
|
12175
12493
|
...useTableParams
|
|
12176
12494
|
},
|
|
12177
12495
|
columns: [nameRenderer, ...(columns == null ? void 0 : columns()) || []],
|
|
@@ -12179,28 +12497,20 @@ var __publicField = (obj, key, value) => {
|
|
|
12179
12497
|
defaultSize: 10,
|
|
12180
12498
|
...config.tableProps
|
|
12181
12499
|
},
|
|
12182
|
-
resource,
|
|
12183
12500
|
formatter,
|
|
12184
12501
|
Dropdown
|
|
12185
12502
|
});
|
|
12186
12503
|
React.useEffect(() => {
|
|
12187
12504
|
tableProps.onPageChange(1);
|
|
12188
12505
|
}, []);
|
|
12189
|
-
if (!((_a = tableProps.data) == null ? void 0 : _a.length) && !tableProps.loading) {
|
|
12190
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
12191
|
-
WidgetErrorContent,
|
|
12192
|
-
{
|
|
12193
|
-
errorText: tableProps.empty || i18n2.t("dovetail.no_resource", { kind: ` ${config.kind}` }),
|
|
12194
|
-
type: ErrorContentType.Card
|
|
12195
|
-
}
|
|
12196
|
-
);
|
|
12197
|
-
}
|
|
12198
12506
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
12199
|
-
Table
|
|
12507
|
+
Table,
|
|
12200
12508
|
{
|
|
12201
|
-
|
|
12202
|
-
|
|
12203
|
-
|
|
12509
|
+
tableProps,
|
|
12510
|
+
displayName: config.displayName || config.kind,
|
|
12511
|
+
errorContentProps: {
|
|
12512
|
+
type: ErrorContentType.Card
|
|
12513
|
+
}
|
|
12204
12514
|
}
|
|
12205
12515
|
);
|
|
12206
12516
|
}
|
|
@@ -12208,7 +12518,8 @@ var __publicField = (obj, key, value) => {
|
|
|
12208
12518
|
const WorkloadPodsTable = ({
|
|
12209
12519
|
namespace: namespace2,
|
|
12210
12520
|
selector,
|
|
12211
|
-
hideToolbar
|
|
12521
|
+
hideToolbar,
|
|
12522
|
+
filter
|
|
12212
12523
|
}) => {
|
|
12213
12524
|
var _a;
|
|
12214
12525
|
const {
|
|
@@ -12216,7 +12527,7 @@ var __publicField = (obj, key, value) => {
|
|
|
12216
12527
|
} = useTranslation();
|
|
12217
12528
|
const [selectedKeys, setSelectedKeys] = React.useState([]);
|
|
12218
12529
|
const component = React.useContext(ComponentContext);
|
|
12219
|
-
const
|
|
12530
|
+
const Table2 = component.Table || Table$1;
|
|
12220
12531
|
const currentSize = 10;
|
|
12221
12532
|
const columns = [NameColumnRenderer(i18n2, "pods"), StateDisplayColumnRenderer(i18n2), {
|
|
12222
12533
|
key: "ip",
|
|
@@ -12241,7 +12552,7 @@ var __publicField = (obj, key, value) => {
|
|
|
12241
12552
|
field: "",
|
|
12242
12553
|
value: "",
|
|
12243
12554
|
fn(item) {
|
|
12244
|
-
return matchSelector(item, selector, namespace2);
|
|
12555
|
+
return filter ? filter(item) : matchSelector(item, selector, namespace2);
|
|
12245
12556
|
}
|
|
12246
12557
|
}]
|
|
12247
12558
|
}
|
|
@@ -12264,7 +12575,7 @@ var __publicField = (obj, key, value) => {
|
|
|
12264
12575
|
children: [hideToolbar ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(TableToolBar, {
|
|
12265
12576
|
selectedKeys,
|
|
12266
12577
|
hideCreate: true
|
|
12267
|
-
}), /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
12578
|
+
}), /* @__PURE__ */ jsxRuntimeExports.jsx(Table2, {
|
|
12268
12579
|
...tableProps,
|
|
12269
12580
|
tableKey: "pods",
|
|
12270
12581
|
onSelect: (keys) => setSelectedKeys(keys),
|
|
@@ -12442,126 +12753,6 @@ var __publicField = (obj, key, value) => {
|
|
|
12442
12753
|
})]
|
|
12443
12754
|
});
|
|
12444
12755
|
}
|
|
12445
|
-
var StorageUnit = /* @__PURE__ */ ((StorageUnit2) => {
|
|
12446
|
-
StorageUnit2["Pi"] = "Pi";
|
|
12447
|
-
StorageUnit2["PiB"] = "PiB";
|
|
12448
|
-
StorageUnit2["Ti"] = "Ti";
|
|
12449
|
-
StorageUnit2["TiB"] = "TiB";
|
|
12450
|
-
StorageUnit2["Gi"] = "Gi";
|
|
12451
|
-
StorageUnit2["GiB"] = "GiB";
|
|
12452
|
-
StorageUnit2["Mi"] = "Mi";
|
|
12453
|
-
StorageUnit2["MiB"] = "MiB";
|
|
12454
|
-
StorageUnit2["Ki"] = "Ki";
|
|
12455
|
-
StorageUnit2["KiB"] = "KiB";
|
|
12456
|
-
return StorageUnit2;
|
|
12457
|
-
})(StorageUnit || {});
|
|
12458
|
-
const UNIT_FACTORS = {
|
|
12459
|
-
Pi: 1024 ** 5,
|
|
12460
|
-
PiB: 1024 ** 5,
|
|
12461
|
-
Ti: 1024 ** 4,
|
|
12462
|
-
TiB: 1024 ** 4,
|
|
12463
|
-
Gi: 1024 ** 3,
|
|
12464
|
-
GiB: 1024 ** 3,
|
|
12465
|
-
Mi: 1024 ** 2,
|
|
12466
|
-
MiB: 1024 ** 2,
|
|
12467
|
-
Ki: 1024,
|
|
12468
|
-
KiB: 1024,
|
|
12469
|
-
B: 1
|
|
12470
|
-
};
|
|
12471
|
-
function transformStorageUnit(value2, toUnit = "Gi") {
|
|
12472
|
-
const num = parseFloat(value2);
|
|
12473
|
-
const unit = Object.values(StorageUnit).find((u) => value2.includes(u)) || "Ki";
|
|
12474
|
-
return num / UNIT_FACTORS[unit] * UNIT_FACTORS[toUnit];
|
|
12475
|
-
}
|
|
12476
|
-
const DistributeStorageForm = React.forwardRef(function DistributeStorageForm2(props, ref) {
|
|
12477
|
-
const { defaultValue, pvc: pvc2 } = props;
|
|
12478
|
-
const { resource } = core.useResource();
|
|
12479
|
-
const { mutateAsync } = core.useUpdate();
|
|
12480
|
-
const { t: t2 } = useTranslation();
|
|
12481
|
-
const [distributeStorage, setDistributeStorage] = React.useState(defaultValue);
|
|
12482
|
-
const submit = React.useCallback(() => {
|
|
12483
|
-
const v = pvc2.updateDistributeStorage(distributeStorage);
|
|
12484
|
-
const id = pvc2.id;
|
|
12485
|
-
pruneBeforeEdit(v);
|
|
12486
|
-
return mutateAsync({
|
|
12487
|
-
id,
|
|
12488
|
-
resource: (resource == null ? void 0 : resource.name) || "",
|
|
12489
|
-
values: v,
|
|
12490
|
-
successNotification() {
|
|
12491
|
-
return {
|
|
12492
|
-
message: t2("dovetail.edit_distribute_storage_success_toast", {
|
|
12493
|
-
kind: pvc2.kind,
|
|
12494
|
-
name: pvc2.id,
|
|
12495
|
-
interpolation: {
|
|
12496
|
-
escapeValue: false
|
|
12497
|
-
}
|
|
12498
|
-
}),
|
|
12499
|
-
type: "success"
|
|
12500
|
-
};
|
|
12501
|
-
},
|
|
12502
|
-
errorNotification: false
|
|
12503
|
-
});
|
|
12504
|
-
}, [pvc2, distributeStorage, resource == null ? void 0 : resource.name, mutateAsync, t2]);
|
|
12505
|
-
React.useImperativeHandle(ref, () => ({
|
|
12506
|
-
submit
|
|
12507
|
-
}), [submit]);
|
|
12508
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
12509
|
-
eagle.Form.Item,
|
|
12510
|
-
{
|
|
12511
|
-
label: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { style: { width: "134px" }, children: t2("dovetail.distributed") }),
|
|
12512
|
-
colon: false,
|
|
12513
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
12514
|
-
eagle.Fields.Integer,
|
|
12515
|
-
{
|
|
12516
|
-
style: { width: "142px" },
|
|
12517
|
-
input: {
|
|
12518
|
-
name: "distributeStorage",
|
|
12519
|
-
value: distributeStorage,
|
|
12520
|
-
onChange: (value2) => {
|
|
12521
|
-
setDistributeStorage(Number(value2));
|
|
12522
|
-
},
|
|
12523
|
-
onBlur: () => {
|
|
12524
|
-
},
|
|
12525
|
-
onFocus: () => {
|
|
12526
|
-
}
|
|
12527
|
-
},
|
|
12528
|
-
min: 0,
|
|
12529
|
-
meta: {},
|
|
12530
|
-
suffix: "GiB",
|
|
12531
|
-
controls: true
|
|
12532
|
-
}
|
|
12533
|
-
)
|
|
12534
|
-
}
|
|
12535
|
-
);
|
|
12536
|
-
});
|
|
12537
|
-
function PVCDistributeStorage({ pvc: pvc2, editable }) {
|
|
12538
|
-
var _a, _b;
|
|
12539
|
-
const { t: t2 } = useTranslation();
|
|
12540
|
-
const formRef = React.useRef(null);
|
|
12541
|
-
const value2 = (_b = (_a = pvc2.spec.resources) == null ? void 0 : _a.requests) == null ? void 0 : _b.storage;
|
|
12542
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
12543
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Units.Byte, { rawValue: parseSi(value2), decimals: 1 }),
|
|
12544
|
-
editable && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
12545
|
-
EditField,
|
|
12546
|
-
{
|
|
12547
|
-
modalProps: {
|
|
12548
|
-
formRef,
|
|
12549
|
-
title: t2("dovetail.edit_replicas"),
|
|
12550
|
-
renderContent() {
|
|
12551
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
12552
|
-
DistributeStorageForm,
|
|
12553
|
-
{
|
|
12554
|
-
ref: formRef,
|
|
12555
|
-
defaultValue: value2 ? transformStorageUnit(value2, StorageUnit.Gi) : 0,
|
|
12556
|
-
pvc: pvc2
|
|
12557
|
-
}
|
|
12558
|
-
);
|
|
12559
|
-
}
|
|
12560
|
-
}
|
|
12561
|
-
}
|
|
12562
|
-
)
|
|
12563
|
-
] });
|
|
12564
|
-
}
|
|
12565
12756
|
var AreaType = /* @__PURE__ */ ((AreaType2) => {
|
|
12566
12757
|
AreaType2["Inline"] = "Inline";
|
|
12567
12758
|
AreaType2["Grid"] = "Grid";
|
|
@@ -12595,6 +12786,15 @@ var __publicField = (obj, key, value) => {
|
|
|
12595
12786
|
}
|
|
12596
12787
|
};
|
|
12597
12788
|
};
|
|
12789
|
+
const NodeTaintsField = () => {
|
|
12790
|
+
return {
|
|
12791
|
+
key: "NodeTaints",
|
|
12792
|
+
path: ["spec", "taints"],
|
|
12793
|
+
renderContent: (value2) => {
|
|
12794
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(NodeTaintsTable, { taints: value2 });
|
|
12795
|
+
}
|
|
12796
|
+
};
|
|
12797
|
+
};
|
|
12598
12798
|
const PodsField = () => {
|
|
12599
12799
|
return {
|
|
12600
12800
|
key: "pods",
|
|
@@ -12824,13 +13024,15 @@ var __publicField = (obj, key, value) => {
|
|
|
12824
13024
|
resource: "persistentvolumes",
|
|
12825
13025
|
useTableParams: {
|
|
12826
13026
|
filters: {
|
|
12827
|
-
permanent: [
|
|
12828
|
-
|
|
12829
|
-
|
|
12830
|
-
|
|
12831
|
-
|
|
13027
|
+
permanent: [
|
|
13028
|
+
{
|
|
13029
|
+
field: "",
|
|
13030
|
+
value: "",
|
|
13031
|
+
fn(pv2) {
|
|
13032
|
+
return sc.filterPV(pv2, sc.metadata.name);
|
|
13033
|
+
}
|
|
12832
13034
|
}
|
|
12833
|
-
|
|
13035
|
+
]
|
|
12834
13036
|
}
|
|
12835
13037
|
}
|
|
12836
13038
|
}
|
|
@@ -12871,17 +13073,24 @@ var __publicField = (obj, key, value) => {
|
|
|
12871
13073
|
path: ["spec", "storageClassName"],
|
|
12872
13074
|
title: i18n2.t("dovetail.storage_class"),
|
|
12873
13075
|
renderContent(value2) {
|
|
12874
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
13076
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
13077
|
+
ResourceLink,
|
|
13078
|
+
{
|
|
13079
|
+
resourceKind: "storageclasses",
|
|
13080
|
+
namespace: "",
|
|
13081
|
+
name: value2
|
|
13082
|
+
}
|
|
13083
|
+
);
|
|
12875
13084
|
}
|
|
12876
13085
|
};
|
|
12877
13086
|
};
|
|
12878
13087
|
const PVPhaseField = (i18n2) => {
|
|
12879
13088
|
return {
|
|
12880
13089
|
key: "phase",
|
|
12881
|
-
path: ["
|
|
13090
|
+
path: ["stateDisplay"],
|
|
12882
13091
|
title: i18n2.t("dovetail.state"),
|
|
12883
13092
|
renderContent(value2) {
|
|
12884
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
13093
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(StateTag, { state: value2, resourceKind: "PersistentVolume", hideBackground: true });
|
|
12885
13094
|
}
|
|
12886
13095
|
};
|
|
12887
13096
|
};
|
|
@@ -12899,14 +13108,49 @@ var __publicField = (obj, key, value) => {
|
|
|
12899
13108
|
return {
|
|
12900
13109
|
key: "accessMode",
|
|
12901
13110
|
path: ["spec", "accessModes"],
|
|
12902
|
-
title: i18n2.t("dovetail.access_mode")
|
|
13111
|
+
title: i18n2.t("dovetail.access_mode"),
|
|
13112
|
+
renderContent(value2) {
|
|
13113
|
+
return value2.join(", ");
|
|
13114
|
+
}
|
|
13115
|
+
};
|
|
13116
|
+
};
|
|
13117
|
+
const PVCPodsField = () => {
|
|
13118
|
+
return {
|
|
13119
|
+
key: "pods",
|
|
13120
|
+
path: [],
|
|
13121
|
+
renderContent: (_, record) => {
|
|
13122
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
13123
|
+
WorkloadPodsTable,
|
|
13124
|
+
{
|
|
13125
|
+
filter: (item) => {
|
|
13126
|
+
var _a, _b;
|
|
13127
|
+
return !!((_b = (_a = item.spec) == null ? void 0 : _a.volumes) == null ? void 0 : _b.some((v) => {
|
|
13128
|
+
var _a2;
|
|
13129
|
+
return ((_a2 = v.persistentVolumeClaim) == null ? void 0 : _a2.claimName) === record.metadata.name;
|
|
13130
|
+
}));
|
|
13131
|
+
},
|
|
13132
|
+
namespace: record.metadata.namespace,
|
|
13133
|
+
hideToolbar: true
|
|
13134
|
+
}
|
|
13135
|
+
);
|
|
13136
|
+
}
|
|
12903
13137
|
};
|
|
12904
13138
|
};
|
|
12905
13139
|
const PVCRefField = (i18n2) => {
|
|
12906
13140
|
return {
|
|
12907
13141
|
key: "pvc",
|
|
12908
13142
|
path: ["pvc"],
|
|
12909
|
-
title: i18n2.t("dovetail.pvc")
|
|
13143
|
+
title: i18n2.t("dovetail.pvc"),
|
|
13144
|
+
renderContent(value2, pvc2) {
|
|
13145
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
13146
|
+
ResourceLink,
|
|
13147
|
+
{
|
|
13148
|
+
resourceKind: "persistentvolumeclaims",
|
|
13149
|
+
namespace: pvc2.pvcNamespace || "default",
|
|
13150
|
+
name: value2
|
|
13151
|
+
}
|
|
13152
|
+
);
|
|
13153
|
+
}
|
|
12910
13154
|
};
|
|
12911
13155
|
};
|
|
12912
13156
|
const PVCSIRefField = (i18n2) => {
|
|
@@ -12955,13 +13199,7 @@ var __publicField = (obj, key, value) => {
|
|
|
12955
13199
|
key: resource,
|
|
12956
13200
|
path: [],
|
|
12957
13201
|
renderContent() {
|
|
12958
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
12959
|
-
ResourceTable,
|
|
12960
|
-
{
|
|
12961
|
-
resource,
|
|
12962
|
-
useTableParams
|
|
12963
|
-
}
|
|
12964
|
-
);
|
|
13202
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(ResourceTable, { resource, useTableParams });
|
|
12965
13203
|
}
|
|
12966
13204
|
};
|
|
12967
13205
|
};
|
|
@@ -19000,7 +19238,7 @@ var __publicField = (obj, key, value) => {
|
|
|
19000
19238
|
}) => {
|
|
19001
19239
|
const { i18n: i18n2 } = useTranslation();
|
|
19002
19240
|
const component = React.useContext(ComponentContext);
|
|
19003
|
-
const
|
|
19241
|
+
const Table2 = component.Table || Table$1;
|
|
19004
19242
|
const currentSize = 10;
|
|
19005
19243
|
const columns = React.useMemo(
|
|
19006
19244
|
() => [
|
|
@@ -19095,7 +19333,7 @@ var __publicField = (obj, key, value) => {
|
|
|
19095
19333
|
);
|
|
19096
19334
|
}
|
|
19097
19335
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
19098
|
-
|
|
19336
|
+
Table2,
|
|
19099
19337
|
{
|
|
19100
19338
|
tableKey: "podContainers",
|
|
19101
19339
|
loading: false,
|
|
@@ -19116,18 +19354,17 @@ var __publicField = (obj, key, value) => {
|
|
|
19116
19354
|
upAreas = [],
|
|
19117
19355
|
downAreas = [],
|
|
19118
19356
|
basicFields = []
|
|
19119
|
-
} = {}) => ({
|
|
19357
|
+
} = {}, isShowNamespace = true) => ({
|
|
19120
19358
|
title: i18n2.t("dovetail.basic_info"),
|
|
19121
19359
|
areas: [
|
|
19122
19360
|
...upAreas,
|
|
19123
19361
|
{
|
|
19124
|
-
fields: [
|
|
19125
|
-
NamespaceField(i18n2),
|
|
19362
|
+
fields: (isShowNamespace ? [NamespaceField(i18n2)] : []).concat([
|
|
19126
19363
|
...basicFields,
|
|
19127
19364
|
LabelsField(i18n2),
|
|
19128
19365
|
AnnotationsField(i18n2),
|
|
19129
19366
|
AgeField(i18n2)
|
|
19130
|
-
]
|
|
19367
|
+
])
|
|
19131
19368
|
},
|
|
19132
19369
|
...downAreas
|
|
19133
19370
|
]
|
|
@@ -19171,6 +19408,14 @@ var __publicField = (obj, key, value) => {
|
|
|
19171
19408
|
}
|
|
19172
19409
|
]
|
|
19173
19410
|
});
|
|
19411
|
+
const PVCPodsGroup = () => ({
|
|
19412
|
+
title: "Pod",
|
|
19413
|
+
areas: [
|
|
19414
|
+
{
|
|
19415
|
+
fields: [PVCPodsField()]
|
|
19416
|
+
}
|
|
19417
|
+
]
|
|
19418
|
+
});
|
|
19174
19419
|
const ConditionsGroup = (i18n2) => ({
|
|
19175
19420
|
title: i18n2.t("dovetail.condition"),
|
|
19176
19421
|
areas: [
|
|
@@ -19179,6 +19424,14 @@ var __publicField = (obj, key, value) => {
|
|
|
19179
19424
|
}
|
|
19180
19425
|
]
|
|
19181
19426
|
});
|
|
19427
|
+
const NodeTaintsGroup = (i18n2) => ({
|
|
19428
|
+
title: i18n2.t("dovetail.taint"),
|
|
19429
|
+
areas: [
|
|
19430
|
+
{
|
|
19431
|
+
fields: [NodeTaintsField()]
|
|
19432
|
+
}
|
|
19433
|
+
]
|
|
19434
|
+
});
|
|
19182
19435
|
const SecretDataGroup = () => ({
|
|
19183
19436
|
areas: [
|
|
19184
19437
|
{
|
|
@@ -33016,7 +33269,6 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
33016
33269
|
})]
|
|
33017
33270
|
});
|
|
33018
33271
|
});
|
|
33019
|
-
const GlobalStoreContext = React.createContext({});
|
|
33020
33272
|
var buffer = {};
|
|
33021
33273
|
var base64Js = {};
|
|
33022
33274
|
base64Js.byteLength = byteLength;
|
|
@@ -35473,13 +35725,7 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
35473
35725
|
tableProps,
|
|
35474
35726
|
contentClassName
|
|
35475
35727
|
} = props;
|
|
35476
|
-
|
|
35477
|
-
Table: TableComponent
|
|
35478
|
-
} = React.useContext(ComponentContext);
|
|
35479
|
-
const {
|
|
35480
|
-
t: t2
|
|
35481
|
-
} = useTranslation();
|
|
35482
|
-
const Table$1 = TableComponent || Table;
|
|
35728
|
+
useTranslation();
|
|
35483
35729
|
const {
|
|
35484
35730
|
resource
|
|
35485
35731
|
} = core.useResource();
|
|
@@ -35490,6 +35736,7 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
35490
35736
|
children: [!config.hideListToolBar ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
|
|
35491
35737
|
children: [/* @__PURE__ */ jsxRuntimeExports.jsx(TableToolBar, {
|
|
35492
35738
|
selectedKeys,
|
|
35739
|
+
title: config == null ? void 0 : config.displayName,
|
|
35493
35740
|
description: config == null ? void 0 : config.description
|
|
35494
35741
|
}), /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Divider, {
|
|
35495
35742
|
style: {
|
|
@@ -35501,23 +35748,21 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
35501
35748
|
})]
|
|
35502
35749
|
}) : void 0, /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
|
|
35503
35750
|
className: cx_default(ListContentStyle, contentClassName),
|
|
35751
|
+
style: config.hideNamespacesFilter ? {
|
|
35752
|
+
paddingTop: 0
|
|
35753
|
+
} : {},
|
|
35504
35754
|
children: [!config.hideNamespacesFilter ? /* @__PURE__ */ jsxRuntimeExports.jsx(NamespacesFilter, {
|
|
35505
35755
|
className: NamespaceFilterStyle
|
|
35506
35756
|
}) : void 0, /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
35507
35757
|
className: TableStyle,
|
|
35508
|
-
children:
|
|
35509
|
-
|
|
35510
|
-
|
|
35511
|
-
|
|
35512
|
-
|
|
35513
|
-
|
|
35514
|
-
|
|
35515
|
-
|
|
35516
|
-
}),
|
|
35517
|
-
className: cx_default(tableProps.className),
|
|
35518
|
-
scroll: {
|
|
35519
|
-
y: "calc(100% - 48px)"
|
|
35520
|
-
}
|
|
35758
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Table, {
|
|
35759
|
+
tableProps: {
|
|
35760
|
+
...tableProps,
|
|
35761
|
+
scroll: {
|
|
35762
|
+
y: "calc(100% - 48px)"
|
|
35763
|
+
}
|
|
35764
|
+
},
|
|
35765
|
+
displayName: (config == null ? void 0 : config.displayName) || config.kind
|
|
35521
35766
|
})
|
|
35522
35767
|
})]
|
|
35523
35768
|
})]
|
|
@@ -38829,10 +39074,11 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
38829
39074
|
if (typeof ((_c2 = config.formConfig) == null ? void 0 : _c2.formTitle) === "function") {
|
|
38830
39075
|
return (_d2 = config.formConfig) == null ? void 0 : _d2.formTitle(action);
|
|
38831
39076
|
}
|
|
39077
|
+
const label2 = config.displayName || (config == null ? void 0 : config.kind);
|
|
38832
39078
|
return i18n2.t(id ? "dovetail.edit_resource" : "dovetail.create_resource", {
|
|
38833
|
-
resource:
|
|
39079
|
+
resource: /^[a-zA-Z]/.test(label2) ? ` ${label2}` : label2
|
|
38834
39080
|
});
|
|
38835
|
-
}, [action, config.formConfig, config == null ? void 0 : config.kind, i18n2, id]);
|
|
39081
|
+
}, [action, config.formConfig, config.displayName, config == null ? void 0 : config.kind, i18n2, id]);
|
|
38836
39082
|
const desc = React.useMemo(() => {
|
|
38837
39083
|
var _a2, _b2, _c2, _d2;
|
|
38838
39084
|
if (typeof ((_a2 = config.formConfig) == null ? void 0 : _a2.formDesc) === "string")
|
|
@@ -38883,6 +39129,12 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
38883
39129
|
children: [desc ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
38884
39130
|
className: FormDescStyle,
|
|
38885
39131
|
children: desc
|
|
39132
|
+
}) : void 0, !isYamlForm && mode === "form" ? /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Alert, {
|
|
39133
|
+
type: "warning",
|
|
39134
|
+
message: i18n2.t("dovetail.change_form_mode_alert"),
|
|
39135
|
+
style: {
|
|
39136
|
+
marginBottom: "16px"
|
|
39137
|
+
}
|
|
38886
39138
|
}) : void 0, formEle]
|
|
38887
39139
|
});
|
|
38888
39140
|
}
|
|
@@ -39195,8 +39447,8 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
39195
39447
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
39196
39448
|
ResourceLink,
|
|
39197
39449
|
{
|
|
39198
|
-
|
|
39199
|
-
|
|
39450
|
+
name: ownerReference.name,
|
|
39451
|
+
resourceKind: resource.name || "",
|
|
39200
39452
|
namespace: namespace2
|
|
39201
39453
|
}
|
|
39202
39454
|
);
|
|
@@ -39250,9 +39502,9 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
39250
39502
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
39251
39503
|
ResourceLink,
|
|
39252
39504
|
{
|
|
39253
|
-
|
|
39505
|
+
resourceKind: "services",
|
|
39254
39506
|
namespace: ingress.metadata.namespace || "default",
|
|
39255
|
-
|
|
39507
|
+
name: r2.serviceName
|
|
39256
39508
|
}
|
|
39257
39509
|
),
|
|
39258
39510
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { children: [
|
|
@@ -39843,7 +40095,7 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
39843
40095
|
display: true,
|
|
39844
40096
|
dataIndex: ["pv"],
|
|
39845
40097
|
title: i18n2.t("dovetail.pv"),
|
|
39846
|
-
width:
|
|
40098
|
+
width: 160,
|
|
39847
40099
|
sortable: true
|
|
39848
40100
|
};
|
|
39849
40101
|
};
|
|
@@ -39853,13 +40105,13 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
39853
40105
|
display: true,
|
|
39854
40106
|
dataIndex: ["spec", "storageClassName"],
|
|
39855
40107
|
title: i18n2.t("dovetail.storage_class"),
|
|
39856
|
-
width:
|
|
40108
|
+
width: 160,
|
|
39857
40109
|
sortable: true,
|
|
39858
40110
|
render(value2) {
|
|
39859
40111
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(ResourceLink, {
|
|
39860
|
-
|
|
40112
|
+
resourceKind: "storageclasses",
|
|
39861
40113
|
namespace: "",
|
|
39862
|
-
|
|
40114
|
+
name: value2
|
|
39863
40115
|
});
|
|
39864
40116
|
}
|
|
39865
40117
|
};
|
|
@@ -39868,13 +40120,15 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
39868
40120
|
return {
|
|
39869
40121
|
key: "phase",
|
|
39870
40122
|
display: true,
|
|
39871
|
-
dataIndex: ["
|
|
40123
|
+
dataIndex: ["stateDisplay"],
|
|
39872
40124
|
title: i18n2.t("dovetail.state"),
|
|
39873
40125
|
width: 120,
|
|
39874
40126
|
sortable: true,
|
|
39875
40127
|
render(value2) {
|
|
39876
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
39877
|
-
|
|
40128
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(StateTag, {
|
|
40129
|
+
state: value2,
|
|
40130
|
+
resourceKind: "PersistentVolume",
|
|
40131
|
+
hideBackground: true
|
|
39878
40132
|
});
|
|
39879
40133
|
}
|
|
39880
40134
|
};
|
|
@@ -39885,8 +40139,15 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
39885
40139
|
display: true,
|
|
39886
40140
|
dataIndex: ["pvc"],
|
|
39887
40141
|
title: i18n2.t("dovetail.pvc"),
|
|
39888
|
-
width:
|
|
39889
|
-
sortable: true
|
|
40142
|
+
width: 160,
|
|
40143
|
+
sortable: true,
|
|
40144
|
+
render(value2, pv2) {
|
|
40145
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(ResourceLink, {
|
|
40146
|
+
resourceKind: "persistentvolumeclaims",
|
|
40147
|
+
namespace: pv2.pvcNamespace || "default",
|
|
40148
|
+
name: value2
|
|
40149
|
+
});
|
|
40150
|
+
}
|
|
39890
40151
|
};
|
|
39891
40152
|
};
|
|
39892
40153
|
const PVCSIRefColumnRenderer = (i18n2) => {
|
|
@@ -39895,7 +40156,7 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
39895
40156
|
display: true,
|
|
39896
40157
|
dataIndex: ["csi"],
|
|
39897
40158
|
title: i18n2.t("dovetail.csi"),
|
|
39898
|
-
width:
|
|
40159
|
+
width: 160,
|
|
39899
40160
|
sortable: true
|
|
39900
40161
|
};
|
|
39901
40162
|
};
|
|
@@ -39921,7 +40182,15 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
39921
40182
|
dataIndex: ["spec", "accessModes"],
|
|
39922
40183
|
title: i18n2.t("dovetail.access_mode"),
|
|
39923
40184
|
width: 120,
|
|
39924
|
-
sortable: true
|
|
40185
|
+
sortable: true,
|
|
40186
|
+
render(value2) {
|
|
40187
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
|
|
40188
|
+
style: {
|
|
40189
|
+
whiteSpace: "pre-wrap"
|
|
40190
|
+
},
|
|
40191
|
+
children: value2.join("\n")
|
|
40192
|
+
});
|
|
40193
|
+
}
|
|
39925
40194
|
};
|
|
39926
40195
|
};
|
|
39927
40196
|
const IsDefaultSCColumnRenderer = (i18n2) => {
|
|
@@ -39954,6 +40223,19 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
39954
40223
|
}
|
|
39955
40224
|
};
|
|
39956
40225
|
};
|
|
40226
|
+
const SCAllowExpandColumnRenderer = (i18n2) => {
|
|
40227
|
+
return {
|
|
40228
|
+
key: "allowVolumeExpansion",
|
|
40229
|
+
display: true,
|
|
40230
|
+
dataIndex: ["allowVolumeExpansion"],
|
|
40231
|
+
title: i18n2.t("dovetail.allow_expand"),
|
|
40232
|
+
width: 120,
|
|
40233
|
+
sortable: true,
|
|
40234
|
+
render(val) {
|
|
40235
|
+
return val ? i18n2.t("dovetail.support") : i18n2.t("dovetail.not_support");
|
|
40236
|
+
}
|
|
40237
|
+
};
|
|
40238
|
+
};
|
|
39957
40239
|
const styles = "";
|
|
39958
40240
|
const Dovetail = (props) => {
|
|
39959
40241
|
const {
|
|
@@ -40271,6 +40553,7 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
40271
40553
|
exports2.EditAnnotationDropdownMenuItem = EditAnnotationDropdownMenuItem;
|
|
40272
40554
|
exports2.EditButton = EditButton;
|
|
40273
40555
|
exports2.EditLabelDropdownMenuItem = EditLabelDropdownMenuItem;
|
|
40556
|
+
exports2.ErrorContent = WidgetErrorContent;
|
|
40274
40557
|
exports2.EventModel = EventModel;
|
|
40275
40558
|
exports2.EventsTab = EventsTab;
|
|
40276
40559
|
exports2.EventsTableTabField = EventsTableTabField;
|
|
@@ -40322,9 +40605,13 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
40322
40605
|
exports2.NodeModel = NodeModel;
|
|
40323
40606
|
exports2.NodeNameColumnRenderer = NodeNameColumnRenderer;
|
|
40324
40607
|
exports2.NodeRole = NodeRole;
|
|
40608
|
+
exports2.NodeTaintsField = NodeTaintsField;
|
|
40609
|
+
exports2.NodeTaintsGroup = NodeTaintsGroup;
|
|
40325
40610
|
exports2.POD_INIT_VALUE = POD_INIT_VALUE;
|
|
40326
40611
|
exports2.PVAccessModeColumnRenderer = PVAccessModeColumnRenderer;
|
|
40327
40612
|
exports2.PVAccessModeField = PVAccessModeField;
|
|
40613
|
+
exports2.PVCPodsField = PVCPodsField;
|
|
40614
|
+
exports2.PVCPodsGroup = PVCPodsGroup;
|
|
40328
40615
|
exports2.PVCRefColumnRenderer = PVCRefColumnRenderer;
|
|
40329
40616
|
exports2.PVCRefField = PVCRefField;
|
|
40330
40617
|
exports2.PVCSIRefColumnRenderer = PVCSIRefColumnRenderer;
|
|
@@ -40335,7 +40622,6 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
40335
40622
|
exports2.PVCapacityColumnRenderer = PVCapacityColumnRenderer;
|
|
40336
40623
|
exports2.PVCapacityField = PVCapacityField;
|
|
40337
40624
|
exports2.PVPhaseColumnRenderer = PVPhaseColumnRenderer;
|
|
40338
|
-
exports2.PVPhaseDisplay = PVPhaseDisplay;
|
|
40339
40625
|
exports2.PVPhaseField = PVPhaseField;
|
|
40340
40626
|
exports2.PVRefColumnRenderer = PVRefColumnRenderer;
|
|
40341
40627
|
exports2.PVRefField = PVRefField;
|
|
@@ -40385,11 +40671,13 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
40385
40671
|
exports2.ResourceModel = ResourceModel;
|
|
40386
40672
|
exports2.ResourceSelect = ResourceSelect;
|
|
40387
40673
|
exports2.ResourceShow = ResourceShow;
|
|
40674
|
+
exports2.ResourceState = ResourceState;
|
|
40388
40675
|
exports2.ResourceTable = ResourceTable;
|
|
40389
40676
|
exports2.ResourceTableField = ResourceTableField;
|
|
40390
40677
|
exports2.ResourceTableGroup = ResourceTableGroup;
|
|
40391
40678
|
exports2.ResourceUsageBar = ResourceUsageBar;
|
|
40392
40679
|
exports2.RestartCountColumnRenderer = RestartCountColumnRenderer;
|
|
40680
|
+
exports2.SCAllowExpandColumnRenderer = SCAllowExpandColumnRenderer;
|
|
40393
40681
|
exports2.SCReclaimPolicyColumnRenderer = SCReclaimPolicyColumnRenderer;
|
|
40394
40682
|
exports2.SCReclaimPolicyField = SCReclaimPolicyField;
|
|
40395
40683
|
exports2.SECRET_BASIC_AUTH_INIT_VALUE = SECRET_BASIC_AUTH_INIT_VALUE;
|
|
@@ -40432,12 +40720,12 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
40432
40720
|
exports2.StartTimeField = StartTimeField;
|
|
40433
40721
|
exports2.StateDisplayColumnRenderer = StateDisplayColumnRenderer;
|
|
40434
40722
|
exports2.StateTag = StateTag;
|
|
40435
|
-
exports2.StateTagStyle = StateTagStyle;
|
|
40436
40723
|
exports2.StatefulSetModel = StatefulSetModel;
|
|
40437
40724
|
exports2.StorageClassModel = StorageClassModel;
|
|
40438
40725
|
exports2.StorageClassProvisionerField = StorageClassProvisionerField;
|
|
40439
40726
|
exports2.StorageClassPvField = StorageClassPvField;
|
|
40440
40727
|
exports2.StorageClassPvGroup = StorageClassPvGroup;
|
|
40728
|
+
exports2.Table = Table;
|
|
40441
40729
|
exports2.Tabs = Tabs;
|
|
40442
40730
|
exports2.Tags = Tags;
|
|
40443
40731
|
exports2.TextTags = TextTags;
|
|
@@ -40451,7 +40739,6 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
40451
40739
|
exports2.WorkloadReplicas = WorkloadReplicas;
|
|
40452
40740
|
exports2.WorkloadReplicasForm = WorkloadReplicasForm;
|
|
40453
40741
|
exports2.WorkloadRestartsColumnRenderer = WorkloadRestartsColumnRenderer;
|
|
40454
|
-
exports2.WorkloadState = WorkloadState;
|
|
40455
40742
|
exports2.YamlEditorComponent = YamlEditorComponent;
|
|
40456
40743
|
exports2.YamlForm = YamlForm;
|
|
40457
40744
|
exports2.addDefaultRenderToColumns = addDefaultRenderToColumns;
|