@dovetail-v2/refine 0.1.8 → 0.1.10
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-1593cfad.js → MonacoYamlDiffEditor-effbc940.js} +1 -1
- package/dist/{index-45031697.js → index-a2e0edc2.js} +1440 -739
- package/dist/refine.js +216 -196
- package/dist/refine.umd.cjs +1239 -538
- package/dist/style.css +44 -44
- package/lib/components/CreateButton/index.d.ts +5 -1
- package/lib/components/DropdownMenuItems/EditNodeTaintDropdownMenuItem.d.ts +12 -0
- package/lib/components/{CronJobDropdown → Dropdowns/CronJobDropdown}/index.d.ts +1 -1
- package/lib/components/{K8sDropdown → Dropdowns/K8sDropdown}/index.d.ts +1 -1
- package/lib/components/{PodDropdown → Dropdowns/PodDropdown}/index.d.ts +1 -1
- package/lib/components/{ReplicasDropdown → Dropdowns/ReplicasDropdown}/index.d.ts +1 -1
- package/lib/components/{WorkloadDropdown → Dropdowns/WorkloadDropdown}/index.d.ts +1 -1
- package/lib/components/EditField/index.d.ts +1 -1
- package/lib/components/EditMetadataForm/EditNodeTaintForm.d.ts +12 -0
- package/lib/components/Form/YamlForm.d.ts +1 -1
- package/lib/components/Form/useReactHookForm.d.ts +2 -1
- package/lib/components/Form/useYamlForm.d.ts +1 -1
- package/lib/components/InternalBaseTable/index.d.ts +43 -0
- package/lib/components/ListPage/index.d.ts +2 -2
- package/lib/components/NodeTaintsTable/NodeTaintsTable.d.ts +7 -0
- package/lib/components/NodeTaintsTable/index.d.ts +1 -0
- package/lib/components/PVCDistributeStorage/index.d.ts +16 -0
- package/lib/components/ResourceCRUD/list/index.d.ts +2 -2
- package/lib/components/ResourceFiledDisplays.d.ts +2 -3
- package/lib/components/ResourceLink/index.d.ts +2 -2
- package/lib/components/ResourceTable/index.d.ts +9 -0
- package/lib/components/ShowContent/fields.d.ts +10 -0
- package/lib/components/ShowContent/groups.d.ts +5 -2
- package/lib/components/StateTag/StateTag.d.ts +3 -3
- package/lib/components/Table/index.d.ts +11 -43
- package/lib/components/{Table/TableToolBar.d.ts → TableToolbar/index.d.ts} +1 -0
- package/lib/components/WorkloadPodsTable/WorkloadPodsTable.d.ts +2 -0
- package/lib/components/index.d.ts +7 -5
- package/lib/constants/k8s.d.ts +36 -1
- package/lib/constants/state.d.ts +8 -3
- package/lib/contexts/component.d.ts +1 -1
- package/lib/hooks/useEagleTable/columns.d.ts +7 -1
- package/lib/hooks/useEagleTable/useEagleTable.d.ts +3 -3
- package/lib/hooks/useSubmitForm.d.ts +1 -1
- package/lib/hooks/useTableData.d.ts +1 -1
- package/lib/i18n.d.ts +41 -20
- package/lib/locales/en-US/index.d.ts +0 -1
- package/lib/locales/zh-CN/index.d.ts +41 -19
- package/lib/models/cronjob-model.d.ts +2 -2
- package/lib/models/daemonset-model.d.ts +2 -2
- package/lib/models/deployment-model.d.ts +2 -2
- package/lib/models/job-model.d.ts +2 -2
- package/lib/models/node-model.d.ts +2 -2
- package/lib/models/persistent-volume-claim.d.ts +6 -0
- package/lib/models/persistent-volume.d.ts +7 -0
- package/lib/models/statefulset-model.d.ts +2 -2
- package/lib/models/storage-class.d.ts +4 -0
- package/lib/pages/storageclasses/index.d.ts +7 -4
- package/lib/styles/tag.d.ts +1 -0
- package/lib/types/resource.d.ts +5 -6
- package/lib/utils/storage.d.ts +13 -0
- package/package.json +1 -1
- /package/lib/components/{Table → InternalBaseTable}/TableWidgets.d.ts +0 -0
package/dist/refine.umd.cjs
CHANGED
|
@@ -1020,8 +1020,8 @@ var __publicField = (obj, key, value) => {
|
|
|
1020
1020
|
const fetch_schema_fail$1 = "获取 schema 失败。";
|
|
1021
1021
|
const obtain_data_error$1 = "Having trouble getting data.";
|
|
1022
1022
|
const retry$1 = "Retry";
|
|
1023
|
-
const create_resource$1 = "Create
|
|
1024
|
-
const edit_resource$1 = "Edit
|
|
1023
|
+
const create_resource$1 = "Create{{resource}}";
|
|
1024
|
+
const edit_resource$1 = "Edit{{resource}}";
|
|
1025
1025
|
const state$1 = "Status";
|
|
1026
1026
|
const name$1 = "Name";
|
|
1027
1027
|
const pod$1 = "Pod";
|
|
@@ -1055,18 +1055,18 @@ var __publicField = (obj, key, value) => {
|
|
|
1055
1055
|
const resume$1 = "Resume";
|
|
1056
1056
|
const sessionAffinity$1 = "Session Affinity";
|
|
1057
1057
|
const log$1 = "Log";
|
|
1058
|
-
const ready
|
|
1059
|
-
const updating
|
|
1060
|
-
const completed
|
|
1061
|
-
const failed
|
|
1062
|
-
const suspended
|
|
1063
|
-
const running
|
|
1064
|
-
const terminating
|
|
1065
|
-
const terminated
|
|
1066
|
-
const succeeded
|
|
1067
|
-
const unknown
|
|
1068
|
-
const pending
|
|
1069
|
-
const waiting
|
|
1058
|
+
const ready = "Ready";
|
|
1059
|
+
const updating = "Updating";
|
|
1060
|
+
const completed = "Completed";
|
|
1061
|
+
const failed = "Failed";
|
|
1062
|
+
const suspended = "Suspended";
|
|
1063
|
+
const running = "Running";
|
|
1064
|
+
const terminating = "Terminating";
|
|
1065
|
+
const terminated = "Terminated";
|
|
1066
|
+
const succeeded = "Succeeded";
|
|
1067
|
+
const unknown = "Unknown";
|
|
1068
|
+
const pending = "Pending";
|
|
1069
|
+
const waiting = "Waiting";
|
|
1070
1070
|
const expand$1 = "Expand";
|
|
1071
1071
|
const fold$1 = "Collapse";
|
|
1072
1072
|
const rule$1 = "Rule";
|
|
@@ -1157,22 +1157,21 @@ var __publicField = (obj, key, value) => {
|
|
|
1157
1157
|
const path_type$1 = "Path type";
|
|
1158
1158
|
const only_support_one_yaml$1 = "Only one YAML configuration is supported at a time.";
|
|
1159
1159
|
const not_support$1 = "Not supported";
|
|
1160
|
-
const stopped
|
|
1160
|
+
const stopped = "Stopped";
|
|
1161
1161
|
const any_node_ip$1 = "Any node IP";
|
|
1162
1162
|
const storage_class$1 = "Storage class";
|
|
1163
1163
|
const persistent_volume$1 = "Persistent volume";
|
|
1164
1164
|
const provisioner$1 = "Provisioner";
|
|
1165
1165
|
const file_system$1 = "File system";
|
|
1166
1166
|
const capacity$1 = "Capacity";
|
|
1167
|
-
const phase$1 = "Phase";
|
|
1168
1167
|
const volume_mode$1 = "Volume mode";
|
|
1169
1168
|
const access_mode$1 = "Access mode";
|
|
1170
1169
|
const block$1 = "Block";
|
|
1171
|
-
const pv_phase_available
|
|
1172
|
-
const pv_phase_bound
|
|
1173
|
-
const pv_phase_released
|
|
1174
|
-
const pv_phase_failed
|
|
1175
|
-
const pv_phase_pending
|
|
1170
|
+
const pv_phase_available = "Available";
|
|
1171
|
+
const pv_phase_bound = "Bound";
|
|
1172
|
+
const pv_phase_released = "Released";
|
|
1173
|
+
const pv_phase_failed = "Failed";
|
|
1174
|
+
const pv_phase_pending = "Pending";
|
|
1176
1175
|
const exec_pod = "Execute shell";
|
|
1177
1176
|
const search$1 = "Search";
|
|
1178
1177
|
const edit_label$1 = "Edit label";
|
|
@@ -1226,18 +1225,18 @@ var __publicField = (obj, key, value) => {
|
|
|
1226
1225
|
resume: resume$1,
|
|
1227
1226
|
sessionAffinity: sessionAffinity$1,
|
|
1228
1227
|
log: log$1,
|
|
1229
|
-
ready
|
|
1230
|
-
updating
|
|
1231
|
-
completed
|
|
1232
|
-
failed
|
|
1233
|
-
suspended
|
|
1234
|
-
running
|
|
1235
|
-
terminating
|
|
1236
|
-
terminated
|
|
1237
|
-
succeeded
|
|
1238
|
-
unknown
|
|
1239
|
-
pending
|
|
1240
|
-
waiting
|
|
1228
|
+
ready,
|
|
1229
|
+
updating,
|
|
1230
|
+
completed,
|
|
1231
|
+
failed,
|
|
1232
|
+
suspended,
|
|
1233
|
+
running,
|
|
1234
|
+
terminating,
|
|
1235
|
+
terminated,
|
|
1236
|
+
succeeded,
|
|
1237
|
+
unknown,
|
|
1238
|
+
pending,
|
|
1239
|
+
waiting,
|
|
1241
1240
|
expand: expand$1,
|
|
1242
1241
|
fold: fold$1,
|
|
1243
1242
|
rule: rule$1,
|
|
@@ -1330,22 +1329,21 @@ var __publicField = (obj, key, value) => {
|
|
|
1330
1329
|
path_type: path_type$1,
|
|
1331
1330
|
only_support_one_yaml: only_support_one_yaml$1,
|
|
1332
1331
|
not_support: not_support$1,
|
|
1333
|
-
stopped
|
|
1332
|
+
stopped,
|
|
1334
1333
|
any_node_ip: any_node_ip$1,
|
|
1335
1334
|
storage_class: storage_class$1,
|
|
1336
1335
|
persistent_volume: persistent_volume$1,
|
|
1337
1336
|
provisioner: provisioner$1,
|
|
1338
1337
|
file_system: file_system$1,
|
|
1339
1338
|
capacity: capacity$1,
|
|
1340
|
-
phase: phase$1,
|
|
1341
1339
|
volume_mode: volume_mode$1,
|
|
1342
1340
|
access_mode: access_mode$1,
|
|
1343
1341
|
block: block$1,
|
|
1344
|
-
pv_phase_available
|
|
1345
|
-
pv_phase_bound
|
|
1346
|
-
pv_phase_released
|
|
1347
|
-
pv_phase_failed
|
|
1348
|
-
pv_phase_pending
|
|
1342
|
+
pv_phase_available,
|
|
1343
|
+
pv_phase_bound,
|
|
1344
|
+
pv_phase_released,
|
|
1345
|
+
pv_phase_failed,
|
|
1346
|
+
pv_phase_pending,
|
|
1349
1347
|
exec_pod,
|
|
1350
1348
|
search: search$1,
|
|
1351
1349
|
edit_label: edit_label$1
|
|
@@ -1409,20 +1407,20 @@ var __publicField = (obj, key, value) => {
|
|
|
1409
1407
|
const fetch_schema_fail = "获取 schema 失败。";
|
|
1410
1408
|
const obtain_data_error = "获取数据时遇到问题。";
|
|
1411
1409
|
const retry = "重试";
|
|
1412
|
-
const
|
|
1413
|
-
const
|
|
1414
|
-
const
|
|
1415
|
-
const
|
|
1416
|
-
const
|
|
1417
|
-
const
|
|
1418
|
-
const
|
|
1419
|
-
const
|
|
1420
|
-
const
|
|
1421
|
-
const
|
|
1422
|
-
const
|
|
1423
|
-
const
|
|
1424
|
-
const create_resource = "创建
|
|
1425
|
-
const edit_resource = "编辑
|
|
1410
|
+
const ready_state = "已就绪";
|
|
1411
|
+
const updating_state = "更新中";
|
|
1412
|
+
const completed_state = "已完成";
|
|
1413
|
+
const abnormal_state = "异常";
|
|
1414
|
+
const suspended_state = "已挂起";
|
|
1415
|
+
const running_state = "运行中";
|
|
1416
|
+
const terminating_state = "终止中";
|
|
1417
|
+
const succeeded_state = "已成功终止";
|
|
1418
|
+
const terminated_state = "已终止";
|
|
1419
|
+
const unknown_state = "未知";
|
|
1420
|
+
const pending_state = "待处理";
|
|
1421
|
+
const waiting_state = "等待中";
|
|
1422
|
+
const create_resource = "创建{{resource}}";
|
|
1423
|
+
const edit_resource = "编辑{{resource}}";
|
|
1426
1424
|
const sec = "秒";
|
|
1427
1425
|
const min = "分";
|
|
1428
1426
|
const hr = "小时";
|
|
@@ -1457,6 +1455,7 @@ var __publicField = (obj, key, value) => {
|
|
|
1457
1455
|
const protocol = "协议";
|
|
1458
1456
|
const key = "键";
|
|
1459
1457
|
const value = "值";
|
|
1458
|
+
const effect = "效果";
|
|
1460
1459
|
const show_data_value = "显示数值";
|
|
1461
1460
|
const hide_data_value = "隐藏数值";
|
|
1462
1461
|
const path_type = "路径类型";
|
|
@@ -1503,23 +1502,24 @@ var __publicField = (obj, key, value) => {
|
|
|
1503
1502
|
const out_cluster_lb_desc = "LoadBalancer 展示 <strong>ingress[*].ip</strong>。";
|
|
1504
1503
|
const out_external_name_desc = "ExternalName 展示 <strong>external-ip</strong>。";
|
|
1505
1504
|
const only_support_one_yaml = "一次仅支持输入一个 YAML 配置。";
|
|
1505
|
+
const support = "支持";
|
|
1506
1506
|
const not_support = "不支持";
|
|
1507
|
-
const
|
|
1507
|
+
const stopped_state = "已停止";
|
|
1508
1508
|
const any_node_ip = "任意节点 IP";
|
|
1509
1509
|
const storage_class = "存储类";
|
|
1510
1510
|
const persistent_volume = "持久卷";
|
|
1511
1511
|
const provisioner = "制备器";
|
|
1512
1512
|
const file_system = "文件系统";
|
|
1513
1513
|
const capacity = "容量";
|
|
1514
|
-
const
|
|
1514
|
+
const distributed = "分配量";
|
|
1515
1515
|
const volume_mode = "卷模式";
|
|
1516
1516
|
const access_mode = "访问模式";
|
|
1517
1517
|
const block = "块";
|
|
1518
|
-
const
|
|
1519
|
-
const
|
|
1520
|
-
const
|
|
1521
|
-
const
|
|
1522
|
-
const
|
|
1518
|
+
const available_state = "可用";
|
|
1519
|
+
const bound_state = "已绑定";
|
|
1520
|
+
const released_state = "已释放";
|
|
1521
|
+
const failed_state = "失败";
|
|
1522
|
+
const lost_state = "卷不可用";
|
|
1523
1523
|
const font_size = "字体大小";
|
|
1524
1524
|
const download_shell_content = "下载控制台日志";
|
|
1525
1525
|
const clear_shell = "清空命令行";
|
|
@@ -1535,6 +1535,26 @@ var __publicField = (obj, key, value) => {
|
|
|
1535
1535
|
const edit_label_success_toast = "编辑资源 {{name}} 的标签成功";
|
|
1536
1536
|
const edit_annotation = "编辑注解";
|
|
1537
1537
|
const edit_annotation_success_toast = "编辑资源 {{name}} 的注解成功";
|
|
1538
|
+
const pvc = "持久卷申领";
|
|
1539
|
+
const pv = "持久卷";
|
|
1540
|
+
const csi = "CSI";
|
|
1541
|
+
const retain = "保留";
|
|
1542
|
+
const default_sc = "默认存储类";
|
|
1543
|
+
const reclaim_policy = "回收策略";
|
|
1544
|
+
const allow_expand = "卷扩容";
|
|
1545
|
+
const edit_distribute_storage = "编辑分配量";
|
|
1546
|
+
const edit_distribute_storage_success_toast = "编辑分配量成功";
|
|
1547
|
+
const edit_distribute_storage_failed_toast = "编辑分配量失败";
|
|
1548
|
+
const edit_node_taint = "编辑节点污点";
|
|
1549
|
+
const edit_node_taint_success_toast = "编辑节点 {{name}} 的污点成功";
|
|
1550
|
+
const node_taint_NoSchedule = "仅阻止调度";
|
|
1551
|
+
const node_taint_PreferNoSchedule = "尽可能阻止调度";
|
|
1552
|
+
const node_taint_NoExecute = "阻止调度并驱逐 Pod";
|
|
1553
|
+
const taint = "污点";
|
|
1554
|
+
const change_form_mode_alert = "从编辑 YAML 切回表单编辑,将无法保留对 YAML 文件做出的所有更改。";
|
|
1555
|
+
const pvc_storage_required = "请填写分配量。";
|
|
1556
|
+
const pvc_storage_min = "请输入正整数。";
|
|
1557
|
+
const pvc_storage_reduce_limit = "输入值不得小于当前数值。";
|
|
1538
1558
|
const dovetail = {
|
|
1539
1559
|
copy: copy$1,
|
|
1540
1560
|
reset_arguments,
|
|
@@ -1593,18 +1613,18 @@ var __publicField = (obj, key, value) => {
|
|
|
1593
1613
|
fetch_schema_fail,
|
|
1594
1614
|
obtain_data_error,
|
|
1595
1615
|
retry,
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1616
|
+
ready_state,
|
|
1617
|
+
updating_state,
|
|
1618
|
+
completed_state,
|
|
1619
|
+
abnormal_state,
|
|
1620
|
+
suspended_state,
|
|
1621
|
+
running_state,
|
|
1622
|
+
terminating_state,
|
|
1623
|
+
succeeded_state,
|
|
1624
|
+
terminated_state,
|
|
1625
|
+
unknown_state,
|
|
1626
|
+
pending_state,
|
|
1627
|
+
waiting_state,
|
|
1608
1628
|
create_resource,
|
|
1609
1629
|
edit_resource,
|
|
1610
1630
|
sec,
|
|
@@ -1641,6 +1661,7 @@ var __publicField = (obj, key, value) => {
|
|
|
1641
1661
|
protocol,
|
|
1642
1662
|
key,
|
|
1643
1663
|
value,
|
|
1664
|
+
effect,
|
|
1644
1665
|
show_data_value,
|
|
1645
1666
|
hide_data_value,
|
|
1646
1667
|
path_type,
|
|
@@ -1689,23 +1710,24 @@ var __publicField = (obj, key, value) => {
|
|
|
1689
1710
|
out_cluster_lb_desc,
|
|
1690
1711
|
out_external_name_desc,
|
|
1691
1712
|
only_support_one_yaml,
|
|
1713
|
+
support,
|
|
1692
1714
|
not_support,
|
|
1693
|
-
|
|
1715
|
+
stopped_state,
|
|
1694
1716
|
any_node_ip,
|
|
1695
1717
|
storage_class,
|
|
1696
1718
|
persistent_volume,
|
|
1697
1719
|
provisioner,
|
|
1698
1720
|
file_system,
|
|
1699
1721
|
capacity,
|
|
1700
|
-
|
|
1722
|
+
distributed,
|
|
1701
1723
|
volume_mode,
|
|
1702
1724
|
access_mode,
|
|
1703
1725
|
block,
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1726
|
+
available_state,
|
|
1727
|
+
bound_state,
|
|
1728
|
+
released_state,
|
|
1729
|
+
failed_state,
|
|
1730
|
+
lost_state,
|
|
1709
1731
|
font_size,
|
|
1710
1732
|
download_shell_content,
|
|
1711
1733
|
clear_shell,
|
|
@@ -1720,7 +1742,27 @@ var __publicField = (obj, key, value) => {
|
|
|
1720
1742
|
edit_label,
|
|
1721
1743
|
edit_label_success_toast,
|
|
1722
1744
|
edit_annotation,
|
|
1723
|
-
edit_annotation_success_toast
|
|
1745
|
+
edit_annotation_success_toast,
|
|
1746
|
+
pvc,
|
|
1747
|
+
pv,
|
|
1748
|
+
csi,
|
|
1749
|
+
retain,
|
|
1750
|
+
default_sc,
|
|
1751
|
+
reclaim_policy,
|
|
1752
|
+
allow_expand,
|
|
1753
|
+
edit_distribute_storage,
|
|
1754
|
+
edit_distribute_storage_success_toast,
|
|
1755
|
+
edit_distribute_storage_failed_toast,
|
|
1756
|
+
edit_node_taint,
|
|
1757
|
+
edit_node_taint_success_toast,
|
|
1758
|
+
node_taint_NoSchedule,
|
|
1759
|
+
node_taint_PreferNoSchedule,
|
|
1760
|
+
node_taint_NoExecute,
|
|
1761
|
+
taint,
|
|
1762
|
+
change_form_mode_alert,
|
|
1763
|
+
pvc_storage_required,
|
|
1764
|
+
pvc_storage_min,
|
|
1765
|
+
pvc_storage_reduce_limit
|
|
1724
1766
|
};
|
|
1725
1767
|
const ZH = {
|
|
1726
1768
|
dovetail
|
|
@@ -8823,15 +8865,15 @@ var __publicField = (obj, key, value) => {
|
|
|
8823
8865
|
})
|
|
8824
8866
|
});
|
|
8825
8867
|
};
|
|
8826
|
-
const
|
|
8868
|
+
const TableWidgets_zbqkvj = "";
|
|
8827
8869
|
const AuxiliaryLine = /* @__PURE__ */ styled_default("div")({
|
|
8828
8870
|
name: "AuxiliaryLine",
|
|
8829
|
-
class: "
|
|
8871
|
+
class: "a60f3dj",
|
|
8830
8872
|
propsAsIs: false
|
|
8831
8873
|
});
|
|
8832
|
-
const
|
|
8833
|
-
const TableContainerStyle = "
|
|
8834
|
-
function Table(props) {
|
|
8874
|
+
const index_17chkj7 = "";
|
|
8875
|
+
const TableContainerStyle = "t47xc8k";
|
|
8876
|
+
function Table$1(props) {
|
|
8835
8877
|
const {
|
|
8836
8878
|
t: t2
|
|
8837
8879
|
} = useTranslation();
|
|
@@ -8948,7 +8990,7 @@ var __publicField = (obj, key, value) => {
|
|
|
8948
8990
|
const PodSelectorTable = ({ podSelectors = {} }) => {
|
|
8949
8991
|
const { t: t2 } = useTranslation();
|
|
8950
8992
|
const component = React.useContext(ComponentContext);
|
|
8951
|
-
const
|
|
8993
|
+
const Table2 = component.Table || Table$1;
|
|
8952
8994
|
const currentSize = 10;
|
|
8953
8995
|
const datas = Object.keys(podSelectors).map((key2) => ({
|
|
8954
8996
|
id: key2,
|
|
@@ -8993,7 +9035,7 @@ var __publicField = (obj, key, value) => {
|
|
|
8993
9035
|
);
|
|
8994
9036
|
}
|
|
8995
9037
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
8996
|
-
|
|
9038
|
+
Table2,
|
|
8997
9039
|
{
|
|
8998
9040
|
tableKey: "podSelector",
|
|
8999
9041
|
loading: false,
|
|
@@ -9013,7 +9055,7 @@ var __publicField = (obj, key, value) => {
|
|
|
9013
9055
|
const PortsTable = ({ service }) => {
|
|
9014
9056
|
const { t: t2 } = useTranslation();
|
|
9015
9057
|
const component = React.useContext(ComponentContext);
|
|
9016
|
-
const
|
|
9058
|
+
const Table2 = component.Table || Table$1;
|
|
9017
9059
|
const currentSize = 10;
|
|
9018
9060
|
const columns = [
|
|
9019
9061
|
{
|
|
@@ -9081,7 +9123,7 @@ var __publicField = (obj, key, value) => {
|
|
|
9081
9123
|
);
|
|
9082
9124
|
}
|
|
9083
9125
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
9084
|
-
|
|
9126
|
+
Table2,
|
|
9085
9127
|
{
|
|
9086
9128
|
tableKey: "ports",
|
|
9087
9129
|
loading: false,
|
|
@@ -9098,6 +9140,409 @@ var __publicField = (obj, key, value) => {
|
|
|
9098
9140
|
}
|
|
9099
9141
|
);
|
|
9100
9142
|
};
|
|
9143
|
+
function FormErrorAlert(props) {
|
|
9144
|
+
const { title, errorMsgs, style, className, isEdit } = props;
|
|
9145
|
+
const { i18n: i18n2 } = useTranslation();
|
|
9146
|
+
return errorMsgs.length ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
9147
|
+
eagle.Alert,
|
|
9148
|
+
{
|
|
9149
|
+
message: /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
9150
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: title || i18n2.t(isEdit ? "dovetail.save_failed_tip" : "dovetail.create_failed_tip") }),
|
|
9151
|
+
errorMsgs.length > 1 ? /* @__PURE__ */ jsxRuntimeExports.jsx("ul", { children: errorMsgs.map((errorMsg, index2) => /* @__PURE__ */ jsxRuntimeExports.jsxs("li", { children: [
|
|
9152
|
+
index2 + 1 + ". ",
|
|
9153
|
+
" ",
|
|
9154
|
+
errorMsg
|
|
9155
|
+
] }, errorMsg)) }) : lodashEs.first(errorMsgs)
|
|
9156
|
+
] }),
|
|
9157
|
+
type: "error",
|
|
9158
|
+
style,
|
|
9159
|
+
className
|
|
9160
|
+
}
|
|
9161
|
+
) : null;
|
|
9162
|
+
}
|
|
9163
|
+
var AccessControlAuth = /* @__PURE__ */ ((AccessControlAuth2) => {
|
|
9164
|
+
AccessControlAuth2["Edit"] = "Edit";
|
|
9165
|
+
AccessControlAuth2["Delete"] = "Delete";
|
|
9166
|
+
AccessControlAuth2["Create"] = "Create";
|
|
9167
|
+
return AccessControlAuth2;
|
|
9168
|
+
})(AccessControlAuth || {});
|
|
9169
|
+
function getCommonErrors(responseBody, i18n2) {
|
|
9170
|
+
var _a;
|
|
9171
|
+
if (!((responseBody == null ? void 0 : responseBody.message) || (responseBody == null ? void 0 : responseBody.code) || (responseBody == null ? void 0 : responseBody.reason) || (responseBody == null ? void 0 : responseBody.details) || (responseBody == null ? void 0 : responseBody.graphQLErrors))) {
|
|
9172
|
+
return [];
|
|
9173
|
+
}
|
|
9174
|
+
const causes = ((_a = responseBody.details) == null ? void 0 : _a.causes) || responseBody.graphQLErrors || [];
|
|
9175
|
+
if (causes.length) {
|
|
9176
|
+
return causes.map((cause) => {
|
|
9177
|
+
let params = {};
|
|
9178
|
+
let message2 = cause.message;
|
|
9179
|
+
try {
|
|
9180
|
+
const info = JSON.parse(cause.message);
|
|
9181
|
+
params = info.params;
|
|
9182
|
+
message2 = info.message;
|
|
9183
|
+
} catch {
|
|
9184
|
+
return i18n2.t(
|
|
9185
|
+
[
|
|
9186
|
+
`error.${cause.reason}`,
|
|
9187
|
+
`error.${cause.code}`,
|
|
9188
|
+
`${cause.field ? `${cause.field}: ` : ""}${message2}`
|
|
9189
|
+
],
|
|
9190
|
+
{
|
|
9191
|
+
...params,
|
|
9192
|
+
fallbackLng: ""
|
|
9193
|
+
}
|
|
9194
|
+
);
|
|
9195
|
+
}
|
|
9196
|
+
return i18n2.t(
|
|
9197
|
+
[
|
|
9198
|
+
`error.${cause.reason}`,
|
|
9199
|
+
`error.${cause.code}`,
|
|
9200
|
+
`${cause.field ? `${cause.field}: ` : ""}${message2}`
|
|
9201
|
+
],
|
|
9202
|
+
{
|
|
9203
|
+
...params,
|
|
9204
|
+
fallbackLng: ""
|
|
9205
|
+
}
|
|
9206
|
+
);
|
|
9207
|
+
});
|
|
9208
|
+
}
|
|
9209
|
+
return [
|
|
9210
|
+
i18n2.t(
|
|
9211
|
+
[`error.${responseBody.code}`, `error.${responseBody.reason}`, responseBody.message || ""],
|
|
9212
|
+
{ fallbackLng: "" }
|
|
9213
|
+
)
|
|
9214
|
+
];
|
|
9215
|
+
}
|
|
9216
|
+
function useSubmitForm(options) {
|
|
9217
|
+
const { formRef, onSubmitSuccess } = options;
|
|
9218
|
+
const { i18n: i18n2 } = useTranslation();
|
|
9219
|
+
const [submitting, setSubmitting] = React.useState(false);
|
|
9220
|
+
const [errorMsgs, setErrorMsgs] = React.useState([]);
|
|
9221
|
+
const reset = React.useCallback(() => {
|
|
9222
|
+
setSubmitting(false);
|
|
9223
|
+
setErrorMsgs([]);
|
|
9224
|
+
}, []);
|
|
9225
|
+
const onSubmit = React.useCallback(async () => {
|
|
9226
|
+
var _a;
|
|
9227
|
+
try {
|
|
9228
|
+
setSubmitting(true);
|
|
9229
|
+
const isFalsy = await ((_a = formRef.current) == null ? void 0 : _a.submit()) === false;
|
|
9230
|
+
if (isFalsy) {
|
|
9231
|
+
return;
|
|
9232
|
+
}
|
|
9233
|
+
onSubmitSuccess == null ? void 0 : onSubmitSuccess();
|
|
9234
|
+
reset();
|
|
9235
|
+
} catch (error) {
|
|
9236
|
+
if (error instanceof Object) {
|
|
9237
|
+
if ("response" in error && error.response instanceof Response) {
|
|
9238
|
+
const response = error.response;
|
|
9239
|
+
const body = await response.json();
|
|
9240
|
+
setErrorMsgs(getCommonErrors(body, i18n2));
|
|
9241
|
+
} else if ("message" in error && typeof error.message === "string") {
|
|
9242
|
+
setErrorMsgs([error.message]);
|
|
9243
|
+
}
|
|
9244
|
+
}
|
|
9245
|
+
} finally {
|
|
9246
|
+
setSubmitting(false);
|
|
9247
|
+
}
|
|
9248
|
+
}, [formRef, i18n2, reset, onSubmitSuccess]);
|
|
9249
|
+
return {
|
|
9250
|
+
submitting,
|
|
9251
|
+
errorMsgs,
|
|
9252
|
+
reset,
|
|
9253
|
+
onSubmit
|
|
9254
|
+
};
|
|
9255
|
+
}
|
|
9256
|
+
const index_10dq51k = "";
|
|
9257
|
+
const EditButtonStyle = "esoz3jw";
|
|
9258
|
+
function EditFieldModal(props) {
|
|
9259
|
+
const {
|
|
9260
|
+
title,
|
|
9261
|
+
formRef: form2,
|
|
9262
|
+
renderContent,
|
|
9263
|
+
fullscreen
|
|
9264
|
+
} = props;
|
|
9265
|
+
const {
|
|
9266
|
+
i18n: i18n2
|
|
9267
|
+
} = useTranslation();
|
|
9268
|
+
const popModal = eagle.usePopModal();
|
|
9269
|
+
const {
|
|
9270
|
+
submitting,
|
|
9271
|
+
errorMsgs,
|
|
9272
|
+
reset,
|
|
9273
|
+
onSubmit
|
|
9274
|
+
} = useSubmitForm({
|
|
9275
|
+
formRef: form2,
|
|
9276
|
+
onSubmitSuccess: () => {
|
|
9277
|
+
popModal();
|
|
9278
|
+
}
|
|
9279
|
+
});
|
|
9280
|
+
const close = React.useCallback(() => {
|
|
9281
|
+
popModal();
|
|
9282
|
+
reset();
|
|
9283
|
+
}, [reset]);
|
|
9284
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(eagle.Modal, {
|
|
9285
|
+
className: fullscreen ? FullscreenModalStyle : SmallModalStyle,
|
|
9286
|
+
title: title || i18n2.t("dovetail.edit"),
|
|
9287
|
+
confirmLoading: submitting,
|
|
9288
|
+
onOk: onSubmit,
|
|
9289
|
+
onCancel: close,
|
|
9290
|
+
okText: i18n2.t("dovetail.save"),
|
|
9291
|
+
normal: true,
|
|
9292
|
+
destroyOnClose: true,
|
|
9293
|
+
fullscreen,
|
|
9294
|
+
children: [renderContent(), /* @__PURE__ */ jsxRuntimeExports.jsx(FormErrorAlert, {
|
|
9295
|
+
style: {
|
|
9296
|
+
marginTop: 16
|
|
9297
|
+
},
|
|
9298
|
+
errorMsgs,
|
|
9299
|
+
isEdit: true
|
|
9300
|
+
})]
|
|
9301
|
+
});
|
|
9302
|
+
}
|
|
9303
|
+
function EditField(props) {
|
|
9304
|
+
const {
|
|
9305
|
+
modalProps
|
|
9306
|
+
} = props;
|
|
9307
|
+
const {
|
|
9308
|
+
i18n: i18n2
|
|
9309
|
+
} = useTranslation();
|
|
9310
|
+
const {
|
|
9311
|
+
resource
|
|
9312
|
+
} = core.useResource();
|
|
9313
|
+
const pushModal = eagle.usePushModal();
|
|
9314
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(core.CanAccess, {
|
|
9315
|
+
resource: resource == null ? void 0 : resource.name,
|
|
9316
|
+
action: AccessControlAuth.Edit,
|
|
9317
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Button, {
|
|
9318
|
+
className: cx_default(EditButtonStyle, eagle.Typo.Label.l4_regular_title),
|
|
9319
|
+
type: "link",
|
|
9320
|
+
onClick: () => {
|
|
9321
|
+
pushModal({
|
|
9322
|
+
component: EditFieldModal,
|
|
9323
|
+
props: modalProps
|
|
9324
|
+
});
|
|
9325
|
+
},
|
|
9326
|
+
children: i18n2.t("dovetail.edit")
|
|
9327
|
+
})
|
|
9328
|
+
});
|
|
9329
|
+
}
|
|
9330
|
+
var StorageUnit = /* @__PURE__ */ ((StorageUnit2) => {
|
|
9331
|
+
StorageUnit2["Pi"] = "Pi";
|
|
9332
|
+
StorageUnit2["PiB"] = "PiB";
|
|
9333
|
+
StorageUnit2["Ti"] = "Ti";
|
|
9334
|
+
StorageUnit2["TiB"] = "TiB";
|
|
9335
|
+
StorageUnit2["Gi"] = "Gi";
|
|
9336
|
+
StorageUnit2["GiB"] = "GiB";
|
|
9337
|
+
StorageUnit2["Mi"] = "Mi";
|
|
9338
|
+
StorageUnit2["MiB"] = "MiB";
|
|
9339
|
+
StorageUnit2["Ki"] = "Ki";
|
|
9340
|
+
StorageUnit2["KiB"] = "KiB";
|
|
9341
|
+
return StorageUnit2;
|
|
9342
|
+
})(StorageUnit || {});
|
|
9343
|
+
const UNIT_FACTORS = {
|
|
9344
|
+
Pi: 1024 ** 5,
|
|
9345
|
+
PiB: 1024 ** 5,
|
|
9346
|
+
Ti: 1024 ** 4,
|
|
9347
|
+
TiB: 1024 ** 4,
|
|
9348
|
+
Gi: 1024 ** 3,
|
|
9349
|
+
GiB: 1024 ** 3,
|
|
9350
|
+
Mi: 1024 ** 2,
|
|
9351
|
+
MiB: 1024 ** 2,
|
|
9352
|
+
Ki: 1024,
|
|
9353
|
+
KiB: 1024,
|
|
9354
|
+
B: 1
|
|
9355
|
+
};
|
|
9356
|
+
function transformStorageUnit(value2, toUnit = "Gi") {
|
|
9357
|
+
const num = parseFloat(value2);
|
|
9358
|
+
const unit = Object.values(StorageUnit).find((u) => value2.includes(u)) || "Ki";
|
|
9359
|
+
return num / UNIT_FACTORS[unit] * UNIT_FACTORS[toUnit];
|
|
9360
|
+
}
|
|
9361
|
+
const UNITS = ["", "K", "M", "G", "T", "P"];
|
|
9362
|
+
const FRACTIONAL = ["", "m", "u", "n", "p", "f"];
|
|
9363
|
+
function formatSi(inValue, options) {
|
|
9364
|
+
const {
|
|
9365
|
+
increment = 1e3,
|
|
9366
|
+
suffix = null,
|
|
9367
|
+
firstSuffix = null,
|
|
9368
|
+
startingExponent = 0,
|
|
9369
|
+
minExponent = 0,
|
|
9370
|
+
maxPrecision = 2,
|
|
9371
|
+
atLeastOne = true
|
|
9372
|
+
} = options || {};
|
|
9373
|
+
let val = inValue;
|
|
9374
|
+
let exp = startingExponent;
|
|
9375
|
+
while (val >= increment && exp + 1 < UNITS.length || exp < minExponent) {
|
|
9376
|
+
val = val / increment;
|
|
9377
|
+
exp++;
|
|
9378
|
+
}
|
|
9379
|
+
let out = 0;
|
|
9380
|
+
if (val < 10 && maxPrecision >= 2) {
|
|
9381
|
+
out = Math.round(val * 100) / 100;
|
|
9382
|
+
} else if (val < 100 && maxPrecision >= 1) {
|
|
9383
|
+
out = Math.round(val * 10) / 10;
|
|
9384
|
+
} else {
|
|
9385
|
+
out = Math.round(val);
|
|
9386
|
+
}
|
|
9387
|
+
if (atLeastOne && out === 0) {
|
|
9388
|
+
out = 1;
|
|
9389
|
+
}
|
|
9390
|
+
let outStr = String(out);
|
|
9391
|
+
if (exp === 0 && firstSuffix !== null) {
|
|
9392
|
+
outStr += `${firstSuffix}`;
|
|
9393
|
+
} else {
|
|
9394
|
+
outStr += `${UNITS[exp]}${suffix}` || "";
|
|
9395
|
+
}
|
|
9396
|
+
return outStr;
|
|
9397
|
+
}
|
|
9398
|
+
function parseSi(inValue, increment = null, allowFractional = true) {
|
|
9399
|
+
if (!inValue || typeof inValue !== "string" || !inValue.length) {
|
|
9400
|
+
return NaN;
|
|
9401
|
+
}
|
|
9402
|
+
inValue = inValue.replace(/,/g, "");
|
|
9403
|
+
let [, valStr, unit, incStr] = inValue.match(/^([0-9.-]+)\s*([^0-9.-]?)([^0-9.-]?)/) || [];
|
|
9404
|
+
const val = parseFloat(valStr);
|
|
9405
|
+
if (!unit) {
|
|
9406
|
+
return val;
|
|
9407
|
+
}
|
|
9408
|
+
if (unit.charCodeAt(0) === 181) {
|
|
9409
|
+
unit = "u";
|
|
9410
|
+
}
|
|
9411
|
+
const divide = FRACTIONAL.includes(unit);
|
|
9412
|
+
const multiply = UNITS.includes(unit.toUpperCase());
|
|
9413
|
+
if (increment === null) {
|
|
9414
|
+
if ((multiply || divide) && incStr === "i") {
|
|
9415
|
+
increment = 1024;
|
|
9416
|
+
} else {
|
|
9417
|
+
increment = 1e3;
|
|
9418
|
+
}
|
|
9419
|
+
}
|
|
9420
|
+
if (divide && allowFractional) {
|
|
9421
|
+
const exp = FRACTIONAL.indexOf(unit);
|
|
9422
|
+
return val / Math.pow(increment, exp);
|
|
9423
|
+
}
|
|
9424
|
+
if (multiply) {
|
|
9425
|
+
const exp = UNITS.indexOf(unit.toUpperCase());
|
|
9426
|
+
return val * Math.pow(increment, exp);
|
|
9427
|
+
}
|
|
9428
|
+
return val;
|
|
9429
|
+
}
|
|
9430
|
+
const DistributeStorageForm = React.forwardRef(function DistributeStorageForm2(props, ref) {
|
|
9431
|
+
const { defaultValue, pvc: pvc2 } = props;
|
|
9432
|
+
const { resource } = core.useResource();
|
|
9433
|
+
const { mutateAsync } = core.useUpdate();
|
|
9434
|
+
const { t: t2 } = useTranslation();
|
|
9435
|
+
const [distributeStorage, setDistributeStorage] = React.useState(defaultValue);
|
|
9436
|
+
const [validateResult, setValidateResult] = React.useState({
|
|
9437
|
+
distributeStorage: ""
|
|
9438
|
+
});
|
|
9439
|
+
const validators = React.useMemo(() => {
|
|
9440
|
+
return {
|
|
9441
|
+
distributeStorage(value2) {
|
|
9442
|
+
if (lodashEs.isNil(value2)) {
|
|
9443
|
+
return t2("dovetail.pvc_storage_required");
|
|
9444
|
+
} else if (value2 < 1) {
|
|
9445
|
+
return t2("dovetail.pvc_storage_min");
|
|
9446
|
+
} else if (value2 < defaultValue) {
|
|
9447
|
+
return t2("dovetail.pvc_storage_reduce_limit");
|
|
9448
|
+
}
|
|
9449
|
+
return "";
|
|
9450
|
+
}
|
|
9451
|
+
};
|
|
9452
|
+
}, [t2, defaultValue]);
|
|
9453
|
+
const submit = React.useCallback(() => {
|
|
9454
|
+
const isInvalid = !!validators.distributeStorage(distributeStorage);
|
|
9455
|
+
if (isInvalid) {
|
|
9456
|
+
return false;
|
|
9457
|
+
}
|
|
9458
|
+
const v = pvc2.updateDistributeStorage(distributeStorage);
|
|
9459
|
+
const id = pvc2.id;
|
|
9460
|
+
pruneBeforeEdit(v);
|
|
9461
|
+
return mutateAsync({
|
|
9462
|
+
id,
|
|
9463
|
+
resource: (resource == null ? void 0 : resource.name) || "",
|
|
9464
|
+
values: v,
|
|
9465
|
+
successNotification() {
|
|
9466
|
+
return {
|
|
9467
|
+
message: t2("dovetail.edit_distribute_storage_success_toast", {
|
|
9468
|
+
kind: pvc2.kind,
|
|
9469
|
+
name: pvc2.id,
|
|
9470
|
+
interpolation: {
|
|
9471
|
+
escapeValue: false
|
|
9472
|
+
}
|
|
9473
|
+
}),
|
|
9474
|
+
type: "success"
|
|
9475
|
+
};
|
|
9476
|
+
},
|
|
9477
|
+
errorNotification: false
|
|
9478
|
+
});
|
|
9479
|
+
}, [pvc2, distributeStorage, resource == null ? void 0 : resource.name, validators, mutateAsync, t2]);
|
|
9480
|
+
React.useImperativeHandle(ref, () => ({
|
|
9481
|
+
submit
|
|
9482
|
+
}), [submit]);
|
|
9483
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
9484
|
+
eagle.Form.Item,
|
|
9485
|
+
{
|
|
9486
|
+
label: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { style: { width: "134px" }, children: t2("dovetail.distributed") }),
|
|
9487
|
+
colon: false,
|
|
9488
|
+
help: validateResult.distributeStorage,
|
|
9489
|
+
validateStatus: validateResult.distributeStorage ? "error" : "",
|
|
9490
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
9491
|
+
eagle.Fields.Integer,
|
|
9492
|
+
{
|
|
9493
|
+
style: { width: "142px" },
|
|
9494
|
+
input: {
|
|
9495
|
+
name: "distributeStorage",
|
|
9496
|
+
value: distributeStorage,
|
|
9497
|
+
onChange: (value2) => {
|
|
9498
|
+
const v = Number(value2);
|
|
9499
|
+
setDistributeStorage(v);
|
|
9500
|
+
setValidateResult({
|
|
9501
|
+
distributeStorage: validators.distributeStorage(v)
|
|
9502
|
+
});
|
|
9503
|
+
},
|
|
9504
|
+
onBlur: () => {
|
|
9505
|
+
},
|
|
9506
|
+
onFocus: () => {
|
|
9507
|
+
}
|
|
9508
|
+
},
|
|
9509
|
+
min: 1,
|
|
9510
|
+
meta: {},
|
|
9511
|
+
suffix: "GiB",
|
|
9512
|
+
controls: true
|
|
9513
|
+
}
|
|
9514
|
+
)
|
|
9515
|
+
}
|
|
9516
|
+
);
|
|
9517
|
+
});
|
|
9518
|
+
function PVCDistributeStorage({ pvc: pvc2, editable }) {
|
|
9519
|
+
var _a, _b;
|
|
9520
|
+
const { t: t2 } = useTranslation();
|
|
9521
|
+
const formRef = React.useRef(null);
|
|
9522
|
+
const value2 = (_b = (_a = pvc2.spec.resources) == null ? void 0 : _a.requests) == null ? void 0 : _b.storage;
|
|
9523
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
9524
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Units.Byte, { rawValue: parseSi(value2), decimals: 1 }),
|
|
9525
|
+
editable && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
9526
|
+
EditField,
|
|
9527
|
+
{
|
|
9528
|
+
modalProps: {
|
|
9529
|
+
formRef,
|
|
9530
|
+
title: t2("dovetail.edit_replicas"),
|
|
9531
|
+
renderContent() {
|
|
9532
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
9533
|
+
DistributeStorageForm,
|
|
9534
|
+
{
|
|
9535
|
+
ref: formRef,
|
|
9536
|
+
defaultValue: value2 ? transformStorageUnit(value2, StorageUnit.Gi) : 0,
|
|
9537
|
+
pvc: pvc2
|
|
9538
|
+
}
|
|
9539
|
+
);
|
|
9540
|
+
}
|
|
9541
|
+
}
|
|
9542
|
+
}
|
|
9543
|
+
)
|
|
9544
|
+
] });
|
|
9545
|
+
}
|
|
9101
9546
|
class ResourceModel {
|
|
9102
9547
|
constructor(_rawYaml, _globalStore) {
|
|
9103
9548
|
__publicField(this, "id");
|
|
@@ -9734,34 +10179,72 @@ var __publicField = (obj, key, value) => {
|
|
|
9734
10179
|
const STORAGE_CLASS_INIT_VALUE = {
|
|
9735
10180
|
"apiVersion": "storage.k8s.io/v1",
|
|
9736
10181
|
"kind": "StorageClass",
|
|
10182
|
+
"metadata": {
|
|
10183
|
+
"name": "example"
|
|
10184
|
+
},
|
|
10185
|
+
"parameters": {},
|
|
10186
|
+
"provisioner": "example",
|
|
10187
|
+
"reclaimPolicy": "Delete",
|
|
10188
|
+
"allowVolumeExpansion": true,
|
|
10189
|
+
"volumeBindingMode": "Immediate"
|
|
10190
|
+
};
|
|
10191
|
+
const PV_INIT_VALUE = {
|
|
10192
|
+
"apiVersion": "v1",
|
|
10193
|
+
"kind": "PersistentVolume",
|
|
10194
|
+
"metadata": {
|
|
10195
|
+
"name": "example"
|
|
10196
|
+
},
|
|
10197
|
+
"spec": {
|
|
10198
|
+
"accessModes": [
|
|
10199
|
+
"ReadWriteOnce"
|
|
10200
|
+
],
|
|
10201
|
+
"capacity": {
|
|
10202
|
+
"storage": "40Gi"
|
|
10203
|
+
},
|
|
10204
|
+
"persistentVolumeReclaimPolicy": "Delete",
|
|
10205
|
+
"volumeMode": "Filesystem"
|
|
10206
|
+
}
|
|
10207
|
+
};
|
|
10208
|
+
const PVC_INIT_VALUE = {
|
|
10209
|
+
"apiVersion": "v1",
|
|
10210
|
+
"kind": "PersistentVolumeClaim",
|
|
9737
10211
|
"metadata": {
|
|
9738
10212
|
"name": "example",
|
|
9739
10213
|
"namespace": "default"
|
|
9740
10214
|
},
|
|
9741
|
-
"spec": {
|
|
10215
|
+
"spec": {
|
|
10216
|
+
"accessModes": [
|
|
10217
|
+
"ReadWriteOnce"
|
|
10218
|
+
],
|
|
10219
|
+
"resources": {
|
|
10220
|
+
"requests": {
|
|
10221
|
+
"storage": "40Gi"
|
|
10222
|
+
}
|
|
10223
|
+
},
|
|
10224
|
+
"storageClassName": "example"
|
|
10225
|
+
}
|
|
9742
10226
|
};
|
|
9743
|
-
var
|
|
9744
|
-
|
|
9745
|
-
|
|
9746
|
-
|
|
9747
|
-
|
|
9748
|
-
|
|
9749
|
-
|
|
9750
|
-
|
|
9751
|
-
|
|
9752
|
-
|
|
9753
|
-
|
|
9754
|
-
|
|
9755
|
-
|
|
9756
|
-
|
|
9757
|
-
|
|
9758
|
-
|
|
9759
|
-
|
|
9760
|
-
|
|
9761
|
-
|
|
9762
|
-
|
|
9763
|
-
|
|
9764
|
-
})(AccessControlAuth || {});
|
|
10227
|
+
var ResourceState = /* @__PURE__ */ ((ResourceState2) => {
|
|
10228
|
+
ResourceState2["TERMINATED"] = "terminated";
|
|
10229
|
+
ResourceState2["UPDATING"] = "updating";
|
|
10230
|
+
ResourceState2["READY"] = "ready";
|
|
10231
|
+
ResourceState2["COMPLETED"] = "completed";
|
|
10232
|
+
ResourceState2["ABNORMAL"] = "abnormal";
|
|
10233
|
+
ResourceState2["FAILED"] = "failed";
|
|
10234
|
+
ResourceState2["SUSPENDED"] = "suspended";
|
|
10235
|
+
ResourceState2["RUNNING"] = "running";
|
|
10236
|
+
ResourceState2["SUCCEEDED"] = "succeeded";
|
|
10237
|
+
ResourceState2["UNKNOWN"] = "unknown";
|
|
10238
|
+
ResourceState2["TERMINATING"] = "terminating";
|
|
10239
|
+
ResourceState2["PENDING"] = "pending";
|
|
10240
|
+
ResourceState2["WAITING"] = "waiting";
|
|
10241
|
+
ResourceState2["STOPPED"] = "stopped";
|
|
10242
|
+
ResourceState2["AVAILABLE"] = "available";
|
|
10243
|
+
ResourceState2["BOUND"] = "bound";
|
|
10244
|
+
ResourceState2["RELEASED"] = "released";
|
|
10245
|
+
ResourceState2["LOST"] = "lost";
|
|
10246
|
+
return ResourceState2;
|
|
10247
|
+
})(ResourceState || {});
|
|
9765
10248
|
function matchSelector(pod2, selector, namespace2 = "default") {
|
|
9766
10249
|
var _a, _b, _c;
|
|
9767
10250
|
let match = true;
|
|
@@ -9847,18 +10330,18 @@ var __publicField = (obj, key, value) => {
|
|
|
9847
10330
|
get stateDisplay() {
|
|
9848
10331
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
9849
10332
|
if (!((_a = this.spec) == null ? void 0 : _a.completions) && !((_b = this.status) == null ? void 0 : _b.succeeded)) {
|
|
9850
|
-
return
|
|
10333
|
+
return ResourceState.RUNNING;
|
|
9851
10334
|
}
|
|
9852
10335
|
if (((_c = this.spec) == null ? void 0 : _c.completions) === ((_d = this.status) == null ? void 0 : _d.succeeded) || ((_f = (_e = this.status) == null ? void 0 : _e.conditions) == null ? void 0 : _f.some((c2) => c2.type === "Complete" && c2.status === "True"))) {
|
|
9853
|
-
return
|
|
10336
|
+
return ResourceState.COMPLETED;
|
|
9854
10337
|
}
|
|
9855
10338
|
if ((_h = (_g = this.status) == null ? void 0 : _g.conditions) == null ? void 0 : _h.some((c2) => c2.type === "Failed" && c2.status === "True")) {
|
|
9856
|
-
return
|
|
10339
|
+
return ResourceState.ABNORMAL;
|
|
9857
10340
|
}
|
|
9858
10341
|
if ((_j = (_i = this.status) == null ? void 0 : _i.conditions) == null ? void 0 : _j.some((c2) => c2.type === "Suspended" && c2.status === "True")) {
|
|
9859
|
-
return
|
|
10342
|
+
return ResourceState.SUSPENDED;
|
|
9860
10343
|
}
|
|
9861
|
-
return
|
|
10344
|
+
return ResourceState.RUNNING;
|
|
9862
10345
|
}
|
|
9863
10346
|
}
|
|
9864
10347
|
class WorkloadModel extends WorkloadBaseModel {
|
|
@@ -9910,75 +10393,6 @@ var __publicField = (obj, key, value) => {
|
|
|
9910
10393
|
return newOne;
|
|
9911
10394
|
}
|
|
9912
10395
|
}
|
|
9913
|
-
const UNITS = ["", "K", "M", "G", "T", "P"];
|
|
9914
|
-
const FRACTIONAL = ["", "m", "u", "n", "p", "f"];
|
|
9915
|
-
function formatSi(inValue, options) {
|
|
9916
|
-
const {
|
|
9917
|
-
increment = 1e3,
|
|
9918
|
-
suffix = null,
|
|
9919
|
-
firstSuffix = null,
|
|
9920
|
-
startingExponent = 0,
|
|
9921
|
-
minExponent = 0,
|
|
9922
|
-
maxPrecision = 2,
|
|
9923
|
-
atLeastOne = true
|
|
9924
|
-
} = options || {};
|
|
9925
|
-
let val = inValue;
|
|
9926
|
-
let exp = startingExponent;
|
|
9927
|
-
while (val >= increment && exp + 1 < UNITS.length || exp < minExponent) {
|
|
9928
|
-
val = val / increment;
|
|
9929
|
-
exp++;
|
|
9930
|
-
}
|
|
9931
|
-
let out = 0;
|
|
9932
|
-
if (val < 10 && maxPrecision >= 2) {
|
|
9933
|
-
out = Math.round(val * 100) / 100;
|
|
9934
|
-
} else if (val < 100 && maxPrecision >= 1) {
|
|
9935
|
-
out = Math.round(val * 10) / 10;
|
|
9936
|
-
} else {
|
|
9937
|
-
out = Math.round(val);
|
|
9938
|
-
}
|
|
9939
|
-
if (atLeastOne && out === 0) {
|
|
9940
|
-
out = 1;
|
|
9941
|
-
}
|
|
9942
|
-
let outStr = String(out);
|
|
9943
|
-
if (exp === 0 && firstSuffix !== null) {
|
|
9944
|
-
outStr += `${firstSuffix}`;
|
|
9945
|
-
} else {
|
|
9946
|
-
outStr += `${UNITS[exp]}${suffix}` || "";
|
|
9947
|
-
}
|
|
9948
|
-
return outStr;
|
|
9949
|
-
}
|
|
9950
|
-
function parseSi(inValue, increment = null, allowFractional = true) {
|
|
9951
|
-
if (!inValue || typeof inValue !== "string" || !inValue.length) {
|
|
9952
|
-
return NaN;
|
|
9953
|
-
}
|
|
9954
|
-
inValue = inValue.replace(/,/g, "");
|
|
9955
|
-
let [, valStr, unit, incStr] = inValue.match(/^([0-9.-]+)\s*([^0-9.-]?)([^0-9.-]?)/) || [];
|
|
9956
|
-
const val = parseFloat(valStr);
|
|
9957
|
-
if (!unit) {
|
|
9958
|
-
return val;
|
|
9959
|
-
}
|
|
9960
|
-
if (unit.charCodeAt(0) === 181) {
|
|
9961
|
-
unit = "u";
|
|
9962
|
-
}
|
|
9963
|
-
const divide = FRACTIONAL.includes(unit);
|
|
9964
|
-
const multiply = UNITS.includes(unit.toUpperCase());
|
|
9965
|
-
if (increment === null) {
|
|
9966
|
-
if ((multiply || divide) && incStr === "i") {
|
|
9967
|
-
increment = 1024;
|
|
9968
|
-
} else {
|
|
9969
|
-
increment = 1e3;
|
|
9970
|
-
}
|
|
9971
|
-
}
|
|
9972
|
-
if (divide && allowFractional) {
|
|
9973
|
-
const exp = FRACTIONAL.indexOf(unit);
|
|
9974
|
-
return val / Math.pow(increment, exp);
|
|
9975
|
-
}
|
|
9976
|
-
if (multiply) {
|
|
9977
|
-
const exp = UNITS.indexOf(unit.toUpperCase());
|
|
9978
|
-
return val * Math.pow(increment, exp);
|
|
9979
|
-
}
|
|
9980
|
-
return val;
|
|
9981
|
-
}
|
|
9982
10396
|
class PodModel extends WorkloadBaseModel {
|
|
9983
10397
|
constructor(_rawYaml, _globalStore) {
|
|
9984
10398
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
@@ -10056,9 +10470,9 @@ var __publicField = (obj, key, value) => {
|
|
|
10056
10470
|
get stateDisplay() {
|
|
10057
10471
|
var _a, _b;
|
|
10058
10472
|
if (this.metadata.deletionTimestamp) {
|
|
10059
|
-
return
|
|
10473
|
+
return ResourceState.TERMINATING;
|
|
10060
10474
|
}
|
|
10061
|
-
return ((_b = (_a = this.status) == null ? void 0 : _a.phase) == null ? void 0 : _b.toLowerCase()) ||
|
|
10475
|
+
return ((_b = (_a = this.status) == null ? void 0 : _a.phase) == null ? void 0 : _b.toLowerCase()) || ResourceState.UNKNOWN;
|
|
10062
10476
|
}
|
|
10063
10477
|
}
|
|
10064
10478
|
class PodMetricsModel extends ResourceModel {
|
|
@@ -10098,9 +10512,9 @@ var __publicField = (obj, key, value) => {
|
|
|
10098
10512
|
get stateDisplay() {
|
|
10099
10513
|
var _a;
|
|
10100
10514
|
if ((_a = this.spec) == null ? void 0 : _a.suspend) {
|
|
10101
|
-
return
|
|
10515
|
+
return ResourceState.SUSPENDED;
|
|
10102
10516
|
}
|
|
10103
|
-
return
|
|
10517
|
+
return ResourceState.RUNNING;
|
|
10104
10518
|
}
|
|
10105
10519
|
suspend() {
|
|
10106
10520
|
const newOne = lodashExports.cloneDeep(this._rawYaml);
|
|
@@ -10132,11 +10546,11 @@ var __publicField = (obj, key, value) => {
|
|
|
10132
10546
|
get stateDisplay() {
|
|
10133
10547
|
var _a, _b, _c;
|
|
10134
10548
|
if (((_a = this.spec) == null ? void 0 : _a.replicas) === 0) {
|
|
10135
|
-
return
|
|
10549
|
+
return ResourceState.STOPPED;
|
|
10136
10550
|
} else if (((_b = this.spec) == null ? void 0 : _b.replicas) !== ((_c = this.status) == null ? void 0 : _c.readyReplicas)) {
|
|
10137
|
-
return
|
|
10551
|
+
return ResourceState.UPDATING;
|
|
10138
10552
|
}
|
|
10139
|
-
return
|
|
10553
|
+
return ResourceState.READY;
|
|
10140
10554
|
}
|
|
10141
10555
|
}
|
|
10142
10556
|
class DaemonSetModel extends WorkloadModel {
|
|
@@ -10147,9 +10561,9 @@ var __publicField = (obj, key, value) => {
|
|
|
10147
10561
|
get stateDisplay() {
|
|
10148
10562
|
var _a, _b;
|
|
10149
10563
|
if (((_a = this.status) == null ? void 0 : _a.desiredNumberScheduled) !== ((_b = this.status) == null ? void 0 : _b.numberReady)) {
|
|
10150
|
-
return
|
|
10564
|
+
return ResourceState.UPDATING;
|
|
10151
10565
|
}
|
|
10152
|
-
return
|
|
10566
|
+
return ResourceState.READY;
|
|
10153
10567
|
}
|
|
10154
10568
|
get replicas() {
|
|
10155
10569
|
return this.status && "desiredNumberScheduled" in this.status ? this.status.desiredNumberScheduled : 0;
|
|
@@ -10166,11 +10580,11 @@ var __publicField = (obj, key, value) => {
|
|
|
10166
10580
|
get stateDisplay() {
|
|
10167
10581
|
var _a, _b, _c;
|
|
10168
10582
|
if (((_a = this.spec) == null ? void 0 : _a.replicas) === 0) {
|
|
10169
|
-
return
|
|
10583
|
+
return ResourceState.STOPPED;
|
|
10170
10584
|
} else if (((_b = this.spec) == null ? void 0 : _b.replicas) !== ((_c = this.status) == null ? void 0 : _c.readyReplicas)) {
|
|
10171
|
-
return
|
|
10585
|
+
return ResourceState.UPDATING;
|
|
10172
10586
|
}
|
|
10173
|
-
return
|
|
10587
|
+
return ResourceState.READY;
|
|
10174
10588
|
}
|
|
10175
10589
|
}
|
|
10176
10590
|
var ServiceTypeEnum = /* @__PURE__ */ ((ServiceTypeEnum2) => {
|
|
@@ -10219,7 +10633,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10219
10633
|
NodeRole2["Worker"] = "Worker";
|
|
10220
10634
|
return NodeRole2;
|
|
10221
10635
|
})(NodeRole || {});
|
|
10222
|
-
class NodeModel extends
|
|
10636
|
+
class NodeModel extends ResourceModel {
|
|
10223
10637
|
constructor(_rawYaml, _globalStore) {
|
|
10224
10638
|
super(_rawYaml, _globalStore);
|
|
10225
10639
|
this._rawYaml = _rawYaml;
|
|
@@ -10254,24 +10668,85 @@ var __publicField = (obj, key, value) => {
|
|
|
10254
10668
|
kind: "PersistentVolume"
|
|
10255
10669
|
});
|
|
10256
10670
|
this.pvs = pvs.items.filter(
|
|
10257
|
-
(
|
|
10258
|
-
var _a;
|
|
10259
|
-
return ((_a = pv.spec) == null ? void 0 : _a.storageClassName) === this.metadata.name;
|
|
10260
|
-
}
|
|
10671
|
+
(pv2) => this.filterPV(pv2, this.metadata.name)
|
|
10261
10672
|
);
|
|
10262
10673
|
}
|
|
10674
|
+
filterPV(pv2, scName) {
|
|
10675
|
+
var _a;
|
|
10676
|
+
return ((_a = pv2.spec) == null ? void 0 : _a.storageClassName) === scName;
|
|
10677
|
+
}
|
|
10678
|
+
get isDefaultSC() {
|
|
10679
|
+
var _a, _b;
|
|
10680
|
+
return (_b = (_a = this._rawYaml.metadata) == null ? void 0 : _a.annotations) == null ? void 0 : _b["storageclass.kubernetes.io/is-default-class"];
|
|
10681
|
+
}
|
|
10682
|
+
get reclaimPolicy() {
|
|
10683
|
+
return this._rawYaml.reclaimPolicy;
|
|
10684
|
+
}
|
|
10263
10685
|
}
|
|
10264
10686
|
class PersistentVolumeModel extends ResourceModel {
|
|
10265
10687
|
constructor(_rawYaml, _globalStore) {
|
|
10266
10688
|
super(_rawYaml, _globalStore);
|
|
10267
10689
|
this._rawYaml = _rawYaml;
|
|
10268
10690
|
}
|
|
10691
|
+
get phase() {
|
|
10692
|
+
return this._rawYaml.status.phase;
|
|
10693
|
+
}
|
|
10694
|
+
get stateDisplay() {
|
|
10695
|
+
switch (this.phase) {
|
|
10696
|
+
case "Pending":
|
|
10697
|
+
return ResourceState.PENDING;
|
|
10698
|
+
case "Bound":
|
|
10699
|
+
return ResourceState.BOUND;
|
|
10700
|
+
case "Failed":
|
|
10701
|
+
return ResourceState.FAILED;
|
|
10702
|
+
case "Available":
|
|
10703
|
+
return ResourceState.AVAILABLE;
|
|
10704
|
+
case "Released":
|
|
10705
|
+
return ResourceState.RELEASED;
|
|
10706
|
+
default:
|
|
10707
|
+
return ResourceState.UNKNOWN;
|
|
10708
|
+
}
|
|
10709
|
+
}
|
|
10710
|
+
get csi() {
|
|
10711
|
+
var _a;
|
|
10712
|
+
return (_a = this._rawYaml.spec.csi) == null ? void 0 : _a.driver;
|
|
10713
|
+
}
|
|
10714
|
+
get pvc() {
|
|
10715
|
+
var _a;
|
|
10716
|
+
return (_a = this._rawYaml.spec.claimRef) == null ? void 0 : _a.name;
|
|
10717
|
+
}
|
|
10718
|
+
get pvcNamespace() {
|
|
10719
|
+
var _a;
|
|
10720
|
+
return (_a = this._rawYaml.spec.claimRef) == null ? void 0 : _a.namespace;
|
|
10721
|
+
}
|
|
10269
10722
|
}
|
|
10270
10723
|
class PersistentVolumeClaimModel extends ResourceModel {
|
|
10271
10724
|
constructor(_rawYaml, _globalStore) {
|
|
10272
10725
|
super(_rawYaml, _globalStore);
|
|
10273
10726
|
this._rawYaml = _rawYaml;
|
|
10274
10727
|
}
|
|
10728
|
+
get phase() {
|
|
10729
|
+
return this._rawYaml.status.phase;
|
|
10730
|
+
}
|
|
10731
|
+
get pv() {
|
|
10732
|
+
return this._rawYaml.spec.volumeName;
|
|
10733
|
+
}
|
|
10734
|
+
get stateDisplay() {
|
|
10735
|
+
switch (this.phase) {
|
|
10736
|
+
case "Pending":
|
|
10737
|
+
return ResourceState.PENDING;
|
|
10738
|
+
case "Bound":
|
|
10739
|
+
return ResourceState.BOUND;
|
|
10740
|
+
case "Lost":
|
|
10741
|
+
return ResourceState.LOST;
|
|
10742
|
+
case "Failed":
|
|
10743
|
+
return ResourceState.FAILED;
|
|
10744
|
+
}
|
|
10745
|
+
}
|
|
10746
|
+
updateDistributeStorage(distributeStorage) {
|
|
10747
|
+
const yaml2 = lodashEs.cloneDeep(this._globalStore.restoreItem(this));
|
|
10748
|
+
return lodashEs.set(yaml2, "spec.resources.requests.storage", `${distributeStorage}Gi`);
|
|
10749
|
+
}
|
|
10275
10750
|
}
|
|
10276
10751
|
const index_1iq0dq9 = "";
|
|
10277
10752
|
const ServiceInClusterAccessComponent = ({
|
|
@@ -10379,38 +10854,8 @@ var __publicField = (obj, key, value) => {
|
|
|
10379
10854
|
children: tags
|
|
10380
10855
|
});
|
|
10381
10856
|
};
|
|
10382
|
-
const
|
|
10383
|
-
const StateTagStyle = "
|
|
10384
|
-
const StateTag = ({
|
|
10385
|
-
state: state2 = WorkloadState.UPDATING,
|
|
10386
|
-
hideBackground,
|
|
10387
|
-
className
|
|
10388
|
-
}) => {
|
|
10389
|
-
const {
|
|
10390
|
-
t: t2
|
|
10391
|
-
} = useTranslation();
|
|
10392
|
-
const statusMap = {
|
|
10393
|
-
updating: "loading",
|
|
10394
|
-
ready: "green",
|
|
10395
|
-
completed: "gray",
|
|
10396
|
-
failed: "red",
|
|
10397
|
-
suspended: "warning",
|
|
10398
|
-
running: "green",
|
|
10399
|
-
succeeded: "blue",
|
|
10400
|
-
unknown: "gray",
|
|
10401
|
-
terminating: "loading",
|
|
10402
|
-
pending: "warning",
|
|
10403
|
-
waiting: "warning",
|
|
10404
|
-
terminated: "red",
|
|
10405
|
-
stopped: "gray"
|
|
10406
|
-
};
|
|
10407
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.StatusCapsule, {
|
|
10408
|
-
className: cx_default(className, StateTagStyle, hideBackground && "no-background"),
|
|
10409
|
-
color: statusMap[state2] !== "loading" ? statusMap[state2] : void 0,
|
|
10410
|
-
loading: statusMap[state2] === "loading",
|
|
10411
|
-
children: t2(`dovetail.${state2 || "updating"}`)
|
|
10412
|
-
});
|
|
10413
|
-
};
|
|
10857
|
+
const tag_how7no = "";
|
|
10858
|
+
const StateTagStyle = "s82411";
|
|
10414
10859
|
function addId(arr, idKey) {
|
|
10415
10860
|
return arr.map((e2) => {
|
|
10416
10861
|
return {
|
|
@@ -10528,7 +10973,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10528
10973
|
const ConditionsTable = ({ conditions = [] }) => {
|
|
10529
10974
|
const { t: t2 } = useTranslation();
|
|
10530
10975
|
const component = React.useContext(ComponentContext);
|
|
10531
|
-
const
|
|
10976
|
+
const Table2 = component.Table || Table$1;
|
|
10532
10977
|
const conditionsWithId = addId(conditions, "type");
|
|
10533
10978
|
const columns = [
|
|
10534
10979
|
{
|
|
@@ -10604,7 +11049,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10604
11049
|
);
|
|
10605
11050
|
}
|
|
10606
11051
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10607
|
-
|
|
11052
|
+
Table2,
|
|
10608
11053
|
{
|
|
10609
11054
|
tableKey: "condition",
|
|
10610
11055
|
loading: false,
|
|
@@ -10721,184 +11166,6 @@ var __publicField = (obj, key, value) => {
|
|
|
10721
11166
|
}
|
|
10722
11167
|
};
|
|
10723
11168
|
}
|
|
10724
|
-
function FormErrorAlert(props) {
|
|
10725
|
-
const { title, errorMsgs, style, className, isEdit } = props;
|
|
10726
|
-
const { i18n: i18n2 } = useTranslation();
|
|
10727
|
-
return errorMsgs.length ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10728
|
-
eagle.Alert,
|
|
10729
|
-
{
|
|
10730
|
-
message: /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
10731
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: title || i18n2.t(isEdit ? "dovetail.save_failed_tip" : "dovetail.create_failed_tip") }),
|
|
10732
|
-
errorMsgs.length > 1 ? /* @__PURE__ */ jsxRuntimeExports.jsx("ul", { children: errorMsgs.map((errorMsg, index2) => /* @__PURE__ */ jsxRuntimeExports.jsxs("li", { children: [
|
|
10733
|
-
index2 + 1 + ". ",
|
|
10734
|
-
" ",
|
|
10735
|
-
errorMsg
|
|
10736
|
-
] }, errorMsg)) }) : lodashEs.first(errorMsgs)
|
|
10737
|
-
] }),
|
|
10738
|
-
type: "error",
|
|
10739
|
-
style,
|
|
10740
|
-
className
|
|
10741
|
-
}
|
|
10742
|
-
) : null;
|
|
10743
|
-
}
|
|
10744
|
-
function getCommonErrors(responseBody, i18n2) {
|
|
10745
|
-
var _a;
|
|
10746
|
-
if (!((responseBody == null ? void 0 : responseBody.message) || (responseBody == null ? void 0 : responseBody.code) || (responseBody == null ? void 0 : responseBody.reason) || (responseBody == null ? void 0 : responseBody.details) || (responseBody == null ? void 0 : responseBody.graphQLErrors))) {
|
|
10747
|
-
return [];
|
|
10748
|
-
}
|
|
10749
|
-
const causes = ((_a = responseBody.details) == null ? void 0 : _a.causes) || responseBody.graphQLErrors || [];
|
|
10750
|
-
if (causes.length) {
|
|
10751
|
-
return causes.map((cause) => {
|
|
10752
|
-
let params = {};
|
|
10753
|
-
let message2 = cause.message;
|
|
10754
|
-
try {
|
|
10755
|
-
const info = JSON.parse(cause.message);
|
|
10756
|
-
params = info.params;
|
|
10757
|
-
message2 = info.message;
|
|
10758
|
-
} catch {
|
|
10759
|
-
return i18n2.t(
|
|
10760
|
-
[
|
|
10761
|
-
`error.${cause.reason}`,
|
|
10762
|
-
`error.${cause.code}`,
|
|
10763
|
-
`${cause.field ? `${cause.field}: ` : ""}${message2}`
|
|
10764
|
-
],
|
|
10765
|
-
{
|
|
10766
|
-
...params,
|
|
10767
|
-
fallbackLng: ""
|
|
10768
|
-
}
|
|
10769
|
-
);
|
|
10770
|
-
}
|
|
10771
|
-
return i18n2.t(
|
|
10772
|
-
[
|
|
10773
|
-
`error.${cause.reason}`,
|
|
10774
|
-
`error.${cause.code}`,
|
|
10775
|
-
`${cause.field ? `${cause.field}: ` : ""}${message2}`
|
|
10776
|
-
],
|
|
10777
|
-
{
|
|
10778
|
-
...params,
|
|
10779
|
-
fallbackLng: ""
|
|
10780
|
-
}
|
|
10781
|
-
);
|
|
10782
|
-
});
|
|
10783
|
-
}
|
|
10784
|
-
return [
|
|
10785
|
-
i18n2.t(
|
|
10786
|
-
[`error.${responseBody.code}`, `error.${responseBody.reason}`, responseBody.message || ""],
|
|
10787
|
-
{ fallbackLng: "" }
|
|
10788
|
-
)
|
|
10789
|
-
];
|
|
10790
|
-
}
|
|
10791
|
-
function useSubmitForm(options) {
|
|
10792
|
-
const { formRef, onSubmitSuccess } = options;
|
|
10793
|
-
const { i18n: i18n2 } = useTranslation();
|
|
10794
|
-
const [submitting, setSubmitting] = React.useState(false);
|
|
10795
|
-
const [errorMsgs, setErrorMsgs] = React.useState([]);
|
|
10796
|
-
const reset = React.useCallback(() => {
|
|
10797
|
-
setSubmitting(false);
|
|
10798
|
-
setErrorMsgs([]);
|
|
10799
|
-
}, []);
|
|
10800
|
-
const onSubmit = React.useCallback(async () => {
|
|
10801
|
-
var _a;
|
|
10802
|
-
try {
|
|
10803
|
-
setSubmitting(true);
|
|
10804
|
-
await ((_a = formRef.current) == null ? void 0 : _a.submit());
|
|
10805
|
-
onSubmitSuccess == null ? void 0 : onSubmitSuccess();
|
|
10806
|
-
reset();
|
|
10807
|
-
} catch (error) {
|
|
10808
|
-
if (error instanceof Object) {
|
|
10809
|
-
if ("response" in error && error.response instanceof Response) {
|
|
10810
|
-
const response = error.response;
|
|
10811
|
-
const body = await response.json();
|
|
10812
|
-
setErrorMsgs(getCommonErrors(body, i18n2));
|
|
10813
|
-
} else if ("message" in error && typeof error.message === "string") {
|
|
10814
|
-
setErrorMsgs([error.message]);
|
|
10815
|
-
}
|
|
10816
|
-
}
|
|
10817
|
-
} finally {
|
|
10818
|
-
setSubmitting(false);
|
|
10819
|
-
}
|
|
10820
|
-
}, [formRef, i18n2, reset, onSubmitSuccess]);
|
|
10821
|
-
return {
|
|
10822
|
-
submitting,
|
|
10823
|
-
errorMsgs,
|
|
10824
|
-
reset,
|
|
10825
|
-
onSubmit
|
|
10826
|
-
};
|
|
10827
|
-
}
|
|
10828
|
-
const index_130sdg8 = "";
|
|
10829
|
-
const EditButtonStyle = "esoz3jw";
|
|
10830
|
-
function EditFieldModal(props) {
|
|
10831
|
-
const {
|
|
10832
|
-
title,
|
|
10833
|
-
formRef: form2,
|
|
10834
|
-
renderContent,
|
|
10835
|
-
fullscreen
|
|
10836
|
-
} = props;
|
|
10837
|
-
const {
|
|
10838
|
-
i18n: i18n2
|
|
10839
|
-
} = useTranslation();
|
|
10840
|
-
const popModal = eagle.usePopModal();
|
|
10841
|
-
const {
|
|
10842
|
-
submitting,
|
|
10843
|
-
errorMsgs,
|
|
10844
|
-
reset,
|
|
10845
|
-
onSubmit
|
|
10846
|
-
} = useSubmitForm({
|
|
10847
|
-
formRef: form2,
|
|
10848
|
-
onSubmitSuccess: () => {
|
|
10849
|
-
popModal();
|
|
10850
|
-
}
|
|
10851
|
-
});
|
|
10852
|
-
const close = React.useCallback(() => {
|
|
10853
|
-
popModal();
|
|
10854
|
-
reset();
|
|
10855
|
-
}, [reset]);
|
|
10856
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(eagle.Modal, {
|
|
10857
|
-
className: fullscreen ? FullscreenModalStyle : SmallModalStyle,
|
|
10858
|
-
title: title || i18n2.t("dovetail.edit"),
|
|
10859
|
-
confirmLoading: submitting,
|
|
10860
|
-
onOk: onSubmit,
|
|
10861
|
-
onCancel: close,
|
|
10862
|
-
okText: i18n2.t("dovetail.save"),
|
|
10863
|
-
normal: true,
|
|
10864
|
-
destroyOnClose: true,
|
|
10865
|
-
fullscreen,
|
|
10866
|
-
children: [renderContent(), /* @__PURE__ */ jsxRuntimeExports.jsx(FormErrorAlert, {
|
|
10867
|
-
style: {
|
|
10868
|
-
marginTop: 16
|
|
10869
|
-
},
|
|
10870
|
-
errorMsgs,
|
|
10871
|
-
isEdit: true
|
|
10872
|
-
})]
|
|
10873
|
-
});
|
|
10874
|
-
}
|
|
10875
|
-
function EditField(props) {
|
|
10876
|
-
const {
|
|
10877
|
-
modalProps
|
|
10878
|
-
} = props;
|
|
10879
|
-
const {
|
|
10880
|
-
i18n: i18n2
|
|
10881
|
-
} = useTranslation();
|
|
10882
|
-
const {
|
|
10883
|
-
resource
|
|
10884
|
-
} = core.useResource();
|
|
10885
|
-
const pushModal = eagle.usePushModal();
|
|
10886
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(core.CanAccess, {
|
|
10887
|
-
resource: resource == null ? void 0 : resource.name,
|
|
10888
|
-
action: AccessControlAuth.Edit,
|
|
10889
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Button, {
|
|
10890
|
-
className: EditButtonStyle,
|
|
10891
|
-
type: "link",
|
|
10892
|
-
onClick: () => {
|
|
10893
|
-
pushModal({
|
|
10894
|
-
component: EditFieldModal,
|
|
10895
|
-
props: modalProps
|
|
10896
|
-
});
|
|
10897
|
-
},
|
|
10898
|
-
children: i18n2.t("dovetail.edit")
|
|
10899
|
-
})
|
|
10900
|
-
});
|
|
10901
|
-
}
|
|
10902
11169
|
const EditLabelForm = React.forwardRef(
|
|
10903
11170
|
function EditLabelForm2(props, ref) {
|
|
10904
11171
|
var _a;
|
|
@@ -10959,12 +11226,12 @@ var __publicField = (obj, key, value) => {
|
|
|
10959
11226
|
columns: [
|
|
10960
11227
|
{
|
|
10961
11228
|
key: "key",
|
|
10962
|
-
title: "
|
|
11229
|
+
title: t2("dovetail.key"),
|
|
10963
11230
|
type: "input"
|
|
10964
11231
|
},
|
|
10965
11232
|
{
|
|
10966
11233
|
key: "value",
|
|
10967
|
-
title: "
|
|
11234
|
+
title: t2("dovetail.value"),
|
|
10968
11235
|
type: "input"
|
|
10969
11236
|
}
|
|
10970
11237
|
],
|
|
@@ -11031,7 +11298,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11031
11298
|
value2.forEach(({ key: key2, value: value22 }) => {
|
|
11032
11299
|
newAnnotations[key2] = value22;
|
|
11033
11300
|
});
|
|
11034
|
-
const newYaml = resourceModel.
|
|
11301
|
+
const newYaml = resourceModel.updateAnnotation(newAnnotations);
|
|
11035
11302
|
pruneBeforeEdit(newYaml);
|
|
11036
11303
|
return mutateAsync({
|
|
11037
11304
|
id: resourceModel.id,
|
|
@@ -11072,12 +11339,12 @@ var __publicField = (obj, key, value) => {
|
|
|
11072
11339
|
columns: [
|
|
11073
11340
|
{
|
|
11074
11341
|
key: "key",
|
|
11075
|
-
title: "
|
|
11342
|
+
title: t2("dovetail.key"),
|
|
11076
11343
|
type: "input"
|
|
11077
11344
|
},
|
|
11078
11345
|
{
|
|
11079
11346
|
key: "value",
|
|
11080
|
-
title: "
|
|
11347
|
+
title: t2("dovetail.value"),
|
|
11081
11348
|
type: "input"
|
|
11082
11349
|
}
|
|
11083
11350
|
],
|
|
@@ -11230,21 +11497,23 @@ var __publicField = (obj, key, value) => {
|
|
|
11230
11497
|
}));
|
|
11231
11498
|
}
|
|
11232
11499
|
const useEagleTable = (params) => {
|
|
11233
|
-
var _a, _b;
|
|
11500
|
+
var _a, _b, _c;
|
|
11234
11501
|
const { columns, tableProps, formatter, Dropdown = K8sDropdown } = params;
|
|
11235
11502
|
const [selectedKeys, setSelectedKeys] = React.useState([]);
|
|
11236
11503
|
const [currentPage, setCurrentPage] = React.useState((tableProps == null ? void 0 : tableProps.currentPage) || 1);
|
|
11237
11504
|
const { resource } = core.useResource();
|
|
11238
11505
|
const currentSize = (tableProps == null ? void 0 : tableProps.defaultSize) || 10;
|
|
11239
11506
|
const useTableParams = React.useMemo(() => {
|
|
11507
|
+
var _a2;
|
|
11240
11508
|
const mergedParams = lodashEs.merge(params.useTableParams, {
|
|
11241
11509
|
pagination: {
|
|
11242
11510
|
pageSize: currentSize,
|
|
11243
11511
|
mode: "server"
|
|
11244
|
-
}
|
|
11512
|
+
},
|
|
11513
|
+
resource: ((_a2 = params.useTableParams) == null ? void 0 : _a2.resource) || (resource == null ? void 0 : resource.name)
|
|
11245
11514
|
});
|
|
11246
11515
|
return mergedParams;
|
|
11247
|
-
}, [params.useTableParams, currentSize]);
|
|
11516
|
+
}, [params.useTableParams, currentSize, resource]);
|
|
11248
11517
|
const finalColumns = React.useMemo(
|
|
11249
11518
|
() => addDefaultRenderToColumns(columns),
|
|
11250
11519
|
[columns]
|
|
@@ -11274,7 +11543,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11274
11543
|
const total = ((_b = table.tableQueryResult.data) == null ? void 0 : _b.total) || 0;
|
|
11275
11544
|
const finalDataSource = formatter ? data2 == null ? void 0 : data2.map(formatter) : data2;
|
|
11276
11545
|
const finalProps = {
|
|
11277
|
-
tableKey: (resource == null ? void 0 : resource.name) || "table",
|
|
11546
|
+
tableKey: ((_c = params.useTableParams) == null ? void 0 : _c.resource) || (resource == null ? void 0 : resource.name) || "table",
|
|
11278
11547
|
loading: table.tableQueryResult.isLoading,
|
|
11279
11548
|
data: finalDataSource || [],
|
|
11280
11549
|
columns: finalColumns,
|
|
@@ -11299,18 +11568,19 @@ var __publicField = (obj, key, value) => {
|
|
|
11299
11568
|
}, []);
|
|
11300
11569
|
return { tableProps: finalProps, selectedKeys, ...table };
|
|
11301
11570
|
};
|
|
11302
|
-
function CreateButton() {
|
|
11571
|
+
function CreateButton(props) {
|
|
11303
11572
|
var _a;
|
|
11304
11573
|
const { t: t2 } = useTranslation();
|
|
11305
11574
|
const openForm = useOpenForm();
|
|
11306
11575
|
const { resource } = core.useResource();
|
|
11576
|
+
const label2 = props.label || ((_a = resource == null ? void 0 : resource.meta) == null ? void 0 : _a.kind);
|
|
11307
11577
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11308
11578
|
eagle.Button,
|
|
11309
11579
|
{
|
|
11310
11580
|
prefixIcon: /* @__PURE__ */ jsxRuntimeExports.jsx(iconsReact.PlusAddCreateNew16BoldOntintIcon, {}),
|
|
11311
11581
|
type: "primary",
|
|
11312
11582
|
onClick: openForm,
|
|
11313
|
-
children: t2("dovetail.create_resource", { resource: (
|
|
11583
|
+
children: t2("dovetail.create_resource", { resource: /^[a-zA-Z]/.test(label2) ? ` ${label2}` : label2 })
|
|
11314
11584
|
}
|
|
11315
11585
|
);
|
|
11316
11586
|
}
|
|
@@ -11357,12 +11627,13 @@ var __publicField = (obj, key, value) => {
|
|
|
11357
11627
|
visible ? /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Modal, { ...modalProps }) : null
|
|
11358
11628
|
] });
|
|
11359
11629
|
};
|
|
11360
|
-
const
|
|
11361
|
-
const ToolbarWrapperStyle = "
|
|
11362
|
-
const ToolbarStyle$3 = "
|
|
11363
|
-
const TitleStyle$2 = "
|
|
11364
|
-
const DescriptionStyle = "
|
|
11630
|
+
const index_1wo1wv1 = "";
|
|
11631
|
+
const ToolbarWrapperStyle = "t1908hhn";
|
|
11632
|
+
const ToolbarStyle$3 = "t1ym1gqo";
|
|
11633
|
+
const TitleStyle$2 = "t38ugwl";
|
|
11634
|
+
const DescriptionStyle = "d13nfex0";
|
|
11365
11635
|
const TableToolBar = ({
|
|
11636
|
+
title,
|
|
11366
11637
|
description,
|
|
11367
11638
|
selectedKeys,
|
|
11368
11639
|
hideCreate
|
|
@@ -11377,14 +11648,16 @@ var __publicField = (obj, key, value) => {
|
|
|
11377
11648
|
className: ToolbarStyle$3,
|
|
11378
11649
|
children: [/* @__PURE__ */ jsxRuntimeExports.jsx("span", {
|
|
11379
11650
|
className: cx_default(eagle.Typo.Display.d2_regular_title, TitleStyle$2),
|
|
11380
|
-
children: (_a = resource == null ? void 0 : resource.meta) == null ? void 0 : _a.kind
|
|
11651
|
+
children: title || ((_a = resource == null ? void 0 : resource.meta) == null ? void 0 : _a.kind)
|
|
11381
11652
|
}), /* @__PURE__ */ jsxRuntimeExports.jsxs(eagle.Space, {
|
|
11382
11653
|
children: [selectedKeys.length > 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx(DeleteManyButton, {
|
|
11383
11654
|
ids: selectedKeys
|
|
11384
11655
|
}) : void 0, /* @__PURE__ */ jsxRuntimeExports.jsx(core.CanAccess, {
|
|
11385
11656
|
resource: resource == null ? void 0 : resource.name,
|
|
11386
11657
|
action: AccessControlAuth.Create,
|
|
11387
|
-
children: !hideCreate ? /* @__PURE__ */ jsxRuntimeExports.jsx(CreateButton, {
|
|
11658
|
+
children: !hideCreate ? /* @__PURE__ */ jsxRuntimeExports.jsx(CreateButton, {
|
|
11659
|
+
label: title
|
|
11660
|
+
}) : null
|
|
11388
11661
|
})]
|
|
11389
11662
|
})]
|
|
11390
11663
|
}), description ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
@@ -11415,7 +11688,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11415
11688
|
} = useTranslation();
|
|
11416
11689
|
const [selectedKeys] = React.useState([]);
|
|
11417
11690
|
const component = React.useContext(ComponentContext);
|
|
11418
|
-
const
|
|
11691
|
+
const Table2 = component.Table || Table$1;
|
|
11419
11692
|
const columns = React.useMemo(() => [NameColumnRenderer(i18n2, "jobs"), StateDisplayColumnRenderer(i18n2), NameSpaceColumnRenderer(i18n2), {
|
|
11420
11693
|
...WorkloadImageColumnRenderer(i18n2),
|
|
11421
11694
|
width: 238
|
|
@@ -11456,7 +11729,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11456
11729
|
children: [hideToolBar ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(TableToolBar, {
|
|
11457
11730
|
selectedKeys,
|
|
11458
11731
|
hideCreate: true
|
|
11459
|
-
}), /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11732
|
+
}), /* @__PURE__ */ jsxRuntimeExports.jsx(Table2, {
|
|
11460
11733
|
...tableProps,
|
|
11461
11734
|
tableKey: "cronjobs",
|
|
11462
11735
|
showMenuColumn: false
|
|
@@ -11530,7 +11803,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11530
11803
|
}), [columns, uid]);
|
|
11531
11804
|
const { tableProps } = useEagleTable(params);
|
|
11532
11805
|
const component = React.useContext(ComponentContext);
|
|
11533
|
-
const
|
|
11806
|
+
const Table2 = component.Table || Table$1;
|
|
11534
11807
|
if (!((_a = tableProps.data) == null ? void 0 : _a.length) && !tableProps.loading) {
|
|
11535
11808
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11536
11809
|
WidgetErrorContent,
|
|
@@ -11540,7 +11813,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11540
11813
|
);
|
|
11541
11814
|
}
|
|
11542
11815
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11543
|
-
|
|
11816
|
+
Table2,
|
|
11544
11817
|
{
|
|
11545
11818
|
...tableProps,
|
|
11546
11819
|
tableKey: "events",
|
|
@@ -11583,9 +11856,9 @@ var __publicField = (obj, key, value) => {
|
|
|
11583
11856
|
const LinkStyle = "l1vnw9x0";
|
|
11584
11857
|
const ResourceLink = (props) => {
|
|
11585
11858
|
const {
|
|
11586
|
-
resourceName,
|
|
11859
|
+
resourceKind: resourceName,
|
|
11587
11860
|
namespace: namespace2,
|
|
11588
|
-
resourceId
|
|
11861
|
+
name: resourceId
|
|
11589
11862
|
} = props;
|
|
11590
11863
|
const navigation = core.useNavigation();
|
|
11591
11864
|
const go = core.useGo();
|
|
@@ -11612,7 +11885,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11612
11885
|
return addId(ingress.flattenedRules || [], "fullPath");
|
|
11613
11886
|
}, [ingress.flattenedRules]);
|
|
11614
11887
|
const component = React.useContext(ComponentContext);
|
|
11615
|
-
const
|
|
11888
|
+
const Table2 = component.Table || Table$1;
|
|
11616
11889
|
const currentSize = 10;
|
|
11617
11890
|
const columns = [
|
|
11618
11891
|
{
|
|
@@ -11645,9 +11918,9 @@ var __publicField = (obj, key, value) => {
|
|
|
11645
11918
|
return record.serviceName ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11646
11919
|
ResourceLink,
|
|
11647
11920
|
{
|
|
11648
|
-
|
|
11921
|
+
resourceKind: "services",
|
|
11649
11922
|
namespace: ingress.metadata.namespace || "default",
|
|
11650
|
-
|
|
11923
|
+
name: serviceName
|
|
11651
11924
|
}
|
|
11652
11925
|
) : record.resourceName;
|
|
11653
11926
|
}
|
|
@@ -11672,9 +11945,9 @@ var __publicField = (obj, key, value) => {
|
|
|
11672
11945
|
return secretName ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11673
11946
|
ResourceLink,
|
|
11674
11947
|
{
|
|
11675
|
-
|
|
11948
|
+
resourceKind: "secrets",
|
|
11676
11949
|
namespace: ingress.metadata.namespace || "default",
|
|
11677
|
-
|
|
11950
|
+
name: secretName
|
|
11678
11951
|
}
|
|
11679
11952
|
) : /* @__PURE__ */ jsxRuntimeExports.jsx(ValueDisplay, { value: "" });
|
|
11680
11953
|
},
|
|
@@ -11701,7 +11974,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11701
11974
|
);
|
|
11702
11975
|
}
|
|
11703
11976
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11704
|
-
|
|
11977
|
+
Table2,
|
|
11705
11978
|
{
|
|
11706
11979
|
tableKey: "ingressRules",
|
|
11707
11980
|
loading: false,
|
|
@@ -11718,7 +11991,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11718
11991
|
}
|
|
11719
11992
|
);
|
|
11720
11993
|
};
|
|
11721
|
-
const
|
|
11994
|
+
const KeyValue_1cqk7i8 = "";
|
|
11722
11995
|
const ContentBlockStyle = "c8jy7dc";
|
|
11723
11996
|
const KeyStyle = "k2sddxl";
|
|
11724
11997
|
const ValueStyle$2 = "v16vicsr";
|
|
@@ -11798,6 +12071,40 @@ var __publicField = (obj, key, value) => {
|
|
|
11798
12071
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.TabsTabPane, { tab: tab.title, children: tab.children }, tab.title);
|
|
11799
12072
|
}) });
|
|
11800
12073
|
}
|
|
12074
|
+
const StateTag = (props) => {
|
|
12075
|
+
const { state: state2 = ResourceState.UPDATING, hideBackground, className, resourceKind } = props;
|
|
12076
|
+
const { t: t2 } = useTranslation();
|
|
12077
|
+
const defaultStateMap = {
|
|
12078
|
+
[ResourceState.UPDATING]: "loading",
|
|
12079
|
+
[ResourceState.READY]: "green",
|
|
12080
|
+
[ResourceState.COMPLETED]: "gray",
|
|
12081
|
+
[ResourceState.FAILED]: "red",
|
|
12082
|
+
[ResourceState.SUSPENDED]: "warning",
|
|
12083
|
+
[ResourceState.RUNNING]: "green",
|
|
12084
|
+
[ResourceState.SUCCEEDED]: "blue",
|
|
12085
|
+
[ResourceState.UNKNOWN]: "gray",
|
|
12086
|
+
[ResourceState.TERMINATING]: "loading",
|
|
12087
|
+
[ResourceState.PENDING]: "warning",
|
|
12088
|
+
[ResourceState.WAITING]: "warning",
|
|
12089
|
+
[ResourceState.TERMINATED]: "red",
|
|
12090
|
+
[ResourceState.STOPPED]: "gray",
|
|
12091
|
+
[ResourceState.AVAILABLE]: "blue",
|
|
12092
|
+
[ResourceState.BOUND]: "green",
|
|
12093
|
+
[ResourceState.RELEASED]: "gray",
|
|
12094
|
+
[ResourceState.LOST]: "red"
|
|
12095
|
+
};
|
|
12096
|
+
const resourceStateMap = {};
|
|
12097
|
+
const finalStateMap = resourceStateMap[resourceKind || ""] || defaultStateMap;
|
|
12098
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
12099
|
+
eagle.StatusCapsule,
|
|
12100
|
+
{
|
|
12101
|
+
className: cx_default(className, StateTagStyle, hideBackground && "no-background"),
|
|
12102
|
+
color: finalStateMap[state2] !== "loading" ? finalStateMap[state2] : void 0,
|
|
12103
|
+
loading: finalStateMap[state2] === "loading",
|
|
12104
|
+
children: t2(`dovetail.${state2 || "updating"}_state`)
|
|
12105
|
+
}
|
|
12106
|
+
);
|
|
12107
|
+
};
|
|
11801
12108
|
const ShowContent_11g4jr2 = "";
|
|
11802
12109
|
const ShowContentWrapperStyle = "s9agep2";
|
|
11803
12110
|
const BackButton = "bo89gfi";
|
|
@@ -11830,7 +12137,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11830
12137
|
});
|
|
11831
12138
|
}
|
|
11832
12139
|
const ShowContent = (props) => {
|
|
11833
|
-
var _a, _b, _c, _d;
|
|
12140
|
+
var _a, _b, _c, _d, _e;
|
|
11834
12141
|
const {
|
|
11835
12142
|
showConfig,
|
|
11836
12143
|
formatter,
|
|
@@ -11859,6 +12166,8 @@ var __publicField = (obj, key, value) => {
|
|
|
11859
12166
|
id
|
|
11860
12167
|
});
|
|
11861
12168
|
const Component = React.useContext(ComponentContext);
|
|
12169
|
+
const configs = React.useContext(ConfigsContext);
|
|
12170
|
+
const config = configs[(resource == null ? void 0 : resource.name) || ""];
|
|
11862
12171
|
const Tabs$1 = Component.Tabs || Tabs;
|
|
11863
12172
|
if (!(data2 == null ? void 0 : data2.data)) {
|
|
11864
12173
|
return null;
|
|
@@ -11930,7 +12239,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11930
12239
|
},
|
|
11931
12240
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
|
|
11932
12241
|
className: "button-text",
|
|
11933
|
-
children: (_b = resource == null ? void 0 : resource.meta) == null ? void 0 : _b.kind
|
|
12242
|
+
children: (config == null ? void 0 : config.displayName) || ((_b = resource == null ? void 0 : resource.meta) == null ? void 0 : _b.kind)
|
|
11934
12243
|
})
|
|
11935
12244
|
})
|
|
11936
12245
|
}), /* @__PURE__ */ jsxRuntimeExports.jsxs(eagle.Space, {
|
|
@@ -11943,10 +12252,11 @@ var __publicField = (obj, key, value) => {
|
|
|
11943
12252
|
className: cx_default(eagle.Typo.Display.d2_regular_title, NameStyle),
|
|
11944
12253
|
children: (_c = record == null ? void 0 : record.metadata) == null ? void 0 : _c.name
|
|
11945
12254
|
}), stateDisplay ? /* @__PURE__ */ jsxRuntimeExports.jsx(StateTag, {
|
|
11946
|
-
state: stateDisplay
|
|
12255
|
+
state: stateDisplay,
|
|
12256
|
+
resourceKind: (_d = resource == null ? void 0 : resource.meta) == null ? void 0 : _d.kind
|
|
11947
12257
|
}) : void 0]
|
|
11948
12258
|
}), /* @__PURE__ */ jsxRuntimeExports.jsxs(eagle.Space, {
|
|
11949
|
-
children: [(
|
|
12259
|
+
children: [(_e = showConfig.renderExtraButton) == null ? void 0 : _e.call(showConfig, record), !showConfig.hideEditYamlButton ? /* @__PURE__ */ jsxRuntimeExports.jsx(core.CanAccess, {
|
|
11950
12260
|
resource: resource == null ? void 0 : resource.name,
|
|
11951
12261
|
action: AccessControlAuth.Edit,
|
|
11952
12262
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Button, {
|
|
@@ -12043,18 +12353,84 @@ var __publicField = (obj, key, value) => {
|
|
|
12043
12353
|
})
|
|
12044
12354
|
});
|
|
12045
12355
|
}
|
|
12046
|
-
|
|
12047
|
-
const {
|
|
12048
|
-
const
|
|
12049
|
-
const
|
|
12050
|
-
|
|
12051
|
-
|
|
12052
|
-
|
|
12053
|
-
|
|
12054
|
-
|
|
12055
|
-
|
|
12056
|
-
|
|
12057
|
-
|
|
12356
|
+
const NodeTaintsTable = ({ taints = [] }) => {
|
|
12357
|
+
const { t: t2 } = useTranslation();
|
|
12358
|
+
const component = React.useContext(ComponentContext);
|
|
12359
|
+
const Table2 = component.Table || Table$1;
|
|
12360
|
+
const taintsWithId = addId(taints, "key");
|
|
12361
|
+
const columns = [
|
|
12362
|
+
{
|
|
12363
|
+
key: "key",
|
|
12364
|
+
display: true,
|
|
12365
|
+
dataIndex: "key",
|
|
12366
|
+
title: t2("dovetail.key"),
|
|
12367
|
+
width: 120,
|
|
12368
|
+
sortable: true
|
|
12369
|
+
},
|
|
12370
|
+
{
|
|
12371
|
+
key: "value",
|
|
12372
|
+
display: true,
|
|
12373
|
+
dataIndex: "value",
|
|
12374
|
+
title: t2("dovetail.value"),
|
|
12375
|
+
width: 120,
|
|
12376
|
+
sortable: true
|
|
12377
|
+
},
|
|
12378
|
+
{
|
|
12379
|
+
key: "effect",
|
|
12380
|
+
display: true,
|
|
12381
|
+
dataIndex: "effect",
|
|
12382
|
+
title: t2("dovetail.effect"),
|
|
12383
|
+
width: 120,
|
|
12384
|
+
sortable: true,
|
|
12385
|
+
render: (value2) => {
|
|
12386
|
+
return t2(`dovetail.node_taint_${value2}`);
|
|
12387
|
+
}
|
|
12388
|
+
}
|
|
12389
|
+
];
|
|
12390
|
+
const {
|
|
12391
|
+
data: finalData,
|
|
12392
|
+
currentPage,
|
|
12393
|
+
onPageChange,
|
|
12394
|
+
onSorterChange
|
|
12395
|
+
} = useTableData({
|
|
12396
|
+
data: taintsWithId,
|
|
12397
|
+
columns,
|
|
12398
|
+
defaultSorters: [
|
|
12399
|
+
{
|
|
12400
|
+
field: "lastUpdateTime",
|
|
12401
|
+
order: "desc"
|
|
12402
|
+
}
|
|
12403
|
+
]
|
|
12404
|
+
});
|
|
12405
|
+
const currentSize = 10;
|
|
12406
|
+
if (taintsWithId.length === 0) {
|
|
12407
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
12408
|
+
WidgetErrorContent,
|
|
12409
|
+
{
|
|
12410
|
+
errorText: t2("dovetail.no_resource", { kind: t2("dovetail.taint") }),
|
|
12411
|
+
style: { padding: "15px 0" },
|
|
12412
|
+
type: ErrorContentType.Card
|
|
12413
|
+
}
|
|
12414
|
+
);
|
|
12415
|
+
}
|
|
12416
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
12417
|
+
Table2,
|
|
12418
|
+
{
|
|
12419
|
+
tableKey: "condition",
|
|
12420
|
+
loading: false,
|
|
12421
|
+
data: finalData,
|
|
12422
|
+
total: taintsWithId.length,
|
|
12423
|
+
columns: addDefaultRenderToColumns(columns),
|
|
12424
|
+
rowKey: "key",
|
|
12425
|
+
empty: t2("dovetail.empty"),
|
|
12426
|
+
defaultSize: currentSize,
|
|
12427
|
+
currentPage,
|
|
12428
|
+
onPageChange,
|
|
12429
|
+
onSorterChange,
|
|
12430
|
+
showMenuColumn: false
|
|
12431
|
+
}
|
|
12432
|
+
);
|
|
12433
|
+
};
|
|
12058
12434
|
function PVVolumeModeDisplay(props) {
|
|
12059
12435
|
const { value: value2 } = props;
|
|
12060
12436
|
const i18n2 = useTranslation();
|
|
@@ -12064,11 +12440,72 @@ var __publicField = (obj, key, value) => {
|
|
|
12064
12440
|
};
|
|
12065
12441
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: map[value2] || value2 });
|
|
12066
12442
|
}
|
|
12443
|
+
const GlobalStoreContext = React.createContext({});
|
|
12444
|
+
function Table(props) {
|
|
12445
|
+
var _a;
|
|
12446
|
+
const { tableProps, displayName, errorContentProps } = props;
|
|
12447
|
+
const { Table: TableComponent } = React.useContext(ComponentContext);
|
|
12448
|
+
const Table2 = TableComponent || Table$1;
|
|
12449
|
+
const { i18n: i18n2 } = useTranslation();
|
|
12450
|
+
const resourceType = /^[a-zA-Z]/.test(displayName) ? ` ${displayName}` : displayName;
|
|
12451
|
+
if (!((_a = tableProps.data) == null ? void 0 : _a.length) && !tableProps.loading) {
|
|
12452
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
12453
|
+
WidgetErrorContent,
|
|
12454
|
+
{
|
|
12455
|
+
errorText: tableProps.empty || i18n2.t("dovetail.no_resource", { kind: resourceType }),
|
|
12456
|
+
...errorContentProps
|
|
12457
|
+
}
|
|
12458
|
+
);
|
|
12459
|
+
}
|
|
12460
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
12461
|
+
Table2,
|
|
12462
|
+
{
|
|
12463
|
+
...tableProps,
|
|
12464
|
+
empty: tableProps.empty || i18n2.t("dovetail.no_resource", { kind: resourceType }),
|
|
12465
|
+
className: cx_default(tableProps.className)
|
|
12466
|
+
}
|
|
12467
|
+
);
|
|
12468
|
+
}
|
|
12469
|
+
function ResourceTable(props) {
|
|
12470
|
+
const { resource, useTableParams } = props;
|
|
12471
|
+
const configs = React.useContext(ConfigsContext);
|
|
12472
|
+
const config = configs[resource];
|
|
12473
|
+
const { formatter, columns, Dropdown, noShow } = config;
|
|
12474
|
+
const { i18n: i18n2 } = useTranslation();
|
|
12475
|
+
const nameRenderer = noShow ? PlainTextNameColumnRenderer(i18n2) : NameColumnRenderer(i18n2);
|
|
12476
|
+
const { tableProps } = useEagleTable({
|
|
12477
|
+
useTableParams: {
|
|
12478
|
+
resource,
|
|
12479
|
+
...useTableParams
|
|
12480
|
+
},
|
|
12481
|
+
columns: [nameRenderer, ...(columns == null ? void 0 : columns()) || []],
|
|
12482
|
+
tableProps: {
|
|
12483
|
+
defaultSize: 10,
|
|
12484
|
+
...config.tableProps
|
|
12485
|
+
},
|
|
12486
|
+
formatter,
|
|
12487
|
+
Dropdown
|
|
12488
|
+
});
|
|
12489
|
+
React.useEffect(() => {
|
|
12490
|
+
tableProps.onPageChange(1);
|
|
12491
|
+
}, []);
|
|
12492
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
12493
|
+
Table,
|
|
12494
|
+
{
|
|
12495
|
+
tableProps,
|
|
12496
|
+
displayName: config.displayName || config.kind,
|
|
12497
|
+
errorContentProps: {
|
|
12498
|
+
type: ErrorContentType.Card
|
|
12499
|
+
}
|
|
12500
|
+
}
|
|
12501
|
+
);
|
|
12502
|
+
}
|
|
12067
12503
|
const WorkloadPodsTable_975j2t = "";
|
|
12068
12504
|
const WorkloadPodsTable = ({
|
|
12069
12505
|
namespace: namespace2,
|
|
12070
12506
|
selector,
|
|
12071
|
-
hideToolbar
|
|
12507
|
+
hideToolbar,
|
|
12508
|
+
filter
|
|
12072
12509
|
}) => {
|
|
12073
12510
|
var _a;
|
|
12074
12511
|
const {
|
|
@@ -12076,7 +12513,7 @@ var __publicField = (obj, key, value) => {
|
|
|
12076
12513
|
} = useTranslation();
|
|
12077
12514
|
const [selectedKeys, setSelectedKeys] = React.useState([]);
|
|
12078
12515
|
const component = React.useContext(ComponentContext);
|
|
12079
|
-
const
|
|
12516
|
+
const Table2 = component.Table || Table$1;
|
|
12080
12517
|
const currentSize = 10;
|
|
12081
12518
|
const columns = [NameColumnRenderer(i18n2, "pods"), StateDisplayColumnRenderer(i18n2), {
|
|
12082
12519
|
key: "ip",
|
|
@@ -12101,7 +12538,7 @@ var __publicField = (obj, key, value) => {
|
|
|
12101
12538
|
field: "",
|
|
12102
12539
|
value: "",
|
|
12103
12540
|
fn(item) {
|
|
12104
|
-
return matchSelector(item, selector, namespace2);
|
|
12541
|
+
return filter ? filter(item) : matchSelector(item, selector, namespace2);
|
|
12105
12542
|
}
|
|
12106
12543
|
}]
|
|
12107
12544
|
}
|
|
@@ -12124,7 +12561,7 @@ var __publicField = (obj, key, value) => {
|
|
|
12124
12561
|
children: [hideToolbar ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(TableToolBar, {
|
|
12125
12562
|
selectedKeys,
|
|
12126
12563
|
hideCreate: true
|
|
12127
|
-
}), /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
12564
|
+
}), /* @__PURE__ */ jsxRuntimeExports.jsx(Table2, {
|
|
12128
12565
|
...tableProps,
|
|
12129
12566
|
tableKey: "pods",
|
|
12130
12567
|
onSelect: (keys) => setSelectedKeys(keys),
|
|
@@ -12335,6 +12772,15 @@ var __publicField = (obj, key, value) => {
|
|
|
12335
12772
|
}
|
|
12336
12773
|
};
|
|
12337
12774
|
};
|
|
12775
|
+
const NodeTaintsField = () => {
|
|
12776
|
+
return {
|
|
12777
|
+
key: "NodeTaints",
|
|
12778
|
+
path: ["spec", "taints"],
|
|
12779
|
+
renderContent: (value2) => {
|
|
12780
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(NodeTaintsTable, { taints: value2 });
|
|
12781
|
+
}
|
|
12782
|
+
};
|
|
12783
|
+
};
|
|
12338
12784
|
const PodsField = () => {
|
|
12339
12785
|
return {
|
|
12340
12786
|
key: "pods",
|
|
@@ -12557,15 +13003,26 @@ var __publicField = (obj, key, value) => {
|
|
|
12557
13003
|
return {
|
|
12558
13004
|
key: "pvs",
|
|
12559
13005
|
path: ["pvs"],
|
|
12560
|
-
renderContent: (
|
|
12561
|
-
return
|
|
12562
|
-
|
|
13006
|
+
renderContent: (_, sc) => {
|
|
13007
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
13008
|
+
ResourceTable,
|
|
12563
13009
|
{
|
|
12564
|
-
|
|
12565
|
-
|
|
12566
|
-
|
|
13010
|
+
resource: "persistentvolumes",
|
|
13011
|
+
useTableParams: {
|
|
13012
|
+
filters: {
|
|
13013
|
+
permanent: [
|
|
13014
|
+
{
|
|
13015
|
+
field: "",
|
|
13016
|
+
value: "",
|
|
13017
|
+
fn(pv2) {
|
|
13018
|
+
return sc.filterPV(pv2, sc.metadata.name);
|
|
13019
|
+
}
|
|
13020
|
+
}
|
|
13021
|
+
]
|
|
13022
|
+
}
|
|
13023
|
+
}
|
|
12567
13024
|
}
|
|
12568
|
-
)
|
|
13025
|
+
);
|
|
12569
13026
|
}
|
|
12570
13027
|
};
|
|
12571
13028
|
};
|
|
@@ -12583,29 +13040,43 @@ var __publicField = (obj, key, value) => {
|
|
|
12583
13040
|
return {
|
|
12584
13041
|
key: "storage",
|
|
12585
13042
|
path: ["spec", "resources", "requests", "storage"],
|
|
12586
|
-
title: i18n2.t("dovetail.
|
|
12587
|
-
renderContent(value2) {
|
|
12588
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
13043
|
+
title: i18n2.t("dovetail.distributed"),
|
|
13044
|
+
renderContent(value2, pvc2) {
|
|
13045
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(PVCDistributeStorage, { pvc: pvc2, editable: true });
|
|
12589
13046
|
}
|
|
12590
13047
|
};
|
|
12591
13048
|
};
|
|
13049
|
+
const PVRefField = (i18n2) => {
|
|
13050
|
+
return {
|
|
13051
|
+
key: "pv",
|
|
13052
|
+
path: ["pv"],
|
|
13053
|
+
title: i18n2.t("dovetail.pv")
|
|
13054
|
+
};
|
|
13055
|
+
};
|
|
12592
13056
|
const PVStorageClassField = (i18n2) => {
|
|
12593
13057
|
return {
|
|
12594
13058
|
key: "storageClass",
|
|
12595
13059
|
path: ["spec", "storageClassName"],
|
|
12596
13060
|
title: i18n2.t("dovetail.storage_class"),
|
|
12597
13061
|
renderContent(value2) {
|
|
12598
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
13062
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
13063
|
+
ResourceLink,
|
|
13064
|
+
{
|
|
13065
|
+
resourceKind: "storageclasses",
|
|
13066
|
+
namespace: "",
|
|
13067
|
+
name: value2
|
|
13068
|
+
}
|
|
13069
|
+
);
|
|
12599
13070
|
}
|
|
12600
13071
|
};
|
|
12601
13072
|
};
|
|
12602
13073
|
const PVPhaseField = (i18n2) => {
|
|
12603
13074
|
return {
|
|
12604
13075
|
key: "phase",
|
|
12605
|
-
path: ["
|
|
12606
|
-
title: i18n2.t("dovetail.
|
|
13076
|
+
path: ["stateDisplay"],
|
|
13077
|
+
title: i18n2.t("dovetail.state"),
|
|
12607
13078
|
renderContent(value2) {
|
|
12608
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
13079
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(StateTag, { state: value2, resourceKind: "PersistentVolume", hideBackground: true });
|
|
12609
13080
|
}
|
|
12610
13081
|
};
|
|
12611
13082
|
};
|
|
@@ -12623,7 +13094,99 @@ var __publicField = (obj, key, value) => {
|
|
|
12623
13094
|
return {
|
|
12624
13095
|
key: "accessMode",
|
|
12625
13096
|
path: ["spec", "accessModes"],
|
|
12626
|
-
title: i18n2.t("dovetail.access_mode")
|
|
13097
|
+
title: i18n2.t("dovetail.access_mode"),
|
|
13098
|
+
renderContent(value2) {
|
|
13099
|
+
return value2.join(", ");
|
|
13100
|
+
}
|
|
13101
|
+
};
|
|
13102
|
+
};
|
|
13103
|
+
const PVCPodsField = () => {
|
|
13104
|
+
return {
|
|
13105
|
+
key: "pods",
|
|
13106
|
+
path: [],
|
|
13107
|
+
renderContent: (_, record) => {
|
|
13108
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
13109
|
+
WorkloadPodsTable,
|
|
13110
|
+
{
|
|
13111
|
+
filter: (item) => {
|
|
13112
|
+
var _a, _b;
|
|
13113
|
+
return !!((_b = (_a = item.spec) == null ? void 0 : _a.volumes) == null ? void 0 : _b.some((v) => {
|
|
13114
|
+
var _a2;
|
|
13115
|
+
return ((_a2 = v.persistentVolumeClaim) == null ? void 0 : _a2.claimName) === record.metadata.name;
|
|
13116
|
+
}));
|
|
13117
|
+
},
|
|
13118
|
+
namespace: record.metadata.namespace,
|
|
13119
|
+
hideToolbar: true
|
|
13120
|
+
}
|
|
13121
|
+
);
|
|
13122
|
+
}
|
|
13123
|
+
};
|
|
13124
|
+
};
|
|
13125
|
+
const PVCRefField = (i18n2) => {
|
|
13126
|
+
return {
|
|
13127
|
+
key: "pvc",
|
|
13128
|
+
path: ["pvc"],
|
|
13129
|
+
title: i18n2.t("dovetail.pvc"),
|
|
13130
|
+
renderContent(value2, pvc2) {
|
|
13131
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
13132
|
+
ResourceLink,
|
|
13133
|
+
{
|
|
13134
|
+
resourceKind: "persistentvolumeclaims",
|
|
13135
|
+
namespace: pvc2.pvcNamespace || "default",
|
|
13136
|
+
name: value2
|
|
13137
|
+
}
|
|
13138
|
+
);
|
|
13139
|
+
}
|
|
13140
|
+
};
|
|
13141
|
+
};
|
|
13142
|
+
const PVCSIRefField = (i18n2) => {
|
|
13143
|
+
return {
|
|
13144
|
+
key: "csi",
|
|
13145
|
+
path: ["csi"],
|
|
13146
|
+
title: i18n2.t("dovetail.csi")
|
|
13147
|
+
};
|
|
13148
|
+
};
|
|
13149
|
+
const IsDefaultSCField = (i18n2) => {
|
|
13150
|
+
return {
|
|
13151
|
+
key: "isDefaultSC",
|
|
13152
|
+
path: ["isDefaultSC"],
|
|
13153
|
+
title: i18n2.t("dovetail.default_sc"),
|
|
13154
|
+
renderContent(val) {
|
|
13155
|
+
return val ? i18n2.t("dovetail.true") : i18n2.t("dovetail.false");
|
|
13156
|
+
}
|
|
13157
|
+
};
|
|
13158
|
+
};
|
|
13159
|
+
const SCReclaimPolicyField = (i18n2) => {
|
|
13160
|
+
return {
|
|
13161
|
+
key: "reclaimPolicy",
|
|
13162
|
+
path: ["reclaimPolicy"],
|
|
13163
|
+
title: i18n2.t("dovetail.reclaim_policy"),
|
|
13164
|
+
renderContent(val) {
|
|
13165
|
+
const map = {
|
|
13166
|
+
Delete: i18n2.t("dovetail.delete"),
|
|
13167
|
+
Retain: i18n2.t("dovetail.retain")
|
|
13168
|
+
};
|
|
13169
|
+
return map[val] || val;
|
|
13170
|
+
}
|
|
13171
|
+
};
|
|
13172
|
+
};
|
|
13173
|
+
const IsSCAllowVolumeExpansionField = (i18n2) => {
|
|
13174
|
+
return {
|
|
13175
|
+
key: "allowVolumeExpansion",
|
|
13176
|
+
path: ["allowVolumeExpansion"],
|
|
13177
|
+
title: i18n2.t("dovetail.allow_expand"),
|
|
13178
|
+
renderContent(val) {
|
|
13179
|
+
return val ? i18n2.t("dovetail.support") : i18n2.t("dovetail.not_support");
|
|
13180
|
+
}
|
|
13181
|
+
};
|
|
13182
|
+
};
|
|
13183
|
+
const ResourceTableField = (resource, useTableParams) => {
|
|
13184
|
+
return {
|
|
13185
|
+
key: resource,
|
|
13186
|
+
path: [],
|
|
13187
|
+
renderContent() {
|
|
13188
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(ResourceTable, { resource, useTableParams });
|
|
13189
|
+
}
|
|
12627
13190
|
};
|
|
12628
13191
|
};
|
|
12629
13192
|
function __rest(s2, e2) {
|
|
@@ -18661,7 +19224,7 @@ var __publicField = (obj, key, value) => {
|
|
|
18661
19224
|
}) => {
|
|
18662
19225
|
const { i18n: i18n2 } = useTranslation();
|
|
18663
19226
|
const component = React.useContext(ComponentContext);
|
|
18664
|
-
const
|
|
19227
|
+
const Table2 = component.Table || Table$1;
|
|
18665
19228
|
const currentSize = 10;
|
|
18666
19229
|
const columns = React.useMemo(
|
|
18667
19230
|
() => [
|
|
@@ -18756,7 +19319,7 @@ var __publicField = (obj, key, value) => {
|
|
|
18756
19319
|
);
|
|
18757
19320
|
}
|
|
18758
19321
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
18759
|
-
|
|
19322
|
+
Table2,
|
|
18760
19323
|
{
|
|
18761
19324
|
tableKey: "podContainers",
|
|
18762
19325
|
loading: false,
|
|
@@ -18777,18 +19340,17 @@ var __publicField = (obj, key, value) => {
|
|
|
18777
19340
|
upAreas = [],
|
|
18778
19341
|
downAreas = [],
|
|
18779
19342
|
basicFields = []
|
|
18780
|
-
} = {}) => ({
|
|
19343
|
+
} = {}, isShowNamespace = true) => ({
|
|
18781
19344
|
title: i18n2.t("dovetail.basic_info"),
|
|
18782
19345
|
areas: [
|
|
18783
19346
|
...upAreas,
|
|
18784
19347
|
{
|
|
18785
|
-
fields: [
|
|
18786
|
-
NamespaceField(i18n2),
|
|
19348
|
+
fields: (isShowNamespace ? [NamespaceField(i18n2)] : []).concat([
|
|
18787
19349
|
...basicFields,
|
|
18788
19350
|
LabelsField(i18n2),
|
|
18789
19351
|
AnnotationsField(i18n2),
|
|
18790
19352
|
AgeField(i18n2)
|
|
18791
|
-
]
|
|
19353
|
+
])
|
|
18792
19354
|
},
|
|
18793
19355
|
...downAreas
|
|
18794
19356
|
]
|
|
@@ -18832,6 +19394,14 @@ var __publicField = (obj, key, value) => {
|
|
|
18832
19394
|
}
|
|
18833
19395
|
]
|
|
18834
19396
|
});
|
|
19397
|
+
const PVCPodsGroup = () => ({
|
|
19398
|
+
title: "Pod",
|
|
19399
|
+
areas: [
|
|
19400
|
+
{
|
|
19401
|
+
fields: [PVCPodsField()]
|
|
19402
|
+
}
|
|
19403
|
+
]
|
|
19404
|
+
});
|
|
18835
19405
|
const ConditionsGroup = (i18n2) => ({
|
|
18836
19406
|
title: i18n2.t("dovetail.condition"),
|
|
18837
19407
|
areas: [
|
|
@@ -18840,6 +19410,14 @@ var __publicField = (obj, key, value) => {
|
|
|
18840
19410
|
}
|
|
18841
19411
|
]
|
|
18842
19412
|
});
|
|
19413
|
+
const NodeTaintsGroup = (i18n2) => ({
|
|
19414
|
+
title: i18n2.t("dovetail.taint"),
|
|
19415
|
+
areas: [
|
|
19416
|
+
{
|
|
19417
|
+
fields: [NodeTaintsField()]
|
|
19418
|
+
}
|
|
19419
|
+
]
|
|
19420
|
+
});
|
|
18843
19421
|
const SecretDataGroup = () => ({
|
|
18844
19422
|
areas: [
|
|
18845
19423
|
{
|
|
@@ -18939,6 +19517,14 @@ var __publicField = (obj, key, value) => {
|
|
|
18939
19517
|
}
|
|
18940
19518
|
]
|
|
18941
19519
|
});
|
|
19520
|
+
const ResourceTableGroup = (resource, title) => ({
|
|
19521
|
+
title,
|
|
19522
|
+
areas: [
|
|
19523
|
+
{
|
|
19524
|
+
fields: [ResourceTableField(resource)]
|
|
19525
|
+
}
|
|
19526
|
+
]
|
|
19527
|
+
});
|
|
18942
19528
|
const PageShow = (props) => {
|
|
18943
19529
|
var _a;
|
|
18944
19530
|
const parsed = core.useParsed();
|
|
@@ -32669,7 +33255,6 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
32669
33255
|
})]
|
|
32670
33256
|
});
|
|
32671
33257
|
});
|
|
32672
|
-
const GlobalStoreContext = React.createContext({});
|
|
32673
33258
|
var buffer = {};
|
|
32674
33259
|
var base64Js = {};
|
|
32675
33260
|
base64Js.byteLength = byteLength;
|
|
@@ -35126,13 +35711,7 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
35126
35711
|
tableProps,
|
|
35127
35712
|
contentClassName
|
|
35128
35713
|
} = props;
|
|
35129
|
-
|
|
35130
|
-
Table: TableComponent
|
|
35131
|
-
} = React.useContext(ComponentContext);
|
|
35132
|
-
const {
|
|
35133
|
-
t: t2
|
|
35134
|
-
} = useTranslation();
|
|
35135
|
-
const Table$1 = TableComponent || Table;
|
|
35714
|
+
useTranslation();
|
|
35136
35715
|
const {
|
|
35137
35716
|
resource
|
|
35138
35717
|
} = core.useResource();
|
|
@@ -35143,6 +35722,7 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
35143
35722
|
children: [!config.hideListToolBar ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
|
|
35144
35723
|
children: [/* @__PURE__ */ jsxRuntimeExports.jsx(TableToolBar, {
|
|
35145
35724
|
selectedKeys,
|
|
35725
|
+
title: config == null ? void 0 : config.displayName,
|
|
35146
35726
|
description: config == null ? void 0 : config.description
|
|
35147
35727
|
}), /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Divider, {
|
|
35148
35728
|
style: {
|
|
@@ -35154,23 +35734,21 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
35154
35734
|
})]
|
|
35155
35735
|
}) : void 0, /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
|
|
35156
35736
|
className: cx_default(ListContentStyle, contentClassName),
|
|
35737
|
+
style: config.hideNamespacesFilter ? {
|
|
35738
|
+
paddingTop: 0
|
|
35739
|
+
} : {},
|
|
35157
35740
|
children: [!config.hideNamespacesFilter ? /* @__PURE__ */ jsxRuntimeExports.jsx(NamespacesFilter, {
|
|
35158
35741
|
className: NamespaceFilterStyle
|
|
35159
35742
|
}) : void 0, /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
35160
35743
|
className: TableStyle,
|
|
35161
|
-
children:
|
|
35162
|
-
|
|
35163
|
-
|
|
35164
|
-
|
|
35165
|
-
|
|
35166
|
-
|
|
35167
|
-
|
|
35168
|
-
|
|
35169
|
-
}),
|
|
35170
|
-
className: cx_default(tableProps.className),
|
|
35171
|
-
scroll: {
|
|
35172
|
-
y: "calc(100% - 48px)"
|
|
35173
|
-
}
|
|
35744
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Table, {
|
|
35745
|
+
tableProps: {
|
|
35746
|
+
...tableProps,
|
|
35747
|
+
scroll: {
|
|
35748
|
+
y: "calc(100% - 48px)"
|
|
35749
|
+
}
|
|
35750
|
+
},
|
|
35751
|
+
displayName: (config == null ? void 0 : config.displayName) || config.kind
|
|
35174
35752
|
})
|
|
35175
35753
|
})]
|
|
35176
35754
|
})]
|
|
@@ -37443,6 +38021,7 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
37443
38021
|
refineCoreProps,
|
|
37444
38022
|
warnWhenUnsavedChanges: warnWhenUnsavedChangesProp,
|
|
37445
38023
|
disableServerSideValidation: disableServerSideValidationProp = false,
|
|
38024
|
+
transformApplyValues,
|
|
37446
38025
|
...rest
|
|
37447
38026
|
} = {}) => {
|
|
37448
38027
|
const { options } = core.useRefineContext();
|
|
@@ -37544,7 +38123,10 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
37544
38123
|
const saveButtonProps = {
|
|
37545
38124
|
disabled: formLoading,
|
|
37546
38125
|
onClick: (e2) => {
|
|
37547
|
-
handleSubmit(
|
|
38126
|
+
handleSubmit(
|
|
38127
|
+
(v) => onFinish(transformApplyValues ? transformApplyValues(v) : v),
|
|
38128
|
+
() => false
|
|
38129
|
+
)(e2);
|
|
37548
38130
|
}
|
|
37549
38131
|
};
|
|
37550
38132
|
return {
|
|
@@ -37555,7 +38137,7 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
37555
38137
|
};
|
|
37556
38138
|
};
|
|
37557
38139
|
const useRefineForm = (props) => {
|
|
37558
|
-
var _a;
|
|
38140
|
+
var _a, _b;
|
|
37559
38141
|
const { config, id, refineProps } = props;
|
|
37560
38142
|
const [responseErrorMsg, setResponseErrorMsg] = React.useState("");
|
|
37561
38143
|
const i18n2 = useTranslation();
|
|
@@ -37586,15 +38168,16 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
37586
38168
|
...refineProps
|
|
37587
38169
|
},
|
|
37588
38170
|
defaultValues: config == null ? void 0 : config.initValue,
|
|
37589
|
-
|
|
38171
|
+
transformApplyValues: (_a = config.formConfig) == null ? void 0 : _a.transformApplyValues,
|
|
38172
|
+
...(_b = config.formConfig) == null ? void 0 : _b.useFormProps
|
|
37590
38173
|
});
|
|
37591
38174
|
React.useEffect(() => {
|
|
37592
|
-
var _a2,
|
|
38175
|
+
var _a2, _b2;
|
|
37593
38176
|
const response = (_a2 = result.refineCore.mutationResult.error) == null ? void 0 : _a2.response;
|
|
37594
38177
|
if (response && !(response == null ? void 0 : response.bodyUsed)) {
|
|
37595
|
-
(
|
|
37596
|
-
var _a3,
|
|
37597
|
-
setResponseErrorMsg(((
|
|
38178
|
+
(_b2 = response.json) == null ? void 0 : _b2.call(response).then((body) => {
|
|
38179
|
+
var _a3, _b3;
|
|
38180
|
+
setResponseErrorMsg(((_b3 = (_a3 = config.formConfig) == null ? void 0 : _a3.formatError) == null ? void 0 : _b3.call(_a3, body)) || body.message);
|
|
37598
38181
|
});
|
|
37599
38182
|
}
|
|
37600
38183
|
}, [config.formConfig, result]);
|
|
@@ -38399,12 +38982,13 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
38399
38982
|
});
|
|
38400
38983
|
const yamlFormProps = React.useMemo(() => {
|
|
38401
38984
|
var _a2, _b2, _c2;
|
|
38985
|
+
const transformApplyValues = ((_a2 = config.formConfig) == null ? void 0 : _a2.transformApplyValues) || ((v) => v);
|
|
38402
38986
|
return {
|
|
38403
38987
|
...props.formProps,
|
|
38404
|
-
transformInitValues: (
|
|
38405
|
-
transformApplyValues
|
|
38406
|
-
initialValuesForCreate: isYamlMode ? refineFormResult.formResult.getValues() : ((_c2 = props.formProps) == null ? void 0 : _c2.initialValuesForCreate) || (config == null ? void 0 : config.initValue),
|
|
38407
|
-
initialValuesForEdit: isYamlMode ? refineFormResult.formResult.getValues() : void 0,
|
|
38988
|
+
transformInitValues: (_b2 = config.formConfig) == null ? void 0 : _b2.transformInitValues,
|
|
38989
|
+
transformApplyValues,
|
|
38990
|
+
initialValuesForCreate: isYamlMode ? transformApplyValues(refineFormResult.formResult.getValues()) : ((_c2 = props.formProps) == null ? void 0 : _c2.initialValuesForCreate) || (config == null ? void 0 : config.initValue),
|
|
38991
|
+
initialValuesForEdit: isYamlMode ? transformApplyValues(refineFormResult.formResult.getValues()) : void 0,
|
|
38408
38992
|
id,
|
|
38409
38993
|
action,
|
|
38410
38994
|
isShowLayout: false,
|
|
@@ -38476,10 +39060,11 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
38476
39060
|
if (typeof ((_c2 = config.formConfig) == null ? void 0 : _c2.formTitle) === "function") {
|
|
38477
39061
|
return (_d2 = config.formConfig) == null ? void 0 : _d2.formTitle(action);
|
|
38478
39062
|
}
|
|
39063
|
+
const label2 = config.displayName || (config == null ? void 0 : config.kind);
|
|
38479
39064
|
return i18n2.t(id ? "dovetail.edit_resource" : "dovetail.create_resource", {
|
|
38480
|
-
resource:
|
|
39065
|
+
resource: /^[a-zA-Z]/.test(label2) ? ` ${label2}` : label2
|
|
38481
39066
|
});
|
|
38482
|
-
}, [action, config.formConfig, config == null ? void 0 : config.kind, i18n2, id]);
|
|
39067
|
+
}, [action, config.formConfig, config.displayName, config == null ? void 0 : config.kind, i18n2, id]);
|
|
38483
39068
|
const desc = React.useMemo(() => {
|
|
38484
39069
|
var _a2, _b2, _c2, _d2;
|
|
38485
39070
|
if (typeof ((_a2 = config.formConfig) == null ? void 0 : _a2.formDesc) === "string")
|
|
@@ -38530,6 +39115,12 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
38530
39115
|
children: [desc ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
38531
39116
|
className: FormDescStyle,
|
|
38532
39117
|
children: desc
|
|
39118
|
+
}) : void 0, !isYamlForm && mode === "form" ? /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Alert, {
|
|
39119
|
+
type: "warning",
|
|
39120
|
+
message: i18n2.t("dovetail.change_form_mode_alert"),
|
|
39121
|
+
style: {
|
|
39122
|
+
marginBottom: "16px"
|
|
39123
|
+
}
|
|
38533
39124
|
}) : void 0, formEle]
|
|
38534
39125
|
});
|
|
38535
39126
|
}
|
|
@@ -38842,8 +39433,8 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
38842
39433
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
38843
39434
|
ResourceLink,
|
|
38844
39435
|
{
|
|
38845
|
-
|
|
38846
|
-
|
|
39436
|
+
name: ownerReference.name,
|
|
39437
|
+
resourceKind: resource.name || "",
|
|
38847
39438
|
namespace: namespace2
|
|
38848
39439
|
}
|
|
38849
39440
|
);
|
|
@@ -38897,9 +39488,9 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
38897
39488
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
38898
39489
|
ResourceLink,
|
|
38899
39490
|
{
|
|
38900
|
-
|
|
39491
|
+
resourceKind: "services",
|
|
38901
39492
|
namespace: ingress.metadata.namespace || "default",
|
|
38902
|
-
|
|
39493
|
+
name: r2.serviceName
|
|
38903
39494
|
}
|
|
38904
39495
|
),
|
|
38905
39496
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { children: [
|
|
@@ -39472,7 +40063,7 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
39472
40063
|
key: "storage",
|
|
39473
40064
|
display: true,
|
|
39474
40065
|
dataIndex: ["spec", "resources", "requests", "storage"],
|
|
39475
|
-
title: i18n2.t("dovetail.
|
|
40066
|
+
title: i18n2.t("dovetail.distributed"),
|
|
39476
40067
|
width: 120,
|
|
39477
40068
|
sortable: true,
|
|
39478
40069
|
align: "right",
|
|
@@ -39484,19 +40075,29 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
39484
40075
|
}
|
|
39485
40076
|
};
|
|
39486
40077
|
};
|
|
40078
|
+
const PVRefColumnRenderer = (i18n2) => {
|
|
40079
|
+
return {
|
|
40080
|
+
key: "pv",
|
|
40081
|
+
display: true,
|
|
40082
|
+
dataIndex: ["pv"],
|
|
40083
|
+
title: i18n2.t("dovetail.pv"),
|
|
40084
|
+
width: 160,
|
|
40085
|
+
sortable: true
|
|
40086
|
+
};
|
|
40087
|
+
};
|
|
39487
40088
|
const PVStorageClassColumnRenderer = (i18n2) => {
|
|
39488
40089
|
return {
|
|
39489
40090
|
key: "storageClass",
|
|
39490
40091
|
display: true,
|
|
39491
40092
|
dataIndex: ["spec", "storageClassName"],
|
|
39492
40093
|
title: i18n2.t("dovetail.storage_class"),
|
|
39493
|
-
width:
|
|
40094
|
+
width: 160,
|
|
39494
40095
|
sortable: true,
|
|
39495
40096
|
render(value2) {
|
|
39496
40097
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(ResourceLink, {
|
|
39497
|
-
|
|
40098
|
+
resourceKind: "storageclasses",
|
|
39498
40099
|
namespace: "",
|
|
39499
|
-
|
|
40100
|
+
name: value2
|
|
39500
40101
|
});
|
|
39501
40102
|
}
|
|
39502
40103
|
};
|
|
@@ -39505,17 +40106,46 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
39505
40106
|
return {
|
|
39506
40107
|
key: "phase",
|
|
39507
40108
|
display: true,
|
|
39508
|
-
dataIndex: ["
|
|
39509
|
-
title: i18n2.t("dovetail.
|
|
40109
|
+
dataIndex: ["stateDisplay"],
|
|
40110
|
+
title: i18n2.t("dovetail.state"),
|
|
39510
40111
|
width: 120,
|
|
39511
40112
|
sortable: true,
|
|
39512
40113
|
render(value2) {
|
|
39513
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
39514
|
-
|
|
40114
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(StateTag, {
|
|
40115
|
+
state: value2,
|
|
40116
|
+
resourceKind: "PersistentVolume",
|
|
40117
|
+
hideBackground: true
|
|
39515
40118
|
});
|
|
39516
40119
|
}
|
|
39517
40120
|
};
|
|
39518
40121
|
};
|
|
40122
|
+
const PVCRefColumnRenderer = (i18n2) => {
|
|
40123
|
+
return {
|
|
40124
|
+
key: "pvc",
|
|
40125
|
+
display: true,
|
|
40126
|
+
dataIndex: ["pvc"],
|
|
40127
|
+
title: i18n2.t("dovetail.pvc"),
|
|
40128
|
+
width: 160,
|
|
40129
|
+
sortable: true,
|
|
40130
|
+
render(value2, pv2) {
|
|
40131
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(ResourceLink, {
|
|
40132
|
+
resourceKind: "persistentvolumeclaims",
|
|
40133
|
+
namespace: pv2.pvcNamespace || "default",
|
|
40134
|
+
name: value2
|
|
40135
|
+
});
|
|
40136
|
+
}
|
|
40137
|
+
};
|
|
40138
|
+
};
|
|
40139
|
+
const PVCSIRefColumnRenderer = (i18n2) => {
|
|
40140
|
+
return {
|
|
40141
|
+
key: "csi",
|
|
40142
|
+
display: true,
|
|
40143
|
+
dataIndex: ["csi"],
|
|
40144
|
+
title: i18n2.t("dovetail.csi"),
|
|
40145
|
+
width: 160,
|
|
40146
|
+
sortable: true
|
|
40147
|
+
};
|
|
40148
|
+
};
|
|
39519
40149
|
const PVVolumeModeColumnRenderer = (i18n2) => {
|
|
39520
40150
|
return {
|
|
39521
40151
|
key: "mode",
|
|
@@ -39538,7 +40168,58 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
39538
40168
|
dataIndex: ["spec", "accessModes"],
|
|
39539
40169
|
title: i18n2.t("dovetail.access_mode"),
|
|
39540
40170
|
width: 120,
|
|
39541
|
-
sortable: true
|
|
40171
|
+
sortable: true,
|
|
40172
|
+
render(value2) {
|
|
40173
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
|
|
40174
|
+
style: {
|
|
40175
|
+
whiteSpace: "pre-wrap"
|
|
40176
|
+
},
|
|
40177
|
+
children: value2.join("\n")
|
|
40178
|
+
});
|
|
40179
|
+
}
|
|
40180
|
+
};
|
|
40181
|
+
};
|
|
40182
|
+
const IsDefaultSCColumnRenderer = (i18n2) => {
|
|
40183
|
+
return {
|
|
40184
|
+
key: "isDefaultSC",
|
|
40185
|
+
display: true,
|
|
40186
|
+
dataIndex: ["isDefaultSC"],
|
|
40187
|
+
title: i18n2.t("dovetail.default_sc"),
|
|
40188
|
+
width: 120,
|
|
40189
|
+
sortable: true,
|
|
40190
|
+
render(val) {
|
|
40191
|
+
return val ? i18n2.t("dovetail.true") : i18n2.t("dovetail.false");
|
|
40192
|
+
}
|
|
40193
|
+
};
|
|
40194
|
+
};
|
|
40195
|
+
const SCReclaimPolicyColumnRenderer = (i18n2) => {
|
|
40196
|
+
return {
|
|
40197
|
+
key: "reclaimPolicy",
|
|
40198
|
+
display: true,
|
|
40199
|
+
dataIndex: ["reclaimPolicy"],
|
|
40200
|
+
title: i18n2.t("dovetail.reclaim_policy"),
|
|
40201
|
+
width: 120,
|
|
40202
|
+
sortable: true,
|
|
40203
|
+
render(val) {
|
|
40204
|
+
const map = {
|
|
40205
|
+
Delete: i18n2.t("dovetail.delete"),
|
|
40206
|
+
Retain: i18n2.t("dovetail.retain")
|
|
40207
|
+
};
|
|
40208
|
+
return map[val] || val;
|
|
40209
|
+
}
|
|
40210
|
+
};
|
|
40211
|
+
};
|
|
40212
|
+
const SCAllowExpandColumnRenderer = (i18n2) => {
|
|
40213
|
+
return {
|
|
40214
|
+
key: "allowVolumeExpansion",
|
|
40215
|
+
display: true,
|
|
40216
|
+
dataIndex: ["allowVolumeExpansion"],
|
|
40217
|
+
title: i18n2.t("dovetail.allow_expand"),
|
|
40218
|
+
width: 120,
|
|
40219
|
+
sortable: true,
|
|
40220
|
+
render(val) {
|
|
40221
|
+
return val ? i18n2.t("dovetail.support") : i18n2.t("dovetail.not_support");
|
|
40222
|
+
}
|
|
39542
40223
|
};
|
|
39543
40224
|
};
|
|
39544
40225
|
const styles = "";
|
|
@@ -39875,6 +40556,9 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
39875
40556
|
exports2.IngressRulesGroup = IngressRulesGroup;
|
|
39876
40557
|
exports2.IngressRulesTableTabField = IngressRulesTableTabField;
|
|
39877
40558
|
exports2.IngressTlsColumnRenderer = IngressTlsColumnRenderer;
|
|
40559
|
+
exports2.IsDefaultSCColumnRenderer = IsDefaultSCColumnRenderer;
|
|
40560
|
+
exports2.IsDefaultSCField = IsDefaultSCField;
|
|
40561
|
+
exports2.IsSCAllowVolumeExpansionField = IsSCAllowVolumeExpansionField;
|
|
39878
40562
|
exports2.JOB_INIT_VALUE = JOB_INIT_VALUE;
|
|
39879
40563
|
exports2.JobModel = JobModel;
|
|
39880
40564
|
exports2.JobsField = JobsField;
|
|
@@ -39906,21 +40590,32 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
39906
40590
|
exports2.NodeModel = NodeModel;
|
|
39907
40591
|
exports2.NodeNameColumnRenderer = NodeNameColumnRenderer;
|
|
39908
40592
|
exports2.NodeRole = NodeRole;
|
|
40593
|
+
exports2.NodeTaintsField = NodeTaintsField;
|
|
40594
|
+
exports2.NodeTaintsGroup = NodeTaintsGroup;
|
|
39909
40595
|
exports2.POD_INIT_VALUE = POD_INIT_VALUE;
|
|
39910
40596
|
exports2.PVAccessModeColumnRenderer = PVAccessModeColumnRenderer;
|
|
39911
40597
|
exports2.PVAccessModeField = PVAccessModeField;
|
|
40598
|
+
exports2.PVCPodsField = PVCPodsField;
|
|
40599
|
+
exports2.PVCPodsGroup = PVCPodsGroup;
|
|
40600
|
+
exports2.PVCRefColumnRenderer = PVCRefColumnRenderer;
|
|
40601
|
+
exports2.PVCRefField = PVCRefField;
|
|
40602
|
+
exports2.PVCSIRefColumnRenderer = PVCSIRefColumnRenderer;
|
|
40603
|
+
exports2.PVCSIRefField = PVCSIRefField;
|
|
39912
40604
|
exports2.PVCStorageColumnRenderer = PVCStorageColumnRenderer;
|
|
39913
40605
|
exports2.PVCStorageField = PVCStorageField;
|
|
40606
|
+
exports2.PVC_INIT_VALUE = PVC_INIT_VALUE;
|
|
39914
40607
|
exports2.PVCapacityColumnRenderer = PVCapacityColumnRenderer;
|
|
39915
40608
|
exports2.PVCapacityField = PVCapacityField;
|
|
39916
40609
|
exports2.PVPhaseColumnRenderer = PVPhaseColumnRenderer;
|
|
39917
|
-
exports2.PVPhaseDisplay = PVPhaseDisplay;
|
|
39918
40610
|
exports2.PVPhaseField = PVPhaseField;
|
|
40611
|
+
exports2.PVRefColumnRenderer = PVRefColumnRenderer;
|
|
40612
|
+
exports2.PVRefField = PVRefField;
|
|
39919
40613
|
exports2.PVStorageClassColumnRenderer = PVStorageClassColumnRenderer;
|
|
39920
40614
|
exports2.PVStorageClassField = PVStorageClassField;
|
|
39921
40615
|
exports2.PVVolumeModeColumnRenderer = PVVolumeModeColumnRenderer;
|
|
39922
40616
|
exports2.PVVolumeModeDisplay = PVVolumeModeDisplay;
|
|
39923
40617
|
exports2.PVVolumeModeField = PVVolumeModeField;
|
|
40618
|
+
exports2.PV_INIT_VALUE = PV_INIT_VALUE;
|
|
39924
40619
|
exports2.PageShow = PageShow;
|
|
39925
40620
|
exports2.PersistentVolumeClaimModel = PersistentVolumeClaimModel;
|
|
39926
40621
|
exports2.PersistentVolumeModel = PersistentVolumeModel;
|
|
@@ -39961,8 +40656,15 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
39961
40656
|
exports2.ResourceModel = ResourceModel;
|
|
39962
40657
|
exports2.ResourceSelect = ResourceSelect;
|
|
39963
40658
|
exports2.ResourceShow = ResourceShow;
|
|
40659
|
+
exports2.ResourceState = ResourceState;
|
|
40660
|
+
exports2.ResourceTable = ResourceTable;
|
|
40661
|
+
exports2.ResourceTableField = ResourceTableField;
|
|
40662
|
+
exports2.ResourceTableGroup = ResourceTableGroup;
|
|
39964
40663
|
exports2.ResourceUsageBar = ResourceUsageBar;
|
|
39965
40664
|
exports2.RestartCountColumnRenderer = RestartCountColumnRenderer;
|
|
40665
|
+
exports2.SCAllowExpandColumnRenderer = SCAllowExpandColumnRenderer;
|
|
40666
|
+
exports2.SCReclaimPolicyColumnRenderer = SCReclaimPolicyColumnRenderer;
|
|
40667
|
+
exports2.SCReclaimPolicyField = SCReclaimPolicyField;
|
|
39966
40668
|
exports2.SECRET_BASIC_AUTH_INIT_VALUE = SECRET_BASIC_AUTH_INIT_VALUE;
|
|
39967
40669
|
exports2.SECRET_CUSTOM_INIT_VALUE = SECRET_CUSTOM_INIT_VALUE;
|
|
39968
40670
|
exports2.SECRET_IMAGE_REPO_INIT_VALUE = SECRET_IMAGE_REPO_INIT_VALUE;
|
|
@@ -40003,12 +40705,12 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
40003
40705
|
exports2.StartTimeField = StartTimeField;
|
|
40004
40706
|
exports2.StateDisplayColumnRenderer = StateDisplayColumnRenderer;
|
|
40005
40707
|
exports2.StateTag = StateTag;
|
|
40006
|
-
exports2.StateTagStyle = StateTagStyle;
|
|
40007
40708
|
exports2.StatefulSetModel = StatefulSetModel;
|
|
40008
40709
|
exports2.StorageClassModel = StorageClassModel;
|
|
40009
40710
|
exports2.StorageClassProvisionerField = StorageClassProvisionerField;
|
|
40010
40711
|
exports2.StorageClassPvField = StorageClassPvField;
|
|
40011
40712
|
exports2.StorageClassPvGroup = StorageClassPvGroup;
|
|
40713
|
+
exports2.Table = Table;
|
|
40012
40714
|
exports2.Tabs = Tabs;
|
|
40013
40715
|
exports2.Tags = Tags;
|
|
40014
40716
|
exports2.TextTags = TextTags;
|
|
@@ -40022,7 +40724,6 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
40022
40724
|
exports2.WorkloadReplicas = WorkloadReplicas;
|
|
40023
40725
|
exports2.WorkloadReplicasForm = WorkloadReplicasForm;
|
|
40024
40726
|
exports2.WorkloadRestartsColumnRenderer = WorkloadRestartsColumnRenderer;
|
|
40025
|
-
exports2.WorkloadState = WorkloadState;
|
|
40026
40727
|
exports2.YamlEditorComponent = YamlEditorComponent;
|
|
40027
40728
|
exports2.YamlForm = YamlForm;
|
|
40028
40729
|
exports2.addDefaultRenderToColumns = addDefaultRenderToColumns;
|