@dovetail-v2/refine 0.3.23-alpha.1 → 0.3.24-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/i18n.d.ts +26 -0
- package/dist/locales/en-US/index.d.ts +24 -0
- package/dist/locales/zh-CN/index.d.ts +2 -0
- package/dist/refine.cjs +87 -12
- package/dist/refine.js +87 -12
- package/dist/utils/validation.d.ts +8 -0
- package/package.json +1 -1
package/dist/i18n.d.ts
CHANGED
|
@@ -253,6 +253,30 @@ export declare const resources: {
|
|
|
253
253
|
input_correct_port: string;
|
|
254
254
|
optional_with_bracket: string;
|
|
255
255
|
label_annotations: string;
|
|
256
|
+
job_pod_count_tooltip: string;
|
|
257
|
+
add: string;
|
|
258
|
+
import_from_file: string;
|
|
259
|
+
specify_workload: string;
|
|
260
|
+
container_port: string;
|
|
261
|
+
add_port: string;
|
|
262
|
+
rf1035_name_format_error: string;
|
|
263
|
+
dns_subdomain_name_format_error: string;
|
|
264
|
+
port_range_limit: string;
|
|
265
|
+
node_port_range_limit: string;
|
|
266
|
+
auto_generate: string;
|
|
267
|
+
specify_port: string;
|
|
268
|
+
node_port_duplicated: string;
|
|
269
|
+
all: string;
|
|
270
|
+
target_service: string;
|
|
271
|
+
target_service_port: string;
|
|
272
|
+
select_workload: string;
|
|
273
|
+
no_search_result: string;
|
|
274
|
+
clear_search_condition: string;
|
|
275
|
+
no_labels: string;
|
|
276
|
+
no_annotations: string;
|
|
277
|
+
pause_scheduling: string;
|
|
278
|
+
port_name: string;
|
|
279
|
+
target_port_range_limit: string;
|
|
256
280
|
};
|
|
257
281
|
};
|
|
258
282
|
'zh-CN': {
|
|
@@ -514,6 +538,7 @@ export declare const resources: {
|
|
|
514
538
|
name_duplicated: string;
|
|
515
539
|
input_correct_port: string;
|
|
516
540
|
port_range_limit: string;
|
|
541
|
+
target_port_range_limit: string;
|
|
517
542
|
node_port_range_limit: string;
|
|
518
543
|
auto_generate: string;
|
|
519
544
|
specify_port: string;
|
|
@@ -529,6 +554,7 @@ export declare const resources: {
|
|
|
529
554
|
no_labels: string;
|
|
530
555
|
no_annotations: string;
|
|
531
556
|
pause_scheduling: string;
|
|
557
|
+
service_port_name_tip: string;
|
|
532
558
|
};
|
|
533
559
|
};
|
|
534
560
|
};
|
|
@@ -250,6 +250,30 @@ declare const _default: {
|
|
|
250
250
|
input_correct_port: string;
|
|
251
251
|
optional_with_bracket: string;
|
|
252
252
|
label_annotations: string;
|
|
253
|
+
job_pod_count_tooltip: string;
|
|
254
|
+
add: string;
|
|
255
|
+
import_from_file: string;
|
|
256
|
+
specify_workload: string;
|
|
257
|
+
container_port: string;
|
|
258
|
+
add_port: string;
|
|
259
|
+
rf1035_name_format_error: string;
|
|
260
|
+
dns_subdomain_name_format_error: string;
|
|
261
|
+
port_range_limit: string;
|
|
262
|
+
node_port_range_limit: string;
|
|
263
|
+
auto_generate: string;
|
|
264
|
+
specify_port: string;
|
|
265
|
+
node_port_duplicated: string;
|
|
266
|
+
all: string;
|
|
267
|
+
target_service: string;
|
|
268
|
+
target_service_port: string;
|
|
269
|
+
select_workload: string;
|
|
270
|
+
no_search_result: string;
|
|
271
|
+
clear_search_condition: string;
|
|
272
|
+
no_labels: string;
|
|
273
|
+
no_annotations: string;
|
|
274
|
+
pause_scheduling: string;
|
|
275
|
+
port_name: string;
|
|
276
|
+
target_port_range_limit: string;
|
|
253
277
|
};
|
|
254
278
|
};
|
|
255
279
|
export default _default;
|
|
@@ -257,6 +257,7 @@ declare const _default: {
|
|
|
257
257
|
name_duplicated: string;
|
|
258
258
|
input_correct_port: string;
|
|
259
259
|
port_range_limit: string;
|
|
260
|
+
target_port_range_limit: string;
|
|
260
261
|
node_port_range_limit: string;
|
|
261
262
|
auto_generate: string;
|
|
262
263
|
specify_port: string;
|
|
@@ -272,6 +273,7 @@ declare const _default: {
|
|
|
272
273
|
no_labels: string;
|
|
273
274
|
no_annotations: string;
|
|
274
275
|
pause_scheduling: string;
|
|
276
|
+
service_port_name_tip: string;
|
|
275
277
|
};
|
|
276
278
|
};
|
|
277
279
|
export default _default;
|
package/dist/refine.cjs
CHANGED
|
@@ -707,6 +707,30 @@ const name_duplicated$1 = "The name already exists.";
|
|
|
707
707
|
const input_correct_port$1 = "Please fill in a valid port number.";
|
|
708
708
|
const optional_with_bracket$1 = "(optional)";
|
|
709
709
|
const label_annotations$1 = "Label & Annotation";
|
|
710
|
+
const job_pod_count_tooltip$1 = "Completed/All";
|
|
711
|
+
const add$1 = "Add";
|
|
712
|
+
const import_from_file$1 = "Import from file";
|
|
713
|
+
const specify_workload$1 = "Specify workload";
|
|
714
|
+
const container_port$1 = "Container port";
|
|
715
|
+
const add_port$1 = "Add port";
|
|
716
|
+
const rf1035_name_format_error$1 = "Only lowercase letters, digits, and hyphens (-) are allowed, and the name must start with a lowercase letter and end with a lowercase letter or digit.";
|
|
717
|
+
const dns_subdomain_name_format_error$1 = "Only lowercase letters, digits, hyphens (-), and dots (.) are allowed, and the name must start and end with a lowercase letter or digit.";
|
|
718
|
+
const port_range_limit$1 = "Only integers between 1 and 65535 are supported.";
|
|
719
|
+
const node_port_range_limit$1 = "Only integers between 30000 and 32767 are supported.";
|
|
720
|
+
const auto_generate$1 = "Auto-generate";
|
|
721
|
+
const specify_port$1 = "Specify port";
|
|
722
|
+
const node_port_duplicated$1 = "The port is already in use.";
|
|
723
|
+
const all$1 = "All";
|
|
724
|
+
const target_service$1 = "Target service";
|
|
725
|
+
const target_service_port$1 = "Target service port";
|
|
726
|
+
const select_workload$1 = "Select workload";
|
|
727
|
+
const no_search_result$1 = "No search results";
|
|
728
|
+
const clear_search_condition$1 = "Clear search criteria";
|
|
729
|
+
const no_labels$1 = "No labels";
|
|
730
|
+
const no_annotations$1 = "No annotations";
|
|
731
|
+
const pause_scheduling$1 = "Suspend scheduling";
|
|
732
|
+
const port_name$1 = "Port name";
|
|
733
|
+
const target_port_range_limit$1 = "Only integers between 1 and 65535, or strings, are supported.";
|
|
710
734
|
const dovetail$1 = {
|
|
711
735
|
copy: copy$1,
|
|
712
736
|
reset_arguments: reset_arguments$1,
|
|
@@ -957,7 +981,31 @@ const dovetail$1 = {
|
|
|
957
981
|
name_duplicated: name_duplicated$1,
|
|
958
982
|
input_correct_port: input_correct_port$1,
|
|
959
983
|
optional_with_bracket: optional_with_bracket$1,
|
|
960
|
-
label_annotations: label_annotations$1
|
|
984
|
+
label_annotations: label_annotations$1,
|
|
985
|
+
job_pod_count_tooltip: job_pod_count_tooltip$1,
|
|
986
|
+
add: add$1,
|
|
987
|
+
import_from_file: import_from_file$1,
|
|
988
|
+
specify_workload: specify_workload$1,
|
|
989
|
+
container_port: container_port$1,
|
|
990
|
+
add_port: add_port$1,
|
|
991
|
+
rf1035_name_format_error: rf1035_name_format_error$1,
|
|
992
|
+
dns_subdomain_name_format_error: dns_subdomain_name_format_error$1,
|
|
993
|
+
port_range_limit: port_range_limit$1,
|
|
994
|
+
node_port_range_limit: node_port_range_limit$1,
|
|
995
|
+
auto_generate: auto_generate$1,
|
|
996
|
+
specify_port: specify_port$1,
|
|
997
|
+
node_port_duplicated: node_port_duplicated$1,
|
|
998
|
+
all: all$1,
|
|
999
|
+
target_service: target_service$1,
|
|
1000
|
+
target_service_port: target_service_port$1,
|
|
1001
|
+
select_workload: select_workload$1,
|
|
1002
|
+
no_search_result: no_search_result$1,
|
|
1003
|
+
clear_search_condition: clear_search_condition$1,
|
|
1004
|
+
no_labels: no_labels$1,
|
|
1005
|
+
no_annotations: no_annotations$1,
|
|
1006
|
+
pause_scheduling: pause_scheduling$1,
|
|
1007
|
+
port_name: port_name$1,
|
|
1008
|
+
target_port_range_limit: target_port_range_limit$1
|
|
961
1009
|
};
|
|
962
1010
|
const EN = {
|
|
963
1011
|
dovetail: dovetail$1
|
|
@@ -1216,6 +1264,7 @@ const dns_subdomain_name_format_error = "仅支持小写字母、数字、连字
|
|
|
1216
1264
|
const name_duplicated = "名称已存在。";
|
|
1217
1265
|
const input_correct_port = "请填写有效的端口号。";
|
|
1218
1266
|
const port_range_limit = "仅支持 1-65535 之间的整数。";
|
|
1267
|
+
const target_port_range_limit = "仅支持 1-65535 之间的整数或字符串。";
|
|
1219
1268
|
const node_port_range_limit = "仅支持 30000-32767 之间的整数。";
|
|
1220
1269
|
const auto_generate = "自动生成";
|
|
1221
1270
|
const specify_port = "指定端口";
|
|
@@ -1231,6 +1280,7 @@ const clear_search_condition = "清空搜索条件";
|
|
|
1231
1280
|
const no_labels = "无标签";
|
|
1232
1281
|
const no_annotations = "无注解";
|
|
1233
1282
|
const pause_scheduling = "暂停调度";
|
|
1283
|
+
const service_port_name_tip = "当端口数量为 1 个时,名称为选填项,当端口数量大于 1 个时,名称为必填项。";
|
|
1234
1284
|
const dovetail = {
|
|
1235
1285
|
copy,
|
|
1236
1286
|
reset_arguments,
|
|
@@ -1489,6 +1539,7 @@ const dovetail = {
|
|
|
1489
1539
|
name_duplicated,
|
|
1490
1540
|
input_correct_port,
|
|
1491
1541
|
port_range_limit,
|
|
1542
|
+
target_port_range_limit,
|
|
1492
1543
|
node_port_range_limit,
|
|
1493
1544
|
auto_generate,
|
|
1494
1545
|
specify_port,
|
|
@@ -1503,7 +1554,8 @@ const dovetail = {
|
|
|
1503
1554
|
clear_search_condition,
|
|
1504
1555
|
no_labels,
|
|
1505
1556
|
no_annotations,
|
|
1506
|
-
pause_scheduling
|
|
1557
|
+
pause_scheduling,
|
|
1558
|
+
service_port_name_tip
|
|
1507
1559
|
};
|
|
1508
1560
|
const ZH = {
|
|
1509
1561
|
dovetail
|
|
@@ -5760,7 +5812,7 @@ lodash.exports;
|
|
|
5760
5812
|
customizer = typeof customizer == "function" ? customizer : undefined$1;
|
|
5761
5813
|
return baseIsMatch(object2, source, getMatchData(source), customizer);
|
|
5762
5814
|
}
|
|
5763
|
-
function
|
|
5815
|
+
function isNaN2(value2) {
|
|
5764
5816
|
return isNumber(value2) && value2 != +value2;
|
|
5765
5817
|
}
|
|
5766
5818
|
function isNative(value2) {
|
|
@@ -6837,7 +6889,7 @@ lodash.exports;
|
|
|
6837
6889
|
lodash2.isMap = isMap;
|
|
6838
6890
|
lodash2.isMatch = isMatch;
|
|
6839
6891
|
lodash2.isMatchWith = isMatchWith;
|
|
6840
|
-
lodash2.isNaN =
|
|
6892
|
+
lodash2.isNaN = isNaN2;
|
|
6841
6893
|
lodash2.isNative = isNative;
|
|
6842
6894
|
lodash2.isNil = isNil;
|
|
6843
6895
|
lodash2.isNull = isNull;
|
|
@@ -10284,9 +10336,7 @@ const ServiceOutClusterAccessComponent = ({
|
|
|
10284
10336
|
}
|
|
10285
10337
|
return /* @__PURE__ */ common.jsxRuntimeExports.jsx("div", {
|
|
10286
10338
|
style: {
|
|
10287
|
-
whiteSpace: "pre-wrap"
|
|
10288
|
-
color: "#0080ff",
|
|
10289
|
-
height: "18px"
|
|
10339
|
+
whiteSpace: "pre-wrap"
|
|
10290
10340
|
},
|
|
10291
10341
|
children: content || "-"
|
|
10292
10342
|
});
|
|
@@ -10839,6 +10889,27 @@ function validatePort(port2, options) {
|
|
|
10839
10889
|
}
|
|
10840
10890
|
return { isValid: true };
|
|
10841
10891
|
}
|
|
10892
|
+
function validatePortNameAndNumber(port2, options) {
|
|
10893
|
+
const { isOptional, emptyText, i18n: i18n2 } = options;
|
|
10894
|
+
if (port2 === "" && !isOptional) {
|
|
10895
|
+
return {
|
|
10896
|
+
isValid: false,
|
|
10897
|
+
errorMessage: emptyText || i18n2.t("dovetail.required_field", {
|
|
10898
|
+
label: i18n2.t("dovetail.port")
|
|
10899
|
+
})
|
|
10900
|
+
};
|
|
10901
|
+
}
|
|
10902
|
+
if (port2 === "") {
|
|
10903
|
+
return { isValid: true };
|
|
10904
|
+
}
|
|
10905
|
+
const portNumber = Number(port2);
|
|
10906
|
+
if (!isNaN(portNumber)) {
|
|
10907
|
+
if (portNumber < 1 || portNumber > 65535) {
|
|
10908
|
+
return { isValid: false, errorMessage: i18n2.t("dovetail.target_port_range_limit") };
|
|
10909
|
+
}
|
|
10910
|
+
}
|
|
10911
|
+
return { isValid: true };
|
|
10912
|
+
}
|
|
10842
10913
|
function validateNodePort(nodePort, allNodePorts, i18n2) {
|
|
10843
10914
|
if (nodePort === "") {
|
|
10844
10915
|
return {
|
|
@@ -18951,7 +19022,7 @@ const PortsConfigForm = React.forwardRef(function PortsConfigForm2({ value: valu
|
|
|
18951
19022
|
},
|
|
18952
19023
|
{
|
|
18953
19024
|
key: "name",
|
|
18954
|
-
title:
|
|
19025
|
+
title: /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Tooltip, { title: i18n2.t("dovetail.service_port_name_tip"), children: /* @__PURE__ */ common.jsxRuntimeExports.jsx("span", { className: DashedTitleStyle, children: i18n2.t("dovetail.name") }) }),
|
|
18955
19026
|
type: "input",
|
|
18956
19027
|
validator: ({ value: portName, rowIndex }) => {
|
|
18957
19028
|
const { errorMessage } = validateRfc1123Name({
|
|
@@ -18995,17 +19066,20 @@ const PortsConfigForm = React.forwardRef(function PortsConfigForm2({ value: valu
|
|
|
18995
19066
|
title: i18n2.t("dovetail.container_port"),
|
|
18996
19067
|
render: ({ value: value22, onChange: onChange2 }) => {
|
|
18997
19068
|
return /* @__PURE__ */ common.jsxRuntimeExports.jsx(
|
|
18998
|
-
eagle.
|
|
19069
|
+
eagle.Input,
|
|
18999
19070
|
{
|
|
19000
19071
|
value: value22,
|
|
19001
19072
|
size: "small",
|
|
19002
|
-
|
|
19003
|
-
|
|
19073
|
+
onChange: (e2) => {
|
|
19074
|
+
const v = e2.target.value;
|
|
19075
|
+
const num = Number(v);
|
|
19076
|
+
onChange2(!v || isNaN(num) ? v : num);
|
|
19077
|
+
}
|
|
19004
19078
|
}
|
|
19005
19079
|
);
|
|
19006
19080
|
},
|
|
19007
19081
|
validator: ({ value: value22 }) => {
|
|
19008
|
-
const { isValid, errorMessage } =
|
|
19082
|
+
const { isValid, errorMessage } = validatePortNameAndNumber(value22 ?? "", {
|
|
19009
19083
|
isOptional: false,
|
|
19010
19084
|
i18n: i18n2,
|
|
19011
19085
|
emptyText: i18n2.t("dovetail.required_field", {
|
|
@@ -20518,5 +20592,6 @@ exports.validateLabelKey = validateLabelKey;
|
|
|
20518
20592
|
exports.validateLabelValue = validateLabelValue;
|
|
20519
20593
|
exports.validateNodePort = validateNodePort;
|
|
20520
20594
|
exports.validatePort = validatePort;
|
|
20595
|
+
exports.validatePortNameAndNumber = validatePortNameAndNumber;
|
|
20521
20596
|
exports.validateResourceName = validateResourceName;
|
|
20522
20597
|
exports.validateRfc1123Name = validateRfc1123Name;
|
package/dist/refine.js
CHANGED
|
@@ -688,6 +688,30 @@ const name_duplicated$1 = "The name already exists.";
|
|
|
688
688
|
const input_correct_port$1 = "Please fill in a valid port number.";
|
|
689
689
|
const optional_with_bracket$1 = "(optional)";
|
|
690
690
|
const label_annotations$1 = "Label & Annotation";
|
|
691
|
+
const job_pod_count_tooltip$1 = "Completed/All";
|
|
692
|
+
const add$1 = "Add";
|
|
693
|
+
const import_from_file$1 = "Import from file";
|
|
694
|
+
const specify_workload$1 = "Specify workload";
|
|
695
|
+
const container_port$1 = "Container port";
|
|
696
|
+
const add_port$1 = "Add port";
|
|
697
|
+
const rf1035_name_format_error$1 = "Only lowercase letters, digits, and hyphens (-) are allowed, and the name must start with a lowercase letter and end with a lowercase letter or digit.";
|
|
698
|
+
const dns_subdomain_name_format_error$1 = "Only lowercase letters, digits, hyphens (-), and dots (.) are allowed, and the name must start and end with a lowercase letter or digit.";
|
|
699
|
+
const port_range_limit$1 = "Only integers between 1 and 65535 are supported.";
|
|
700
|
+
const node_port_range_limit$1 = "Only integers between 30000 and 32767 are supported.";
|
|
701
|
+
const auto_generate$1 = "Auto-generate";
|
|
702
|
+
const specify_port$1 = "Specify port";
|
|
703
|
+
const node_port_duplicated$1 = "The port is already in use.";
|
|
704
|
+
const all$1 = "All";
|
|
705
|
+
const target_service$1 = "Target service";
|
|
706
|
+
const target_service_port$1 = "Target service port";
|
|
707
|
+
const select_workload$1 = "Select workload";
|
|
708
|
+
const no_search_result$1 = "No search results";
|
|
709
|
+
const clear_search_condition$1 = "Clear search criteria";
|
|
710
|
+
const no_labels$1 = "No labels";
|
|
711
|
+
const no_annotations$1 = "No annotations";
|
|
712
|
+
const pause_scheduling$1 = "Suspend scheduling";
|
|
713
|
+
const port_name$1 = "Port name";
|
|
714
|
+
const target_port_range_limit$1 = "Only integers between 1 and 65535, or strings, are supported.";
|
|
691
715
|
const dovetail$1 = {
|
|
692
716
|
copy: copy$1,
|
|
693
717
|
reset_arguments: reset_arguments$1,
|
|
@@ -938,7 +962,31 @@ const dovetail$1 = {
|
|
|
938
962
|
name_duplicated: name_duplicated$1,
|
|
939
963
|
input_correct_port: input_correct_port$1,
|
|
940
964
|
optional_with_bracket: optional_with_bracket$1,
|
|
941
|
-
label_annotations: label_annotations$1
|
|
965
|
+
label_annotations: label_annotations$1,
|
|
966
|
+
job_pod_count_tooltip: job_pod_count_tooltip$1,
|
|
967
|
+
add: add$1,
|
|
968
|
+
import_from_file: import_from_file$1,
|
|
969
|
+
specify_workload: specify_workload$1,
|
|
970
|
+
container_port: container_port$1,
|
|
971
|
+
add_port: add_port$1,
|
|
972
|
+
rf1035_name_format_error: rf1035_name_format_error$1,
|
|
973
|
+
dns_subdomain_name_format_error: dns_subdomain_name_format_error$1,
|
|
974
|
+
port_range_limit: port_range_limit$1,
|
|
975
|
+
node_port_range_limit: node_port_range_limit$1,
|
|
976
|
+
auto_generate: auto_generate$1,
|
|
977
|
+
specify_port: specify_port$1,
|
|
978
|
+
node_port_duplicated: node_port_duplicated$1,
|
|
979
|
+
all: all$1,
|
|
980
|
+
target_service: target_service$1,
|
|
981
|
+
target_service_port: target_service_port$1,
|
|
982
|
+
select_workload: select_workload$1,
|
|
983
|
+
no_search_result: no_search_result$1,
|
|
984
|
+
clear_search_condition: clear_search_condition$1,
|
|
985
|
+
no_labels: no_labels$1,
|
|
986
|
+
no_annotations: no_annotations$1,
|
|
987
|
+
pause_scheduling: pause_scheduling$1,
|
|
988
|
+
port_name: port_name$1,
|
|
989
|
+
target_port_range_limit: target_port_range_limit$1
|
|
942
990
|
};
|
|
943
991
|
const EN = {
|
|
944
992
|
dovetail: dovetail$1
|
|
@@ -1197,6 +1245,7 @@ const dns_subdomain_name_format_error = "仅支持小写字母、数字、连字
|
|
|
1197
1245
|
const name_duplicated = "名称已存在。";
|
|
1198
1246
|
const input_correct_port = "请填写有效的端口号。";
|
|
1199
1247
|
const port_range_limit = "仅支持 1-65535 之间的整数。";
|
|
1248
|
+
const target_port_range_limit = "仅支持 1-65535 之间的整数或字符串。";
|
|
1200
1249
|
const node_port_range_limit = "仅支持 30000-32767 之间的整数。";
|
|
1201
1250
|
const auto_generate = "自动生成";
|
|
1202
1251
|
const specify_port = "指定端口";
|
|
@@ -1212,6 +1261,7 @@ const clear_search_condition = "清空搜索条件";
|
|
|
1212
1261
|
const no_labels = "无标签";
|
|
1213
1262
|
const no_annotations = "无注解";
|
|
1214
1263
|
const pause_scheduling = "暂停调度";
|
|
1264
|
+
const service_port_name_tip = "当端口数量为 1 个时,名称为选填项,当端口数量大于 1 个时,名称为必填项。";
|
|
1215
1265
|
const dovetail = {
|
|
1216
1266
|
copy,
|
|
1217
1267
|
reset_arguments,
|
|
@@ -1470,6 +1520,7 @@ const dovetail = {
|
|
|
1470
1520
|
name_duplicated,
|
|
1471
1521
|
input_correct_port,
|
|
1472
1522
|
port_range_limit,
|
|
1523
|
+
target_port_range_limit,
|
|
1473
1524
|
node_port_range_limit,
|
|
1474
1525
|
auto_generate,
|
|
1475
1526
|
specify_port,
|
|
@@ -1484,7 +1535,8 @@ const dovetail = {
|
|
|
1484
1535
|
clear_search_condition,
|
|
1485
1536
|
no_labels,
|
|
1486
1537
|
no_annotations,
|
|
1487
|
-
pause_scheduling
|
|
1538
|
+
pause_scheduling,
|
|
1539
|
+
service_port_name_tip
|
|
1488
1540
|
};
|
|
1489
1541
|
const ZH = {
|
|
1490
1542
|
dovetail
|
|
@@ -5741,7 +5793,7 @@ lodash.exports;
|
|
|
5741
5793
|
customizer = typeof customizer == "function" ? customizer : undefined$1;
|
|
5742
5794
|
return baseIsMatch(object2, source, getMatchData(source), customizer);
|
|
5743
5795
|
}
|
|
5744
|
-
function
|
|
5796
|
+
function isNaN2(value2) {
|
|
5745
5797
|
return isNumber(value2) && value2 != +value2;
|
|
5746
5798
|
}
|
|
5747
5799
|
function isNative(value2) {
|
|
@@ -6818,7 +6870,7 @@ lodash.exports;
|
|
|
6818
6870
|
lodash2.isMap = isMap;
|
|
6819
6871
|
lodash2.isMatch = isMatch;
|
|
6820
6872
|
lodash2.isMatchWith = isMatchWith;
|
|
6821
|
-
lodash2.isNaN =
|
|
6873
|
+
lodash2.isNaN = isNaN2;
|
|
6822
6874
|
lodash2.isNative = isNative;
|
|
6823
6875
|
lodash2.isNil = isNil;
|
|
6824
6876
|
lodash2.isNull = isNull;
|
|
@@ -10265,9 +10317,7 @@ const ServiceOutClusterAccessComponent = ({
|
|
|
10265
10317
|
}
|
|
10266
10318
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
10267
10319
|
style: {
|
|
10268
|
-
whiteSpace: "pre-wrap"
|
|
10269
|
-
color: "#0080ff",
|
|
10270
|
-
height: "18px"
|
|
10320
|
+
whiteSpace: "pre-wrap"
|
|
10271
10321
|
},
|
|
10272
10322
|
children: content || "-"
|
|
10273
10323
|
});
|
|
@@ -10820,6 +10870,27 @@ function validatePort(port2, options) {
|
|
|
10820
10870
|
}
|
|
10821
10871
|
return { isValid: true };
|
|
10822
10872
|
}
|
|
10873
|
+
function validatePortNameAndNumber(port2, options) {
|
|
10874
|
+
const { isOptional, emptyText, i18n: i18n2 } = options;
|
|
10875
|
+
if (port2 === "" && !isOptional) {
|
|
10876
|
+
return {
|
|
10877
|
+
isValid: false,
|
|
10878
|
+
errorMessage: emptyText || i18n2.t("dovetail.required_field", {
|
|
10879
|
+
label: i18n2.t("dovetail.port")
|
|
10880
|
+
})
|
|
10881
|
+
};
|
|
10882
|
+
}
|
|
10883
|
+
if (port2 === "") {
|
|
10884
|
+
return { isValid: true };
|
|
10885
|
+
}
|
|
10886
|
+
const portNumber = Number(port2);
|
|
10887
|
+
if (!isNaN(portNumber)) {
|
|
10888
|
+
if (portNumber < 1 || portNumber > 65535) {
|
|
10889
|
+
return { isValid: false, errorMessage: i18n2.t("dovetail.target_port_range_limit") };
|
|
10890
|
+
}
|
|
10891
|
+
}
|
|
10892
|
+
return { isValid: true };
|
|
10893
|
+
}
|
|
10823
10894
|
function validateNodePort(nodePort, allNodePorts, i18n2) {
|
|
10824
10895
|
if (nodePort === "") {
|
|
10825
10896
|
return {
|
|
@@ -18932,7 +19003,7 @@ const PortsConfigForm = React.forwardRef(function PortsConfigForm2({ value: valu
|
|
|
18932
19003
|
},
|
|
18933
19004
|
{
|
|
18934
19005
|
key: "name",
|
|
18935
|
-
title:
|
|
19006
|
+
title: /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { title: i18n2.t("dovetail.service_port_name_tip"), children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: DashedTitleStyle, children: i18n2.t("dovetail.name") }) }),
|
|
18936
19007
|
type: "input",
|
|
18937
19008
|
validator: ({ value: portName, rowIndex }) => {
|
|
18938
19009
|
const { errorMessage } = validateRfc1123Name({
|
|
@@ -18976,17 +19047,20 @@ const PortsConfigForm = React.forwardRef(function PortsConfigForm2({ value: valu
|
|
|
18976
19047
|
title: i18n2.t("dovetail.container_port"),
|
|
18977
19048
|
render: ({ value: value22, onChange: onChange2 }) => {
|
|
18978
19049
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
18979
|
-
|
|
19050
|
+
Input,
|
|
18980
19051
|
{
|
|
18981
19052
|
value: value22,
|
|
18982
19053
|
size: "small",
|
|
18983
|
-
|
|
18984
|
-
|
|
19054
|
+
onChange: (e2) => {
|
|
19055
|
+
const v = e2.target.value;
|
|
19056
|
+
const num = Number(v);
|
|
19057
|
+
onChange2(!v || isNaN(num) ? v : num);
|
|
19058
|
+
}
|
|
18985
19059
|
}
|
|
18986
19060
|
);
|
|
18987
19061
|
},
|
|
18988
19062
|
validator: ({ value: value22 }) => {
|
|
18989
|
-
const { isValid, errorMessage } =
|
|
19063
|
+
const { isValid, errorMessage } = validatePortNameAndNumber(value22 ?? "", {
|
|
18990
19064
|
isOptional: false,
|
|
18991
19065
|
i18n: i18n2,
|
|
18992
19066
|
emptyText: i18n2.t("dovetail.required_field", {
|
|
@@ -20500,6 +20574,7 @@ export {
|
|
|
20500
20574
|
validateLabelValue,
|
|
20501
20575
|
validateNodePort,
|
|
20502
20576
|
validatePort,
|
|
20577
|
+
validatePortNameAndNumber,
|
|
20503
20578
|
validateResourceName,
|
|
20504
20579
|
validateRfc1123Name
|
|
20505
20580
|
};
|
|
@@ -61,6 +61,14 @@ export declare function validatePort(port: string | number, options: {
|
|
|
61
61
|
isValid: boolean;
|
|
62
62
|
errorMessage?: string;
|
|
63
63
|
};
|
|
64
|
+
export declare function validatePortNameAndNumber(port: string | number, options: {
|
|
65
|
+
isOptional?: boolean;
|
|
66
|
+
emptyText?: string;
|
|
67
|
+
i18n: I18n;
|
|
68
|
+
}): {
|
|
69
|
+
isValid: boolean;
|
|
70
|
+
errorMessage?: string;
|
|
71
|
+
};
|
|
64
72
|
export declare function validateNodePort(nodePort: number | string | null, allNodePorts: number[], i18n: I18n): {
|
|
65
73
|
isValid: boolean;
|
|
66
74
|
errorMessage?: string;
|