@dovetail-v2/refine 0.3.8-alpha.4 → 0.3.9-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/{MonacoYamlEditor-7e440dd9.cjs → MonacoYamlEditor-16a71448.cjs} +1 -1
- package/dist/{MonacoYamlEditor-70599129.js → MonacoYamlEditor-be30f2cd.js} +1 -1
- package/dist/components/EditMetadataForm/EditNodeTaintForm.d.ts +2 -6
- package/dist/components/EditMetadataForm/NodeTaintEffectSelect.d.ts +16 -0
- package/dist/components/EditMetadataForm/index.d.ts +1 -0
- package/dist/components/KeyValueTableForm/index.d.ts +4 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/i18n.d.ts +2 -0
- package/dist/{index-59def48b.js → index-50687482.js} +321 -231
- package/dist/{index-fec9ef27.cjs → index-ce201e8c.cjs} +242 -152
- package/dist/locales/zh-CN/index.d.ts +2 -0
- package/dist/models/pod-model.d.ts +1 -3
- package/dist/refine.cjs +7 -2
- package/dist/refine.js +84 -79
- package/dist/utils/validation.d.ts +14 -6
- package/package.json +2 -1
|
@@ -683,7 +683,7 @@ const udp$1 = "UDP";
|
|
|
683
683
|
const required_field$1 = "Please enter {{ label }}.";
|
|
684
684
|
const length_limit$1 = "The length of {{ label }} should be between {{ minLength }} and {{ maxLength }} characters.";
|
|
685
685
|
const rf1123_name_format_error$1 = "Only lowercase letters, numbers, and hyphens (-) are supported, and the name must start and end with a lowercase letter or number.";
|
|
686
|
-
const name_duplicated$1 = "
|
|
686
|
+
const name_duplicated$1 = "The name already exists.";
|
|
687
687
|
const input_correct_port$1 = "Please fill in a valid port number.";
|
|
688
688
|
const dovetail$1 = {
|
|
689
689
|
copy: copy$1,
|
|
@@ -1191,11 +1191,13 @@ const required_field = "请填写{{ label }}。";
|
|
|
1191
1191
|
const length_limit = "{{ label }}支持的字符长度范围为 {{ minLength }}–{{ maxLength }}。";
|
|
1192
1192
|
const rf1123_name_format_error = "仅支持小写字母、数字、连字符(-),并且必须以小写字母、数字开头和结尾。";
|
|
1193
1193
|
const rf1035_name_format_error = "仅支持小写字母、数字、连字符(-),并且必须以小写字母开头,以小写字母、数字结尾。";
|
|
1194
|
-
const
|
|
1194
|
+
const dns_subdomain_name_format_error = "仅支持小写字母、数字、连字符(-)和点(.),并且必须以小写字母或数字开头和结尾。";
|
|
1195
|
+
const name_duplicated = "名称已存在。";
|
|
1195
1196
|
const input_correct_port = "请填写有效的端口号。";
|
|
1196
1197
|
const auto_generate = "自动生成";
|
|
1197
1198
|
const specify_port = "指定端口";
|
|
1198
1199
|
const node_port_duplicated = "节点端口已存在。";
|
|
1200
|
+
const all = "全部";
|
|
1199
1201
|
const dovetail = {
|
|
1200
1202
|
copy,
|
|
1201
1203
|
reset_arguments,
|
|
@@ -1452,11 +1454,13 @@ const dovetail = {
|
|
|
1452
1454
|
length_limit,
|
|
1453
1455
|
rf1123_name_format_error,
|
|
1454
1456
|
rf1035_name_format_error,
|
|
1457
|
+
dns_subdomain_name_format_error,
|
|
1455
1458
|
name_duplicated,
|
|
1456
1459
|
input_correct_port,
|
|
1457
1460
|
auto_generate,
|
|
1458
1461
|
specify_port,
|
|
1459
|
-
node_port_duplicated
|
|
1462
|
+
node_port_duplicated,
|
|
1463
|
+
all
|
|
1460
1464
|
};
|
|
1461
1465
|
const ZH = {
|
|
1462
1466
|
dovetail
|
|
@@ -9479,7 +9483,6 @@ class PodModel extends WorkloadBaseModel {
|
|
|
9479
9483
|
super(_rawYaml, _globalStore);
|
|
9480
9484
|
__publicField(this, "request");
|
|
9481
9485
|
__publicField(this, "limit");
|
|
9482
|
-
__publicField(this, "belongToDeployment");
|
|
9483
9486
|
this._rawYaml = _rawYaml;
|
|
9484
9487
|
let cpuRequestNum = 0;
|
|
9485
9488
|
let memoryRequestNum = 0;
|
|
@@ -9520,21 +9523,12 @@ class PodModel extends WorkloadBaseModel {
|
|
|
9520
9523
|
}
|
|
9521
9524
|
};
|
|
9522
9525
|
}
|
|
9523
|
-
getBelongToDeployment(deployments
|
|
9524
|
-
|
|
9525
|
-
|
|
9526
|
-
|
|
9527
|
-
|
|
9528
|
-
|
|
9529
|
-
);
|
|
9530
|
-
return deployments.find(
|
|
9531
|
-
(deployment) => {
|
|
9532
|
-
var _a;
|
|
9533
|
-
return (_a = belongToReplicaSet == null ? void 0 : belongToReplicaSet.metadata.ownerReferences) == null ? void 0 : _a.some(
|
|
9534
|
-
(ownerReference) => ownerReference.kind === "Deployment" && ownerReference.uid === deployment.metadata.uid
|
|
9535
|
-
);
|
|
9536
|
-
}
|
|
9537
|
-
);
|
|
9526
|
+
getBelongToDeployment(deployments) {
|
|
9527
|
+
return deployments.find((deployment) => {
|
|
9528
|
+
return deployment.replicaSets.find((replicaSet) => {
|
|
9529
|
+
return replicaSet.pods.find((pod2) => pod2.metadata.uid === this.metadata.uid);
|
|
9530
|
+
});
|
|
9531
|
+
});
|
|
9538
9532
|
}
|
|
9539
9533
|
get imageNames() {
|
|
9540
9534
|
var _a;
|
|
@@ -10411,16 +10405,7 @@ function getResourceNameByKind(kind, configs) {
|
|
|
10411
10405
|
}
|
|
10412
10406
|
const Rfc1123NameRegExp = /(^[a-z0-9]$)|(^[a-z0-9][a-z0-9-]*[a-z0-9]$)/;
|
|
10413
10407
|
const Rfc1035NameRegExp = /(^[a-z]$)|(^[a-z][a-z0-9\-]*[a-z0-9]$)/;
|
|
10414
|
-
|
|
10415
|
-
const regex = /(^[a-zA-Z0-9]$)|(^[a-zA-Z0-9][a-zA-Z0-9\.\-\_]*[a-zA-Z0-9]$)/;
|
|
10416
|
-
if (!regex.test(subdomain)) {
|
|
10417
|
-
return { isValid: false };
|
|
10418
|
-
}
|
|
10419
|
-
if (subdomain && subdomain.length > 63) {
|
|
10420
|
-
return { isValid: false };
|
|
10421
|
-
}
|
|
10422
|
-
return { isValid: true };
|
|
10423
|
-
}
|
|
10408
|
+
const DnsSubdomainRegExp = /(^[a-z0-9]$)|(^[a-z0-9][a-z0-9-.]*[a-z0-9]$)/;
|
|
10424
10409
|
function validateResourceName({
|
|
10425
10410
|
v,
|
|
10426
10411
|
allNames,
|
|
@@ -10428,7 +10413,8 @@ function validateResourceName({
|
|
|
10428
10413
|
emptyText,
|
|
10429
10414
|
duplicatedText,
|
|
10430
10415
|
formatErrorText,
|
|
10431
|
-
regex
|
|
10416
|
+
regex,
|
|
10417
|
+
maxLength = 63
|
|
10432
10418
|
}) {
|
|
10433
10419
|
if (!v) {
|
|
10434
10420
|
return {
|
|
@@ -10438,13 +10424,13 @@ function validateResourceName({
|
|
|
10438
10424
|
})
|
|
10439
10425
|
};
|
|
10440
10426
|
}
|
|
10441
|
-
if (v.length >
|
|
10427
|
+
if (v.length > maxLength) {
|
|
10442
10428
|
return {
|
|
10443
10429
|
isValid: false,
|
|
10444
10430
|
errorMessage: i18n2.t("dovetail.length_limit", {
|
|
10445
10431
|
label: i18n2.t("dovetail.name"),
|
|
10446
10432
|
minLength: 1,
|
|
10447
|
-
maxLength
|
|
10433
|
+
maxLength
|
|
10448
10434
|
})
|
|
10449
10435
|
};
|
|
10450
10436
|
}
|
|
@@ -10500,6 +10486,24 @@ function ValidateRfc1035Name({
|
|
|
10500
10486
|
formatErrorText: i18n2.t("dovetail.rf1035_name_format_error")
|
|
10501
10487
|
});
|
|
10502
10488
|
}
|
|
10489
|
+
function validateDnsSubdomainName({
|
|
10490
|
+
v,
|
|
10491
|
+
allNames,
|
|
10492
|
+
i18n: i18n2,
|
|
10493
|
+
emptyText,
|
|
10494
|
+
duplicatedText
|
|
10495
|
+
}) {
|
|
10496
|
+
return validateResourceName({
|
|
10497
|
+
v,
|
|
10498
|
+
allNames,
|
|
10499
|
+
i18n: i18n2,
|
|
10500
|
+
emptyText,
|
|
10501
|
+
duplicatedText,
|
|
10502
|
+
regex: DnsSubdomainRegExp,
|
|
10503
|
+
formatErrorText: i18n2.t("dovetail.dns_subdomain_name_format_error"),
|
|
10504
|
+
maxLength: 253
|
|
10505
|
+
});
|
|
10506
|
+
}
|
|
10503
10507
|
function validateLabelKey(key2) {
|
|
10504
10508
|
const labelRegex = /(^[a-zA-Z0-9]$)|(^[a-zA-Z0-9][a-zA-Z0-9\.\-\_]*[a-zA-Z0-9]$)/;
|
|
10505
10509
|
let prefix2, name2;
|
|
@@ -10519,14 +10523,17 @@ function validateLabelKey(key2) {
|
|
|
10519
10523
|
if (prefix2 && prefix2.length > 253) {
|
|
10520
10524
|
return { isValid: false };
|
|
10521
10525
|
}
|
|
10522
|
-
|
|
10526
|
+
if (name2 && name2.length > 63) {
|
|
10527
|
+
return { isValid: false };
|
|
10528
|
+
}
|
|
10529
|
+
return { isValid: true };
|
|
10523
10530
|
}
|
|
10524
|
-
function validateLabelValue(value2, isOptional) {
|
|
10531
|
+
function validateLabelValue(value2, i18n2, isOptional) {
|
|
10525
10532
|
const labelValueRegex = /(^[a-zA-Z0-9]$)|(^[a-zA-Z0-9][a-zA-Z0-9\.\-\_]*[a-zA-Z0-9]$)/;
|
|
10526
10533
|
if (isOptional && value2 === "") {
|
|
10527
10534
|
return { isValid: true };
|
|
10528
10535
|
} else if (value2 === "") {
|
|
10529
|
-
return { isValid: false };
|
|
10536
|
+
return { isValid: false, errorMessage: i18n2.t("dovetail.required_field", { label: i18n2.t("dovetail.value") }) };
|
|
10530
10537
|
}
|
|
10531
10538
|
if (value2.length > 63) {
|
|
10532
10539
|
return { isValid: false };
|
|
@@ -10536,6 +10543,16 @@ function validateLabelValue(value2, isOptional) {
|
|
|
10536
10543
|
}
|
|
10537
10544
|
return { isValid: true };
|
|
10538
10545
|
}
|
|
10546
|
+
function validateDataKey(key2) {
|
|
10547
|
+
const dataKeyRegex = /^[-._a-zA-Z0-9]+$/;
|
|
10548
|
+
if (!dataKeyRegex.test(key2)) {
|
|
10549
|
+
return { isValid: false };
|
|
10550
|
+
}
|
|
10551
|
+
if (key2.length > 253) {
|
|
10552
|
+
return { isValid: false };
|
|
10553
|
+
}
|
|
10554
|
+
return { isValid: true };
|
|
10555
|
+
}
|
|
10539
10556
|
function validatePort(port2, isOptional, i18n2) {
|
|
10540
10557
|
if (port2 === "" && !isOptional) {
|
|
10541
10558
|
return {
|
|
@@ -11435,12 +11452,14 @@ function _KeyValueTableForm(props, ref) {
|
|
|
11435
11452
|
canImportFromFile,
|
|
11436
11453
|
minSize,
|
|
11437
11454
|
extraAction,
|
|
11455
|
+
keyOptions,
|
|
11438
11456
|
validateKey,
|
|
11439
11457
|
validateValue,
|
|
11440
11458
|
onSubmit
|
|
11441
11459
|
} = props;
|
|
11442
11460
|
const {
|
|
11443
|
-
t: t2
|
|
11461
|
+
t: t2,
|
|
11462
|
+
i18n: i18n2
|
|
11444
11463
|
} = common.useTranslation();
|
|
11445
11464
|
const tableFormRef = React.useRef(null);
|
|
11446
11465
|
const [_value, _setValue] = React.useState(value2 || defaultValue);
|
|
@@ -11479,6 +11498,22 @@ function _KeyValueTableForm(props, ref) {
|
|
|
11479
11498
|
(_a = tableFormRef.current) == null ? void 0 : _a.setData(value2);
|
|
11480
11499
|
}
|
|
11481
11500
|
}, [value2]);
|
|
11501
|
+
const renderAutoCompleteFunc = ({
|
|
11502
|
+
value: value22,
|
|
11503
|
+
onChange: onChange2
|
|
11504
|
+
}) => {
|
|
11505
|
+
return /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.AutoComplete, {
|
|
11506
|
+
options: keyOptions || [],
|
|
11507
|
+
value: value22,
|
|
11508
|
+
onChange: onChange2,
|
|
11509
|
+
size: "small",
|
|
11510
|
+
filterOption: (inputValue, option) => {
|
|
11511
|
+
var _a;
|
|
11512
|
+
return ((_a = option == null ? void 0 : option.label) == null ? void 0 : _a.toString().toLowerCase().includes(inputValue.toLowerCase())) || false;
|
|
11513
|
+
},
|
|
11514
|
+
allowClear: true
|
|
11515
|
+
});
|
|
11516
|
+
};
|
|
11482
11517
|
const renderTextAreaFunc = ({
|
|
11483
11518
|
value: value22,
|
|
11484
11519
|
onChange: onChange2
|
|
@@ -11520,7 +11555,7 @@ function _KeyValueTableForm(props, ref) {
|
|
|
11520
11555
|
if (!isValid)
|
|
11521
11556
|
return errorMessage || t2("dovetail.format_error");
|
|
11522
11557
|
},
|
|
11523
|
-
render: renderTextAreaFunc
|
|
11558
|
+
render: (keyOptions == null ? void 0 : keyOptions.length) ? renderAutoCompleteFunc : renderTextAreaFunc
|
|
11524
11559
|
}, {
|
|
11525
11560
|
key: "value",
|
|
11526
11561
|
title: isValueOptional ? t2("dovetail.value_optional") : t2("dovetail.value"),
|
|
@@ -11534,7 +11569,7 @@ function _KeyValueTableForm(props, ref) {
|
|
|
11534
11569
|
const {
|
|
11535
11570
|
isValid,
|
|
11536
11571
|
errorMessage
|
|
11537
|
-
} = validate2(value22 || "", isValueOptional);
|
|
11572
|
+
} = validate2(value22 || "", i18n2, isValueOptional);
|
|
11538
11573
|
if (!isValid)
|
|
11539
11574
|
return errorMessage || t2("dovetail.format_error");
|
|
11540
11575
|
},
|
|
@@ -11579,6 +11614,81 @@ function _KeyValueTableForm(props, ref) {
|
|
|
11579
11614
|
});
|
|
11580
11615
|
}
|
|
11581
11616
|
const KeyValueTableForm = React.forwardRef(_KeyValueTableForm);
|
|
11617
|
+
var NodeTaintEffect = /* @__PURE__ */ ((NodeTaintEffect2) => {
|
|
11618
|
+
NodeTaintEffect2["NoSchedule"] = "NoSchedule";
|
|
11619
|
+
NodeTaintEffect2["PreferNoSchedule"] = "PreferNoSchedule";
|
|
11620
|
+
NodeTaintEffect2["NoExecute"] = "NoExecute";
|
|
11621
|
+
NodeTaintEffect2["All"] = "__none__";
|
|
11622
|
+
return NodeTaintEffect2;
|
|
11623
|
+
})(NodeTaintEffect || {});
|
|
11624
|
+
const NodeTaintEffectSelect = ({
|
|
11625
|
+
value: value2,
|
|
11626
|
+
selectProps,
|
|
11627
|
+
isShowAll,
|
|
11628
|
+
onChange
|
|
11629
|
+
}) => {
|
|
11630
|
+
const { t: t2 } = common.useTranslation();
|
|
11631
|
+
const options = React.useMemo(() => {
|
|
11632
|
+
const options2 = [
|
|
11633
|
+
{
|
|
11634
|
+
value: "NoSchedule",
|
|
11635
|
+
children: t2(`dovetail.node_taint_${"NoSchedule"}`),
|
|
11636
|
+
suffix: /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Tooltip, { title: /* @__PURE__ */ common.jsxRuntimeExports.jsx(TaintEffectTooltip, {
|
|
11637
|
+
effect: "NoSchedule"
|
|
11638
|
+
/* NoSchedule */
|
|
11639
|
+
}), children: /* @__PURE__ */ common.jsxRuntimeExports.jsx(
|
|
11640
|
+
eagle.Icon,
|
|
11641
|
+
{
|
|
11642
|
+
src: iconsReact.InfoICircleFill16GrayIcon,
|
|
11643
|
+
hoverSrc: iconsReact.InfoICircleFill16Gray70Icon
|
|
11644
|
+
}
|
|
11645
|
+
) })
|
|
11646
|
+
},
|
|
11647
|
+
{
|
|
11648
|
+
value: "PreferNoSchedule",
|
|
11649
|
+
children: t2(`dovetail.node_taint_${"PreferNoSchedule"}`),
|
|
11650
|
+
suffix: /* @__PURE__ */ common.jsxRuntimeExports.jsx(
|
|
11651
|
+
eagle.Tooltip,
|
|
11652
|
+
{
|
|
11653
|
+
title: /* @__PURE__ */ common.jsxRuntimeExports.jsx(TaintEffectTooltip, {
|
|
11654
|
+
effect: "PreferNoSchedule"
|
|
11655
|
+
/* PreferNoSchedule */
|
|
11656
|
+
}),
|
|
11657
|
+
children: /* @__PURE__ */ common.jsxRuntimeExports.jsx(
|
|
11658
|
+
eagle.Icon,
|
|
11659
|
+
{
|
|
11660
|
+
src: iconsReact.InfoICircleFill16GrayIcon,
|
|
11661
|
+
hoverSrc: iconsReact.InfoICircleFill16Gray70Icon
|
|
11662
|
+
}
|
|
11663
|
+
)
|
|
11664
|
+
}
|
|
11665
|
+
)
|
|
11666
|
+
},
|
|
11667
|
+
{
|
|
11668
|
+
value: "NoExecute",
|
|
11669
|
+
children: t2(`dovetail.node_taint_${"NoExecute"}`),
|
|
11670
|
+
suffix: /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Tooltip, { title: /* @__PURE__ */ common.jsxRuntimeExports.jsx(TaintEffectTooltip, {
|
|
11671
|
+
effect: "NoExecute"
|
|
11672
|
+
/* NoExecute */
|
|
11673
|
+
}), children: /* @__PURE__ */ common.jsxRuntimeExports.jsx(
|
|
11674
|
+
eagle.Icon,
|
|
11675
|
+
{
|
|
11676
|
+
src: iconsReact.InfoICircleFill16GrayIcon,
|
|
11677
|
+
hoverSrc: iconsReact.InfoICircleFill16Gray70Icon
|
|
11678
|
+
}
|
|
11679
|
+
) })
|
|
11680
|
+
}
|
|
11681
|
+
];
|
|
11682
|
+
if (isShowAll) {
|
|
11683
|
+
options2.unshift({
|
|
11684
|
+
value: "__none__",
|
|
11685
|
+
children: t2("dovetail.all")
|
|
11686
|
+
});
|
|
11687
|
+
}
|
|
11688
|
+
return options2;
|
|
11689
|
+
}, [t2, isShowAll]);
|
|
11690
|
+
return /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Select, { input: {}, value: value2, onChange, size: "small", ...selectProps, children: eagle.getOptions(options) });
|
|
11691
|
+
};
|
|
11582
11692
|
const EditNodeTaintForm_cgov7z = "";
|
|
11583
11693
|
const UlStyle = "u19jcs7t";
|
|
11584
11694
|
const EditNodeTaintForm = React.forwardRef(function EditNodeTaintForm2(props, ref) {
|
|
@@ -11641,56 +11751,14 @@ const EditNodeTaintForm = React.forwardRef(function EditNodeTaintForm2(props, re
|
|
|
11641
11751
|
extraColumns: [{
|
|
11642
11752
|
key: "effect",
|
|
11643
11753
|
title: t2("dovetail.effect"),
|
|
11644
|
-
defaultValue:
|
|
11754
|
+
defaultValue: NodeTaintEffect.NoExecute,
|
|
11645
11755
|
render: ({
|
|
11646
11756
|
value: value2,
|
|
11647
11757
|
onChange
|
|
11648
11758
|
}) => {
|
|
11649
|
-
return /* @__PURE__ */ common.jsxRuntimeExports.jsx(
|
|
11650
|
-
input: {},
|
|
11759
|
+
return /* @__PURE__ */ common.jsxRuntimeExports.jsx(NodeTaintEffectSelect, {
|
|
11651
11760
|
value: value2,
|
|
11652
|
-
onChange
|
|
11653
|
-
size: "small",
|
|
11654
|
-
children: eagle.getOptions([{
|
|
11655
|
-
value: "NoSchedule",
|
|
11656
|
-
children: t2(`dovetail.node_taint_${"NoSchedule"}`),
|
|
11657
|
-
suffix: /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Tooltip, {
|
|
11658
|
-
title: /* @__PURE__ */ common.jsxRuntimeExports.jsx(TaintEffectTooltip, {
|
|
11659
|
-
effect: "NoSchedule"
|
|
11660
|
-
/* NoSchedule */
|
|
11661
|
-
}),
|
|
11662
|
-
children: /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Icon, {
|
|
11663
|
-
src: iconsReact.InfoICircleFill16GrayIcon,
|
|
11664
|
-
hoverSrc: iconsReact.InfoICircleFill16Gray70Icon
|
|
11665
|
-
})
|
|
11666
|
-
})
|
|
11667
|
-
}, {
|
|
11668
|
-
value: "PreferNoSchedule",
|
|
11669
|
-
children: t2(`dovetail.node_taint_${"PreferNoSchedule"}`),
|
|
11670
|
-
suffix: /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Tooltip, {
|
|
11671
|
-
title: /* @__PURE__ */ common.jsxRuntimeExports.jsx(TaintEffectTooltip, {
|
|
11672
|
-
effect: "PreferNoSchedule"
|
|
11673
|
-
/* PreferNoSchedule */
|
|
11674
|
-
}),
|
|
11675
|
-
children: /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Icon, {
|
|
11676
|
-
src: iconsReact.InfoICircleFill16GrayIcon,
|
|
11677
|
-
hoverSrc: iconsReact.InfoICircleFill16Gray70Icon
|
|
11678
|
-
})
|
|
11679
|
-
})
|
|
11680
|
-
}, {
|
|
11681
|
-
value: "NoExecute",
|
|
11682
|
-
children: t2(`dovetail.node_taint_${"NoExecute"}`),
|
|
11683
|
-
suffix: /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Tooltip, {
|
|
11684
|
-
title: /* @__PURE__ */ common.jsxRuntimeExports.jsx(TaintEffectTooltip, {
|
|
11685
|
-
effect: "NoExecute"
|
|
11686
|
-
/* NoExecute */
|
|
11687
|
-
}),
|
|
11688
|
-
children: /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Icon, {
|
|
11689
|
-
src: iconsReact.InfoICircleFill16GrayIcon,
|
|
11690
|
-
hoverSrc: iconsReact.InfoICircleFill16Gray70Icon
|
|
11691
|
-
})
|
|
11692
|
-
})
|
|
11693
|
-
}])
|
|
11761
|
+
onChange
|
|
11694
11762
|
});
|
|
11695
11763
|
},
|
|
11696
11764
|
validator: ({
|
|
@@ -11709,24 +11777,15 @@ const TaintEffectTooltip = ({
|
|
|
11709
11777
|
t: t2
|
|
11710
11778
|
} = common.useTranslation();
|
|
11711
11779
|
const TaintEffectTooltipTextConfig = {
|
|
11712
|
-
[
|
|
11713
|
-
"NoExecute"
|
|
11714
|
-
/* NoExecute */
|
|
11715
|
-
]: {
|
|
11780
|
+
[NodeTaintEffect.NoExecute]: {
|
|
11716
11781
|
title: "NoExecute",
|
|
11717
11782
|
tooltips: [t2("dovetail.taint_effect_NoExecute_tooltip_1"), t2("dovetail.taint_effect_NoExecute_tooltip_2"), t2("dovetail.taint_effect_NoExecute_tooltip_3")]
|
|
11718
11783
|
},
|
|
11719
|
-
[
|
|
11720
|
-
"NoSchedule"
|
|
11721
|
-
/* NoSchedule */
|
|
11722
|
-
]: {
|
|
11784
|
+
[NodeTaintEffect.NoSchedule]: {
|
|
11723
11785
|
title: "NoSchedule",
|
|
11724
11786
|
tooltips: [t2("dovetail.taint_effect_NoSchedule_tooltip_1"), t2("dovetail.taint_effect_NoSchedule_tooltip_2")]
|
|
11725
11787
|
},
|
|
11726
|
-
[
|
|
11727
|
-
"PreferNoSchedule"
|
|
11728
|
-
/* PreferNoSchedule */
|
|
11729
|
-
]: {
|
|
11788
|
+
[NodeTaintEffect.PreferNoSchedule]: {
|
|
11730
11789
|
title: "PreferNoSchedule",
|
|
11731
11790
|
tooltips: [t2("dovetail.taint_effect_PreferNoSchedule_tooltip")]
|
|
11732
11791
|
}
|
|
@@ -12889,7 +12948,7 @@ const PodLogTab = (i18n2, apiUrl) => ({
|
|
|
12889
12948
|
]
|
|
12890
12949
|
});
|
|
12891
12950
|
const NetworkPolicyRulesViewer_r6jity = "";
|
|
12892
|
-
const MonacoYamlEditor$1 = React.lazy(() => Promise.resolve().then(() => require("./MonacoYamlEditor-
|
|
12951
|
+
const MonacoYamlEditor$1 = React.lazy(() => Promise.resolve().then(() => require("./MonacoYamlEditor-16a71448.cjs")));
|
|
12893
12952
|
const EditorStyle$1 = "e1cjl2b8";
|
|
12894
12953
|
const NetworkPolicyRulesViewer = ({
|
|
12895
12954
|
ingressOrEgress,
|
|
@@ -14266,16 +14325,83 @@ function renderCommonFormFiled(props) {
|
|
|
14266
14325
|
}
|
|
14267
14326
|
return ele;
|
|
14268
14327
|
}
|
|
14328
|
+
const MemoizedFormField = React.memo(function FormField({
|
|
14329
|
+
fieldConfig,
|
|
14330
|
+
control,
|
|
14331
|
+
getValues,
|
|
14332
|
+
trigger,
|
|
14333
|
+
action,
|
|
14334
|
+
formConfig,
|
|
14335
|
+
watch
|
|
14336
|
+
}) {
|
|
14337
|
+
const formValues = fieldConfig.condition ? watch() : {};
|
|
14338
|
+
const isDisplay = fieldConfig.condition ? fieldConfig.condition(formValues, lodashEs.get(formValues, fieldConfig.path.join("."))) !== false : true;
|
|
14339
|
+
if (!isDisplay) {
|
|
14340
|
+
return null;
|
|
14341
|
+
}
|
|
14342
|
+
return /* @__PURE__ */ common.jsxRuntimeExports.jsx(
|
|
14343
|
+
reactHookForm.Controller,
|
|
14344
|
+
{
|
|
14345
|
+
control,
|
|
14346
|
+
name: fieldConfig.path.join("."),
|
|
14347
|
+
rules: {
|
|
14348
|
+
async validate(value2) {
|
|
14349
|
+
const formValue = getValues();
|
|
14350
|
+
if (!fieldConfig.validators || fieldConfig.validators.length === 0)
|
|
14351
|
+
return true;
|
|
14352
|
+
for (const func of fieldConfig.validators) {
|
|
14353
|
+
const { isValid, errorMsg } = await func(value2, formValue, FormType.FORM);
|
|
14354
|
+
if (!isValid)
|
|
14355
|
+
return errorMsg;
|
|
14356
|
+
}
|
|
14357
|
+
return true;
|
|
14358
|
+
}
|
|
14359
|
+
},
|
|
14360
|
+
render: ({ field, fieldState }) => {
|
|
14361
|
+
var _a;
|
|
14362
|
+
const currentFormValue = getValues();
|
|
14363
|
+
const renderProps = {
|
|
14364
|
+
field,
|
|
14365
|
+
fieldConfig,
|
|
14366
|
+
action,
|
|
14367
|
+
control,
|
|
14368
|
+
trigger,
|
|
14369
|
+
formValue: currentFormValue
|
|
14370
|
+
};
|
|
14371
|
+
let ele = null;
|
|
14372
|
+
if (fieldConfig == null ? void 0 : fieldConfig.render) {
|
|
14373
|
+
ele = fieldConfig.render(renderProps);
|
|
14374
|
+
} else {
|
|
14375
|
+
ele = renderCommonFormFiled(renderProps);
|
|
14376
|
+
}
|
|
14377
|
+
return /* @__PURE__ */ common.jsxRuntimeExports.jsx(
|
|
14378
|
+
eagle.Form.Item,
|
|
14379
|
+
{
|
|
14380
|
+
label: fieldConfig.label,
|
|
14381
|
+
colon: false,
|
|
14382
|
+
labelCol: fieldConfig.layout === FormItemLayout.VERTICAL ? {} : { flex: `0 0 ${(formConfig == null ? void 0 : formConfig.labelWidth) || "216px"}` },
|
|
14383
|
+
help: fieldConfig.isHideErrorStatus ? "" : (_a = fieldState.error) == null ? void 0 : _a.message,
|
|
14384
|
+
extra: fieldConfig.helperText,
|
|
14385
|
+
validateStatus: fieldState.invalid && !fieldConfig.isHideErrorStatus ? "error" : void 0,
|
|
14386
|
+
"data-test-id": fieldConfig.key,
|
|
14387
|
+
className: fieldConfig.layout === FormItemLayout.VERTICAL ? VerticalFormItemStyle : "",
|
|
14388
|
+
children: ele
|
|
14389
|
+
},
|
|
14390
|
+
fieldConfig.key
|
|
14391
|
+
);
|
|
14392
|
+
}
|
|
14393
|
+
},
|
|
14394
|
+
fieldConfig.key
|
|
14395
|
+
);
|
|
14396
|
+
});
|
|
14269
14397
|
function FieldsContent(props) {
|
|
14270
14398
|
const { config, formConfig, resourceId, step, formResult, fields } = props;
|
|
14271
14399
|
const { control, getValues, watch, trigger } = formResult;
|
|
14272
14400
|
const action = resourceId ? "edit" : "create";
|
|
14273
|
-
const formValues = watch();
|
|
14274
14401
|
const formFieldsConfig = useFieldsConfig(config, { fields }, resourceId, step);
|
|
14275
14402
|
const fieldsEle = formFieldsConfig == null ? void 0 : formFieldsConfig.map((fieldConfig) => {
|
|
14276
|
-
var _a;
|
|
14277
14403
|
if ("fields" in fieldConfig) {
|
|
14278
|
-
return /* @__PURE__ */ common.jsxRuntimeExports.jsx(
|
|
14404
|
+
return /* @__PURE__ */ common.jsxRuntimeExports.jsx(React.Fragment, { children: /* @__PURE__ */ common.jsxRuntimeExports.jsx(
|
|
14279
14405
|
SectionTitle,
|
|
14280
14406
|
{
|
|
14281
14407
|
title: fieldConfig.title,
|
|
@@ -14293,62 +14419,21 @@ function FieldsContent(props) {
|
|
|
14293
14419
|
}
|
|
14294
14420
|
) })
|
|
14295
14421
|
}
|
|
14296
|
-
) });
|
|
14422
|
+
) }, fieldConfig.title);
|
|
14297
14423
|
}
|
|
14298
|
-
|
|
14299
|
-
|
|
14300
|
-
reactHookForm.Controller,
|
|
14424
|
+
return /* @__PURE__ */ common.jsxRuntimeExports.jsx(
|
|
14425
|
+
MemoizedFormField,
|
|
14301
14426
|
{
|
|
14427
|
+
fieldConfig,
|
|
14302
14428
|
control,
|
|
14303
|
-
|
|
14304
|
-
|
|
14305
|
-
|
|
14306
|
-
|
|
14307
|
-
|
|
14308
|
-
return true;
|
|
14309
|
-
for (const func of fieldConfig.validators) {
|
|
14310
|
-
const { isValid, errorMsg } = await func(value2, formValue, FormType.FORM);
|
|
14311
|
-
if (!isValid)
|
|
14312
|
-
return errorMsg;
|
|
14313
|
-
}
|
|
14314
|
-
return true;
|
|
14315
|
-
}
|
|
14316
|
-
},
|
|
14317
|
-
render: ({ field, fieldState }) => {
|
|
14318
|
-
var _a2;
|
|
14319
|
-
const renderProps = {
|
|
14320
|
-
field,
|
|
14321
|
-
fieldConfig,
|
|
14322
|
-
action,
|
|
14323
|
-
control,
|
|
14324
|
-
trigger,
|
|
14325
|
-
formValue: formValues
|
|
14326
|
-
};
|
|
14327
|
-
let ele = null;
|
|
14328
|
-
if (fieldConfig == null ? void 0 : fieldConfig.render) {
|
|
14329
|
-
ele = fieldConfig.render(renderProps);
|
|
14330
|
-
} else {
|
|
14331
|
-
ele = renderCommonFormFiled(renderProps);
|
|
14332
|
-
}
|
|
14333
|
-
return /* @__PURE__ */ common.jsxRuntimeExports.jsx(
|
|
14334
|
-
eagle.Form.Item,
|
|
14335
|
-
{
|
|
14336
|
-
label: fieldConfig.label,
|
|
14337
|
-
colon: false,
|
|
14338
|
-
labelCol: fieldConfig.layout === FormItemLayout.VERTICAL ? {} : { flex: `0 0 ${(formConfig == null ? void 0 : formConfig.labelWidth) || "216px"}` },
|
|
14339
|
-
help: fieldConfig.isHideErrorStatus ? "" : (_a2 = fieldState.error) == null ? void 0 : _a2.message,
|
|
14340
|
-
extra: fieldConfig.helperText,
|
|
14341
|
-
validateStatus: fieldState.invalid && !fieldConfig.isHideErrorStatus ? "error" : void 0,
|
|
14342
|
-
"data-test-id": fieldConfig.key,
|
|
14343
|
-
className: fieldConfig.layout === FormItemLayout.VERTICAL ? VerticalFormItemStyle : "",
|
|
14344
|
-
children: ele
|
|
14345
|
-
},
|
|
14346
|
-
fieldConfig.key
|
|
14347
|
-
);
|
|
14348
|
-
}
|
|
14429
|
+
getValues,
|
|
14430
|
+
trigger,
|
|
14431
|
+
action,
|
|
14432
|
+
formConfig,
|
|
14433
|
+
watch
|
|
14349
14434
|
},
|
|
14350
14435
|
fieldConfig.key
|
|
14351
|
-
)
|
|
14436
|
+
);
|
|
14352
14437
|
});
|
|
14353
14438
|
return /* @__PURE__ */ common.jsxRuntimeExports.jsx("div", { className: ContentWrapper, children: fieldsEle });
|
|
14354
14439
|
}
|
|
@@ -15086,7 +15171,7 @@ const PlainCodeStyle = "pqch97v";
|
|
|
15086
15171
|
const ErrorMsgStyle = "eh2qjnl";
|
|
15087
15172
|
const ErrorWrapperStyle = "e19q2bnp";
|
|
15088
15173
|
const YamlEditorStyle = "y16u5v3w";
|
|
15089
|
-
const MonacoYamlEditor = React.lazy(() => Promise.resolve().then(() => require("./MonacoYamlEditor-
|
|
15174
|
+
const MonacoYamlEditor = React.lazy(() => Promise.resolve().then(() => require("./MonacoYamlEditor-16a71448.cjs")));
|
|
15090
15175
|
const MonacoYamlDiffEditor = React.lazy(() => Promise.resolve().then(() => require("./MonacoYamlDiffEditor-7a07db88.cjs")));
|
|
15091
15176
|
const YamlEditorComponent = React.forwardRef(
|
|
15092
15177
|
function YamlEditorComponent2(props, ref) {
|
|
@@ -18960,10 +19045,12 @@ exports.DrawerShow = DrawerShow;
|
|
|
18960
19045
|
exports.DurationColumnRenderer = DurationColumnRenderer;
|
|
18961
19046
|
exports.DurationField = DurationField;
|
|
18962
19047
|
exports.EditAnnotationDropdownMenuItem = EditAnnotationDropdownMenuItem;
|
|
19048
|
+
exports.EditAnnotationForm = EditAnnotationForm;
|
|
18963
19049
|
exports.EditButton = EditButton;
|
|
18964
19050
|
exports.EditField = EditField;
|
|
18965
19051
|
exports.EditFieldModal = EditFieldModal;
|
|
18966
19052
|
exports.EditLabelDropdownMenuItem = EditLabelDropdownMenuItem;
|
|
19053
|
+
exports.EditLabelForm = EditLabelForm;
|
|
18967
19054
|
exports.EditNodeTaintDropdownMenuItem = EditNodeTaintDropdownMenuItem;
|
|
18968
19055
|
exports.ErrorContentType = ErrorContentType;
|
|
18969
19056
|
exports.ErrorWrapper = ErrorWrapper;
|
|
@@ -19023,6 +19110,8 @@ exports.NetworkPolicyRulesViewer = NetworkPolicyRulesViewer;
|
|
|
19023
19110
|
exports.NodeModel = NodeModel;
|
|
19024
19111
|
exports.NodeNameColumnRenderer = NodeNameColumnRenderer;
|
|
19025
19112
|
exports.NodeRole = NodeRole;
|
|
19113
|
+
exports.NodeTaintEffect = NodeTaintEffect;
|
|
19114
|
+
exports.NodeTaintEffectSelect = NodeTaintEffectSelect;
|
|
19026
19115
|
exports.NodeTaintsField = NodeTaintsField;
|
|
19027
19116
|
exports.NodeTaintsGroup = NodeTaintsGroup;
|
|
19028
19117
|
exports.POD_INIT_VALUE = POD_INIT_VALUE;
|
|
@@ -19193,7 +19282,8 @@ exports.useNamespacesFilter = useNamespacesFilter;
|
|
|
19193
19282
|
exports.useOpenForm = useOpenForm;
|
|
19194
19283
|
exports.useRefineForm = useRefineForm;
|
|
19195
19284
|
exports.useSchema = useSchema;
|
|
19196
|
-
exports.
|
|
19285
|
+
exports.validateDataKey = validateDataKey;
|
|
19286
|
+
exports.validateDnsSubdomainName = validateDnsSubdomainName;
|
|
19197
19287
|
exports.validateLabelKey = validateLabelKey;
|
|
19198
19288
|
exports.validateLabelValue = validateLabelValue;
|
|
19199
19289
|
exports.validateNodePort = validateNodePort;
|
|
@@ -255,11 +255,13 @@ declare const _default: {
|
|
|
255
255
|
length_limit: string;
|
|
256
256
|
rf1123_name_format_error: string;
|
|
257
257
|
rf1035_name_format_error: string;
|
|
258
|
+
dns_subdomain_name_format_error: string;
|
|
258
259
|
name_duplicated: string;
|
|
259
260
|
input_correct_port: string;
|
|
260
261
|
auto_generate: string;
|
|
261
262
|
specify_port: string;
|
|
262
263
|
node_port_duplicated: string;
|
|
264
|
+
all: string;
|
|
263
265
|
};
|
|
264
266
|
};
|
|
265
267
|
export default _default;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { GlobalStore, Unstructured } from 'k8s-api-provider';
|
|
2
2
|
import type { Pod } from 'kubernetes-types/core/v1';
|
|
3
3
|
import { DeploymentModel } from './deployment-model';
|
|
4
|
-
import { ReplicaSetModel } from './replicaset-model';
|
|
5
4
|
import { ResourceQuantity } from './types/metric';
|
|
6
5
|
import { WorkloadBaseModel } from './workload-base-model';
|
|
7
6
|
type RequiredPod = Required<Pod> & Unstructured;
|
|
@@ -11,9 +10,8 @@ export declare class PodModel extends WorkloadBaseModel {
|
|
|
11
10
|
limit: ResourceQuantity;
|
|
12
11
|
spec?: RequiredPod['spec'];
|
|
13
12
|
status?: RequiredPod['status'];
|
|
14
|
-
belongToDeployment: DeploymentModel | undefined;
|
|
15
13
|
constructor(_rawYaml: RequiredPod, _globalStore: GlobalStore);
|
|
16
|
-
getBelongToDeployment(deployments: DeploymentModel[]
|
|
14
|
+
getBelongToDeployment(deployments: DeploymentModel[]): DeploymentModel | undefined;
|
|
17
15
|
get imageNames(): string[];
|
|
18
16
|
get restarts(): number;
|
|
19
17
|
get readyDisplay(): string;
|
package/dist/refine.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const refine = require("./index-
|
|
3
|
+
const refine = require("./index-ce201e8c.cjs");
|
|
4
4
|
require("./common-1eb43414.cjs");
|
|
5
5
|
require("@cloudtower/eagle");
|
|
6
6
|
require("@refinedev/core");
|
|
@@ -57,10 +57,12 @@ exports.DrawerShow = refine.DrawerShow;
|
|
|
57
57
|
exports.DurationColumnRenderer = refine.DurationColumnRenderer;
|
|
58
58
|
exports.DurationField = refine.DurationField;
|
|
59
59
|
exports.EditAnnotationDropdownMenuItem = refine.EditAnnotationDropdownMenuItem;
|
|
60
|
+
exports.EditAnnotationForm = refine.EditAnnotationForm;
|
|
60
61
|
exports.EditButton = refine.EditButton;
|
|
61
62
|
exports.EditField = refine.EditField;
|
|
62
63
|
exports.EditFieldModal = refine.EditFieldModal;
|
|
63
64
|
exports.EditLabelDropdownMenuItem = refine.EditLabelDropdownMenuItem;
|
|
65
|
+
exports.EditLabelForm = refine.EditLabelForm;
|
|
64
66
|
exports.EditNodeTaintDropdownMenuItem = refine.EditNodeTaintDropdownMenuItem;
|
|
65
67
|
exports.ErrorContent = refine.WidgetErrorContent;
|
|
66
68
|
exports.ErrorContentType = refine.ErrorContentType;
|
|
@@ -121,6 +123,8 @@ exports.NetworkPolicyRulesViewer = refine.NetworkPolicyRulesViewer;
|
|
|
121
123
|
exports.NodeModel = refine.NodeModel;
|
|
122
124
|
exports.NodeNameColumnRenderer = refine.NodeNameColumnRenderer;
|
|
123
125
|
exports.NodeRole = refine.NodeRole;
|
|
126
|
+
exports.NodeTaintEffect = refine.NodeTaintEffect;
|
|
127
|
+
exports.NodeTaintEffectSelect = refine.NodeTaintEffectSelect;
|
|
124
128
|
exports.NodeTaintsField = refine.NodeTaintsField;
|
|
125
129
|
exports.NodeTaintsGroup = refine.NodeTaintsGroup;
|
|
126
130
|
exports.POD_INIT_VALUE = refine.POD_INIT_VALUE;
|
|
@@ -289,7 +293,8 @@ exports.useNamespacesFilter = refine.useNamespacesFilter;
|
|
|
289
293
|
exports.useOpenForm = refine.useOpenForm;
|
|
290
294
|
exports.useRefineForm = refine.useRefineForm;
|
|
291
295
|
exports.useSchema = refine.useSchema;
|
|
292
|
-
exports.
|
|
296
|
+
exports.validateDataKey = refine.validateDataKey;
|
|
297
|
+
exports.validateDnsSubdomainName = refine.validateDnsSubdomainName;
|
|
293
298
|
exports.validateLabelKey = refine.validateLabelKey;
|
|
294
299
|
exports.validateLabelValue = refine.validateLabelValue;
|
|
295
300
|
exports.validateNodePort = refine.validateNodePort;
|