@dovetail-v2/refine 0.1.14-alpha.4 → 0.1.14
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-2636b66c.js → MonacoYamlDiffEditor-fdc5faf9.js} +1 -1
- package/dist/{index-45c3dd0a.js → index-0a0a8e71.js} +51 -36
- package/dist/refine.js +1 -1
- package/dist/refine.umd.cjs +50 -35
- package/lib/components/EditMetadataForm/KeyValueTableForm.d.ts +1 -0
- package/lib/components/EditMetadataForm/LabelFormatPopover.d.ts +3 -1
- package/lib/utils/string.d.ts +1 -0
- package/package.json +1 -1
- package/lib/components/CronJobDropdown/index.d.ts +0 -9
- package/lib/components/K8sDropdown/index.d.ts +0 -9
- package/lib/components/PodDropdown/index.d.ts +0 -9
- package/lib/components/ReplicasDropdown/index.d.ts +0 -9
- package/lib/components/Table/TableToolBar.d.ts +0 -9
- package/lib/components/Table/TableWidgets.d.ts +0 -6
- package/lib/components/WorkloadDropdown/index.d.ts +0 -9
- package/lib/src/App.d.ts +0 -3
- package/lib/src/Dovetail.d.ts +0 -18
- package/lib/src/components/Breadcrumb/index.d.ts +0 -6
- package/lib/src/components/ConditionsTable/ConditionsTable.d.ts +0 -7
- package/lib/src/components/ConditionsTable/index.d.ts +0 -1
- package/lib/src/components/CreateButton/index.d.ts +0 -2
- package/lib/src/components/CronJobDropdown/index.d.ts +0 -9
- package/lib/src/components/CronjobJobsTable/index.d.ts +0 -8
- package/lib/src/components/DeleteButton/index.d.ts +0 -2
- package/lib/src/components/DeleteManyButton/index.d.ts +0 -4
- package/lib/src/components/DrawerShow/DrawerShow.d.ts +0 -9
- package/lib/src/components/DrawerShow/index.d.ts +0 -1
- package/lib/src/components/DurationTime/index.d.ts +0 -6
- package/lib/src/components/EditButton/index.d.ts +0 -2
- package/lib/src/components/EditField/index.d.ts +0 -15
- package/lib/src/components/ErrorContent/index.d.ts +0 -17
- package/lib/src/components/EventsTable/EventsTable.d.ts +0 -6
- package/lib/src/components/EventsTable/index.d.ts +0 -1
- package/lib/src/components/Form/FormModal.d.ts +0 -9
- package/lib/src/components/Form/RefineFormContent.d.ts +0 -12
- package/lib/src/components/Form/RefineFormPage.d.ts +0 -7
- package/lib/src/components/Form/YamlForm.d.ts +0 -29
- package/lib/src/components/Form/index.d.ts +0 -7
- package/lib/src/components/Form/type.d.ts +0 -17
- package/lib/src/components/Form/useFieldsConfig.d.ts +0 -4
- package/lib/src/components/Form/useReactHookForm.d.ts +0 -30
- package/lib/src/components/Form/useRefineForm.d.ts +0 -13
- package/lib/src/components/Form/useYamlForm.d.ts +0 -50
- package/lib/src/components/FormErrorAlert/index.d.ts +0 -9
- package/lib/src/components/FormLayout/index.d.ts +0 -7
- package/lib/src/components/FormWidgets/KeyValueListWidget.d.ts +0 -6
- package/lib/src/components/FormWidgets/MetadataForm.d.ts +0 -2
- package/lib/src/components/FormWidgets/NameInputWidget.d.ts +0 -51
- package/lib/src/components/FormWidgets/NamespaceSelectWidget.d.ts +0 -9
- package/lib/src/components/FormWidgets/index.d.ts +0 -4
- package/lib/src/components/FormWidgets/widget.d.ts +0 -5
- package/lib/src/components/ImageNames/index.d.ts +0 -5
- package/lib/src/components/IngressRulesComponent/index.d.ts +0 -5
- package/lib/src/components/IngressRulesTable/IngressRulesTable.d.ts +0 -7
- package/lib/src/components/IngressRulesTable/index.d.ts +0 -1
- package/lib/src/components/K8sDropdown/index.d.ts +0 -9
- package/lib/src/components/KeyValue/KeyValue.d.ts +0 -7
- package/lib/src/components/KeyValue/KeyValueAnnotation.d.ts +0 -6
- package/lib/src/components/KeyValue/KeyValueSecret.d.ts +0 -5
- package/lib/src/components/KeyValue/index.d.ts +0 -3
- package/lib/src/components/Layout/index.d.ts +0 -3
- package/lib/src/components/LinkFallback/index.d.ts +0 -4
- package/lib/src/components/ListPage/index.d.ts +0 -10
- package/lib/src/components/Menu/index.d.ts +0 -2
- package/lib/src/components/NamespacesFilter/index.d.ts +0 -11
- package/lib/src/components/NetworkPolicyRulesViewer/NetworkPolicyRulesViewer.d.ts +0 -8
- package/lib/src/components/NetworkPolicyRulesViewer/index.d.ts +0 -1
- package/lib/src/components/PVCDistributeStorage/index.d.ts +0 -16
- package/lib/src/components/PageShow/PageShow.d.ts +0 -12
- package/lib/src/components/PageShow/index.d.ts +0 -1
- package/lib/src/components/PodContainersTable/PodContainersTable.d.ts +0 -8
- package/lib/src/components/PodContainersTable/index.d.ts +0 -1
- package/lib/src/components/PodDropdown/index.d.ts +0 -9
- package/lib/src/components/PodLog/index.d.ts +0 -6
- package/lib/src/components/PodSelectorTable/index.d.ts +0 -6
- package/lib/src/components/PodShellModal/PodShell.d.ts +0 -18
- package/lib/src/components/PodShellModal/index.d.ts +0 -10
- package/lib/src/components/PortsTable/index.d.ts +0 -7
- package/lib/src/components/ReferenceLink/index.d.ts +0 -8
- package/lib/src/components/ReplicasDropdown/index.d.ts +0 -9
- package/lib/src/components/ResourceCRUD/ResourceCRUD.d.ts +0 -8
- package/lib/src/components/ResourceCRUD/create/index.d.ts +0 -8
- package/lib/src/components/ResourceCRUD/index.d.ts +0 -4
- package/lib/src/components/ResourceCRUD/list/index.d.ts +0 -9
- package/lib/src/components/ResourceCRUD/show/index.d.ts +0 -9
- package/lib/src/components/ResourceFiledDisplays.d.ts +0 -7
- package/lib/src/components/ResourceLink/index.d.ts +0 -8
- package/lib/src/components/ResourceSelect/index.d.ts +0 -12
- package/lib/src/components/ResourceTable/index.d.ts +0 -9
- package/lib/src/components/ResourceUsageBar/index.d.ts +0 -8
- package/lib/src/components/Separator/index.d.ts +0 -2
- package/lib/src/components/ServiceComponents/index.d.ts +0 -10
- package/lib/src/components/Shell/ShellToolbar.d.ts +0 -16
- package/lib/src/components/Shell/index.d.ts +0 -74
- package/lib/src/components/ShowContent/ShowContent.d.ts +0 -18
- package/lib/src/components/ShowContent/fields.d.ts +0 -76
- package/lib/src/components/ShowContent/groups.d.ts +0 -24
- package/lib/src/components/ShowContent/index.d.ts +0 -4
- package/lib/src/components/ShowContent/tabs.d.ts +0 -5
- package/lib/src/components/StateTag/StateTag.d.ts +0 -10
- package/lib/src/components/StateTag/index.d.ts +0 -1
- package/lib/src/components/Table/TableToolBar.d.ts +0 -8
- package/lib/src/components/Table/TableWidgets.d.ts +0 -6
- package/lib/src/components/Table/index.d.ts +0 -43
- package/lib/src/components/Tabs/index.d.ts +0 -10
- package/lib/src/components/Tags/index.d.ts +0 -6
- package/lib/src/components/TextTags/index.d.ts +0 -6
- package/lib/src/components/Time/index.d.ts +0 -8
- package/lib/src/components/ValueDisplay/index.d.ts +0 -9
- package/lib/src/components/WorkloadDropdown/index.d.ts +0 -9
- package/lib/src/components/WorkloadPodsTable/WorkloadPodsTable.d.ts +0 -9
- package/lib/src/components/WorkloadPodsTable/index.d.ts +0 -1
- package/lib/src/components/WorkloadReplicas/index.d.ts +0 -17
- package/lib/src/components/YamlEditor/MonacoYamlDiffEditor.d.ts +0 -9
- package/lib/src/components/YamlEditor/MonacoYamlEditor.d.ts +0 -19
- package/lib/src/components/YamlEditor/YamlEditorComponent.d.ts +0 -27
- package/lib/src/components/YamlEditor/index.d.ts +0 -1
- package/lib/src/components/YamlEditor/style.d.ts +0 -11
- package/lib/src/components/YamlEditor/yaml.worker.d.ts +0 -1
- package/lib/src/components/index.d.ts +0 -49
- package/lib/src/constants/auth.d.ts +0 -5
- package/lib/src/constants/index.d.ts +0 -3
- package/lib/src/constants/k8s.d.ts +0 -522
- package/lib/src/constants/state.d.ts +0 -15
- package/lib/src/contexts/component.d.ts +0 -8
- package/lib/src/contexts/configs.d.ts +0 -4
- package/lib/src/contexts/global-store.d.ts +0 -6
- package/lib/src/contexts/index.d.ts +0 -3
- package/lib/src/hooks/index.d.ts +0 -8
- package/lib/src/hooks/useDeleteModal/index.d.ts +0 -1
- package/lib/src/hooks/useDeleteModal/useDeleteManyModal.d.ts +0 -8
- package/lib/src/hooks/useDeleteModal/useDeleteModal.d.ts +0 -7
- package/lib/src/hooks/useDownloadYAML.d.ts +0 -7
- package/lib/src/hooks/useEagleTable/columns.d.ts +0 -47
- package/lib/src/hooks/useEagleTable/index.d.ts +0 -2
- package/lib/src/hooks/useEagleTable/useEagleTable.d.ts +0 -56
- package/lib/src/hooks/useEdit.d.ts +0 -4
- package/lib/src/hooks/useGlobalStore.d.ts +0 -3
- package/lib/src/hooks/useK8sYamlEditor.d.ts +0 -5
- package/lib/src/hooks/useNamespaceRefineFilter.d.ts +0 -5
- package/lib/src/hooks/useOpenForm.d.ts +0 -8
- package/lib/src/hooks/useSchema.d.ts +0 -21
- package/lib/src/hooks/useSubmitForm.d.ts +0 -14
- package/lib/src/hooks/useTableData.d.ts +0 -20
- package/lib/src/i18n.d.ts +0 -371
- package/lib/src/index.d.ts +0 -12
- package/lib/src/locales/en-US/index.d.ts +0 -175
- package/lib/src/locales/index.d.ts +0 -2
- package/lib/src/locales/zh-CN/index.d.ts +0 -193
- package/lib/src/main.d.ts +0 -3
- package/lib/src/models/cronjob-model.d.ts +0 -15
- package/lib/src/models/daemonset-model.d.ts +0 -15
- package/lib/src/models/deployment-model.d.ts +0 -13
- package/lib/src/models/event-model.d.ts +0 -7
- package/lib/src/models/index.d.ts +0 -19
- package/lib/src/models/ingress-model.d.ts +0 -20
- package/lib/src/models/job-model.d.ts +0 -20
- package/lib/src/models/network-policy-model.d.ts +0 -9
- package/lib/src/models/node-model.d.ts +0 -17
- package/lib/src/models/persistent-volume-claim.d.ts +0 -13
- package/lib/src/models/persistent-volume.d.ts +0 -13
- package/lib/src/models/pod-metrics-model.d.ts +0 -8
- package/lib/src/models/pod-model.d.ts +0 -20
- package/lib/src/models/resource-model.d.ts +0 -21
- package/lib/src/models/service-model.d.ts +0 -24
- package/lib/src/models/statefulset-model.d.ts +0 -13
- package/lib/src/models/storage-class.d.ts +0 -16
- package/lib/src/models/types/index.d.ts +0 -1
- package/lib/src/models/types/metric.d.ts +0 -25
- package/lib/src/models/workload-base-model.d.ts +0 -12
- package/lib/src/models/workload-model.d.ts +0 -18
- package/lib/src/pages/configmaps/index.d.ts +0 -4
- package/lib/src/pages/cronjobs/create/index.d.ts +0 -3
- package/lib/src/pages/cronjobs/index.d.ts +0 -3
- package/lib/src/pages/cronjobs/list/index.d.ts +0 -3
- package/lib/src/pages/cronjobs/show/index.d.ts +0 -3
- package/lib/src/pages/daemonsets/create/index.d.ts +0 -3
- package/lib/src/pages/daemonsets/index.d.ts +0 -3
- package/lib/src/pages/daemonsets/list/index.d.ts +0 -3
- package/lib/src/pages/daemonsets/show/index.d.ts +0 -3
- package/lib/src/pages/deployments/index.d.ts +0 -2
- package/lib/src/pages/deployments/list/index.d.ts +0 -3
- package/lib/src/pages/deployments/show/index.d.ts +0 -3
- package/lib/src/pages/ingresses/index.d.ts +0 -4
- package/lib/src/pages/jobs/index.d.ts +0 -4
- package/lib/src/pages/networkPolicies/index.d.ts +0 -4
- package/lib/src/pages/nodes/index.d.ts +0 -2
- package/lib/src/pages/nodes/list/index.d.ts +0 -3
- package/lib/src/pages/nodes/show/index.d.ts +0 -3
- package/lib/src/pages/persistentvolumeclaims/index.d.ts +0 -4
- package/lib/src/pages/persistentvolumes/index.d.ts +0 -4
- package/lib/src/pages/pods/create/index.d.ts +0 -3
- package/lib/src/pages/pods/index.d.ts +0 -3
- package/lib/src/pages/pods/list/index.d.ts +0 -3
- package/lib/src/pages/pods/show/index.d.ts +0 -3
- package/lib/src/pages/secrets/index.d.ts +0 -4
- package/lib/src/pages/services/index.d.ts +0 -4
- package/lib/src/pages/statefulsets/index.d.ts +0 -4
- package/lib/src/pages/storageclasses/form/index.d.ts +0 -9
- package/lib/src/pages/storageclasses/index.d.ts +0 -48
- package/lib/src/plugins/index.d.ts +0 -4
- package/lib/src/plugins/model-plugin.d.ts +0 -13
- package/lib/src/plugins/relation-plugin.d.ts +0 -26
- package/lib/src/plugins/type.d.ts +0 -8
- package/lib/src/providers/index.d.ts +0 -1
- package/lib/src/providers/router-provider/index.d.ts +0 -21
- package/lib/src/styles/button.d.ts +0 -1
- package/lib/src/styles/modal.d.ts +0 -1
- package/lib/src/types/index.d.ts +0 -1
- package/lib/src/types/resource.d.ts +0 -62
- package/lib/src/utils/addId.d.ts +0 -3
- package/lib/src/utils/download.d.ts +0 -1
- package/lib/src/utils/error.d.ts +0 -20
- package/lib/src/utils/form.d.ts +0 -3
- package/lib/src/utils/index.d.ts +0 -1
- package/lib/src/utils/k8s.d.ts +0 -3
- package/lib/src/utils/labels.d.ts +0 -9
- package/lib/src/utils/match-selector.d.ts +0 -3
- package/lib/src/utils/openapi.d.ts +0 -40
- package/lib/src/utils/schema.d.ts +0 -18
- package/lib/src/utils/selector.d.ts +0 -3
- package/lib/src/utils/shell.d.ts +0 -16
- package/lib/src/utils/storage.d.ts +0 -13
- package/lib/src/utils/string.d.ts +0 -1
- package/lib/src/utils/time.d.ts +0 -13
- package/lib/src/utils/unit.d.ts +0 -12
- package/lib/src/utils/yaml.d.ts +0 -2
- package/lib/vite.config.d.ts +0 -2
|
@@ -1472,7 +1472,7 @@ const password = "密码";
|
|
|
1472
1472
|
const username = "用户名";
|
|
1473
1473
|
const host = "主机";
|
|
1474
1474
|
const container_num = "容器数量";
|
|
1475
|
-
const edit_resource_success = "编辑{{
|
|
1475
|
+
const edit_resource_success = "编辑{{kind}} {{name}} 成功";
|
|
1476
1476
|
const redeploy_success_toast = "重新部署 {{kind}} {{name}} 成功";
|
|
1477
1477
|
const redeploy_failed_toast = "重新部署 {{kind}} {{name}} 失败";
|
|
1478
1478
|
const pause_success_toast = "暂停成功";
|
|
@@ -8375,6 +8375,9 @@ function shortenedImage(image2) {
|
|
|
8375
8375
|
function isFirstLetterEnglish(str) {
|
|
8376
8376
|
return /^[a-zA-Z]/.test(str);
|
|
8377
8377
|
}
|
|
8378
|
+
function addSpaceBeforeLetter(str) {
|
|
8379
|
+
return isFirstLetterEnglish(str) ? ` ${str}` : str;
|
|
8380
|
+
}
|
|
8378
8381
|
const useDeleteModal_mi8he5 = "";
|
|
8379
8382
|
const TextStyle = "t1vq0ett";
|
|
8380
8383
|
const TipStyle = "t139onst";
|
|
@@ -8393,7 +8396,7 @@ const useDeleteModal = (resource) => {
|
|
|
8393
8396
|
t: t2
|
|
8394
8397
|
} = useTranslation();
|
|
8395
8398
|
const displayName = config.displayName || config.kind;
|
|
8396
|
-
const resourceDisplayName =
|
|
8399
|
+
const resourceDisplayName = addSpaceBeforeLetter(displayName);
|
|
8397
8400
|
const modalProps = {
|
|
8398
8401
|
className: SmallModalStyle,
|
|
8399
8402
|
title: t2("dovetail.delete_resource", {
|
|
@@ -11408,7 +11411,7 @@ function CreateButton(props) {
|
|
|
11408
11411
|
type: "primary",
|
|
11409
11412
|
onClick: openForm,
|
|
11410
11413
|
children: t2("dovetail.create_resource", {
|
|
11411
|
-
resource:
|
|
11414
|
+
resource: addSpaceBeforeLetter(label2)
|
|
11412
11415
|
})
|
|
11413
11416
|
}
|
|
11414
11417
|
);
|
|
@@ -12181,8 +12184,7 @@ function KeyValueSecret(props) {
|
|
|
12181
12184
|
});
|
|
12182
12185
|
}
|
|
12183
12186
|
function validateLabelKey(key2) {
|
|
12184
|
-
const
|
|
12185
|
-
const labelNameRegex = /(^[a-zA-Z0-9]$)|(^[a-zA-Z0-9][a-zA-Z0-9\.\-]*[a-zA-Z0-9]$)/;
|
|
12187
|
+
const labelRegex = /(^[a-zA-Z0-9]$)|(^[a-zA-Z0-9][a-zA-Z0-9\.\-\_]*[a-zA-Z0-9]$)/;
|
|
12186
12188
|
let prefix, name2;
|
|
12187
12189
|
const splitResult = key2.split("/");
|
|
12188
12190
|
if (splitResult.length === 1) {
|
|
@@ -12194,10 +12196,10 @@ function validateLabelKey(key2) {
|
|
|
12194
12196
|
if (prefix === "") {
|
|
12195
12197
|
return { isValid: false, errorMessage: "EMPTY_PREFIX" };
|
|
12196
12198
|
}
|
|
12197
|
-
if (prefix && !
|
|
12199
|
+
if (prefix && !labelRegex.test(prefix)) {
|
|
12198
12200
|
return { isValid: false, errorMessage: "INVALID_PREFIX" };
|
|
12199
12201
|
}
|
|
12200
|
-
if (!
|
|
12202
|
+
if (!labelRegex.test(name2)) {
|
|
12201
12203
|
return { isValid: false, errorMessage: "INVALID_NAME" };
|
|
12202
12204
|
}
|
|
12203
12205
|
if (prefix && prefix.length > 253) {
|
|
@@ -12209,7 +12211,7 @@ function validateLabelKey(key2) {
|
|
|
12209
12211
|
return { isValid: true };
|
|
12210
12212
|
}
|
|
12211
12213
|
function validateLabelValue(value2) {
|
|
12212
|
-
const labelValueRegex = /(^[a-zA-Z0-9]$)|(^[a-zA-Z0-9][a-zA-Z0-9
|
|
12214
|
+
const labelValueRegex = /(^[a-zA-Z0-9]$)|(^[a-zA-Z0-9][a-zA-Z0-9\.\-\_]*[a-zA-Z0-9]$)/;
|
|
12213
12215
|
if (value2 === "") {
|
|
12214
12216
|
return { isValid: true };
|
|
12215
12217
|
}
|
|
@@ -12223,31 +12225,37 @@ function validateLabelValue(value2) {
|
|
|
12223
12225
|
}
|
|
12224
12226
|
const LabelFormatPopover_105yfzn = "";
|
|
12225
12227
|
const PodLabelFormatRulePopoverStyle = "p5jt6nm";
|
|
12226
|
-
const LabelFormatPopover = (
|
|
12228
|
+
const LabelFormatPopover = ({
|
|
12229
|
+
noValueValidation
|
|
12230
|
+
}) => {
|
|
12227
12231
|
const {
|
|
12228
12232
|
t: t2
|
|
12229
12233
|
} = useTranslation();
|
|
12234
|
+
const data2 = [{
|
|
12235
|
+
object: t2("dovetail.key"),
|
|
12236
|
+
contains: t2("dovetail.suffix"),
|
|
12237
|
+
optional: t2("dovetail.no"),
|
|
12238
|
+
rule: [t2("dovetail.suffix_format_rule_1"), t2("dovetail.suffix_format_rule_2"), t2("dovetail.suffix_format_rule_3")]
|
|
12239
|
+
}, {
|
|
12240
|
+
object: t2("dovetail.key"),
|
|
12241
|
+
contains: t2("dovetail.name"),
|
|
12242
|
+
optional: t2("dovetail.yes"),
|
|
12243
|
+
rule: [t2("dovetail.name_format_rule_1"), t2("dovetail.name_format_rule_2"), t2("dovetail.name_format_rule_3")]
|
|
12244
|
+
}];
|
|
12245
|
+
if (!noValueValidation) {
|
|
12246
|
+
data2.push({
|
|
12247
|
+
object: t2("dovetail.value"),
|
|
12248
|
+
contains: t2("dovetail.name"),
|
|
12249
|
+
optional: t2("dovetail.no"),
|
|
12250
|
+
rule: [t2("dovetail.name_format_rule_1"), t2("dovetail.name_format_rule_2"), t2("dovetail.name_format_rule_3")]
|
|
12251
|
+
});
|
|
12252
|
+
}
|
|
12230
12253
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(Popover, {
|
|
12231
12254
|
overlayClassName: PodLabelFormatRulePopoverStyle,
|
|
12232
12255
|
placement: "bottomRight",
|
|
12233
12256
|
content: /* @__PURE__ */ jsxRuntimeExports.jsx(AntdTable, {
|
|
12234
12257
|
bordered: true,
|
|
12235
|
-
dataSource:
|
|
12236
|
-
object: t2("dovetail.key"),
|
|
12237
|
-
contains: t2("dovetail.suffix"),
|
|
12238
|
-
optional: t2("dovetail.no"),
|
|
12239
|
-
rule: [t2("dovetail.suffix_format_rule_1"), t2("dovetail.suffix_format_rule_2"), t2("dovetail.suffix_format_rule_3")]
|
|
12240
|
-
}, {
|
|
12241
|
-
object: t2("dovetail.key"),
|
|
12242
|
-
contains: t2("dovetail.name"),
|
|
12243
|
-
optional: t2("dovetail.yes"),
|
|
12244
|
-
rule: [t2("dovetail.name_format_rule_1"), t2("dovetail.name_format_rule_2"), t2("dovetail.name_format_rule_3")]
|
|
12245
|
-
}, {
|
|
12246
|
-
object: t2("dovetail.value"),
|
|
12247
|
-
contains: t2("dovetail.name"),
|
|
12248
|
-
optional: t2("dovetail.no"),
|
|
12249
|
-
rule: [t2("dovetail.name_format_rule_1"), t2("dovetail.name_format_rule_2"), t2("dovetail.name_format_rule_3")]
|
|
12250
|
-
}],
|
|
12258
|
+
dataSource: data2,
|
|
12251
12259
|
columns: [{
|
|
12252
12260
|
key: "object",
|
|
12253
12261
|
title: t2("dovetail.object"),
|
|
@@ -12299,7 +12307,8 @@ function _KeyValueTableFormForm(props, ref) {
|
|
|
12299
12307
|
defaultValue,
|
|
12300
12308
|
onSubmit,
|
|
12301
12309
|
extraColumns,
|
|
12302
|
-
addButtonText
|
|
12310
|
+
addButtonText,
|
|
12311
|
+
noValueValidation
|
|
12303
12312
|
} = props;
|
|
12304
12313
|
const {
|
|
12305
12314
|
t: t2
|
|
@@ -12369,6 +12378,8 @@ function _KeyValueTableFormForm(props, ref) {
|
|
|
12369
12378
|
validator: ({
|
|
12370
12379
|
value: value22
|
|
12371
12380
|
}) => {
|
|
12381
|
+
if (noValueValidation)
|
|
12382
|
+
return;
|
|
12372
12383
|
const {
|
|
12373
12384
|
isValid
|
|
12374
12385
|
} = validateLabelValue(value22 || "");
|
|
@@ -12387,7 +12398,9 @@ function _KeyValueTableFormForm(props, ref) {
|
|
|
12387
12398
|
row: {
|
|
12388
12399
|
deletable: true
|
|
12389
12400
|
}
|
|
12390
|
-
}), /* @__PURE__ */ jsxRuntimeExports.jsx(LabelFormatPopover, {
|
|
12401
|
+
}), /* @__PURE__ */ jsxRuntimeExports.jsx(LabelFormatPopover, {
|
|
12402
|
+
noValueValidation
|
|
12403
|
+
})]
|
|
12391
12404
|
});
|
|
12392
12405
|
}
|
|
12393
12406
|
const KeyValueTableFormForm = React__default.forwardRef(_KeyValueTableFormForm);
|
|
@@ -12640,7 +12653,7 @@ function Table(props) {
|
|
|
12640
12653
|
const { Table: TableComponent } = useContext(ComponentContext);
|
|
12641
12654
|
const Table2 = TableComponent || Table$1;
|
|
12642
12655
|
const { i18n: i18n2 } = useTranslation();
|
|
12643
|
-
const resourceType =
|
|
12656
|
+
const resourceType = addSpaceBeforeLetter(displayName);
|
|
12644
12657
|
if (!((_a = tableProps.data) == null ? void 0 : _a.length) && !tableProps.loading) {
|
|
12645
12658
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
12646
12659
|
WidgetErrorContent,
|
|
@@ -12737,6 +12750,9 @@ const WorkloadPodsTable = ({
|
|
|
12737
12750
|
}
|
|
12738
12751
|
}
|
|
12739
12752
|
});
|
|
12753
|
+
if (tableProps.loading) {
|
|
12754
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Loading, {});
|
|
12755
|
+
}
|
|
12740
12756
|
if (((_a = tableProps.data) == null ? void 0 : _a.length) === 0) {
|
|
12741
12757
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent, {
|
|
12742
12758
|
errorText: i18n2.t("dovetail.no_resource", {
|
|
@@ -33154,7 +33170,7 @@ const Shell = React__default.forwardRef(function Shell2(props, ref) {
|
|
|
33154
33170
|
});
|
|
33155
33171
|
}
|
|
33156
33172
|
}, [encode, send, props.fit]);
|
|
33157
|
-
const debouncedFit =
|
|
33173
|
+
const debouncedFit = useMemo(() => debounce(fit, 200), [fit]);
|
|
33158
33174
|
const flush = useCallback(() => {
|
|
33159
33175
|
const backlog = backlogRef.current.slice();
|
|
33160
33176
|
backlogRef.current = [];
|
|
@@ -38340,14 +38356,12 @@ const useRefineForm = (props) => {
|
|
|
38340
38356
|
errorNotification: false,
|
|
38341
38357
|
successNotification: () => {
|
|
38342
38358
|
const formValue = result.getValues();
|
|
38343
|
-
const resource = config.displayName || config.kind;
|
|
38344
38359
|
return {
|
|
38345
38360
|
message: i18n2.t(
|
|
38346
38361
|
id ? "dovetail.edit_resource_success" : "dovetail.create_success_toast",
|
|
38347
38362
|
{
|
|
38348
|
-
kind:
|
|
38363
|
+
kind: addSpaceBeforeLetter(config.displayName || config.kind),
|
|
38349
38364
|
name: formValue.metadata.name,
|
|
38350
|
-
resource: isFirstLetterEnglish(resource) ? ` ${resource}` : resource,
|
|
38351
38365
|
interpolation: { escapeValue: false }
|
|
38352
38366
|
}
|
|
38353
38367
|
).trim(),
|
|
@@ -38386,7 +38400,7 @@ const Separator = () => {
|
|
|
38386
38400
|
});
|
|
38387
38401
|
};
|
|
38388
38402
|
const MonacoYamlEditor = React__default.lazy(() => Promise.resolve().then(() => MonacoYamlEditor$2));
|
|
38389
|
-
const MonacoYamlDiffEditor = React__default.lazy(() => import("./MonacoYamlDiffEditor-
|
|
38403
|
+
const MonacoYamlDiffEditor = React__default.lazy(() => import("./MonacoYamlDiffEditor-fdc5faf9.js"));
|
|
38390
38404
|
const YamlEditorComponent = forwardRef(
|
|
38391
38405
|
function YamlEditorComponent2(props, ref) {
|
|
38392
38406
|
const {
|
|
@@ -39028,7 +39042,7 @@ function YamlForm(props) {
|
|
|
39028
39042
|
const displayName = config.displayName || ((_a = resource == null ? void 0 : resource.meta) == null ? void 0 : _a.kind);
|
|
39029
39043
|
return {
|
|
39030
39044
|
message: i18n2.t(action === "create" ? "dovetail.create_success_toast" : "dovetail.save_yaml_success_toast", {
|
|
39031
|
-
kind:
|
|
39045
|
+
kind: addSpaceBeforeLetter(displayName),
|
|
39032
39046
|
name: data2 == null ? void 0 : data2.data.id,
|
|
39033
39047
|
interpolation: {
|
|
39034
39048
|
escapeValue: false
|
|
@@ -39270,7 +39284,7 @@ function FormModal(props) {
|
|
|
39270
39284
|
}
|
|
39271
39285
|
const label2 = config.displayName || (config == null ? void 0 : config.kind);
|
|
39272
39286
|
return i18n2.t(id ? "dovetail.edit_resource" : "dovetail.create_resource", {
|
|
39273
|
-
resource:
|
|
39287
|
+
resource: addSpaceBeforeLetter(label2)
|
|
39274
39288
|
});
|
|
39275
39289
|
}, [action, config.formConfig, config.displayName, config == null ? void 0 : config.kind, i18n2, id]);
|
|
39276
39290
|
const desc = useMemo(() => {
|
|
@@ -39595,7 +39609,8 @@ const EditAnnotationForm = React__default.forwardRef(function EditAnnotationForm
|
|
|
39595
39609
|
ref,
|
|
39596
39610
|
defaultValue,
|
|
39597
39611
|
onSubmit,
|
|
39598
|
-
addButtonText: t2("dovetail.add_annotation")
|
|
39612
|
+
addButtonText: t2("dovetail.add_annotation"),
|
|
39613
|
+
noValueValidation: true
|
|
39599
39614
|
}
|
|
39600
39615
|
);
|
|
39601
39616
|
});
|
package/dist/refine.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { bN, cC, A, aW, aY, aF, ca, bk, a1, co, cc, aQ, T, C, i, cG, aI, bp, ac, cI, ai, ap, cR, ax, cd, cb, cU, aM, bw, w, aD, bD, cT, cD, bG, D, b1, as, bJ, ar, at, a0, c9, c8, cS, bi, aU, ad, bQ, cF, cH, cm, aG, aj, s, q, cJ, I, bt, aT, t, M, be, bg, ce, cL, aL, bs, aq, ay, az, a8, aA, aX, aE, bE, bH, a9, d2, cn, cx, bM, N, a2, e, aV, a6, bP, by, bx, cK, b$, cZ, g, cY, aJ, bq, cg, L, ba, bb, bo, H, bc, J, bd, B, b5, cA, z, b4, G, b8, E, b6, F, b7, K, c0, b9, cz, aa, d0, c$, P, bm, v, ae, ah, b_, bj, cP, cO, a$, bu, c6, c5, p, aK, bl, x, bv, b0, d1, y, cq, cE, bK, bR, bS, d4, aH, R, ag, an, am, bL, ak, cQ, c2, al, cB, c7, bh, bA, au, h, Q, O, bf, ct, cw, cs, cr, cu, cv, cp, ch, ck, cl, cj, ci, cf, cy, bT, aN, br, aB, m, bW, l, aZ, cX, o, bX, a_, n, aS, bn, k, cW, aP, aR, c4, bC, bB, c3, aO, S, bF, cV, c_, b2, b3, bz, bI, c1, bY, bZ, ab, $, cN, af, W, cM, ao, aw, av, f, aC, bU, U, a3, d, d7, d6, d9, d3, a7, da, d5, d8, a5, a4, r, a, c, X, V, Y, Z, u, bO, _, bV, b } from "./index-
|
|
1
|
+
import { bN, cC, A, aW, aY, aF, ca, bk, a1, co, cc, aQ, T, C, i, cG, aI, bp, ac, cI, ai, ap, cR, ax, cd, cb, cU, aM, bw, w, aD, bD, cT, cD, bG, D, b1, as, bJ, ar, at, a0, c9, c8, cS, bi, aU, ad, bQ, cF, cH, cm, aG, aj, s, q, cJ, I, bt, aT, t, M, be, bg, ce, cL, aL, bs, aq, ay, az, a8, aA, aX, aE, bE, bH, a9, d2, cn, cx, bM, N, a2, e, aV, a6, bP, by, bx, cK, b$, cZ, g, cY, aJ, bq, cg, L, ba, bb, bo, H, bc, J, bd, B, b5, cA, z, b4, G, b8, E, b6, F, b7, K, c0, b9, cz, aa, d0, c$, P, bm, v, ae, ah, b_, bj, cP, cO, a$, bu, c6, c5, p, aK, bl, x, bv, b0, d1, y, cq, cE, bK, bR, bS, d4, aH, R, ag, an, am, bL, ak, cQ, c2, al, cB, c7, bh, bA, au, h, Q, O, bf, ct, cw, cs, cr, cu, cv, cp, ch, ck, cl, cj, ci, cf, cy, bT, aN, br, aB, m, bW, l, aZ, cX, o, bX, a_, n, aS, bn, k, cW, aP, aR, c4, bC, bB, c3, aO, S, bF, cV, c_, b2, b3, bz, bI, c1, bY, bZ, ab, $, cN, af, W, cM, ao, aw, av, f, aC, bU, U, a3, d, d7, d6, d9, d3, a7, da, d5, d8, a5, a4, r, a, c, X, V, Y, Z, u, bO, _, bV, b } from "./index-0a0a8e71.js";
|
|
2
2
|
import "@cloudtower/eagle";
|
|
3
3
|
import "@refinedev/core";
|
|
4
4
|
import "react";
|
package/dist/refine.umd.cjs
CHANGED
|
@@ -1478,7 +1478,7 @@ var __publicField = (obj, key, value) => {
|
|
|
1478
1478
|
const username = "用户名";
|
|
1479
1479
|
const host = "主机";
|
|
1480
1480
|
const container_num = "容器数量";
|
|
1481
|
-
const edit_resource_success = "编辑{{
|
|
1481
|
+
const edit_resource_success = "编辑{{kind}} {{name}} 成功";
|
|
1482
1482
|
const redeploy_success_toast = "重新部署 {{kind}} {{name}} 成功";
|
|
1483
1483
|
const redeploy_failed_toast = "重新部署 {{kind}} {{name}} 失败";
|
|
1484
1484
|
const pause_success_toast = "暂停成功";
|
|
@@ -8381,6 +8381,9 @@ var __publicField = (obj, key, value) => {
|
|
|
8381
8381
|
function isFirstLetterEnglish(str) {
|
|
8382
8382
|
return /^[a-zA-Z]/.test(str);
|
|
8383
8383
|
}
|
|
8384
|
+
function addSpaceBeforeLetter(str) {
|
|
8385
|
+
return isFirstLetterEnglish(str) ? ` ${str}` : str;
|
|
8386
|
+
}
|
|
8384
8387
|
const useDeleteModal_mi8he5 = "";
|
|
8385
8388
|
const TextStyle = "t1vq0ett";
|
|
8386
8389
|
const TipStyle = "t139onst";
|
|
@@ -8399,7 +8402,7 @@ var __publicField = (obj, key, value) => {
|
|
|
8399
8402
|
t: t2
|
|
8400
8403
|
} = useTranslation();
|
|
8401
8404
|
const displayName = config.displayName || config.kind;
|
|
8402
|
-
const resourceDisplayName =
|
|
8405
|
+
const resourceDisplayName = addSpaceBeforeLetter(displayName);
|
|
8403
8406
|
const modalProps = {
|
|
8404
8407
|
className: SmallModalStyle,
|
|
8405
8408
|
title: t2("dovetail.delete_resource", {
|
|
@@ -11414,7 +11417,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11414
11417
|
type: "primary",
|
|
11415
11418
|
onClick: openForm,
|
|
11416
11419
|
children: t2("dovetail.create_resource", {
|
|
11417
|
-
resource:
|
|
11420
|
+
resource: addSpaceBeforeLetter(label2)
|
|
11418
11421
|
})
|
|
11419
11422
|
}
|
|
11420
11423
|
);
|
|
@@ -12187,8 +12190,7 @@ var __publicField = (obj, key, value) => {
|
|
|
12187
12190
|
});
|
|
12188
12191
|
}
|
|
12189
12192
|
function validateLabelKey(key2) {
|
|
12190
|
-
const
|
|
12191
|
-
const labelNameRegex = /(^[a-zA-Z0-9]$)|(^[a-zA-Z0-9][a-zA-Z0-9\.\-]*[a-zA-Z0-9]$)/;
|
|
12193
|
+
const labelRegex = /(^[a-zA-Z0-9]$)|(^[a-zA-Z0-9][a-zA-Z0-9\.\-\_]*[a-zA-Z0-9]$)/;
|
|
12192
12194
|
let prefix, name2;
|
|
12193
12195
|
const splitResult = key2.split("/");
|
|
12194
12196
|
if (splitResult.length === 1) {
|
|
@@ -12200,10 +12202,10 @@ var __publicField = (obj, key, value) => {
|
|
|
12200
12202
|
if (prefix === "") {
|
|
12201
12203
|
return { isValid: false, errorMessage: "EMPTY_PREFIX" };
|
|
12202
12204
|
}
|
|
12203
|
-
if (prefix && !
|
|
12205
|
+
if (prefix && !labelRegex.test(prefix)) {
|
|
12204
12206
|
return { isValid: false, errorMessage: "INVALID_PREFIX" };
|
|
12205
12207
|
}
|
|
12206
|
-
if (!
|
|
12208
|
+
if (!labelRegex.test(name2)) {
|
|
12207
12209
|
return { isValid: false, errorMessage: "INVALID_NAME" };
|
|
12208
12210
|
}
|
|
12209
12211
|
if (prefix && prefix.length > 253) {
|
|
@@ -12215,7 +12217,7 @@ var __publicField = (obj, key, value) => {
|
|
|
12215
12217
|
return { isValid: true };
|
|
12216
12218
|
}
|
|
12217
12219
|
function validateLabelValue(value2) {
|
|
12218
|
-
const labelValueRegex = /(^[a-zA-Z0-9]$)|(^[a-zA-Z0-9][a-zA-Z0-9
|
|
12220
|
+
const labelValueRegex = /(^[a-zA-Z0-9]$)|(^[a-zA-Z0-9][a-zA-Z0-9\.\-\_]*[a-zA-Z0-9]$)/;
|
|
12219
12221
|
if (value2 === "") {
|
|
12220
12222
|
return { isValid: true };
|
|
12221
12223
|
}
|
|
@@ -12229,31 +12231,37 @@ var __publicField = (obj, key, value) => {
|
|
|
12229
12231
|
}
|
|
12230
12232
|
const LabelFormatPopover_105yfzn = "";
|
|
12231
12233
|
const PodLabelFormatRulePopoverStyle = "p5jt6nm";
|
|
12232
|
-
const LabelFormatPopover = (
|
|
12234
|
+
const LabelFormatPopover = ({
|
|
12235
|
+
noValueValidation
|
|
12236
|
+
}) => {
|
|
12233
12237
|
const {
|
|
12234
12238
|
t: t2
|
|
12235
12239
|
} = useTranslation();
|
|
12240
|
+
const data2 = [{
|
|
12241
|
+
object: t2("dovetail.key"),
|
|
12242
|
+
contains: t2("dovetail.suffix"),
|
|
12243
|
+
optional: t2("dovetail.no"),
|
|
12244
|
+
rule: [t2("dovetail.suffix_format_rule_1"), t2("dovetail.suffix_format_rule_2"), t2("dovetail.suffix_format_rule_3")]
|
|
12245
|
+
}, {
|
|
12246
|
+
object: t2("dovetail.key"),
|
|
12247
|
+
contains: t2("dovetail.name"),
|
|
12248
|
+
optional: t2("dovetail.yes"),
|
|
12249
|
+
rule: [t2("dovetail.name_format_rule_1"), t2("dovetail.name_format_rule_2"), t2("dovetail.name_format_rule_3")]
|
|
12250
|
+
}];
|
|
12251
|
+
if (!noValueValidation) {
|
|
12252
|
+
data2.push({
|
|
12253
|
+
object: t2("dovetail.value"),
|
|
12254
|
+
contains: t2("dovetail.name"),
|
|
12255
|
+
optional: t2("dovetail.no"),
|
|
12256
|
+
rule: [t2("dovetail.name_format_rule_1"), t2("dovetail.name_format_rule_2"), t2("dovetail.name_format_rule_3")]
|
|
12257
|
+
});
|
|
12258
|
+
}
|
|
12236
12259
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Popover, {
|
|
12237
12260
|
overlayClassName: PodLabelFormatRulePopoverStyle,
|
|
12238
12261
|
placement: "bottomRight",
|
|
12239
12262
|
content: /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.AntdTable, {
|
|
12240
12263
|
bordered: true,
|
|
12241
|
-
dataSource:
|
|
12242
|
-
object: t2("dovetail.key"),
|
|
12243
|
-
contains: t2("dovetail.suffix"),
|
|
12244
|
-
optional: t2("dovetail.no"),
|
|
12245
|
-
rule: [t2("dovetail.suffix_format_rule_1"), t2("dovetail.suffix_format_rule_2"), t2("dovetail.suffix_format_rule_3")]
|
|
12246
|
-
}, {
|
|
12247
|
-
object: t2("dovetail.key"),
|
|
12248
|
-
contains: t2("dovetail.name"),
|
|
12249
|
-
optional: t2("dovetail.yes"),
|
|
12250
|
-
rule: [t2("dovetail.name_format_rule_1"), t2("dovetail.name_format_rule_2"), t2("dovetail.name_format_rule_3")]
|
|
12251
|
-
}, {
|
|
12252
|
-
object: t2("dovetail.value"),
|
|
12253
|
-
contains: t2("dovetail.name"),
|
|
12254
|
-
optional: t2("dovetail.no"),
|
|
12255
|
-
rule: [t2("dovetail.name_format_rule_1"), t2("dovetail.name_format_rule_2"), t2("dovetail.name_format_rule_3")]
|
|
12256
|
-
}],
|
|
12264
|
+
dataSource: data2,
|
|
12257
12265
|
columns: [{
|
|
12258
12266
|
key: "object",
|
|
12259
12267
|
title: t2("dovetail.object"),
|
|
@@ -12305,7 +12313,8 @@ var __publicField = (obj, key, value) => {
|
|
|
12305
12313
|
defaultValue,
|
|
12306
12314
|
onSubmit,
|
|
12307
12315
|
extraColumns,
|
|
12308
|
-
addButtonText
|
|
12316
|
+
addButtonText,
|
|
12317
|
+
noValueValidation
|
|
12309
12318
|
} = props;
|
|
12310
12319
|
const {
|
|
12311
12320
|
t: t2
|
|
@@ -12375,6 +12384,8 @@ var __publicField = (obj, key, value) => {
|
|
|
12375
12384
|
validator: ({
|
|
12376
12385
|
value: value22
|
|
12377
12386
|
}) => {
|
|
12387
|
+
if (noValueValidation)
|
|
12388
|
+
return;
|
|
12378
12389
|
const {
|
|
12379
12390
|
isValid
|
|
12380
12391
|
} = validateLabelValue(value22 || "");
|
|
@@ -12393,7 +12404,9 @@ var __publicField = (obj, key, value) => {
|
|
|
12393
12404
|
row: {
|
|
12394
12405
|
deletable: true
|
|
12395
12406
|
}
|
|
12396
|
-
}), /* @__PURE__ */ jsxRuntimeExports.jsx(LabelFormatPopover, {
|
|
12407
|
+
}), /* @__PURE__ */ jsxRuntimeExports.jsx(LabelFormatPopover, {
|
|
12408
|
+
noValueValidation
|
|
12409
|
+
})]
|
|
12397
12410
|
});
|
|
12398
12411
|
}
|
|
12399
12412
|
const KeyValueTableFormForm = React.forwardRef(_KeyValueTableFormForm);
|
|
@@ -12646,7 +12659,7 @@ var __publicField = (obj, key, value) => {
|
|
|
12646
12659
|
const { Table: TableComponent } = React.useContext(ComponentContext);
|
|
12647
12660
|
const Table2 = TableComponent || Table$1;
|
|
12648
12661
|
const { i18n: i18n2 } = useTranslation();
|
|
12649
|
-
const resourceType =
|
|
12662
|
+
const resourceType = addSpaceBeforeLetter(displayName);
|
|
12650
12663
|
if (!((_a = tableProps.data) == null ? void 0 : _a.length) && !tableProps.loading) {
|
|
12651
12664
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
12652
12665
|
WidgetErrorContent,
|
|
@@ -12743,6 +12756,9 @@ var __publicField = (obj, key, value) => {
|
|
|
12743
12756
|
}
|
|
12744
12757
|
}
|
|
12745
12758
|
});
|
|
12759
|
+
if (tableProps.loading) {
|
|
12760
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Loading, {});
|
|
12761
|
+
}
|
|
12746
12762
|
if (((_a = tableProps.data) == null ? void 0 : _a.length) === 0) {
|
|
12747
12763
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent, {
|
|
12748
12764
|
errorText: i18n2.t("dovetail.no_resource", {
|
|
@@ -33160,7 +33176,7 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
33160
33176
|
});
|
|
33161
33177
|
}
|
|
33162
33178
|
}, [encode, send, props.fit]);
|
|
33163
|
-
const debouncedFit = React.
|
|
33179
|
+
const debouncedFit = React.useMemo(() => lodashEs.debounce(fit, 200), [fit]);
|
|
33164
33180
|
const flush = React.useCallback(() => {
|
|
33165
33181
|
const backlog = backlogRef.current.slice();
|
|
33166
33182
|
backlogRef.current = [];
|
|
@@ -38346,14 +38362,12 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
38346
38362
|
errorNotification: false,
|
|
38347
38363
|
successNotification: () => {
|
|
38348
38364
|
const formValue = result.getValues();
|
|
38349
|
-
const resource = config.displayName || config.kind;
|
|
38350
38365
|
return {
|
|
38351
38366
|
message: i18n2.t(
|
|
38352
38367
|
id ? "dovetail.edit_resource_success" : "dovetail.create_success_toast",
|
|
38353
38368
|
{
|
|
38354
|
-
kind:
|
|
38369
|
+
kind: addSpaceBeforeLetter(config.displayName || config.kind),
|
|
38355
38370
|
name: formValue.metadata.name,
|
|
38356
|
-
resource: isFirstLetterEnglish(resource) ? ` ${resource}` : resource,
|
|
38357
38371
|
interpolation: { escapeValue: false }
|
|
38358
38372
|
}
|
|
38359
38373
|
).trim(),
|
|
@@ -39034,7 +39048,7 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
39034
39048
|
const displayName = config.displayName || ((_a = resource == null ? void 0 : resource.meta) == null ? void 0 : _a.kind);
|
|
39035
39049
|
return {
|
|
39036
39050
|
message: i18n2.t(action === "create" ? "dovetail.create_success_toast" : "dovetail.save_yaml_success_toast", {
|
|
39037
|
-
kind:
|
|
39051
|
+
kind: addSpaceBeforeLetter(displayName),
|
|
39038
39052
|
name: data2 == null ? void 0 : data2.data.id,
|
|
39039
39053
|
interpolation: {
|
|
39040
39054
|
escapeValue: false
|
|
@@ -39276,7 +39290,7 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
39276
39290
|
}
|
|
39277
39291
|
const label2 = config.displayName || (config == null ? void 0 : config.kind);
|
|
39278
39292
|
return i18n2.t(id ? "dovetail.edit_resource" : "dovetail.create_resource", {
|
|
39279
|
-
resource:
|
|
39293
|
+
resource: addSpaceBeforeLetter(label2)
|
|
39280
39294
|
});
|
|
39281
39295
|
}, [action, config.formConfig, config.displayName, config == null ? void 0 : config.kind, i18n2, id]);
|
|
39282
39296
|
const desc = React.useMemo(() => {
|
|
@@ -39601,7 +39615,8 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
39601
39615
|
ref,
|
|
39602
39616
|
defaultValue,
|
|
39603
39617
|
onSubmit,
|
|
39604
|
-
addButtonText: t2("dovetail.add_annotation")
|
|
39618
|
+
addButtonText: t2("dovetail.add_annotation"),
|
|
39619
|
+
noValueValidation: true
|
|
39605
39620
|
}
|
|
39606
39621
|
);
|
|
39607
39622
|
});
|
|
@@ -10,6 +10,7 @@ interface KeyValueTableFormFormProps<T extends KeyValuePair> {
|
|
|
10
10
|
onSubmit: (value: T[]) => Promise<unknown> | undefined;
|
|
11
11
|
extraColumns?: TableFormColumn[];
|
|
12
12
|
addButtonText?: string;
|
|
13
|
+
noValueValidation?: boolean;
|
|
13
14
|
}
|
|
14
15
|
export declare const KeyValueTableFormForm: React.ForwardRefExoticComponent<KeyValueTableFormFormProps<KeyValuePair> & React.RefAttributes<EditFieldFormHandler>>;
|
|
15
16
|
export {};
|
package/lib/utils/string.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { CronJobModel } from '../../models';
|
|
3
|
-
import { DropdownSize } from '../K8sDropdown';
|
|
4
|
-
type Props<Model extends CronJobModel> = {
|
|
5
|
-
record: Model;
|
|
6
|
-
size?: DropdownSize;
|
|
7
|
-
};
|
|
8
|
-
export declare function CronJobDropdown<Model extends CronJobModel>(props: Props<Model>): JSX.Element;
|
|
9
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ResourceModel } from '../../models';
|
|
3
|
-
export type DropdownSize = 'normal' | 'large';
|
|
4
|
-
interface K8sDropdownProps {
|
|
5
|
-
record: ResourceModel;
|
|
6
|
-
size?: DropdownSize;
|
|
7
|
-
}
|
|
8
|
-
export declare function K8sDropdown(props: React.PropsWithChildren<K8sDropdownProps>): JSX.Element;
|
|
9
|
-
export default K8sDropdown;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { PodModel } from '../../models';
|
|
3
|
-
import { DropdownSize } from '../K8sDropdown';
|
|
4
|
-
type Props<Model extends PodModel> = {
|
|
5
|
-
record: Model;
|
|
6
|
-
size?: DropdownSize;
|
|
7
|
-
};
|
|
8
|
-
export declare function PodDropdown<Model extends PodModel>(props: React.PropsWithChildren<Props<Model>>): JSX.Element;
|
|
9
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { WorkloadModel } from '../../models';
|
|
3
|
-
import { DropdownSize } from '../K8sDropdown';
|
|
4
|
-
type Props<Model extends WorkloadModel> = {
|
|
5
|
-
record: Model;
|
|
6
|
-
size?: DropdownSize;
|
|
7
|
-
};
|
|
8
|
-
export declare function ReplicasDropdown<Model extends WorkloadModel>(props: React.PropsWithChildren<Props<Model>>): JSX.Element;
|
|
9
|
-
export {};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export declare const ColumnTitle: React.FC<{
|
|
3
|
-
sortOrder?: 'descend' | 'ascend' | null;
|
|
4
|
-
title: React.ReactNode;
|
|
5
|
-
}>;
|
|
6
|
-
export declare const AuxiliaryLine: import("@linaria/react").StyledComponent<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { WorkloadModel } from '../../models';
|
|
3
|
-
import { DropdownSize } from '../K8sDropdown';
|
|
4
|
-
type Props<Model extends WorkloadModel> = {
|
|
5
|
-
record: Model;
|
|
6
|
-
size?: DropdownSize;
|
|
7
|
-
};
|
|
8
|
-
export declare function WorkloadDropdown<Model extends WorkloadModel>(props: React.PropsWithChildren<Props<Model>>): JSX.Element;
|
|
9
|
-
export {};
|
package/lib/src/App.d.ts
DELETED
package/lib/src/Dovetail.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { AccessControlProvider } from '@refinedev/core';
|
|
2
|
-
import { History } from 'history';
|
|
3
|
-
import { GlobalStore } from 'k8s-api-provider';
|
|
4
|
-
import React from 'react';
|
|
5
|
-
import { ResourceConfig } from './types';
|
|
6
|
-
import './styles.css';
|
|
7
|
-
type Props = {
|
|
8
|
-
resourcesConfig: ResourceConfig[];
|
|
9
|
-
useHashUrl?: boolean;
|
|
10
|
-
urlPrefix?: string;
|
|
11
|
-
Layout?: React.FC<unknown>;
|
|
12
|
-
history: History;
|
|
13
|
-
globalStore: GlobalStore;
|
|
14
|
-
accessControlProvider?: AccessControlProvider;
|
|
15
|
-
routerProvider?: any;
|
|
16
|
-
};
|
|
17
|
-
export declare const Dovetail: React.FC<Props>;
|
|
18
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './ConditionsTable';
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { CronJobModel } from '../../models';
|
|
3
|
-
import { DropdownSize } from '../K8sDropdown';
|
|
4
|
-
type Props<Model extends CronJobModel> = {
|
|
5
|
-
record: Model;
|
|
6
|
-
size?: DropdownSize;
|
|
7
|
-
};
|
|
8
|
-
export declare function CronJobDropdown<Model extends CronJobModel>(props: Props<Model>): JSX.Element;
|
|
9
|
-
export {};
|