@dovetail-v2/refine 0.1.14 → 0.1.15-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{MonacoYamlDiffEditor-fdc5faf9.js → MonacoYamlDiffEditor-440e4624.js} +1 -1
- package/dist/{index-0a0a8e71.js → index-0e3c2558.js} +40 -47
- package/dist/refine.js +1 -1
- package/dist/refine.umd.cjs +39 -46
- package/lib/components/EditMetadataForm/KeyValueTableForm.d.ts +0 -1
- package/lib/components/EditMetadataForm/LabelFormatPopover.d.ts +1 -3
- package/lib/components/ShowContent/fields.d.ts +0 -1
- package/lib/constants/k8s.d.ts +1 -0
- package/lib/types/resource.d.ts +1 -0
- package/package.json +1 -1
|
@@ -10243,7 +10243,7 @@ const STORAGE_CLASS_INIT_VALUE = {
|
|
|
10243
10243
|
"csi.storage.k8s.io/fstype": "ext4"
|
|
10244
10244
|
},
|
|
10245
10245
|
"provisioner": "",
|
|
10246
|
-
"reclaimPolicy": "",
|
|
10246
|
+
"reclaimPolicy": "Delete",
|
|
10247
10247
|
"allowVolumeExpansion": true,
|
|
10248
10248
|
"volumeBindingMode": "Immediate"
|
|
10249
10249
|
};
|
|
@@ -10275,10 +10275,11 @@ const PVC_INIT_VALUE = {
|
|
|
10275
10275
|
"accessModes": [],
|
|
10276
10276
|
"resources": {
|
|
10277
10277
|
"requests": {
|
|
10278
|
-
"storage": "
|
|
10278
|
+
"storage": "10Gi"
|
|
10279
10279
|
}
|
|
10280
10280
|
},
|
|
10281
|
-
"storageClassName": ""
|
|
10281
|
+
"storageClassName": "",
|
|
10282
|
+
"volumeMode": "Filesystem"
|
|
10282
10283
|
}
|
|
10283
10284
|
};
|
|
10284
10285
|
var ResourceState = /* @__PURE__ */ ((ResourceState2) => {
|
|
@@ -11252,7 +11253,7 @@ function K8sDropdown(props) {
|
|
|
11252
11253
|
Dropdown,
|
|
11253
11254
|
{
|
|
11254
11255
|
overlay: /* @__PURE__ */ jsxRuntimeExports.jsxs(Menu$1, { children: [
|
|
11255
|
-
isInShowPage || (canEditData == null ? void 0 : canEditData.can) === false ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(Menu$1.Item, { onClick: openForm, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Icon$1, { src: EditPen16PrimaryIcon, children: ((_a = config.formConfig) == null ? void 0 : _a.fields) ? t2("dovetail.edit") : t2("dovetail.edit_yaml") }) }),
|
|
11256
|
+
isInShowPage || (canEditData == null ? void 0 : canEditData.can) === false || config.hideEdit ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(Menu$1.Item, { onClick: openForm, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Icon$1, { src: EditPen16PrimaryIcon, children: ((_a = config.formConfig) == null ? void 0 : _a.fields) ? t2("dovetail.edit") : t2("dovetail.edit_yaml") }) }),
|
|
11256
11257
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11257
11258
|
Menu$1.Item,
|
|
11258
11259
|
{
|
|
@@ -12087,7 +12088,7 @@ const ShowContent = (props) => {
|
|
|
12087
12088
|
resourceKind: (_d = resource == null ? void 0 : resource.meta) == null ? void 0 : _d.kind
|
|
12088
12089
|
}) : void 0]
|
|
12089
12090
|
}), /* @__PURE__ */ jsxRuntimeExports.jsxs(Space, {
|
|
12090
|
-
children: [(_e = showConfig.renderExtraButton) == null ? void 0 : _e.call(showConfig, record), !
|
|
12091
|
+
children: [(_e = showConfig.renderExtraButton) == null ? void 0 : _e.call(showConfig, record), !config.hideEdit ? /* @__PURE__ */ jsxRuntimeExports.jsx(CanAccess, {
|
|
12091
12092
|
resource: resource == null ? void 0 : resource.name,
|
|
12092
12093
|
action: AccessControlAuth.Edit,
|
|
12093
12094
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Button, {
|
|
@@ -12184,7 +12185,8 @@ function KeyValueSecret(props) {
|
|
|
12184
12185
|
});
|
|
12185
12186
|
}
|
|
12186
12187
|
function validateLabelKey(key2) {
|
|
12187
|
-
const
|
|
12188
|
+
const labelPrefixRegex = /(^[a-zA-Z0-9]$)|(^[a-zA-Z0-9][a-zA-Z0-9\.]*[a-zA-Z0-9]$)/;
|
|
12189
|
+
const labelNameRegex = /(^[a-zA-Z0-9]$)|(^[a-zA-Z0-9][a-zA-Z0-9\.\-]*[a-zA-Z0-9]$)/;
|
|
12188
12190
|
let prefix, name2;
|
|
12189
12191
|
const splitResult = key2.split("/");
|
|
12190
12192
|
if (splitResult.length === 1) {
|
|
@@ -12196,10 +12198,10 @@ function validateLabelKey(key2) {
|
|
|
12196
12198
|
if (prefix === "") {
|
|
12197
12199
|
return { isValid: false, errorMessage: "EMPTY_PREFIX" };
|
|
12198
12200
|
}
|
|
12199
|
-
if (prefix && !
|
|
12201
|
+
if (prefix && !labelPrefixRegex.test(prefix)) {
|
|
12200
12202
|
return { isValid: false, errorMessage: "INVALID_PREFIX" };
|
|
12201
12203
|
}
|
|
12202
|
-
if (!
|
|
12204
|
+
if (!labelNameRegex.test(name2)) {
|
|
12203
12205
|
return { isValid: false, errorMessage: "INVALID_NAME" };
|
|
12204
12206
|
}
|
|
12205
12207
|
if (prefix && prefix.length > 253) {
|
|
@@ -12211,7 +12213,7 @@ function validateLabelKey(key2) {
|
|
|
12211
12213
|
return { isValid: true };
|
|
12212
12214
|
}
|
|
12213
12215
|
function validateLabelValue(value2) {
|
|
12214
|
-
const labelValueRegex = /(^[a-zA-Z0-9]$)|(^[a-zA-Z0-9][a-zA-Z0-9
|
|
12216
|
+
const labelValueRegex = /(^[a-zA-Z0-9]$)|(^[a-zA-Z0-9][a-zA-Z0-9\.\-]*[a-zA-Z0-9]$)/;
|
|
12215
12217
|
if (value2 === "") {
|
|
12216
12218
|
return { isValid: true };
|
|
12217
12219
|
}
|
|
@@ -12225,37 +12227,31 @@ function validateLabelValue(value2) {
|
|
|
12225
12227
|
}
|
|
12226
12228
|
const LabelFormatPopover_105yfzn = "";
|
|
12227
12229
|
const PodLabelFormatRulePopoverStyle = "p5jt6nm";
|
|
12228
|
-
const LabelFormatPopover = ({
|
|
12229
|
-
noValueValidation
|
|
12230
|
-
}) => {
|
|
12230
|
+
const LabelFormatPopover = () => {
|
|
12231
12231
|
const {
|
|
12232
12232
|
t: t2
|
|
12233
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
|
-
}
|
|
12253
12234
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(Popover, {
|
|
12254
12235
|
overlayClassName: PodLabelFormatRulePopoverStyle,
|
|
12255
12236
|
placement: "bottomRight",
|
|
12256
12237
|
content: /* @__PURE__ */ jsxRuntimeExports.jsx(AntdTable, {
|
|
12257
12238
|
bordered: true,
|
|
12258
|
-
dataSource:
|
|
12239
|
+
dataSource: [{
|
|
12240
|
+
object: t2("dovetail.key"),
|
|
12241
|
+
contains: t2("dovetail.suffix"),
|
|
12242
|
+
optional: t2("dovetail.no"),
|
|
12243
|
+
rule: [t2("dovetail.suffix_format_rule_1"), t2("dovetail.suffix_format_rule_2"), t2("dovetail.suffix_format_rule_3")]
|
|
12244
|
+
}, {
|
|
12245
|
+
object: t2("dovetail.key"),
|
|
12246
|
+
contains: t2("dovetail.name"),
|
|
12247
|
+
optional: t2("dovetail.yes"),
|
|
12248
|
+
rule: [t2("dovetail.name_format_rule_1"), t2("dovetail.name_format_rule_2"), t2("dovetail.name_format_rule_3")]
|
|
12249
|
+
}, {
|
|
12250
|
+
object: t2("dovetail.value"),
|
|
12251
|
+
contains: t2("dovetail.name"),
|
|
12252
|
+
optional: t2("dovetail.no"),
|
|
12253
|
+
rule: [t2("dovetail.name_format_rule_1"), t2("dovetail.name_format_rule_2"), t2("dovetail.name_format_rule_3")]
|
|
12254
|
+
}],
|
|
12259
12255
|
columns: [{
|
|
12260
12256
|
key: "object",
|
|
12261
12257
|
title: t2("dovetail.object"),
|
|
@@ -12307,8 +12303,7 @@ function _KeyValueTableFormForm(props, ref) {
|
|
|
12307
12303
|
defaultValue,
|
|
12308
12304
|
onSubmit,
|
|
12309
12305
|
extraColumns,
|
|
12310
|
-
addButtonText
|
|
12311
|
-
noValueValidation
|
|
12306
|
+
addButtonText
|
|
12312
12307
|
} = props;
|
|
12313
12308
|
const {
|
|
12314
12309
|
t: t2
|
|
@@ -12378,8 +12373,6 @@ function _KeyValueTableFormForm(props, ref) {
|
|
|
12378
12373
|
validator: ({
|
|
12379
12374
|
value: value22
|
|
12380
12375
|
}) => {
|
|
12381
|
-
if (noValueValidation)
|
|
12382
|
-
return;
|
|
12383
12376
|
const {
|
|
12384
12377
|
isValid
|
|
12385
12378
|
} = validateLabelValue(value22 || "");
|
|
@@ -12398,9 +12391,7 @@ function _KeyValueTableFormForm(props, ref) {
|
|
|
12398
12391
|
row: {
|
|
12399
12392
|
deletable: true
|
|
12400
12393
|
}
|
|
12401
|
-
}), /* @__PURE__ */ jsxRuntimeExports.jsx(LabelFormatPopover, {
|
|
12402
|
-
noValueValidation
|
|
12403
|
-
})]
|
|
12394
|
+
}), /* @__PURE__ */ jsxRuntimeExports.jsx(LabelFormatPopover, {})]
|
|
12404
12395
|
});
|
|
12405
12396
|
}
|
|
12406
12397
|
const KeyValueTableFormForm = React__default.forwardRef(_KeyValueTableFormForm);
|
|
@@ -19483,13 +19474,13 @@ const PodContainersTable = ({
|
|
|
19483
19474
|
},
|
|
19484
19475
|
{
|
|
19485
19476
|
key: "started",
|
|
19486
|
-
dataIndex: ["
|
|
19477
|
+
dataIndex: ["startedAt"],
|
|
19487
19478
|
title: i18n2.t("dovetail.created_time"),
|
|
19488
19479
|
sortable: true,
|
|
19489
|
-
sorter: CommonSorter(["
|
|
19480
|
+
sorter: CommonSorter(["startedAt"]),
|
|
19490
19481
|
width: 120,
|
|
19491
19482
|
render: (_, record) => {
|
|
19492
|
-
const value2 =
|
|
19483
|
+
const value2 = record.startedAt;
|
|
19493
19484
|
if (value2)
|
|
19494
19485
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(Time, { date: new Date(value2) });
|
|
19495
19486
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(ValueDisplay, { value: "" });
|
|
@@ -19499,7 +19490,10 @@ const PodContainersTable = ({
|
|
|
19499
19490
|
[i18n2, initContainerStatuses]
|
|
19500
19491
|
);
|
|
19501
19492
|
const dataSource = useMemo(
|
|
19502
|
-
() => addId(containerStatuses.concat(initContainerStatuses), "containerID")
|
|
19493
|
+
() => addId(containerStatuses.concat(initContainerStatuses), "containerID").map((container2) => ({
|
|
19494
|
+
...container2,
|
|
19495
|
+
startedAt: get$3(container2, ["state", "running", "startedAt"]) || get$3(container2, ["state", "terminated", "startedAt"])
|
|
19496
|
+
})),
|
|
19503
19497
|
[containerStatuses, initContainerStatuses]
|
|
19504
19498
|
);
|
|
19505
19499
|
const {
|
|
@@ -19511,7 +19505,7 @@ const PodContainersTable = ({
|
|
|
19511
19505
|
data: dataSource,
|
|
19512
19506
|
columns,
|
|
19513
19507
|
defaultSorters: [{
|
|
19514
|
-
field: "
|
|
19508
|
+
field: "startedAt",
|
|
19515
19509
|
order: "desc"
|
|
19516
19510
|
}]
|
|
19517
19511
|
});
|
|
@@ -38400,7 +38394,7 @@ const Separator = () => {
|
|
|
38400
38394
|
});
|
|
38401
38395
|
};
|
|
38402
38396
|
const MonacoYamlEditor = React__default.lazy(() => Promise.resolve().then(() => MonacoYamlEditor$2));
|
|
38403
|
-
const MonacoYamlDiffEditor = React__default.lazy(() => import("./MonacoYamlDiffEditor-
|
|
38397
|
+
const MonacoYamlDiffEditor = React__default.lazy(() => import("./MonacoYamlDiffEditor-440e4624.js"));
|
|
38404
38398
|
const YamlEditorComponent = forwardRef(
|
|
38405
38399
|
function YamlEditorComponent2(props, ref) {
|
|
38406
38400
|
const {
|
|
@@ -39609,8 +39603,7 @@ const EditAnnotationForm = React__default.forwardRef(function EditAnnotationForm
|
|
|
39609
39603
|
ref,
|
|
39610
39604
|
defaultValue,
|
|
39611
39605
|
onSubmit,
|
|
39612
|
-
addButtonText: t2("dovetail.add_annotation")
|
|
39613
|
-
noValueValidation: true
|
|
39606
|
+
addButtonText: t2("dovetail.add_annotation")
|
|
39614
39607
|
}
|
|
39615
39608
|
);
|
|
39616
39609
|
});
|
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-0e3c2558.js";
|
|
2
2
|
import "@cloudtower/eagle";
|
|
3
3
|
import "@refinedev/core";
|
|
4
4
|
import "react";
|
package/dist/refine.umd.cjs
CHANGED
|
@@ -10249,7 +10249,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10249
10249
|
"csi.storage.k8s.io/fstype": "ext4"
|
|
10250
10250
|
},
|
|
10251
10251
|
"provisioner": "",
|
|
10252
|
-
"reclaimPolicy": "",
|
|
10252
|
+
"reclaimPolicy": "Delete",
|
|
10253
10253
|
"allowVolumeExpansion": true,
|
|
10254
10254
|
"volumeBindingMode": "Immediate"
|
|
10255
10255
|
};
|
|
@@ -10281,10 +10281,11 @@ var __publicField = (obj, key, value) => {
|
|
|
10281
10281
|
"accessModes": [],
|
|
10282
10282
|
"resources": {
|
|
10283
10283
|
"requests": {
|
|
10284
|
-
"storage": "
|
|
10284
|
+
"storage": "10Gi"
|
|
10285
10285
|
}
|
|
10286
10286
|
},
|
|
10287
|
-
"storageClassName": ""
|
|
10287
|
+
"storageClassName": "",
|
|
10288
|
+
"volumeMode": "Filesystem"
|
|
10288
10289
|
}
|
|
10289
10290
|
};
|
|
10290
10291
|
var ResourceState = /* @__PURE__ */ ((ResourceState2) => {
|
|
@@ -11258,7 +11259,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11258
11259
|
eagle.Dropdown,
|
|
11259
11260
|
{
|
|
11260
11261
|
overlay: /* @__PURE__ */ jsxRuntimeExports.jsxs(eagle.Menu, { children: [
|
|
11261
|
-
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") }) }),
|
|
11262
|
+
isInShowPage || (canEditData == null ? void 0 : canEditData.can) === false || config.hideEdit ? 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") }) }),
|
|
11262
11263
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11263
11264
|
eagle.Menu.Item,
|
|
11264
11265
|
{
|
|
@@ -12093,7 +12094,7 @@ var __publicField = (obj, key, value) => {
|
|
|
12093
12094
|
resourceKind: (_d = resource == null ? void 0 : resource.meta) == null ? void 0 : _d.kind
|
|
12094
12095
|
}) : void 0]
|
|
12095
12096
|
}), /* @__PURE__ */ jsxRuntimeExports.jsxs(eagle.Space, {
|
|
12096
|
-
children: [(_e = showConfig.renderExtraButton) == null ? void 0 : _e.call(showConfig, record), !
|
|
12097
|
+
children: [(_e = showConfig.renderExtraButton) == null ? void 0 : _e.call(showConfig, record), !config.hideEdit ? /* @__PURE__ */ jsxRuntimeExports.jsx(core.CanAccess, {
|
|
12097
12098
|
resource: resource == null ? void 0 : resource.name,
|
|
12098
12099
|
action: AccessControlAuth.Edit,
|
|
12099
12100
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Button, {
|
|
@@ -12190,7 +12191,8 @@ var __publicField = (obj, key, value) => {
|
|
|
12190
12191
|
});
|
|
12191
12192
|
}
|
|
12192
12193
|
function validateLabelKey(key2) {
|
|
12193
|
-
const
|
|
12194
|
+
const labelPrefixRegex = /(^[a-zA-Z0-9]$)|(^[a-zA-Z0-9][a-zA-Z0-9\.]*[a-zA-Z0-9]$)/;
|
|
12195
|
+
const labelNameRegex = /(^[a-zA-Z0-9]$)|(^[a-zA-Z0-9][a-zA-Z0-9\.\-]*[a-zA-Z0-9]$)/;
|
|
12194
12196
|
let prefix, name2;
|
|
12195
12197
|
const splitResult = key2.split("/");
|
|
12196
12198
|
if (splitResult.length === 1) {
|
|
@@ -12202,10 +12204,10 @@ var __publicField = (obj, key, value) => {
|
|
|
12202
12204
|
if (prefix === "") {
|
|
12203
12205
|
return { isValid: false, errorMessage: "EMPTY_PREFIX" };
|
|
12204
12206
|
}
|
|
12205
|
-
if (prefix && !
|
|
12207
|
+
if (prefix && !labelPrefixRegex.test(prefix)) {
|
|
12206
12208
|
return { isValid: false, errorMessage: "INVALID_PREFIX" };
|
|
12207
12209
|
}
|
|
12208
|
-
if (!
|
|
12210
|
+
if (!labelNameRegex.test(name2)) {
|
|
12209
12211
|
return { isValid: false, errorMessage: "INVALID_NAME" };
|
|
12210
12212
|
}
|
|
12211
12213
|
if (prefix && prefix.length > 253) {
|
|
@@ -12217,7 +12219,7 @@ var __publicField = (obj, key, value) => {
|
|
|
12217
12219
|
return { isValid: true };
|
|
12218
12220
|
}
|
|
12219
12221
|
function validateLabelValue(value2) {
|
|
12220
|
-
const labelValueRegex = /(^[a-zA-Z0-9]$)|(^[a-zA-Z0-9][a-zA-Z0-9
|
|
12222
|
+
const labelValueRegex = /(^[a-zA-Z0-9]$)|(^[a-zA-Z0-9][a-zA-Z0-9\.\-]*[a-zA-Z0-9]$)/;
|
|
12221
12223
|
if (value2 === "") {
|
|
12222
12224
|
return { isValid: true };
|
|
12223
12225
|
}
|
|
@@ -12231,37 +12233,31 @@ var __publicField = (obj, key, value) => {
|
|
|
12231
12233
|
}
|
|
12232
12234
|
const LabelFormatPopover_105yfzn = "";
|
|
12233
12235
|
const PodLabelFormatRulePopoverStyle = "p5jt6nm";
|
|
12234
|
-
const LabelFormatPopover = ({
|
|
12235
|
-
noValueValidation
|
|
12236
|
-
}) => {
|
|
12236
|
+
const LabelFormatPopover = () => {
|
|
12237
12237
|
const {
|
|
12238
12238
|
t: t2
|
|
12239
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
|
-
}
|
|
12259
12240
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Popover, {
|
|
12260
12241
|
overlayClassName: PodLabelFormatRulePopoverStyle,
|
|
12261
12242
|
placement: "bottomRight",
|
|
12262
12243
|
content: /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.AntdTable, {
|
|
12263
12244
|
bordered: true,
|
|
12264
|
-
dataSource:
|
|
12245
|
+
dataSource: [{
|
|
12246
|
+
object: t2("dovetail.key"),
|
|
12247
|
+
contains: t2("dovetail.suffix"),
|
|
12248
|
+
optional: t2("dovetail.no"),
|
|
12249
|
+
rule: [t2("dovetail.suffix_format_rule_1"), t2("dovetail.suffix_format_rule_2"), t2("dovetail.suffix_format_rule_3")]
|
|
12250
|
+
}, {
|
|
12251
|
+
object: t2("dovetail.key"),
|
|
12252
|
+
contains: t2("dovetail.name"),
|
|
12253
|
+
optional: t2("dovetail.yes"),
|
|
12254
|
+
rule: [t2("dovetail.name_format_rule_1"), t2("dovetail.name_format_rule_2"), t2("dovetail.name_format_rule_3")]
|
|
12255
|
+
}, {
|
|
12256
|
+
object: t2("dovetail.value"),
|
|
12257
|
+
contains: t2("dovetail.name"),
|
|
12258
|
+
optional: t2("dovetail.no"),
|
|
12259
|
+
rule: [t2("dovetail.name_format_rule_1"), t2("dovetail.name_format_rule_2"), t2("dovetail.name_format_rule_3")]
|
|
12260
|
+
}],
|
|
12265
12261
|
columns: [{
|
|
12266
12262
|
key: "object",
|
|
12267
12263
|
title: t2("dovetail.object"),
|
|
@@ -12313,8 +12309,7 @@ var __publicField = (obj, key, value) => {
|
|
|
12313
12309
|
defaultValue,
|
|
12314
12310
|
onSubmit,
|
|
12315
12311
|
extraColumns,
|
|
12316
|
-
addButtonText
|
|
12317
|
-
noValueValidation
|
|
12312
|
+
addButtonText
|
|
12318
12313
|
} = props;
|
|
12319
12314
|
const {
|
|
12320
12315
|
t: t2
|
|
@@ -12384,8 +12379,6 @@ var __publicField = (obj, key, value) => {
|
|
|
12384
12379
|
validator: ({
|
|
12385
12380
|
value: value22
|
|
12386
12381
|
}) => {
|
|
12387
|
-
if (noValueValidation)
|
|
12388
|
-
return;
|
|
12389
12382
|
const {
|
|
12390
12383
|
isValid
|
|
12391
12384
|
} = validateLabelValue(value22 || "");
|
|
@@ -12404,9 +12397,7 @@ var __publicField = (obj, key, value) => {
|
|
|
12404
12397
|
row: {
|
|
12405
12398
|
deletable: true
|
|
12406
12399
|
}
|
|
12407
|
-
}), /* @__PURE__ */ jsxRuntimeExports.jsx(LabelFormatPopover, {
|
|
12408
|
-
noValueValidation
|
|
12409
|
-
})]
|
|
12400
|
+
}), /* @__PURE__ */ jsxRuntimeExports.jsx(LabelFormatPopover, {})]
|
|
12410
12401
|
});
|
|
12411
12402
|
}
|
|
12412
12403
|
const KeyValueTableFormForm = React.forwardRef(_KeyValueTableFormForm);
|
|
@@ -19489,13 +19480,13 @@ var __publicField = (obj, key, value) => {
|
|
|
19489
19480
|
},
|
|
19490
19481
|
{
|
|
19491
19482
|
key: "started",
|
|
19492
|
-
dataIndex: ["
|
|
19483
|
+
dataIndex: ["startedAt"],
|
|
19493
19484
|
title: i18n2.t("dovetail.created_time"),
|
|
19494
19485
|
sortable: true,
|
|
19495
|
-
sorter: CommonSorter(["
|
|
19486
|
+
sorter: CommonSorter(["startedAt"]),
|
|
19496
19487
|
width: 120,
|
|
19497
19488
|
render: (_, record) => {
|
|
19498
|
-
const value2 =
|
|
19489
|
+
const value2 = record.startedAt;
|
|
19499
19490
|
if (value2)
|
|
19500
19491
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(Time, { date: new Date(value2) });
|
|
19501
19492
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(ValueDisplay, { value: "" });
|
|
@@ -19505,7 +19496,10 @@ var __publicField = (obj, key, value) => {
|
|
|
19505
19496
|
[i18n2, initContainerStatuses]
|
|
19506
19497
|
);
|
|
19507
19498
|
const dataSource = React.useMemo(
|
|
19508
|
-
() => addId(containerStatuses.concat(initContainerStatuses), "containerID")
|
|
19499
|
+
() => addId(containerStatuses.concat(initContainerStatuses), "containerID").map((container2) => ({
|
|
19500
|
+
...container2,
|
|
19501
|
+
startedAt: lodashEs.get(container2, ["state", "running", "startedAt"]) || lodashEs.get(container2, ["state", "terminated", "startedAt"])
|
|
19502
|
+
})),
|
|
19509
19503
|
[containerStatuses, initContainerStatuses]
|
|
19510
19504
|
);
|
|
19511
19505
|
const {
|
|
@@ -19517,7 +19511,7 @@ var __publicField = (obj, key, value) => {
|
|
|
19517
19511
|
data: dataSource,
|
|
19518
19512
|
columns,
|
|
19519
19513
|
defaultSorters: [{
|
|
19520
|
-
field: "
|
|
19514
|
+
field: "startedAt",
|
|
19521
19515
|
order: "desc"
|
|
19522
19516
|
}]
|
|
19523
19517
|
});
|
|
@@ -39615,8 +39609,7 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
39615
39609
|
ref,
|
|
39616
39610
|
defaultValue,
|
|
39617
39611
|
onSubmit,
|
|
39618
|
-
addButtonText: t2("dovetail.add_annotation")
|
|
39619
|
-
noValueValidation: true
|
|
39612
|
+
addButtonText: t2("dovetail.add_annotation")
|
|
39620
39613
|
}
|
|
39621
39614
|
);
|
|
39622
39615
|
});
|
|
@@ -10,7 +10,6 @@ interface KeyValueTableFormFormProps<T extends KeyValuePair> {
|
|
|
10
10
|
onSubmit: (value: T[]) => Promise<unknown> | undefined;
|
|
11
11
|
extraColumns?: TableFormColumn[];
|
|
12
12
|
addButtonText?: string;
|
|
13
|
-
noValueValidation?: boolean;
|
|
14
13
|
}
|
|
15
14
|
export declare const KeyValueTableFormForm: React.ForwardRefExoticComponent<KeyValueTableFormFormProps<KeyValuePair> & React.RefAttributes<EditFieldFormHandler>>;
|
|
16
15
|
export {};
|
|
@@ -34,7 +34,6 @@ export type ShowTab<Model extends ResourceModel> = {
|
|
|
34
34
|
export interface ShowConfig<Model extends ResourceModel = ResourceModel> {
|
|
35
35
|
tabs?: ShowTab<Model>[];
|
|
36
36
|
renderExtraButton?: (record: Model) => React.ReactNode;
|
|
37
|
-
hideEditYamlButton?: boolean;
|
|
38
37
|
}
|
|
39
38
|
export declare const ImageField: <Model extends WorkloadBaseModel>(i18n: I18nType) => ShowField<Model>;
|
|
40
39
|
export declare const ReplicaField: <Model extends JobModel | WorkloadModel>() => ShowField<Model>;
|
package/lib/constants/k8s.d.ts
CHANGED
package/lib/types/resource.d.ts
CHANGED
|
@@ -30,6 +30,7 @@ export type ResourceConfig<Model extends ResourceModel = ResourceModel> = {
|
|
|
30
30
|
displayName?: string;
|
|
31
31
|
hideListToolBar?: boolean;
|
|
32
32
|
hideNamespacesFilter?: boolean;
|
|
33
|
+
hideEdit?: boolean;
|
|
33
34
|
description?: string;
|
|
34
35
|
parent?: RESOURCE_GROUP;
|
|
35
36
|
formatter?: (v: Model) => Model;
|