@dovetail-v2/refine 0.1.19-alpha.1 → 0.1.20
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-d782441c.js → MonacoYamlDiffEditor-6e074a11.js} +1 -1
- package/dist/{index-e72fe3d3.js → index-c144b223.js} +152 -39
- package/dist/refine.js +1 -1
- package/dist/refine.umd.cjs +152 -39
- package/lib/components/ListPage/index.d.ts +2 -1
- package/lib/i18n.d.ts +60 -4
- package/lib/locales/en-US/index.d.ts +56 -0
- package/lib/locales/zh-CN/index.d.ts +4 -4
- package/package.json +1 -1
|
@@ -13,7 +13,7 @@ import { useLocation, useHistory, useParams, matchPath, Link, Route, NavLink, Ro
|
|
|
13
13
|
import { Typo, Tag, Input, Select, AntdOption, Button, Form, Space, TextArea, kitContext, Loading, Table as Table$2, Pagination, Alert, usePopModal, Modal, usePushModal, Fields, Units, OverflowTooltip, Tooltip, StatusCapsule, Dropdown, Menu as Menu$1, Icon as Icon$1, Divider, Link as Link$1, Tabs as Tabs$1, TabsTabPane, Row, Col, Popover, AntdTable, TableForm, getOptions, DonutChart, SegmentControl, Checkbox, DropdownMenu, SearchInput, Token, AntdSelectOptGroup, MenuItemGroup, Layout as Layout$1, Time as Time$1, useMessage, ModalStack, KitStoreProvider, ConfigProvider } from "@cloudtower/eagle";
|
|
14
14
|
import { EditPen16PrimaryIcon, Download16GradientBlueIcon, TrashBinDelete16Icon, MoreEllipsis324BoldSecondaryIcon, MoreEllipsis324BoldBlueIcon, MoreEllipsis316BoldBlueIcon, PlusAddCreateNew16BoldOntintIcon, ArrowChevronLeft16BoldTertiaryIcon, ArrowChevronLeftSmall16BoldBlueIcon, ViewEye16GradientGrayIcon, EntityFilterIgnoreGradient16GrayIcon, InfoICircleFill16GrayIcon, InfoICircleFill16Gray70Icon, RecoverContinue16GradientBlueIcon, SuspendedPause16GradientBlueIcon, Retry16GradientBlueIcon, FontSize16GrayIcon, FontSize16BlueIcon, LogCollection16GrayIcon, LogCollection16GradientBlueIcon, TrashBinDeletePermanently16GrayIcon, TrashBinDeletePermanently16BlueIcon, Loading24GradientBlueIcon, OpenTerminal16GradientBlueIcon, HierarchyTriangleRight16GrayIcon, HierarchyTriangleRight16BlueIcon, ClipboardCopy16GradientGrayIcon, ClipboardCopy16GradientBlueIcon, Retry16GradientGrayIcon, EditPen16GradientGrayIcon, EditPen16GradientBlueIcon, Showdiff16GradientGrayIcon, Showdiff16GradientBlueIcon, XmarkFailedSeriousWarningFill16RedIcon, ExclamationErrorCircleFill16RedIcon, Pause16GradientBlueIcon, EditPen16BlueIcon } from "@cloudtower/icons-react";
|
|
15
15
|
import { first, get as get$3, cloneDeep, set as set$1, omit as omit$1, merge, debounce, last, isObject as isObject$4, uniq, keyBy } from "lodash-es";
|
|
16
|
-
import yaml$
|
|
16
|
+
import yaml$2 from "js-yaml";
|
|
17
17
|
import { paginateData, sortData, dataProvider, liveProvider } from "k8s-api-provider";
|
|
18
18
|
import * as monaco from "monaco-editor";
|
|
19
19
|
import { setDiagnosticsOptions } from "monaco-yaml";
|
|
@@ -1179,6 +1179,62 @@ const connecting$1 = "Connecting...";
|
|
|
1179
1179
|
const reconnect$1 = "Reconnect";
|
|
1180
1180
|
const edit_form$1 = "Edit form";
|
|
1181
1181
|
const exit_yaml_tip$1 = "If you go back to the form, any changes made to the YAML file will be lost.";
|
|
1182
|
+
const value_optional$1 = "Value (optional)";
|
|
1183
|
+
const effect$1 = "Effect";
|
|
1184
|
+
const name_can_not_be_empty$1 = "Name cannot be empty";
|
|
1185
|
+
const support$1 = "Supported";
|
|
1186
|
+
const distributed$1 = "Allocated capacity";
|
|
1187
|
+
const lost_state$1 = "Volume unavailable";
|
|
1188
|
+
const form$1 = "Form";
|
|
1189
|
+
const yaml$1 = "YAML";
|
|
1190
|
+
const edit_label_success_toast$1 = "Successfully edited the label for the resource {{name}}";
|
|
1191
|
+
const edit_annotation$1 = "Edit annotation";
|
|
1192
|
+
const edit_annotation_success_toast$1 = "Successfully edited the annotation for the resource {{name}}";
|
|
1193
|
+
const pvc$1 = "PVC";
|
|
1194
|
+
const pv$1 = "Persistent volume";
|
|
1195
|
+
const retain$1 = "Retain";
|
|
1196
|
+
const default_sc$1 = "Default storage class";
|
|
1197
|
+
const reclaim_policy$1 = "Reclaim policy";
|
|
1198
|
+
const allow_expand$1 = "Volume expansion";
|
|
1199
|
+
const edit_distribute_storage$1 = "Edit capacity allocation";
|
|
1200
|
+
const edit_distribute_storage_success_toast$1 = "Successfully edited the capacity allocation";
|
|
1201
|
+
const edit_distribute_storage_failed_toast$1 = "Failed to edit the capacity allocation";
|
|
1202
|
+
const edit_node_taint$1 = "Edit taint";
|
|
1203
|
+
const edit_node_taint_success_toast$1 = "Successfully edited the taint for the node {{name}}";
|
|
1204
|
+
const node_taint_NoSchedule$1 = "Only prevent scheduling";
|
|
1205
|
+
const node_taint_PreferNoSchedule$1 = "Prefer no scheduling";
|
|
1206
|
+
const node_taint_NoExecute$1 = "Prevent scheduling and evict pods";
|
|
1207
|
+
const taint$1 = "Taint";
|
|
1208
|
+
const change_form_mode_alert$1 = "Switching from YAML editing to form editing will discard all changes made to the YAML file.";
|
|
1209
|
+
const pvc_storage_required$1 = "Please specify the allocation.";
|
|
1210
|
+
const pvc_storage_min$1 = "Please enter a positive integer.";
|
|
1211
|
+
const pvc_storage_reduce_limit$1 = "The value cannot be less than the current value.";
|
|
1212
|
+
const pvc_storage_max_limit$1 = "The allocation cannot exceed 64 TiB.";
|
|
1213
|
+
const key_empty_text$1 = "Please specify a key.";
|
|
1214
|
+
const format_error$1 = "Format error.";
|
|
1215
|
+
const taint_effect_empty_text$1 = "Please select an effect.";
|
|
1216
|
+
const add_label$1 = "Add label";
|
|
1217
|
+
const add_annotation$1 = "Add annotation";
|
|
1218
|
+
const add_taint$1 = "Add taint";
|
|
1219
|
+
const look_format_requirement$1 = "View taint requirements";
|
|
1220
|
+
const yes$1 = "Yes";
|
|
1221
|
+
const no$1 = "No";
|
|
1222
|
+
const contains$1 = "Contains";
|
|
1223
|
+
const optional$1 = "Is it required?";
|
|
1224
|
+
const format_requirements$1 = "Format requirements";
|
|
1225
|
+
const prefix$1 = "Prefix";
|
|
1226
|
+
const prefix_format_rule_1$1 = "DNS subdomain: a series of DNS labels separated by dots (.)";
|
|
1227
|
+
const prefix_format_rule_2$1 = "No more than 253 characters";
|
|
1228
|
+
const prefix_format_rule_3$1 = "Followed by a slash (/), meaning the content before the first slash (/) is the prefix. If the slash (/) is present, the prefix cannot be empty.";
|
|
1229
|
+
const name_format_rule_1$1 = "Includes letters, numbers, hyphens (-), underscores (_), or dots (.)";
|
|
1230
|
+
const name_format_rule_2$1 = "Must start and end with a letter or number";
|
|
1231
|
+
const name_format_rule_3$1 = "No more than 63 characters";
|
|
1232
|
+
const taint_effect_NoSchedule_tooltip_1$1 = "Pods running on the node will not be evicted.";
|
|
1233
|
+
const taint_effect_NoSchedule_tooltip_2$1 = "New pods will not be scheduled onto tainted nodes unless there is a matching tolerance.";
|
|
1234
|
+
const taint_effect_PreferNoSchedule_tooltip_1$1 = "Pods without taint tolerance will be immediately evicted.";
|
|
1235
|
+
const taint_effect_PreferNoSchedule_tooltip_2$1 = "Pods with tolerance but no duration set will continue running.";
|
|
1236
|
+
const taint_effect_PreferNoSchedule_tooltip_3$1 = "Pods with tolerance and a duration set will run for the specified time and then be evicted.";
|
|
1237
|
+
const taint_effect_NoExecute_tooltip_3$1 = "The control plane will try to avoid scheduling pods without taint tolerance to the node, but full avoidance isn't guaranteed.";
|
|
1182
1238
|
const dovetail$1 = {
|
|
1183
1239
|
copy: copy$2,
|
|
1184
1240
|
reset_arguments: reset_arguments$1,
|
|
@@ -1360,7 +1416,63 @@ const dovetail$1 = {
|
|
|
1360
1416
|
connecting: connecting$1,
|
|
1361
1417
|
reconnect: reconnect$1,
|
|
1362
1418
|
edit_form: edit_form$1,
|
|
1363
|
-
exit_yaml_tip: exit_yaml_tip$1
|
|
1419
|
+
exit_yaml_tip: exit_yaml_tip$1,
|
|
1420
|
+
value_optional: value_optional$1,
|
|
1421
|
+
effect: effect$1,
|
|
1422
|
+
name_can_not_be_empty: name_can_not_be_empty$1,
|
|
1423
|
+
support: support$1,
|
|
1424
|
+
distributed: distributed$1,
|
|
1425
|
+
lost_state: lost_state$1,
|
|
1426
|
+
form: form$1,
|
|
1427
|
+
yaml: yaml$1,
|
|
1428
|
+
edit_label_success_toast: edit_label_success_toast$1,
|
|
1429
|
+
edit_annotation: edit_annotation$1,
|
|
1430
|
+
edit_annotation_success_toast: edit_annotation_success_toast$1,
|
|
1431
|
+
pvc: pvc$1,
|
|
1432
|
+
pv: pv$1,
|
|
1433
|
+
retain: retain$1,
|
|
1434
|
+
default_sc: default_sc$1,
|
|
1435
|
+
reclaim_policy: reclaim_policy$1,
|
|
1436
|
+
allow_expand: allow_expand$1,
|
|
1437
|
+
edit_distribute_storage: edit_distribute_storage$1,
|
|
1438
|
+
edit_distribute_storage_success_toast: edit_distribute_storage_success_toast$1,
|
|
1439
|
+
edit_distribute_storage_failed_toast: edit_distribute_storage_failed_toast$1,
|
|
1440
|
+
edit_node_taint: edit_node_taint$1,
|
|
1441
|
+
edit_node_taint_success_toast: edit_node_taint_success_toast$1,
|
|
1442
|
+
node_taint_NoSchedule: node_taint_NoSchedule$1,
|
|
1443
|
+
node_taint_PreferNoSchedule: node_taint_PreferNoSchedule$1,
|
|
1444
|
+
node_taint_NoExecute: node_taint_NoExecute$1,
|
|
1445
|
+
taint: taint$1,
|
|
1446
|
+
change_form_mode_alert: change_form_mode_alert$1,
|
|
1447
|
+
pvc_storage_required: pvc_storage_required$1,
|
|
1448
|
+
pvc_storage_min: pvc_storage_min$1,
|
|
1449
|
+
pvc_storage_reduce_limit: pvc_storage_reduce_limit$1,
|
|
1450
|
+
pvc_storage_max_limit: pvc_storage_max_limit$1,
|
|
1451
|
+
key_empty_text: key_empty_text$1,
|
|
1452
|
+
format_error: format_error$1,
|
|
1453
|
+
taint_effect_empty_text: taint_effect_empty_text$1,
|
|
1454
|
+
add_label: add_label$1,
|
|
1455
|
+
add_annotation: add_annotation$1,
|
|
1456
|
+
add_taint: add_taint$1,
|
|
1457
|
+
look_format_requirement: look_format_requirement$1,
|
|
1458
|
+
yes: yes$1,
|
|
1459
|
+
no: no$1,
|
|
1460
|
+
contains: contains$1,
|
|
1461
|
+
optional: optional$1,
|
|
1462
|
+
format_requirements: format_requirements$1,
|
|
1463
|
+
prefix: prefix$1,
|
|
1464
|
+
prefix_format_rule_1: prefix_format_rule_1$1,
|
|
1465
|
+
prefix_format_rule_2: prefix_format_rule_2$1,
|
|
1466
|
+
prefix_format_rule_3: prefix_format_rule_3$1,
|
|
1467
|
+
name_format_rule_1: name_format_rule_1$1,
|
|
1468
|
+
name_format_rule_2: name_format_rule_2$1,
|
|
1469
|
+
name_format_rule_3: name_format_rule_3$1,
|
|
1470
|
+
taint_effect_NoSchedule_tooltip_1: taint_effect_NoSchedule_tooltip_1$1,
|
|
1471
|
+
taint_effect_NoSchedule_tooltip_2: taint_effect_NoSchedule_tooltip_2$1,
|
|
1472
|
+
taint_effect_PreferNoSchedule_tooltip_1: taint_effect_PreferNoSchedule_tooltip_1$1,
|
|
1473
|
+
taint_effect_PreferNoSchedule_tooltip_2: taint_effect_PreferNoSchedule_tooltip_2$1,
|
|
1474
|
+
taint_effect_PreferNoSchedule_tooltip_3: taint_effect_PreferNoSchedule_tooltip_3$1,
|
|
1475
|
+
taint_effect_NoExecute_tooltip_3: taint_effect_NoExecute_tooltip_3$1
|
|
1364
1476
|
};
|
|
1365
1477
|
const EN = {
|
|
1366
1478
|
dovetail: dovetail$1
|
|
@@ -1583,10 +1695,10 @@ const no = "否";
|
|
|
1583
1695
|
const contains = "包含";
|
|
1584
1696
|
const optional = "是否必填";
|
|
1585
1697
|
const format_requirements = "格式要求";
|
|
1586
|
-
const
|
|
1587
|
-
const
|
|
1588
|
-
const
|
|
1589
|
-
const
|
|
1698
|
+
const prefix = "前缀";
|
|
1699
|
+
const prefix_format_rule_1 = "DNS 子域:由点 (.) 分隔的一系列 DNS 标签";
|
|
1700
|
+
const prefix_format_rule_2 = "不超过 253 个字符";
|
|
1701
|
+
const prefix_format_rule_3 = "后跟斜杠 (/),即第一个 (/) 前的内容是前缀。如有 (/) ,前缀不可为空";
|
|
1590
1702
|
const name_format_rule_1 = "由字母、数字、连字符 (-)、下划线(_) 或点 (.) 组成";
|
|
1591
1703
|
const name_format_rule_2 = "以字母或数字开头和结尾";
|
|
1592
1704
|
const name_format_rule_3 = "不超过 63 个字符";
|
|
@@ -1820,10 +1932,10 @@ const dovetail = {
|
|
|
1820
1932
|
contains,
|
|
1821
1933
|
optional,
|
|
1822
1934
|
format_requirements,
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1935
|
+
prefix,
|
|
1936
|
+
prefix_format_rule_1,
|
|
1937
|
+
prefix_format_rule_2,
|
|
1938
|
+
prefix_format_rule_3,
|
|
1827
1939
|
name_format_rule_1,
|
|
1828
1940
|
name_format_rule_2,
|
|
1829
1941
|
name_format_rule_3,
|
|
@@ -7574,9 +7686,9 @@ lodash.exports;
|
|
|
7574
7686
|
}
|
|
7575
7687
|
return isSymbol2(value2) ? [value2] : copyArray(stringToPath2(toString2(value2)));
|
|
7576
7688
|
}
|
|
7577
|
-
function uniqueId(
|
|
7689
|
+
function uniqueId(prefix2) {
|
|
7578
7690
|
var id = ++idCounter;
|
|
7579
|
-
return toString2(
|
|
7691
|
+
return toString2(prefix2) + id;
|
|
7580
7692
|
}
|
|
7581
7693
|
var add = createMathOperation(function(augend, addend) {
|
|
7582
7694
|
return augend + addend;
|
|
@@ -9452,7 +9564,7 @@ const FRACTIONAL = ["", "m", "u", "n", "p", "f"];
|
|
|
9452
9564
|
function formatSi(inValue, options) {
|
|
9453
9565
|
const {
|
|
9454
9566
|
increment = 1e3,
|
|
9455
|
-
suffix
|
|
9567
|
+
suffix = null,
|
|
9456
9568
|
firstSuffix = null,
|
|
9457
9569
|
startingExponent = 0,
|
|
9458
9570
|
minExponent = 0,
|
|
@@ -9480,7 +9592,7 @@ function formatSi(inValue, options) {
|
|
|
9480
9592
|
if (exp === 0 && firstSuffix !== null) {
|
|
9481
9593
|
outStr += `${firstSuffix}`;
|
|
9482
9594
|
} else {
|
|
9483
|
-
outStr += `${UNITS[exp]}${
|
|
9595
|
+
outStr += `${UNITS[exp]}${suffix}` || "";
|
|
9484
9596
|
}
|
|
9485
9597
|
return outStr;
|
|
9486
9598
|
}
|
|
@@ -11189,7 +11301,7 @@ function download(filename, content) {
|
|
|
11189
11301
|
function useDownloadYAML() {
|
|
11190
11302
|
return function(options) {
|
|
11191
11303
|
const { name: name2, item } = options;
|
|
11192
|
-
const content = yaml$
|
|
11304
|
+
const content = yaml$2.dump(item);
|
|
11193
11305
|
download(`${name2}.yaml`, content);
|
|
11194
11306
|
};
|
|
11195
11307
|
}
|
|
@@ -12249,24 +12361,24 @@ function KeyValueSecret(props) {
|
|
|
12249
12361
|
}
|
|
12250
12362
|
function validateLabelKey(key2) {
|
|
12251
12363
|
const labelRegex = /(^[a-zA-Z0-9]$)|(^[a-zA-Z0-9][a-zA-Z0-9\.\-\_]*[a-zA-Z0-9]$)/;
|
|
12252
|
-
let
|
|
12364
|
+
let prefix2, name2;
|
|
12253
12365
|
const splitResult = key2.split("/");
|
|
12254
12366
|
if (splitResult.length === 1) {
|
|
12255
12367
|
name2 = splitResult[0];
|
|
12256
12368
|
} else {
|
|
12257
|
-
|
|
12369
|
+
prefix2 = splitResult[0];
|
|
12258
12370
|
name2 = splitResult[1];
|
|
12259
12371
|
}
|
|
12260
|
-
if (
|
|
12372
|
+
if (prefix2 === "") {
|
|
12261
12373
|
return { isValid: false, errorMessage: "EMPTY_PREFIX" };
|
|
12262
12374
|
}
|
|
12263
|
-
if (
|
|
12375
|
+
if (prefix2 && !labelRegex.test(prefix2)) {
|
|
12264
12376
|
return { isValid: false, errorMessage: "INVALID_PREFIX" };
|
|
12265
12377
|
}
|
|
12266
12378
|
if (!labelRegex.test(name2)) {
|
|
12267
12379
|
return { isValid: false, errorMessage: "INVALID_NAME" };
|
|
12268
12380
|
}
|
|
12269
|
-
if (
|
|
12381
|
+
if (prefix2 && prefix2.length > 253) {
|
|
12270
12382
|
return { isValid: false, errorMessage: "MAX_253" };
|
|
12271
12383
|
}
|
|
12272
12384
|
if (name2 && name2.length > 63) {
|
|
@@ -12297,9 +12409,9 @@ const LabelFormatPopover = ({
|
|
|
12297
12409
|
} = useTranslation();
|
|
12298
12410
|
const data2 = [{
|
|
12299
12411
|
object: t2("dovetail.key"),
|
|
12300
|
-
contains: t2("dovetail.
|
|
12412
|
+
contains: t2("dovetail.prefix"),
|
|
12301
12413
|
optional: t2("dovetail.no"),
|
|
12302
|
-
rule: [t2("dovetail.
|
|
12414
|
+
rule: [t2("dovetail.prefix_format_rule_1"), t2("dovetail.prefix_format_rule_2"), t2("dovetail.prefix_format_rule_3")]
|
|
12303
12415
|
}, {
|
|
12304
12416
|
object: t2("dovetail.key"),
|
|
12305
12417
|
contains: t2("dovetail.name"),
|
|
@@ -14968,8 +15080,8 @@ function requireReactDomServer_browser_development() {
|
|
|
14968
15080
|
if (propertyInfo !== null) {
|
|
14969
15081
|
return !propertyInfo.acceptsBooleans;
|
|
14970
15082
|
} else {
|
|
14971
|
-
var
|
|
14972
|
-
return
|
|
15083
|
+
var prefix2 = name2.toLowerCase().slice(0, 5);
|
|
15084
|
+
return prefix2 !== "data-" && prefix2 !== "aria-";
|
|
14973
15085
|
}
|
|
14974
15086
|
}
|
|
14975
15087
|
default:
|
|
@@ -15936,13 +16048,13 @@ function requireReactDomServer_browser_development() {
|
|
|
15936
16048
|
strokeOpacity: true,
|
|
15937
16049
|
strokeWidth: true
|
|
15938
16050
|
};
|
|
15939
|
-
function prefixKey(
|
|
15940
|
-
return
|
|
16051
|
+
function prefixKey(prefix2, key2) {
|
|
16052
|
+
return prefix2 + key2.charAt(0).toUpperCase() + key2.substring(1);
|
|
15941
16053
|
}
|
|
15942
16054
|
var prefixes = ["Webkit", "ms", "Moz", "O"];
|
|
15943
16055
|
Object.keys(isUnitlessNumber).forEach(function(prop) {
|
|
15944
|
-
prefixes.forEach(function(
|
|
15945
|
-
isUnitlessNumber[prefixKey(
|
|
16056
|
+
prefixes.forEach(function(prefix2) {
|
|
16057
|
+
isUnitlessNumber[prefixKey(prefix2, prop)] = isUnitlessNumber[prop];
|
|
15946
16058
|
});
|
|
15947
16059
|
});
|
|
15948
16060
|
function dangerousStyleValue(name2, value2, isCustomProperty) {
|
|
@@ -19490,7 +19602,7 @@ const NetworkPolicyRulesViewer = ({
|
|
|
19490
19602
|
}
|
|
19491
19603
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(MonacoYamlEditor$1, {
|
|
19492
19604
|
schemas: [],
|
|
19493
|
-
defaultValue: yaml$
|
|
19605
|
+
defaultValue: yaml$2.dump(ingressOrEgress),
|
|
19494
19606
|
height: "300px",
|
|
19495
19607
|
className: EditorStyle$1,
|
|
19496
19608
|
readOnly: true,
|
|
@@ -35990,7 +36102,8 @@ function ListPage(props) {
|
|
|
35990
36102
|
const {
|
|
35991
36103
|
selectedKeys,
|
|
35992
36104
|
tableProps,
|
|
35993
|
-
contentClassName
|
|
36105
|
+
contentClassName,
|
|
36106
|
+
belowToolBarContent
|
|
35994
36107
|
} = props;
|
|
35995
36108
|
const {
|
|
35996
36109
|
resource
|
|
@@ -36005,7 +36118,7 @@ function ListPage(props) {
|
|
|
36005
36118
|
title: config == null ? void 0 : config.displayName,
|
|
36006
36119
|
description: config == null ? void 0 : config.description,
|
|
36007
36120
|
hideCreate: config == null ? void 0 : config.hideCreate
|
|
36008
|
-
}), /* @__PURE__ */ jsxRuntimeExports.jsx(Divider, {
|
|
36121
|
+
}), belowToolBarContent, /* @__PURE__ */ jsxRuntimeExports.jsx(Divider, {
|
|
36009
36122
|
style: {
|
|
36010
36123
|
margin: 0,
|
|
36011
36124
|
minHeight: 1,
|
|
@@ -38478,7 +38591,7 @@ const Separator = () => {
|
|
|
38478
38591
|
});
|
|
38479
38592
|
};
|
|
38480
38593
|
const MonacoYamlEditor = React__default.lazy(() => Promise.resolve().then(() => MonacoYamlEditor$2));
|
|
38481
|
-
const MonacoYamlDiffEditor = React__default.lazy(() => import("./MonacoYamlDiffEditor-
|
|
38594
|
+
const MonacoYamlDiffEditor = React__default.lazy(() => import("./MonacoYamlDiffEditor-6e074a11.js"));
|
|
38482
38595
|
const YamlEditorComponent = forwardRef(
|
|
38483
38596
|
function YamlEditorComponent2(props, ref) {
|
|
38484
38597
|
const {
|
|
@@ -38810,7 +38923,7 @@ function generateYamlBySchema(defaultValue, schema) {
|
|
|
38810
38923
|
return merged2;
|
|
38811
38924
|
}
|
|
38812
38925
|
const merged = merge2(defaultValue, typeObject);
|
|
38813
|
-
const content = yaml$
|
|
38926
|
+
const content = yaml$2.dump(merged);
|
|
38814
38927
|
return content.replace(/(')(#.+?)(')/g, "$2").replace(/( +)(#)/g, "$2$1");
|
|
38815
38928
|
}
|
|
38816
38929
|
const useGlobalStore = () => {
|
|
@@ -38940,7 +39053,7 @@ const useYamlForm = ({
|
|
|
38940
39053
|
const validateYaml = (yamlValue) => {
|
|
38941
39054
|
const errorMap = {};
|
|
38942
39055
|
if (rules && isYamlValid && isSchemaValid) {
|
|
38943
|
-
const formValue = yaml$
|
|
39056
|
+
const formValue = yaml$2.load(yamlValue || "");
|
|
38944
39057
|
rules.forEach((rule2) => {
|
|
38945
39058
|
const { path: path2, validators } = rule2;
|
|
38946
39059
|
const value2 = get$3(formValue, path2);
|
|
@@ -38972,7 +39085,7 @@ const useYamlForm = ({
|
|
|
38972
39085
|
var _a2;
|
|
38973
39086
|
return {
|
|
38974
39087
|
ref: editor,
|
|
38975
|
-
defaultValue: schema && (editorOptions == null ? void 0 : editorOptions.isGenerateAnnotations) ? generateYamlBySchema(initialValues || {}, schema) : yaml$
|
|
39088
|
+
defaultValue: schema && (editorOptions == null ? void 0 : editorOptions.isGenerateAnnotations) ? generateYamlBySchema(initialValues || {}, schema) : yaml$2.dump(initialValues),
|
|
38976
39089
|
schemas,
|
|
38977
39090
|
id: ((_a2 = useResourceResult.resource) == null ? void 0 : _a2.name) || "",
|
|
38978
39091
|
errorMsgs: finalErrors,
|
|
@@ -38985,7 +39098,7 @@ const useYamlForm = ({
|
|
|
38985
39098
|
},
|
|
38986
39099
|
onEditorCreate(editorInstance) {
|
|
38987
39100
|
var _a3, _b;
|
|
38988
|
-
const editorValue = yaml$
|
|
39101
|
+
const editorValue = yaml$2.dump(initialValues);
|
|
38989
39102
|
(_a3 = editor.current) == null ? void 0 : _a3.setEditorValue(editorValue);
|
|
38990
39103
|
(_b = editor.current) == null ? void 0 : _b.setValue(editorValue);
|
|
38991
39104
|
if (action === "edit") {
|
|
@@ -39024,7 +39137,7 @@ const useYamlForm = ({
|
|
|
39024
39137
|
return;
|
|
39025
39138
|
}
|
|
39026
39139
|
try {
|
|
39027
|
-
const objectValues = editor.current ? yaml$
|
|
39140
|
+
const objectValues = editor.current ? yaml$2.load(((_b = editor.current) == null ? void 0 : _b.getEditorValue()) || "") : values;
|
|
39028
39141
|
const finalValues = (transformApplyValues == null ? void 0 : transformApplyValues(objectValues)) || objectValues;
|
|
39029
39142
|
return onFinish(finalValues);
|
|
39030
39143
|
} catch (error) {
|
|
@@ -39054,14 +39167,14 @@ const useYamlForm = ({
|
|
|
39054
39167
|
switchEditor() {
|
|
39055
39168
|
var _a2, _b;
|
|
39056
39169
|
if (enableEditor && ((_a2 = editor.current) == null ? void 0 : _a2.getEditorValue())) {
|
|
39057
|
-
const value2 = yaml$
|
|
39170
|
+
const value2 = yaml$2.load((_b = editor.current) == null ? void 0 : _b.getEditorValue());
|
|
39058
39171
|
form2 == null ? void 0 : form2.setFieldsValue(value2);
|
|
39059
39172
|
}
|
|
39060
39173
|
setEnableEditor(!enableEditor);
|
|
39061
39174
|
},
|
|
39062
39175
|
onFinish: async (values) => {
|
|
39063
39176
|
var _a2;
|
|
39064
|
-
const finalValues = enableEditor ? yaml$
|
|
39177
|
+
const finalValues = enableEditor ? yaml$2.load(((_a2 = editor.current) == null ? void 0 : _a2.getEditorValue()) || "") : values ?? formSF.form.getFieldsValue(true);
|
|
39065
39178
|
return await onFinish(finalValues);
|
|
39066
39179
|
}
|
|
39067
39180
|
};
|
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-c144b223.js";
|
|
2
2
|
import "@cloudtower/eagle";
|
|
3
3
|
import "@refinedev/core";
|
|
4
4
|
import "react";
|
package/dist/refine.umd.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
(function(global2, factory) {
|
|
2
|
-
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("i18next"), require("@refinedev/core"), require("qs"), require("react"), require("react-router-dom"), require("@cloudtower/eagle"), require("@cloudtower/icons-react"), require("lodash-es"), require("js-yaml"), require("k8s-api-provider"), require("monaco-editor"), require("monaco-yaml"), require("react-dom"), require("sunflower-antd"), require("antd")) : typeof define === "function" && define.amd ? define(["exports", "i18next", "@refinedev/core", "qs", "react", "react-router-dom", "@cloudtower/eagle", "@cloudtower/icons-react", "lodash-es", "js-yaml", "k8s-api-provider", "monaco-editor", "monaco-yaml", "react-dom", "sunflower-antd", "antd"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory(global2.dovetail = {}, global2.i18n, global2.core, global2.qs, global2.React, global2.reactRouterDom, global2.eagle, global2.iconsReact, global2.lodashEs, global2.yaml$
|
|
3
|
-
})(this, function(exports2, i18n, core, qs, React, reactRouterDom, eagle, iconsReact, lodashEs, yaml$
|
|
2
|
+
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("i18next"), require("@refinedev/core"), require("qs"), require("react"), require("react-router-dom"), require("@cloudtower/eagle"), require("@cloudtower/icons-react"), require("lodash-es"), require("js-yaml"), require("k8s-api-provider"), require("monaco-editor"), require("monaco-yaml"), require("react-dom"), require("sunflower-antd"), require("antd")) : typeof define === "function" && define.amd ? define(["exports", "i18next", "@refinedev/core", "qs", "react", "react-router-dom", "@cloudtower/eagle", "@cloudtower/icons-react", "lodash-es", "js-yaml", "k8s-api-provider", "monaco-editor", "monaco-yaml", "react-dom", "sunflower-antd", "antd"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory(global2.dovetail = {}, global2.i18n, global2.core, global2.qs, global2.React, global2.reactRouterDom, global2.eagle, global2.iconsReact, global2.lodashEs, global2.yaml$2, global2.k8sApiProvider, global2.monaco, global2.monacoYaml, global2.ReactDOM, global2.sunflowerAntd, global2.antd));
|
|
3
|
+
})(this, function(exports2, i18n, core, qs, React, reactRouterDom, eagle, iconsReact, lodashEs, yaml$2, k8sApiProvider, monaco, monacoYaml, ReactDOM, sunflowerAntd, antd) {
|
|
4
4
|
"use strict";var __defProp = Object.defineProperty;
|
|
5
5
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
6
|
var __publicField = (obj, key, value) => {
|
|
@@ -1185,6 +1185,62 @@ var __publicField = (obj, key, value) => {
|
|
|
1185
1185
|
const reconnect$1 = "Reconnect";
|
|
1186
1186
|
const edit_form$1 = "Edit form";
|
|
1187
1187
|
const exit_yaml_tip$1 = "If you go back to the form, any changes made to the YAML file will be lost.";
|
|
1188
|
+
const value_optional$1 = "Value (optional)";
|
|
1189
|
+
const effect$1 = "Effect";
|
|
1190
|
+
const name_can_not_be_empty$1 = "Name cannot be empty";
|
|
1191
|
+
const support$1 = "Supported";
|
|
1192
|
+
const distributed$1 = "Allocated capacity";
|
|
1193
|
+
const lost_state$1 = "Volume unavailable";
|
|
1194
|
+
const form$1 = "Form";
|
|
1195
|
+
const yaml$1 = "YAML";
|
|
1196
|
+
const edit_label_success_toast$1 = "Successfully edited the label for the resource {{name}}";
|
|
1197
|
+
const edit_annotation$1 = "Edit annotation";
|
|
1198
|
+
const edit_annotation_success_toast$1 = "Successfully edited the annotation for the resource {{name}}";
|
|
1199
|
+
const pvc$1 = "PVC";
|
|
1200
|
+
const pv$1 = "Persistent volume";
|
|
1201
|
+
const retain$1 = "Retain";
|
|
1202
|
+
const default_sc$1 = "Default storage class";
|
|
1203
|
+
const reclaim_policy$1 = "Reclaim policy";
|
|
1204
|
+
const allow_expand$1 = "Volume expansion";
|
|
1205
|
+
const edit_distribute_storage$1 = "Edit capacity allocation";
|
|
1206
|
+
const edit_distribute_storage_success_toast$1 = "Successfully edited the capacity allocation";
|
|
1207
|
+
const edit_distribute_storage_failed_toast$1 = "Failed to edit the capacity allocation";
|
|
1208
|
+
const edit_node_taint$1 = "Edit taint";
|
|
1209
|
+
const edit_node_taint_success_toast$1 = "Successfully edited the taint for the node {{name}}";
|
|
1210
|
+
const node_taint_NoSchedule$1 = "Only prevent scheduling";
|
|
1211
|
+
const node_taint_PreferNoSchedule$1 = "Prefer no scheduling";
|
|
1212
|
+
const node_taint_NoExecute$1 = "Prevent scheduling and evict pods";
|
|
1213
|
+
const taint$1 = "Taint";
|
|
1214
|
+
const change_form_mode_alert$1 = "Switching from YAML editing to form editing will discard all changes made to the YAML file.";
|
|
1215
|
+
const pvc_storage_required$1 = "Please specify the allocation.";
|
|
1216
|
+
const pvc_storage_min$1 = "Please enter a positive integer.";
|
|
1217
|
+
const pvc_storage_reduce_limit$1 = "The value cannot be less than the current value.";
|
|
1218
|
+
const pvc_storage_max_limit$1 = "The allocation cannot exceed 64 TiB.";
|
|
1219
|
+
const key_empty_text$1 = "Please specify a key.";
|
|
1220
|
+
const format_error$1 = "Format error.";
|
|
1221
|
+
const taint_effect_empty_text$1 = "Please select an effect.";
|
|
1222
|
+
const add_label$1 = "Add label";
|
|
1223
|
+
const add_annotation$1 = "Add annotation";
|
|
1224
|
+
const add_taint$1 = "Add taint";
|
|
1225
|
+
const look_format_requirement$1 = "View taint requirements";
|
|
1226
|
+
const yes$1 = "Yes";
|
|
1227
|
+
const no$1 = "No";
|
|
1228
|
+
const contains$1 = "Contains";
|
|
1229
|
+
const optional$1 = "Is it required?";
|
|
1230
|
+
const format_requirements$1 = "Format requirements";
|
|
1231
|
+
const prefix$1 = "Prefix";
|
|
1232
|
+
const prefix_format_rule_1$1 = "DNS subdomain: a series of DNS labels separated by dots (.)";
|
|
1233
|
+
const prefix_format_rule_2$1 = "No more than 253 characters";
|
|
1234
|
+
const prefix_format_rule_3$1 = "Followed by a slash (/), meaning the content before the first slash (/) is the prefix. If the slash (/) is present, the prefix cannot be empty.";
|
|
1235
|
+
const name_format_rule_1$1 = "Includes letters, numbers, hyphens (-), underscores (_), or dots (.)";
|
|
1236
|
+
const name_format_rule_2$1 = "Must start and end with a letter or number";
|
|
1237
|
+
const name_format_rule_3$1 = "No more than 63 characters";
|
|
1238
|
+
const taint_effect_NoSchedule_tooltip_1$1 = "Pods running on the node will not be evicted.";
|
|
1239
|
+
const taint_effect_NoSchedule_tooltip_2$1 = "New pods will not be scheduled onto tainted nodes unless there is a matching tolerance.";
|
|
1240
|
+
const taint_effect_PreferNoSchedule_tooltip_1$1 = "Pods without taint tolerance will be immediately evicted.";
|
|
1241
|
+
const taint_effect_PreferNoSchedule_tooltip_2$1 = "Pods with tolerance but no duration set will continue running.";
|
|
1242
|
+
const taint_effect_PreferNoSchedule_tooltip_3$1 = "Pods with tolerance and a duration set will run for the specified time and then be evicted.";
|
|
1243
|
+
const taint_effect_NoExecute_tooltip_3$1 = "The control plane will try to avoid scheduling pods without taint tolerance to the node, but full avoidance isn't guaranteed.";
|
|
1188
1244
|
const dovetail$1 = {
|
|
1189
1245
|
copy: copy$2,
|
|
1190
1246
|
reset_arguments: reset_arguments$1,
|
|
@@ -1366,7 +1422,63 @@ var __publicField = (obj, key, value) => {
|
|
|
1366
1422
|
connecting: connecting$1,
|
|
1367
1423
|
reconnect: reconnect$1,
|
|
1368
1424
|
edit_form: edit_form$1,
|
|
1369
|
-
exit_yaml_tip: exit_yaml_tip$1
|
|
1425
|
+
exit_yaml_tip: exit_yaml_tip$1,
|
|
1426
|
+
value_optional: value_optional$1,
|
|
1427
|
+
effect: effect$1,
|
|
1428
|
+
name_can_not_be_empty: name_can_not_be_empty$1,
|
|
1429
|
+
support: support$1,
|
|
1430
|
+
distributed: distributed$1,
|
|
1431
|
+
lost_state: lost_state$1,
|
|
1432
|
+
form: form$1,
|
|
1433
|
+
yaml: yaml$1,
|
|
1434
|
+
edit_label_success_toast: edit_label_success_toast$1,
|
|
1435
|
+
edit_annotation: edit_annotation$1,
|
|
1436
|
+
edit_annotation_success_toast: edit_annotation_success_toast$1,
|
|
1437
|
+
pvc: pvc$1,
|
|
1438
|
+
pv: pv$1,
|
|
1439
|
+
retain: retain$1,
|
|
1440
|
+
default_sc: default_sc$1,
|
|
1441
|
+
reclaim_policy: reclaim_policy$1,
|
|
1442
|
+
allow_expand: allow_expand$1,
|
|
1443
|
+
edit_distribute_storage: edit_distribute_storage$1,
|
|
1444
|
+
edit_distribute_storage_success_toast: edit_distribute_storage_success_toast$1,
|
|
1445
|
+
edit_distribute_storage_failed_toast: edit_distribute_storage_failed_toast$1,
|
|
1446
|
+
edit_node_taint: edit_node_taint$1,
|
|
1447
|
+
edit_node_taint_success_toast: edit_node_taint_success_toast$1,
|
|
1448
|
+
node_taint_NoSchedule: node_taint_NoSchedule$1,
|
|
1449
|
+
node_taint_PreferNoSchedule: node_taint_PreferNoSchedule$1,
|
|
1450
|
+
node_taint_NoExecute: node_taint_NoExecute$1,
|
|
1451
|
+
taint: taint$1,
|
|
1452
|
+
change_form_mode_alert: change_form_mode_alert$1,
|
|
1453
|
+
pvc_storage_required: pvc_storage_required$1,
|
|
1454
|
+
pvc_storage_min: pvc_storage_min$1,
|
|
1455
|
+
pvc_storage_reduce_limit: pvc_storage_reduce_limit$1,
|
|
1456
|
+
pvc_storage_max_limit: pvc_storage_max_limit$1,
|
|
1457
|
+
key_empty_text: key_empty_text$1,
|
|
1458
|
+
format_error: format_error$1,
|
|
1459
|
+
taint_effect_empty_text: taint_effect_empty_text$1,
|
|
1460
|
+
add_label: add_label$1,
|
|
1461
|
+
add_annotation: add_annotation$1,
|
|
1462
|
+
add_taint: add_taint$1,
|
|
1463
|
+
look_format_requirement: look_format_requirement$1,
|
|
1464
|
+
yes: yes$1,
|
|
1465
|
+
no: no$1,
|
|
1466
|
+
contains: contains$1,
|
|
1467
|
+
optional: optional$1,
|
|
1468
|
+
format_requirements: format_requirements$1,
|
|
1469
|
+
prefix: prefix$1,
|
|
1470
|
+
prefix_format_rule_1: prefix_format_rule_1$1,
|
|
1471
|
+
prefix_format_rule_2: prefix_format_rule_2$1,
|
|
1472
|
+
prefix_format_rule_3: prefix_format_rule_3$1,
|
|
1473
|
+
name_format_rule_1: name_format_rule_1$1,
|
|
1474
|
+
name_format_rule_2: name_format_rule_2$1,
|
|
1475
|
+
name_format_rule_3: name_format_rule_3$1,
|
|
1476
|
+
taint_effect_NoSchedule_tooltip_1: taint_effect_NoSchedule_tooltip_1$1,
|
|
1477
|
+
taint_effect_NoSchedule_tooltip_2: taint_effect_NoSchedule_tooltip_2$1,
|
|
1478
|
+
taint_effect_PreferNoSchedule_tooltip_1: taint_effect_PreferNoSchedule_tooltip_1$1,
|
|
1479
|
+
taint_effect_PreferNoSchedule_tooltip_2: taint_effect_PreferNoSchedule_tooltip_2$1,
|
|
1480
|
+
taint_effect_PreferNoSchedule_tooltip_3: taint_effect_PreferNoSchedule_tooltip_3$1,
|
|
1481
|
+
taint_effect_NoExecute_tooltip_3: taint_effect_NoExecute_tooltip_3$1
|
|
1370
1482
|
};
|
|
1371
1483
|
const EN = {
|
|
1372
1484
|
dovetail: dovetail$1
|
|
@@ -1589,10 +1701,10 @@ var __publicField = (obj, key, value) => {
|
|
|
1589
1701
|
const contains = "包含";
|
|
1590
1702
|
const optional = "是否必填";
|
|
1591
1703
|
const format_requirements = "格式要求";
|
|
1592
|
-
const
|
|
1593
|
-
const
|
|
1594
|
-
const
|
|
1595
|
-
const
|
|
1704
|
+
const prefix = "前缀";
|
|
1705
|
+
const prefix_format_rule_1 = "DNS 子域:由点 (.) 分隔的一系列 DNS 标签";
|
|
1706
|
+
const prefix_format_rule_2 = "不超过 253 个字符";
|
|
1707
|
+
const prefix_format_rule_3 = "后跟斜杠 (/),即第一个 (/) 前的内容是前缀。如有 (/) ,前缀不可为空";
|
|
1596
1708
|
const name_format_rule_1 = "由字母、数字、连字符 (-)、下划线(_) 或点 (.) 组成";
|
|
1597
1709
|
const name_format_rule_2 = "以字母或数字开头和结尾";
|
|
1598
1710
|
const name_format_rule_3 = "不超过 63 个字符";
|
|
@@ -1826,10 +1938,10 @@ var __publicField = (obj, key, value) => {
|
|
|
1826
1938
|
contains,
|
|
1827
1939
|
optional,
|
|
1828
1940
|
format_requirements,
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1941
|
+
prefix,
|
|
1942
|
+
prefix_format_rule_1,
|
|
1943
|
+
prefix_format_rule_2,
|
|
1944
|
+
prefix_format_rule_3,
|
|
1833
1945
|
name_format_rule_1,
|
|
1834
1946
|
name_format_rule_2,
|
|
1835
1947
|
name_format_rule_3,
|
|
@@ -7580,9 +7692,9 @@ var __publicField = (obj, key, value) => {
|
|
|
7580
7692
|
}
|
|
7581
7693
|
return isSymbol2(value2) ? [value2] : copyArray(stringToPath2(toString2(value2)));
|
|
7582
7694
|
}
|
|
7583
|
-
function uniqueId(
|
|
7695
|
+
function uniqueId(prefix2) {
|
|
7584
7696
|
var id = ++idCounter;
|
|
7585
|
-
return toString2(
|
|
7697
|
+
return toString2(prefix2) + id;
|
|
7586
7698
|
}
|
|
7587
7699
|
var add = createMathOperation(function(augend, addend) {
|
|
7588
7700
|
return augend + addend;
|
|
@@ -9458,7 +9570,7 @@ var __publicField = (obj, key, value) => {
|
|
|
9458
9570
|
function formatSi(inValue, options) {
|
|
9459
9571
|
const {
|
|
9460
9572
|
increment = 1e3,
|
|
9461
|
-
suffix
|
|
9573
|
+
suffix = null,
|
|
9462
9574
|
firstSuffix = null,
|
|
9463
9575
|
startingExponent = 0,
|
|
9464
9576
|
minExponent = 0,
|
|
@@ -9486,7 +9598,7 @@ var __publicField = (obj, key, value) => {
|
|
|
9486
9598
|
if (exp === 0 && firstSuffix !== null) {
|
|
9487
9599
|
outStr += `${firstSuffix}`;
|
|
9488
9600
|
} else {
|
|
9489
|
-
outStr += `${UNITS[exp]}${
|
|
9601
|
+
outStr += `${UNITS[exp]}${suffix}` || "";
|
|
9490
9602
|
}
|
|
9491
9603
|
return outStr;
|
|
9492
9604
|
}
|
|
@@ -11195,7 +11307,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11195
11307
|
function useDownloadYAML() {
|
|
11196
11308
|
return function(options) {
|
|
11197
11309
|
const { name: name2, item } = options;
|
|
11198
|
-
const content = yaml$
|
|
11310
|
+
const content = yaml$2.dump(item);
|
|
11199
11311
|
download(`${name2}.yaml`, content);
|
|
11200
11312
|
};
|
|
11201
11313
|
}
|
|
@@ -12255,24 +12367,24 @@ var __publicField = (obj, key, value) => {
|
|
|
12255
12367
|
}
|
|
12256
12368
|
function validateLabelKey(key2) {
|
|
12257
12369
|
const labelRegex = /(^[a-zA-Z0-9]$)|(^[a-zA-Z0-9][a-zA-Z0-9\.\-\_]*[a-zA-Z0-9]$)/;
|
|
12258
|
-
let
|
|
12370
|
+
let prefix2, name2;
|
|
12259
12371
|
const splitResult = key2.split("/");
|
|
12260
12372
|
if (splitResult.length === 1) {
|
|
12261
12373
|
name2 = splitResult[0];
|
|
12262
12374
|
} else {
|
|
12263
|
-
|
|
12375
|
+
prefix2 = splitResult[0];
|
|
12264
12376
|
name2 = splitResult[1];
|
|
12265
12377
|
}
|
|
12266
|
-
if (
|
|
12378
|
+
if (prefix2 === "") {
|
|
12267
12379
|
return { isValid: false, errorMessage: "EMPTY_PREFIX" };
|
|
12268
12380
|
}
|
|
12269
|
-
if (
|
|
12381
|
+
if (prefix2 && !labelRegex.test(prefix2)) {
|
|
12270
12382
|
return { isValid: false, errorMessage: "INVALID_PREFIX" };
|
|
12271
12383
|
}
|
|
12272
12384
|
if (!labelRegex.test(name2)) {
|
|
12273
12385
|
return { isValid: false, errorMessage: "INVALID_NAME" };
|
|
12274
12386
|
}
|
|
12275
|
-
if (
|
|
12387
|
+
if (prefix2 && prefix2.length > 253) {
|
|
12276
12388
|
return { isValid: false, errorMessage: "MAX_253" };
|
|
12277
12389
|
}
|
|
12278
12390
|
if (name2 && name2.length > 63) {
|
|
@@ -12303,9 +12415,9 @@ var __publicField = (obj, key, value) => {
|
|
|
12303
12415
|
} = useTranslation();
|
|
12304
12416
|
const data2 = [{
|
|
12305
12417
|
object: t2("dovetail.key"),
|
|
12306
|
-
contains: t2("dovetail.
|
|
12418
|
+
contains: t2("dovetail.prefix"),
|
|
12307
12419
|
optional: t2("dovetail.no"),
|
|
12308
|
-
rule: [t2("dovetail.
|
|
12420
|
+
rule: [t2("dovetail.prefix_format_rule_1"), t2("dovetail.prefix_format_rule_2"), t2("dovetail.prefix_format_rule_3")]
|
|
12309
12421
|
}, {
|
|
12310
12422
|
object: t2("dovetail.key"),
|
|
12311
12423
|
contains: t2("dovetail.name"),
|
|
@@ -14974,8 +15086,8 @@ var __publicField = (obj, key, value) => {
|
|
|
14974
15086
|
if (propertyInfo !== null) {
|
|
14975
15087
|
return !propertyInfo.acceptsBooleans;
|
|
14976
15088
|
} else {
|
|
14977
|
-
var
|
|
14978
|
-
return
|
|
15089
|
+
var prefix2 = name2.toLowerCase().slice(0, 5);
|
|
15090
|
+
return prefix2 !== "data-" && prefix2 !== "aria-";
|
|
14979
15091
|
}
|
|
14980
15092
|
}
|
|
14981
15093
|
default:
|
|
@@ -15942,13 +16054,13 @@ var __publicField = (obj, key, value) => {
|
|
|
15942
16054
|
strokeOpacity: true,
|
|
15943
16055
|
strokeWidth: true
|
|
15944
16056
|
};
|
|
15945
|
-
function prefixKey(
|
|
15946
|
-
return
|
|
16057
|
+
function prefixKey(prefix2, key2) {
|
|
16058
|
+
return prefix2 + key2.charAt(0).toUpperCase() + key2.substring(1);
|
|
15947
16059
|
}
|
|
15948
16060
|
var prefixes = ["Webkit", "ms", "Moz", "O"];
|
|
15949
16061
|
Object.keys(isUnitlessNumber).forEach(function(prop) {
|
|
15950
|
-
prefixes.forEach(function(
|
|
15951
|
-
isUnitlessNumber[prefixKey(
|
|
16062
|
+
prefixes.forEach(function(prefix2) {
|
|
16063
|
+
isUnitlessNumber[prefixKey(prefix2, prop)] = isUnitlessNumber[prop];
|
|
15952
16064
|
});
|
|
15953
16065
|
});
|
|
15954
16066
|
function dangerousStyleValue(name2, value2, isCustomProperty) {
|
|
@@ -19496,7 +19608,7 @@ var __publicField = (obj, key, value) => {
|
|
|
19496
19608
|
}
|
|
19497
19609
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(MonacoYamlEditor$1, {
|
|
19498
19610
|
schemas: [],
|
|
19499
|
-
defaultValue: yaml$
|
|
19611
|
+
defaultValue: yaml$2.dump(ingressOrEgress),
|
|
19500
19612
|
height: "300px",
|
|
19501
19613
|
className: EditorStyle$1,
|
|
19502
19614
|
readOnly: true,
|
|
@@ -35996,7 +36108,8 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
35996
36108
|
const {
|
|
35997
36109
|
selectedKeys,
|
|
35998
36110
|
tableProps,
|
|
35999
|
-
contentClassName
|
|
36111
|
+
contentClassName,
|
|
36112
|
+
belowToolBarContent
|
|
36000
36113
|
} = props;
|
|
36001
36114
|
const {
|
|
36002
36115
|
resource
|
|
@@ -36011,7 +36124,7 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
36011
36124
|
title: config == null ? void 0 : config.displayName,
|
|
36012
36125
|
description: config == null ? void 0 : config.description,
|
|
36013
36126
|
hideCreate: config == null ? void 0 : config.hideCreate
|
|
36014
|
-
}), /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Divider, {
|
|
36127
|
+
}), belowToolBarContent, /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Divider, {
|
|
36015
36128
|
style: {
|
|
36016
36129
|
margin: 0,
|
|
36017
36130
|
minHeight: 1,
|
|
@@ -38816,7 +38929,7 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
38816
38929
|
return merged2;
|
|
38817
38930
|
}
|
|
38818
38931
|
const merged = merge(defaultValue, typeObject);
|
|
38819
|
-
const content = yaml$
|
|
38932
|
+
const content = yaml$2.dump(merged);
|
|
38820
38933
|
return content.replace(/(')(#.+?)(')/g, "$2").replace(/( +)(#)/g, "$2$1");
|
|
38821
38934
|
}
|
|
38822
38935
|
const useGlobalStore = () => {
|
|
@@ -38946,7 +39059,7 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
38946
39059
|
const validateYaml = (yamlValue) => {
|
|
38947
39060
|
const errorMap = {};
|
|
38948
39061
|
if (rules && isYamlValid && isSchemaValid) {
|
|
38949
|
-
const formValue = yaml$
|
|
39062
|
+
const formValue = yaml$2.load(yamlValue || "");
|
|
38950
39063
|
rules.forEach((rule2) => {
|
|
38951
39064
|
const { path: path2, validators } = rule2;
|
|
38952
39065
|
const value2 = lodashEs.get(formValue, path2);
|
|
@@ -38978,7 +39091,7 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
38978
39091
|
var _a2;
|
|
38979
39092
|
return {
|
|
38980
39093
|
ref: editor,
|
|
38981
|
-
defaultValue: schema && (editorOptions == null ? void 0 : editorOptions.isGenerateAnnotations) ? generateYamlBySchema(initialValues || {}, schema) : yaml$
|
|
39094
|
+
defaultValue: schema && (editorOptions == null ? void 0 : editorOptions.isGenerateAnnotations) ? generateYamlBySchema(initialValues || {}, schema) : yaml$2.dump(initialValues),
|
|
38982
39095
|
schemas,
|
|
38983
39096
|
id: ((_a2 = useResourceResult.resource) == null ? void 0 : _a2.name) || "",
|
|
38984
39097
|
errorMsgs: finalErrors,
|
|
@@ -38991,7 +39104,7 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
38991
39104
|
},
|
|
38992
39105
|
onEditorCreate(editorInstance) {
|
|
38993
39106
|
var _a3, _b;
|
|
38994
|
-
const editorValue = yaml$
|
|
39107
|
+
const editorValue = yaml$2.dump(initialValues);
|
|
38995
39108
|
(_a3 = editor.current) == null ? void 0 : _a3.setEditorValue(editorValue);
|
|
38996
39109
|
(_b = editor.current) == null ? void 0 : _b.setValue(editorValue);
|
|
38997
39110
|
if (action === "edit") {
|
|
@@ -39030,7 +39143,7 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
39030
39143
|
return;
|
|
39031
39144
|
}
|
|
39032
39145
|
try {
|
|
39033
|
-
const objectValues = editor.current ? yaml$
|
|
39146
|
+
const objectValues = editor.current ? yaml$2.load(((_b = editor.current) == null ? void 0 : _b.getEditorValue()) || "") : values;
|
|
39034
39147
|
const finalValues = (transformApplyValues == null ? void 0 : transformApplyValues(objectValues)) || objectValues;
|
|
39035
39148
|
return onFinish(finalValues);
|
|
39036
39149
|
} catch (error) {
|
|
@@ -39060,14 +39173,14 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
39060
39173
|
switchEditor() {
|
|
39061
39174
|
var _a2, _b;
|
|
39062
39175
|
if (enableEditor && ((_a2 = editor.current) == null ? void 0 : _a2.getEditorValue())) {
|
|
39063
|
-
const value2 = yaml$
|
|
39176
|
+
const value2 = yaml$2.load((_b = editor.current) == null ? void 0 : _b.getEditorValue());
|
|
39064
39177
|
form2 == null ? void 0 : form2.setFieldsValue(value2);
|
|
39065
39178
|
}
|
|
39066
39179
|
setEnableEditor(!enableEditor);
|
|
39067
39180
|
},
|
|
39068
39181
|
onFinish: async (values) => {
|
|
39069
39182
|
var _a2;
|
|
39070
|
-
const finalValues = enableEditor ? yaml$
|
|
39183
|
+
const finalValues = enableEditor ? yaml$2.load(((_a2 = editor.current) == null ? void 0 : _a2.getEditorValue()) || "") : values ?? formSF.form.getFieldsValue(true);
|
|
39071
39184
|
return await onFinish(finalValues);
|
|
39072
39185
|
}
|
|
39073
39186
|
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { InternalTableProps } from 'src/components/InternalBaseTable';
|
|
3
3
|
import { ResourceModel } from '../../models';
|
|
4
4
|
interface ListPageProps<T extends ResourceModel> {
|
|
5
5
|
selectedKeys: string[];
|
|
6
6
|
tableProps: InternalTableProps<T>;
|
|
7
7
|
contentClassName?: string;
|
|
8
|
+
belowToolBarContent?: React.ReactNode;
|
|
8
9
|
}
|
|
9
10
|
export declare function ListPage<T extends ResourceModel>(props: ListPageProps<T>): JSX.Element;
|
|
10
11
|
export {};
|
package/lib/i18n.d.ts
CHANGED
|
@@ -184,6 +184,62 @@ export declare const resources: {
|
|
|
184
184
|
reconnect: string;
|
|
185
185
|
edit_form: string;
|
|
186
186
|
exit_yaml_tip: string;
|
|
187
|
+
value_optional: string;
|
|
188
|
+
effect: string;
|
|
189
|
+
name_can_not_be_empty: string;
|
|
190
|
+
support: string;
|
|
191
|
+
distributed: string;
|
|
192
|
+
lost_state: string;
|
|
193
|
+
form: string;
|
|
194
|
+
yaml: string;
|
|
195
|
+
edit_label_success_toast: string;
|
|
196
|
+
edit_annotation: string;
|
|
197
|
+
edit_annotation_success_toast: string;
|
|
198
|
+
pvc: string;
|
|
199
|
+
pv: string;
|
|
200
|
+
retain: string;
|
|
201
|
+
default_sc: string;
|
|
202
|
+
reclaim_policy: string;
|
|
203
|
+
allow_expand: string;
|
|
204
|
+
edit_distribute_storage: string;
|
|
205
|
+
edit_distribute_storage_success_toast: string;
|
|
206
|
+
edit_distribute_storage_failed_toast: string;
|
|
207
|
+
edit_node_taint: string;
|
|
208
|
+
edit_node_taint_success_toast: string;
|
|
209
|
+
node_taint_NoSchedule: string;
|
|
210
|
+
node_taint_PreferNoSchedule: string;
|
|
211
|
+
node_taint_NoExecute: string;
|
|
212
|
+
taint: string;
|
|
213
|
+
change_form_mode_alert: string;
|
|
214
|
+
pvc_storage_required: string;
|
|
215
|
+
pvc_storage_min: string;
|
|
216
|
+
pvc_storage_reduce_limit: string;
|
|
217
|
+
pvc_storage_max_limit: string;
|
|
218
|
+
key_empty_text: string;
|
|
219
|
+
format_error: string;
|
|
220
|
+
taint_effect_empty_text: string;
|
|
221
|
+
add_label: string;
|
|
222
|
+
add_annotation: string;
|
|
223
|
+
add_taint: string;
|
|
224
|
+
look_format_requirement: string;
|
|
225
|
+
yes: string;
|
|
226
|
+
no: string;
|
|
227
|
+
contains: string;
|
|
228
|
+
optional: string;
|
|
229
|
+
format_requirements: string;
|
|
230
|
+
prefix: string;
|
|
231
|
+
prefix_format_rule_1: string;
|
|
232
|
+
prefix_format_rule_2: string;
|
|
233
|
+
prefix_format_rule_3: string;
|
|
234
|
+
name_format_rule_1: string;
|
|
235
|
+
name_format_rule_2: string;
|
|
236
|
+
name_format_rule_3: string;
|
|
237
|
+
taint_effect_NoSchedule_tooltip_1: string;
|
|
238
|
+
taint_effect_NoSchedule_tooltip_2: string;
|
|
239
|
+
taint_effect_PreferNoSchedule_tooltip_1: string;
|
|
240
|
+
taint_effect_PreferNoSchedule_tooltip_2: string;
|
|
241
|
+
taint_effect_PreferNoSchedule_tooltip_3: string;
|
|
242
|
+
taint_effect_NoExecute_tooltip_3: string;
|
|
187
243
|
};
|
|
188
244
|
};
|
|
189
245
|
'zh-CN': {
|
|
@@ -409,10 +465,10 @@ export declare const resources: {
|
|
|
409
465
|
contains: string;
|
|
410
466
|
optional: string;
|
|
411
467
|
format_requirements: string;
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
468
|
+
prefix: string;
|
|
469
|
+
prefix_format_rule_1: string;
|
|
470
|
+
prefix_format_rule_2: string;
|
|
471
|
+
prefix_format_rule_3: string;
|
|
416
472
|
name_format_rule_1: string;
|
|
417
473
|
name_format_rule_2: string;
|
|
418
474
|
name_format_rule_3: string;
|
|
@@ -181,6 +181,62 @@ declare const _default: {
|
|
|
181
181
|
reconnect: string;
|
|
182
182
|
edit_form: string;
|
|
183
183
|
exit_yaml_tip: string;
|
|
184
|
+
value_optional: string;
|
|
185
|
+
effect: string;
|
|
186
|
+
name_can_not_be_empty: string;
|
|
187
|
+
support: string;
|
|
188
|
+
distributed: string;
|
|
189
|
+
lost_state: string;
|
|
190
|
+
form: string;
|
|
191
|
+
yaml: string;
|
|
192
|
+
edit_label_success_toast: string;
|
|
193
|
+
edit_annotation: string;
|
|
194
|
+
edit_annotation_success_toast: string;
|
|
195
|
+
pvc: string;
|
|
196
|
+
pv: string;
|
|
197
|
+
retain: string;
|
|
198
|
+
default_sc: string;
|
|
199
|
+
reclaim_policy: string;
|
|
200
|
+
allow_expand: string;
|
|
201
|
+
edit_distribute_storage: string;
|
|
202
|
+
edit_distribute_storage_success_toast: string;
|
|
203
|
+
edit_distribute_storage_failed_toast: string;
|
|
204
|
+
edit_node_taint: string;
|
|
205
|
+
edit_node_taint_success_toast: string;
|
|
206
|
+
node_taint_NoSchedule: string;
|
|
207
|
+
node_taint_PreferNoSchedule: string;
|
|
208
|
+
node_taint_NoExecute: string;
|
|
209
|
+
taint: string;
|
|
210
|
+
change_form_mode_alert: string;
|
|
211
|
+
pvc_storage_required: string;
|
|
212
|
+
pvc_storage_min: string;
|
|
213
|
+
pvc_storage_reduce_limit: string;
|
|
214
|
+
pvc_storage_max_limit: string;
|
|
215
|
+
key_empty_text: string;
|
|
216
|
+
format_error: string;
|
|
217
|
+
taint_effect_empty_text: string;
|
|
218
|
+
add_label: string;
|
|
219
|
+
add_annotation: string;
|
|
220
|
+
add_taint: string;
|
|
221
|
+
look_format_requirement: string;
|
|
222
|
+
yes: string;
|
|
223
|
+
no: string;
|
|
224
|
+
contains: string;
|
|
225
|
+
optional: string;
|
|
226
|
+
format_requirements: string;
|
|
227
|
+
prefix: string;
|
|
228
|
+
prefix_format_rule_1: string;
|
|
229
|
+
prefix_format_rule_2: string;
|
|
230
|
+
prefix_format_rule_3: string;
|
|
231
|
+
name_format_rule_1: string;
|
|
232
|
+
name_format_rule_2: string;
|
|
233
|
+
name_format_rule_3: string;
|
|
234
|
+
taint_effect_NoSchedule_tooltip_1: string;
|
|
235
|
+
taint_effect_NoSchedule_tooltip_2: string;
|
|
236
|
+
taint_effect_PreferNoSchedule_tooltip_1: string;
|
|
237
|
+
taint_effect_PreferNoSchedule_tooltip_2: string;
|
|
238
|
+
taint_effect_PreferNoSchedule_tooltip_3: string;
|
|
239
|
+
taint_effect_NoExecute_tooltip_3: string;
|
|
184
240
|
};
|
|
185
241
|
};
|
|
186
242
|
export default _default;
|
|
@@ -221,10 +221,10 @@ declare const _default: {
|
|
|
221
221
|
contains: string;
|
|
222
222
|
optional: string;
|
|
223
223
|
format_requirements: string;
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
224
|
+
prefix: string;
|
|
225
|
+
prefix_format_rule_1: string;
|
|
226
|
+
prefix_format_rule_2: string;
|
|
227
|
+
prefix_format_rule_3: string;
|
|
228
228
|
name_format_rule_1: string;
|
|
229
229
|
name_format_rule_2: string;
|
|
230
230
|
name_format_rule_3: string;
|