@dovetail-v2/refine 0.1.9 → 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.
Files changed (48) hide show
  1. package/dist/{MonacoYamlDiffEditor-0f76e977.js → MonacoYamlDiffEditor-effbc940.js} +1 -1
  2. package/dist/{index-aacb414b.js → index-a2e0edc2.js} +1435 -1163
  3. package/dist/refine.js +207 -203
  4. package/dist/refine.umd.cjs +1229 -957
  5. package/dist/style.css +44 -44
  6. package/lib/components/CreateButton/index.d.ts +5 -1
  7. package/lib/components/DropdownMenuItems/EditNodeTaintDropdownMenuItem.d.ts +12 -0
  8. package/lib/components/{CronJobDropdown → Dropdowns/CronJobDropdown}/index.d.ts +1 -1
  9. package/lib/components/{K8sDropdown → Dropdowns/K8sDropdown}/index.d.ts +1 -1
  10. package/lib/components/{PodDropdown → Dropdowns/PodDropdown}/index.d.ts +1 -1
  11. package/lib/components/{ReplicasDropdown → Dropdowns/ReplicasDropdown}/index.d.ts +1 -1
  12. package/lib/components/{WorkloadDropdown → Dropdowns/WorkloadDropdown}/index.d.ts +1 -1
  13. package/lib/components/EditField/index.d.ts +1 -1
  14. package/lib/components/EditMetadataForm/EditNodeTaintForm.d.ts +12 -0
  15. package/lib/components/InternalBaseTable/index.d.ts +43 -0
  16. package/lib/components/ListPage/index.d.ts +2 -2
  17. package/lib/components/NodeTaintsTable/NodeTaintsTable.d.ts +7 -0
  18. package/lib/components/NodeTaintsTable/index.d.ts +1 -0
  19. package/lib/components/PVCDistributeStorage/index.d.ts +1 -1
  20. package/lib/components/ResourceFiledDisplays.d.ts +2 -3
  21. package/lib/components/ResourceLink/index.d.ts +2 -2
  22. package/lib/components/ShowContent/fields.d.ts +2 -0
  23. package/lib/components/ShowContent/groups.d.ts +4 -2
  24. package/lib/components/StateTag/StateTag.d.ts +3 -3
  25. package/lib/components/Table/index.d.ts +11 -43
  26. package/lib/components/{Table/TableToolBar.d.ts → TableToolbar/index.d.ts} +1 -0
  27. package/lib/components/WorkloadPodsTable/WorkloadPodsTable.d.ts +2 -0
  28. package/lib/components/index.d.ts +6 -5
  29. package/lib/constants/state.d.ts +8 -3
  30. package/lib/contexts/component.d.ts +1 -1
  31. package/lib/hooks/useEagleTable/columns.d.ts +2 -1
  32. package/lib/hooks/useEagleTable/useEagleTable.d.ts +3 -4
  33. package/lib/hooks/useSubmitForm.d.ts +1 -1
  34. package/lib/hooks/useTableData.d.ts +1 -1
  35. package/lib/i18n.d.ts +29 -18
  36. package/lib/locales/zh-CN/index.d.ts +29 -18
  37. package/lib/models/cronjob-model.d.ts +2 -2
  38. package/lib/models/daemonset-model.d.ts +2 -2
  39. package/lib/models/deployment-model.d.ts +2 -2
  40. package/lib/models/job-model.d.ts +2 -2
  41. package/lib/models/node-model.d.ts +2 -2
  42. package/lib/models/persistent-volume-claim.d.ts +2 -0
  43. package/lib/models/persistent-volume.d.ts +3 -0
  44. package/lib/models/statefulset-model.d.ts +2 -2
  45. package/lib/styles/tag.d.ts +1 -0
  46. package/lib/types/resource.d.ts +3 -3
  47. package/package.json +1 -1
  48. /package/lib/components/{Table → InternalBaseTable}/TableWidgets.d.ts +0 -0
@@ -7,12 +7,12 @@ var __publicField = (obj, key2, value2) => {
7
7
  import i18n from "i18next";
8
8
  import * as React from "react";
9
9
  import React__default, { createElement, isValidElement, cloneElement, Children, createContext, useContext, useState, useRef, useEffect, useCallback, useMemo, useImperativeHandle, memo, PureComponent, useLayoutEffect, forwardRef, Suspense } from "react";
10
- import { ResourceContext, matchResourceFromRoute, useResource, useDelete, useNavigation, useBreadcrumb, useList, useParsed, useGo, CanAccess, useUpdate, useCan, useTable, useDeleteMany, useShow, useDataProvider, useRefineContext, useTranslate, useWarnAboutChange, useForm as useForm$2, flattenObjectKeys, pickNotDeprecated, useMenu, Refine } from "@refinedev/core";
10
+ import { ResourceContext, matchResourceFromRoute, useResource, useDelete, useNavigation, useBreadcrumb, useList, CanAccess, useUpdate, useParsed, useGo, useCan, useTable, useDeleteMany, useShow, useDataProvider, useRefineContext, useTranslate, useWarnAboutChange, useForm as useForm$2, flattenObjectKeys, pickNotDeprecated, useMenu, Refine } from "@refinedev/core";
11
11
  import { parse, stringify } from "qs";
12
12
  import { useLocation, useHistory, useParams, matchPath, Link, Route, NavLink, Router } from "react-router-dom";
13
- import { Typo, Tag, Input, Select, AntdOption, Button, Form, Space, TextArea, kitContext, Loading, Table as Table$1, Pagination, OverflowTooltip, StatusCapsule, Tooltip, usePushModal, Alert, usePopModal, Modal, TableForm, Menu as Menu$1, Icon as Icon$1, Dropdown, Divider, Link as Link$1, Tabs as Tabs$1, TabsTabPane, Row, Col, Fields, DonutChart, Units, SegmentControl, Checkbox, DropdownMenu, SearchInput, Token, AntdSelectOptGroup, MenuItemGroup, Layout as Layout$1, Time as Time$1, useMessage, ModalStack, KitStoreProvider, ConfigProvider } from "@cloudtower/eagle";
13
+ import { Typo, Tag, Input, Select, AntdOption, Button, Form, Space, TextArea, kitContext, Loading, Table as Table$2, Pagination, Alert, usePopModal, Modal, usePushModal, Fields, Units, OverflowTooltip, Tooltip, StatusCapsule, TableForm, Menu as Menu$1, Icon as Icon$1, Dropdown, Divider, Link as Link$1, Tabs as Tabs$1, TabsTabPane, Row, Col, DonutChart, SegmentControl, Checkbox, DropdownMenu, SearchInput, Token, AntdSelectOptGroup, MenuItemGroup, Layout as Layout$1, Time as Time$1, useMessage, ModalStack, KitStoreProvider, ConfigProvider } from "@cloudtower/eagle";
14
14
  import { EditPen16BlueIcon, EditPen16PrimaryIcon, Download16GradientBlueIcon, TrashBinDelete16Icon, MoreEllipsis324BoldSecondaryIcon, MoreEllipsis324BoldBlueIcon, MoreEllipsis316BoldBlueIcon, PlusAddCreateNew16BoldOntintIcon, ArrowChevronLeft16BoldTertiaryIcon, ArrowChevronLeftSmall16BoldBlueIcon, EditPen16GradientBlueIcon, ViewEye16GradientGrayIcon, EntityFilterIgnoreGradient16GrayIcon, RecoverContinue16GradientBlueIcon, SuspendedPause16GradientBlueIcon, Retry16GradientBlueIcon, FontSize16GrayIcon, FontSize16BlueIcon, LogCollection16GrayIcon, LogCollection16GradientBlueIcon, TrashBinDeletePermanently16GrayIcon, TrashBinDeletePermanently16BlueIcon, Loading24GradientBlueIcon, OpenTerminal16GradientBlueIcon, HierarchyTriangleRight16GrayIcon, HierarchyTriangleRight16BlueIcon, ClipboardCopy16GradientGrayIcon, ClipboardCopy16GradientBlueIcon, Retry16GradientGrayIcon, EditPen16GradientGrayIcon, Showdiff16GradientGrayIcon, Showdiff16GradientBlueIcon, XmarkFailedSeriousWarningFill16RedIcon, ExclamationErrorCircleFill16RedIcon, Pause16GradientBlueIcon } from "@cloudtower/icons-react";
15
- import { cloneDeep, set as set$1, first, omit as omit$1, merge, get as get$3, debounce, last, isObject as isObject$4, uniq, keyBy } from "lodash-es";
15
+ import { first, isNil, cloneDeep, set as set$1, omit as omit$1, merge, get as get$3, debounce, last, isObject as isObject$4, uniq, keyBy } from "lodash-es";
16
16
  import yaml$1 from "js-yaml";
17
17
  import { paginateData, sortData, dataProvider, liveProvider } from "k8s-api-provider";
18
18
  import * as monaco from "monaco-editor";
@@ -25,308 +25,301 @@ function getDefaultExportFromCjs(x) {
25
25
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
26
26
  }
27
27
  var dayjs_min = { exports: {} };
28
- var hasRequiredDayjs_min;
29
- function requireDayjs_min() {
30
- if (hasRequiredDayjs_min)
31
- return dayjs_min.exports;
32
- hasRequiredDayjs_min = 1;
33
- (function(module, exports) {
34
- !function(t2, e2) {
35
- module.exports = e2();
36
- }(commonjsGlobal, function() {
37
- var t2 = 1e3, e2 = 6e4, n2 = 36e5, r2 = "millisecond", i = "second", s2 = "minute", u = "hour", a2 = "day", o = "week", c2 = "month", f = "quarter", h = "year", d = "date", l = "Invalid Date", $ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(t3) {
38
- var e3 = ["th", "st", "nd", "rd"], n3 = t3 % 100;
39
- return "[" + t3 + (e3[(n3 - 20) % 10] || e3[n3] || e3[0]) + "]";
40
- } }, m = function(t3, e3, n3) {
41
- var r3 = String(t3);
42
- return !r3 || r3.length >= e3 ? t3 : "" + Array(e3 + 1 - r3.length).join(n3) + t3;
43
- }, v = { s: m, z: function(t3) {
44
- var e3 = -t3.utcOffset(), n3 = Math.abs(e3), r3 = Math.floor(n3 / 60), i2 = n3 % 60;
45
- return (e3 <= 0 ? "+" : "-") + m(r3, 2, "0") + ":" + m(i2, 2, "0");
46
- }, m: function t3(e3, n3) {
47
- if (e3.date() < n3.date())
48
- return -t3(n3, e3);
49
- var r3 = 12 * (n3.year() - e3.year()) + (n3.month() - e3.month()), i2 = e3.clone().add(r3, c2), s3 = n3 - i2 < 0, u2 = e3.clone().add(r3 + (s3 ? -1 : 1), c2);
50
- return +(-(r3 + (n3 - i2) / (s3 ? i2 - u2 : u2 - i2)) || 0);
51
- }, a: function(t3) {
52
- return t3 < 0 ? Math.ceil(t3) || 0 : Math.floor(t3);
53
- }, p: function(t3) {
54
- return { M: c2, y: h, w: o, d: a2, D: d, h: u, m: s2, s: i, ms: r2, Q: f }[t3] || String(t3 || "").toLowerCase().replace(/s$/, "");
55
- }, u: function(t3) {
56
- return void 0 === t3;
57
- } }, g = "en", D = {};
58
- D[g] = M;
59
- var p = "$isDayjsObject", S = function(t3) {
60
- return t3 instanceof _ || !(!t3 || !t3[p]);
61
- }, w = function t3(e3, n3, r3) {
62
- var i2;
63
- if (!e3)
64
- return g;
65
- if ("string" == typeof e3) {
66
- var s3 = e3.toLowerCase();
67
- D[s3] && (i2 = s3), n3 && (D[s3] = n3, i2 = s3);
68
- var u2 = e3.split("-");
69
- if (!i2 && u2.length > 1)
70
- return t3(u2[0]);
71
- } else {
72
- var a3 = e3.name;
73
- D[a3] = e3, i2 = a3;
74
- }
75
- return !r3 && i2 && (g = i2), i2 || !r3 && g;
76
- }, O = function(t3, e3) {
77
- if (S(t3))
78
- return t3.clone();
79
- var n3 = "object" == typeof e3 ? e3 : {};
80
- return n3.date = t3, n3.args = arguments, new _(n3);
81
- }, b = v;
82
- b.l = w, b.i = S, b.w = function(t3, e3) {
83
- return O(t3, { locale: e3.$L, utc: e3.$u, x: e3.$x, $offset: e3.$offset });
84
- };
85
- var _ = function() {
86
- function M2(t3) {
87
- this.$L = w(t3.locale, null, true), this.parse(t3), this.$x = this.$x || t3.x || {}, this[p] = true;
88
- }
89
- var m2 = M2.prototype;
90
- return m2.parse = function(t3) {
91
- this.$d = function(t4) {
92
- var e3 = t4.date, n3 = t4.utc;
93
- if (null === e3)
94
- return /* @__PURE__ */ new Date(NaN);
95
- if (b.u(e3))
96
- return /* @__PURE__ */ new Date();
97
- if (e3 instanceof Date)
98
- return new Date(e3);
99
- if ("string" == typeof e3 && !/Z$/i.test(e3)) {
100
- var r3 = e3.match($);
101
- if (r3) {
102
- var i2 = r3[2] - 1 || 0, s3 = (r3[7] || "0").substring(0, 3);
103
- return n3 ? new Date(Date.UTC(r3[1], i2, r3[3] || 1, r3[4] || 0, r3[5] || 0, r3[6] || 0, s3)) : new Date(r3[1], i2, r3[3] || 1, r3[4] || 0, r3[5] || 0, r3[6] || 0, s3);
104
- }
105
- }
28
+ (function(module, exports) {
29
+ !function(t2, e2) {
30
+ module.exports = e2();
31
+ }(commonjsGlobal, function() {
32
+ var t2 = 1e3, e2 = 6e4, n2 = 36e5, r2 = "millisecond", i = "second", s2 = "minute", u = "hour", a2 = "day", o = "week", c2 = "month", f = "quarter", h = "year", d = "date", l = "Invalid Date", $ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(t3) {
33
+ var e3 = ["th", "st", "nd", "rd"], n3 = t3 % 100;
34
+ return "[" + t3 + (e3[(n3 - 20) % 10] || e3[n3] || e3[0]) + "]";
35
+ } }, m = function(t3, e3, n3) {
36
+ var r3 = String(t3);
37
+ return !r3 || r3.length >= e3 ? t3 : "" + Array(e3 + 1 - r3.length).join(n3) + t3;
38
+ }, v = { s: m, z: function(t3) {
39
+ var e3 = -t3.utcOffset(), n3 = Math.abs(e3), r3 = Math.floor(n3 / 60), i2 = n3 % 60;
40
+ return (e3 <= 0 ? "+" : "-") + m(r3, 2, "0") + ":" + m(i2, 2, "0");
41
+ }, m: function t3(e3, n3) {
42
+ if (e3.date() < n3.date())
43
+ return -t3(n3, e3);
44
+ var r3 = 12 * (n3.year() - e3.year()) + (n3.month() - e3.month()), i2 = e3.clone().add(r3, c2), s3 = n3 - i2 < 0, u2 = e3.clone().add(r3 + (s3 ? -1 : 1), c2);
45
+ return +(-(r3 + (n3 - i2) / (s3 ? i2 - u2 : u2 - i2)) || 0);
46
+ }, a: function(t3) {
47
+ return t3 < 0 ? Math.ceil(t3) || 0 : Math.floor(t3);
48
+ }, p: function(t3) {
49
+ return { M: c2, y: h, w: o, d: a2, D: d, h: u, m: s2, s: i, ms: r2, Q: f }[t3] || String(t3 || "").toLowerCase().replace(/s$/, "");
50
+ }, u: function(t3) {
51
+ return void 0 === t3;
52
+ } }, g = "en", D = {};
53
+ D[g] = M;
54
+ var p = "$isDayjsObject", S = function(t3) {
55
+ return t3 instanceof _ || !(!t3 || !t3[p]);
56
+ }, w = function t3(e3, n3, r3) {
57
+ var i2;
58
+ if (!e3)
59
+ return g;
60
+ if ("string" == typeof e3) {
61
+ var s3 = e3.toLowerCase();
62
+ D[s3] && (i2 = s3), n3 && (D[s3] = n3, i2 = s3);
63
+ var u2 = e3.split("-");
64
+ if (!i2 && u2.length > 1)
65
+ return t3(u2[0]);
66
+ } else {
67
+ var a3 = e3.name;
68
+ D[a3] = e3, i2 = a3;
69
+ }
70
+ return !r3 && i2 && (g = i2), i2 || !r3 && g;
71
+ }, O = function(t3, e3) {
72
+ if (S(t3))
73
+ return t3.clone();
74
+ var n3 = "object" == typeof e3 ? e3 : {};
75
+ return n3.date = t3, n3.args = arguments, new _(n3);
76
+ }, b = v;
77
+ b.l = w, b.i = S, b.w = function(t3, e3) {
78
+ return O(t3, { locale: e3.$L, utc: e3.$u, x: e3.$x, $offset: e3.$offset });
79
+ };
80
+ var _ = function() {
81
+ function M2(t3) {
82
+ this.$L = w(t3.locale, null, true), this.parse(t3), this.$x = this.$x || t3.x || {}, this[p] = true;
83
+ }
84
+ var m2 = M2.prototype;
85
+ return m2.parse = function(t3) {
86
+ this.$d = function(t4) {
87
+ var e3 = t4.date, n3 = t4.utc;
88
+ if (null === e3)
89
+ return /* @__PURE__ */ new Date(NaN);
90
+ if (b.u(e3))
91
+ return /* @__PURE__ */ new Date();
92
+ if (e3 instanceof Date)
106
93
  return new Date(e3);
107
- }(t3), this.init();
108
- }, m2.init = function() {
109
- var t3 = this.$d;
110
- this.$y = t3.getFullYear(), this.$M = t3.getMonth(), this.$D = t3.getDate(), this.$W = t3.getDay(), this.$H = t3.getHours(), this.$m = t3.getMinutes(), this.$s = t3.getSeconds(), this.$ms = t3.getMilliseconds();
111
- }, m2.$utils = function() {
112
- return b;
113
- }, m2.isValid = function() {
114
- return !(this.$d.toString() === l);
115
- }, m2.isSame = function(t3, e3) {
116
- var n3 = O(t3);
117
- return this.startOf(e3) <= n3 && n3 <= this.endOf(e3);
118
- }, m2.isAfter = function(t3, e3) {
119
- return O(t3) < this.startOf(e3);
120
- }, m2.isBefore = function(t3, e3) {
121
- return this.endOf(e3) < O(t3);
122
- }, m2.$g = function(t3, e3, n3) {
123
- return b.u(t3) ? this[e3] : this.set(n3, t3);
124
- }, m2.unix = function() {
125
- return Math.floor(this.valueOf() / 1e3);
126
- }, m2.valueOf = function() {
127
- return this.$d.getTime();
128
- }, m2.startOf = function(t3, e3) {
129
- var n3 = this, r3 = !!b.u(e3) || e3, f2 = b.p(t3), l2 = function(t4, e4) {
130
- var i2 = b.w(n3.$u ? Date.UTC(n3.$y, e4, t4) : new Date(n3.$y, e4, t4), n3);
131
- return r3 ? i2 : i2.endOf(a2);
132
- }, $2 = function(t4, e4) {
133
- return b.w(n3.toDate()[t4].apply(n3.toDate("s"), (r3 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e4)), n3);
134
- }, y2 = this.$W, M3 = this.$M, m3 = this.$D, v2 = "set" + (this.$u ? "UTC" : "");
135
- switch (f2) {
136
- case h:
137
- return r3 ? l2(1, 0) : l2(31, 11);
138
- case c2:
139
- return r3 ? l2(1, M3) : l2(0, M3 + 1);
140
- case o:
141
- var g2 = this.$locale().weekStart || 0, D2 = (y2 < g2 ? y2 + 7 : y2) - g2;
142
- return l2(r3 ? m3 - D2 : m3 + (6 - D2), M3);
143
- case a2:
144
- case d:
145
- return $2(v2 + "Hours", 0);
146
- case u:
147
- return $2(v2 + "Minutes", 1);
148
- case s2:
149
- return $2(v2 + "Seconds", 2);
150
- case i:
151
- return $2(v2 + "Milliseconds", 3);
152
- default:
153
- return this.clone();
154
- }
155
- }, m2.endOf = function(t3) {
156
- return this.startOf(t3, false);
157
- }, m2.$set = function(t3, e3) {
158
- var n3, o2 = b.p(t3), f2 = "set" + (this.$u ? "UTC" : ""), l2 = (n3 = {}, n3[a2] = f2 + "Date", n3[d] = f2 + "Date", n3[c2] = f2 + "Month", n3[h] = f2 + "FullYear", n3[u] = f2 + "Hours", n3[s2] = f2 + "Minutes", n3[i] = f2 + "Seconds", n3[r2] = f2 + "Milliseconds", n3)[o2], $2 = o2 === a2 ? this.$D + (e3 - this.$W) : e3;
159
- if (o2 === c2 || o2 === h) {
160
- var y2 = this.clone().set(d, 1);
161
- y2.$d[l2]($2), y2.init(), this.$d = y2.set(d, Math.min(this.$D, y2.daysInMonth())).$d;
162
- } else
163
- l2 && this.$d[l2]($2);
164
- return this.init(), this;
165
- }, m2.set = function(t3, e3) {
166
- return this.clone().$set(t3, e3);
167
- }, m2.get = function(t3) {
168
- return this[b.p(t3)]();
169
- }, m2.add = function(r3, f2) {
170
- var d2, l2 = this;
171
- r3 = Number(r3);
172
- var $2 = b.p(f2), y2 = function(t3) {
173
- var e3 = O(l2);
174
- return b.w(e3.date(e3.date() + Math.round(t3 * r3)), l2);
175
- };
176
- if ($2 === c2)
177
- return this.set(c2, this.$M + r3);
178
- if ($2 === h)
179
- return this.set(h, this.$y + r3);
180
- if ($2 === a2)
181
- return y2(1);
182
- if ($2 === o)
183
- return y2(7);
184
- var M3 = (d2 = {}, d2[s2] = e2, d2[u] = n2, d2[i] = t2, d2)[$2] || 1, m3 = this.$d.getTime() + r3 * M3;
185
- return b.w(m3, this);
186
- }, m2.subtract = function(t3, e3) {
187
- return this.add(-1 * t3, e3);
188
- }, m2.format = function(t3) {
189
- var e3 = this, n3 = this.$locale();
190
- if (!this.isValid())
191
- return n3.invalidDate || l;
192
- var r3 = t3 || "YYYY-MM-DDTHH:mm:ssZ", i2 = b.z(this), s3 = this.$H, u2 = this.$m, a3 = this.$M, o2 = n3.weekdays, c3 = n3.months, f2 = n3.meridiem, h2 = function(t4, n4, i3, s4) {
193
- return t4 && (t4[n4] || t4(e3, r3)) || i3[n4].slice(0, s4);
194
- }, d2 = function(t4) {
195
- return b.s(s3 % 12 || 12, t4, "0");
196
- }, $2 = f2 || function(t4, e4, n4) {
197
- var r4 = t4 < 12 ? "AM" : "PM";
198
- return n4 ? r4.toLowerCase() : r4;
199
- };
200
- return r3.replace(y, function(t4, r4) {
201
- return r4 || function(t5) {
202
- switch (t5) {
203
- case "YY":
204
- return String(e3.$y).slice(-2);
205
- case "YYYY":
206
- return b.s(e3.$y, 4, "0");
207
- case "M":
208
- return a3 + 1;
209
- case "MM":
210
- return b.s(a3 + 1, 2, "0");
211
- case "MMM":
212
- return h2(n3.monthsShort, a3, c3, 3);
213
- case "MMMM":
214
- return h2(c3, a3);
215
- case "D":
216
- return e3.$D;
217
- case "DD":
218
- return b.s(e3.$D, 2, "0");
219
- case "d":
220
- return String(e3.$W);
221
- case "dd":
222
- return h2(n3.weekdaysMin, e3.$W, o2, 2);
223
- case "ddd":
224
- return h2(n3.weekdaysShort, e3.$W, o2, 3);
225
- case "dddd":
226
- return o2[e3.$W];
227
- case "H":
228
- return String(s3);
229
- case "HH":
230
- return b.s(s3, 2, "0");
231
- case "h":
232
- return d2(1);
233
- case "hh":
234
- return d2(2);
235
- case "a":
236
- return $2(s3, u2, true);
237
- case "A":
238
- return $2(s3, u2, false);
239
- case "m":
240
- return String(u2);
241
- case "mm":
242
- return b.s(u2, 2, "0");
243
- case "s":
244
- return String(e3.$s);
245
- case "ss":
246
- return b.s(e3.$s, 2, "0");
247
- case "SSS":
248
- return b.s(e3.$ms, 3, "0");
249
- case "Z":
250
- return i2;
251
- }
252
- return null;
253
- }(t4) || i2.replace(":", "");
254
- });
255
- }, m2.utcOffset = function() {
256
- return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
257
- }, m2.diff = function(r3, d2, l2) {
258
- var $2, y2 = this, M3 = b.p(d2), m3 = O(r3), v2 = (m3.utcOffset() - this.utcOffset()) * e2, g2 = this - m3, D2 = function() {
259
- return b.m(y2, m3);
260
- };
261
- switch (M3) {
262
- case h:
263
- $2 = D2() / 12;
264
- break;
265
- case c2:
266
- $2 = D2();
267
- break;
268
- case f:
269
- $2 = D2() / 3;
270
- break;
271
- case o:
272
- $2 = (g2 - v2) / 6048e5;
273
- break;
274
- case a2:
275
- $2 = (g2 - v2) / 864e5;
276
- break;
277
- case u:
278
- $2 = g2 / n2;
279
- break;
280
- case s2:
281
- $2 = g2 / e2;
282
- break;
283
- case i:
284
- $2 = g2 / t2;
285
- break;
286
- default:
287
- $2 = g2;
288
- }
289
- return l2 ? $2 : b.a($2);
290
- }, m2.daysInMonth = function() {
291
- return this.endOf(c2).$D;
292
- }, m2.$locale = function() {
293
- return D[this.$L];
294
- }, m2.locale = function(t3, e3) {
295
- if (!t3)
296
- return this.$L;
297
- var n3 = this.clone(), r3 = w(t3, e3, true);
298
- return r3 && (n3.$L = r3), n3;
299
- }, m2.clone = function() {
300
- return b.w(this.$d, this);
301
- }, m2.toDate = function() {
302
- return new Date(this.valueOf());
303
- }, m2.toJSON = function() {
304
- return this.isValid() ? this.toISOString() : null;
305
- }, m2.toISOString = function() {
306
- return this.$d.toISOString();
307
- }, m2.toString = function() {
308
- return this.$d.toUTCString();
309
- }, M2;
310
- }(), k = _.prototype;
311
- return O.prototype = k, [["$ms", r2], ["$s", i], ["$m", s2], ["$H", u], ["$W", a2], ["$M", c2], ["$y", h], ["$D", d]].forEach(function(t3) {
312
- k[t3[1]] = function(e3) {
313
- return this.$g(e3, t3[0], t3[1]);
94
+ if ("string" == typeof e3 && !/Z$/i.test(e3)) {
95
+ var r3 = e3.match($);
96
+ if (r3) {
97
+ var i2 = r3[2] - 1 || 0, s3 = (r3[7] || "0").substring(0, 3);
98
+ return n3 ? new Date(Date.UTC(r3[1], i2, r3[3] || 1, r3[4] || 0, r3[5] || 0, r3[6] || 0, s3)) : new Date(r3[1], i2, r3[3] || 1, r3[4] || 0, r3[5] || 0, r3[6] || 0, s3);
99
+ }
100
+ }
101
+ return new Date(e3);
102
+ }(t3), this.init();
103
+ }, m2.init = function() {
104
+ var t3 = this.$d;
105
+ this.$y = t3.getFullYear(), this.$M = t3.getMonth(), this.$D = t3.getDate(), this.$W = t3.getDay(), this.$H = t3.getHours(), this.$m = t3.getMinutes(), this.$s = t3.getSeconds(), this.$ms = t3.getMilliseconds();
106
+ }, m2.$utils = function() {
107
+ return b;
108
+ }, m2.isValid = function() {
109
+ return !(this.$d.toString() === l);
110
+ }, m2.isSame = function(t3, e3) {
111
+ var n3 = O(t3);
112
+ return this.startOf(e3) <= n3 && n3 <= this.endOf(e3);
113
+ }, m2.isAfter = function(t3, e3) {
114
+ return O(t3) < this.startOf(e3);
115
+ }, m2.isBefore = function(t3, e3) {
116
+ return this.endOf(e3) < O(t3);
117
+ }, m2.$g = function(t3, e3, n3) {
118
+ return b.u(t3) ? this[e3] : this.set(n3, t3);
119
+ }, m2.unix = function() {
120
+ return Math.floor(this.valueOf() / 1e3);
121
+ }, m2.valueOf = function() {
122
+ return this.$d.getTime();
123
+ }, m2.startOf = function(t3, e3) {
124
+ var n3 = this, r3 = !!b.u(e3) || e3, f2 = b.p(t3), l2 = function(t4, e4) {
125
+ var i2 = b.w(n3.$u ? Date.UTC(n3.$y, e4, t4) : new Date(n3.$y, e4, t4), n3);
126
+ return r3 ? i2 : i2.endOf(a2);
127
+ }, $2 = function(t4, e4) {
128
+ return b.w(n3.toDate()[t4].apply(n3.toDate("s"), (r3 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e4)), n3);
129
+ }, y2 = this.$W, M3 = this.$M, m3 = this.$D, v2 = "set" + (this.$u ? "UTC" : "");
130
+ switch (f2) {
131
+ case h:
132
+ return r3 ? l2(1, 0) : l2(31, 11);
133
+ case c2:
134
+ return r3 ? l2(1, M3) : l2(0, M3 + 1);
135
+ case o:
136
+ var g2 = this.$locale().weekStart || 0, D2 = (y2 < g2 ? y2 + 7 : y2) - g2;
137
+ return l2(r3 ? m3 - D2 : m3 + (6 - D2), M3);
138
+ case a2:
139
+ case d:
140
+ return $2(v2 + "Hours", 0);
141
+ case u:
142
+ return $2(v2 + "Minutes", 1);
143
+ case s2:
144
+ return $2(v2 + "Seconds", 2);
145
+ case i:
146
+ return $2(v2 + "Milliseconds", 3);
147
+ default:
148
+ return this.clone();
149
+ }
150
+ }, m2.endOf = function(t3) {
151
+ return this.startOf(t3, false);
152
+ }, m2.$set = function(t3, e3) {
153
+ var n3, o2 = b.p(t3), f2 = "set" + (this.$u ? "UTC" : ""), l2 = (n3 = {}, n3[a2] = f2 + "Date", n3[d] = f2 + "Date", n3[c2] = f2 + "Month", n3[h] = f2 + "FullYear", n3[u] = f2 + "Hours", n3[s2] = f2 + "Minutes", n3[i] = f2 + "Seconds", n3[r2] = f2 + "Milliseconds", n3)[o2], $2 = o2 === a2 ? this.$D + (e3 - this.$W) : e3;
154
+ if (o2 === c2 || o2 === h) {
155
+ var y2 = this.clone().set(d, 1);
156
+ y2.$d[l2]($2), y2.init(), this.$d = y2.set(d, Math.min(this.$D, y2.daysInMonth())).$d;
157
+ } else
158
+ l2 && this.$d[l2]($2);
159
+ return this.init(), this;
160
+ }, m2.set = function(t3, e3) {
161
+ return this.clone().$set(t3, e3);
162
+ }, m2.get = function(t3) {
163
+ return this[b.p(t3)]();
164
+ }, m2.add = function(r3, f2) {
165
+ var d2, l2 = this;
166
+ r3 = Number(r3);
167
+ var $2 = b.p(f2), y2 = function(t3) {
168
+ var e3 = O(l2);
169
+ return b.w(e3.date(e3.date() + Math.round(t3 * r3)), l2);
314
170
  };
315
- }), O.extend = function(t3, e3) {
316
- return t3.$i || (t3(e3, _, O), t3.$i = true), O;
317
- }, O.locale = w, O.isDayjs = S, O.unix = function(t3) {
318
- return O(1e3 * t3);
319
- }, O.en = D[g], O.Ls = D, O.p = {}, O;
320
- });
321
- })(dayjs_min);
322
- return dayjs_min.exports;
323
- }
324
- var dayjs_minExports = requireDayjs_min();
171
+ if ($2 === c2)
172
+ return this.set(c2, this.$M + r3);
173
+ if ($2 === h)
174
+ return this.set(h, this.$y + r3);
175
+ if ($2 === a2)
176
+ return y2(1);
177
+ if ($2 === o)
178
+ return y2(7);
179
+ var M3 = (d2 = {}, d2[s2] = e2, d2[u] = n2, d2[i] = t2, d2)[$2] || 1, m3 = this.$d.getTime() + r3 * M3;
180
+ return b.w(m3, this);
181
+ }, m2.subtract = function(t3, e3) {
182
+ return this.add(-1 * t3, e3);
183
+ }, m2.format = function(t3) {
184
+ var e3 = this, n3 = this.$locale();
185
+ if (!this.isValid())
186
+ return n3.invalidDate || l;
187
+ var r3 = t3 || "YYYY-MM-DDTHH:mm:ssZ", i2 = b.z(this), s3 = this.$H, u2 = this.$m, a3 = this.$M, o2 = n3.weekdays, c3 = n3.months, f2 = n3.meridiem, h2 = function(t4, n4, i3, s4) {
188
+ return t4 && (t4[n4] || t4(e3, r3)) || i3[n4].slice(0, s4);
189
+ }, d2 = function(t4) {
190
+ return b.s(s3 % 12 || 12, t4, "0");
191
+ }, $2 = f2 || function(t4, e4, n4) {
192
+ var r4 = t4 < 12 ? "AM" : "PM";
193
+ return n4 ? r4.toLowerCase() : r4;
194
+ };
195
+ return r3.replace(y, function(t4, r4) {
196
+ return r4 || function(t5) {
197
+ switch (t5) {
198
+ case "YY":
199
+ return String(e3.$y).slice(-2);
200
+ case "YYYY":
201
+ return b.s(e3.$y, 4, "0");
202
+ case "M":
203
+ return a3 + 1;
204
+ case "MM":
205
+ return b.s(a3 + 1, 2, "0");
206
+ case "MMM":
207
+ return h2(n3.monthsShort, a3, c3, 3);
208
+ case "MMMM":
209
+ return h2(c3, a3);
210
+ case "D":
211
+ return e3.$D;
212
+ case "DD":
213
+ return b.s(e3.$D, 2, "0");
214
+ case "d":
215
+ return String(e3.$W);
216
+ case "dd":
217
+ return h2(n3.weekdaysMin, e3.$W, o2, 2);
218
+ case "ddd":
219
+ return h2(n3.weekdaysShort, e3.$W, o2, 3);
220
+ case "dddd":
221
+ return o2[e3.$W];
222
+ case "H":
223
+ return String(s3);
224
+ case "HH":
225
+ return b.s(s3, 2, "0");
226
+ case "h":
227
+ return d2(1);
228
+ case "hh":
229
+ return d2(2);
230
+ case "a":
231
+ return $2(s3, u2, true);
232
+ case "A":
233
+ return $2(s3, u2, false);
234
+ case "m":
235
+ return String(u2);
236
+ case "mm":
237
+ return b.s(u2, 2, "0");
238
+ case "s":
239
+ return String(e3.$s);
240
+ case "ss":
241
+ return b.s(e3.$s, 2, "0");
242
+ case "SSS":
243
+ return b.s(e3.$ms, 3, "0");
244
+ case "Z":
245
+ return i2;
246
+ }
247
+ return null;
248
+ }(t4) || i2.replace(":", "");
249
+ });
250
+ }, m2.utcOffset = function() {
251
+ return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
252
+ }, m2.diff = function(r3, d2, l2) {
253
+ var $2, y2 = this, M3 = b.p(d2), m3 = O(r3), v2 = (m3.utcOffset() - this.utcOffset()) * e2, g2 = this - m3, D2 = function() {
254
+ return b.m(y2, m3);
255
+ };
256
+ switch (M3) {
257
+ case h:
258
+ $2 = D2() / 12;
259
+ break;
260
+ case c2:
261
+ $2 = D2();
262
+ break;
263
+ case f:
264
+ $2 = D2() / 3;
265
+ break;
266
+ case o:
267
+ $2 = (g2 - v2) / 6048e5;
268
+ break;
269
+ case a2:
270
+ $2 = (g2 - v2) / 864e5;
271
+ break;
272
+ case u:
273
+ $2 = g2 / n2;
274
+ break;
275
+ case s2:
276
+ $2 = g2 / e2;
277
+ break;
278
+ case i:
279
+ $2 = g2 / t2;
280
+ break;
281
+ default:
282
+ $2 = g2;
283
+ }
284
+ return l2 ? $2 : b.a($2);
285
+ }, m2.daysInMonth = function() {
286
+ return this.endOf(c2).$D;
287
+ }, m2.$locale = function() {
288
+ return D[this.$L];
289
+ }, m2.locale = function(t3, e3) {
290
+ if (!t3)
291
+ return this.$L;
292
+ var n3 = this.clone(), r3 = w(t3, e3, true);
293
+ return r3 && (n3.$L = r3), n3;
294
+ }, m2.clone = function() {
295
+ return b.w(this.$d, this);
296
+ }, m2.toDate = function() {
297
+ return new Date(this.valueOf());
298
+ }, m2.toJSON = function() {
299
+ return this.isValid() ? this.toISOString() : null;
300
+ }, m2.toISOString = function() {
301
+ return this.$d.toISOString();
302
+ }, m2.toString = function() {
303
+ return this.$d.toUTCString();
304
+ }, M2;
305
+ }(), k = _.prototype;
306
+ return O.prototype = k, [["$ms", r2], ["$s", i], ["$m", s2], ["$H", u], ["$W", a2], ["$M", c2], ["$y", h], ["$D", d]].forEach(function(t3) {
307
+ k[t3[1]] = function(e3) {
308
+ return this.$g(e3, t3[0], t3[1]);
309
+ };
310
+ }), O.extend = function(t3, e3) {
311
+ return t3.$i || (t3(e3, _, O), t3.$i = true), O;
312
+ }, O.locale = w, O.isDayjs = S, O.unix = function(t3) {
313
+ return O(1e3 * t3);
314
+ }, O.en = D[g], O.Ls = D, O.p = {}, O;
315
+ });
316
+ })(dayjs_min);
317
+ var dayjs_minExports = dayjs_min.exports;
325
318
  const dayjs = /* @__PURE__ */ getDefaultExportFromCjs(dayjs_minExports);
326
319
  var zh = { exports: {} };
327
320
  (function(module, exports) {
328
321
  !function(e2, _) {
329
- module.exports = _(requireDayjs_min());
322
+ module.exports = _(dayjs_minExports);
330
323
  }(commonjsGlobal, function(e2) {
331
324
  function _(e3) {
332
325
  return e3 && "object" == typeof e3 && "default" in e3 ? e3 : { default: e3 };
@@ -1021,8 +1014,8 @@ const already_reset$1 = "Already reset";
1021
1014
  const fetch_schema_fail$1 = "获取 schema 失败。";
1022
1015
  const obtain_data_error$1 = "Having trouble getting data.";
1023
1016
  const retry$1 = "Retry";
1024
- const create_resource$1 = "Create {{resource}}";
1025
- const edit_resource$1 = "Edit {{resource}}";
1017
+ const create_resource$1 = "Create{{resource}}";
1018
+ const edit_resource$1 = "Edit{{resource}}";
1026
1019
  const state$1 = "Status";
1027
1020
  const name$1 = "Name";
1028
1021
  const pod$1 = "Pod";
@@ -1056,18 +1049,18 @@ const data$1 = "Data";
1056
1049
  const resume$1 = "Resume";
1057
1050
  const sessionAffinity$1 = "Session Affinity";
1058
1051
  const log$1 = "Log";
1059
- const ready$1 = "Ready";
1060
- const updating$1 = "Updating";
1061
- const completed$1 = "Completed";
1062
- const failed$1 = "Failed";
1063
- const suspended$1 = "Suspended";
1064
- const running$1 = "Running";
1065
- const terminating$1 = "Terminating";
1066
- const terminated$1 = "Terminated";
1067
- const succeeded$1 = "Succeeded";
1068
- const unknown$1 = "Unknown";
1069
- const pending$1 = "Pending";
1070
- const waiting$1 = "Waiting";
1052
+ const ready = "Ready";
1053
+ const updating = "Updating";
1054
+ const completed = "Completed";
1055
+ const failed = "Failed";
1056
+ const suspended = "Suspended";
1057
+ const running = "Running";
1058
+ const terminating = "Terminating";
1059
+ const terminated = "Terminated";
1060
+ const succeeded = "Succeeded";
1061
+ const unknown = "Unknown";
1062
+ const pending = "Pending";
1063
+ const waiting = "Waiting";
1071
1064
  const expand$1 = "Expand";
1072
1065
  const fold$1 = "Collapse";
1073
1066
  const rule$1 = "Rule";
@@ -1158,7 +1151,7 @@ const pod_port$1 = "Pod port";
1158
1151
  const path_type$1 = "Path type";
1159
1152
  const only_support_one_yaml$1 = "Only one YAML configuration is supported at a time.";
1160
1153
  const not_support$1 = "Not supported";
1161
- const stopped$1 = "Stopped";
1154
+ const stopped = "Stopped";
1162
1155
  const any_node_ip$1 = "Any node IP";
1163
1156
  const storage_class$1 = "Storage class";
1164
1157
  const persistent_volume$1 = "Persistent volume";
@@ -1168,11 +1161,11 @@ const capacity$1 = "Capacity";
1168
1161
  const volume_mode$1 = "Volume mode";
1169
1162
  const access_mode$1 = "Access mode";
1170
1163
  const block$1 = "Block";
1171
- const pv_phase_available$1 = "Available";
1172
- const pv_phase_bound$1 = "Bound";
1173
- const pv_phase_released$1 = "Released";
1174
- const pv_phase_failed$1 = "Failed";
1175
- const pv_phase_pending$1 = "Pending";
1164
+ const pv_phase_available = "Available";
1165
+ const pv_phase_bound = "Bound";
1166
+ const pv_phase_released = "Released";
1167
+ const pv_phase_failed = "Failed";
1168
+ const pv_phase_pending = "Pending";
1176
1169
  const exec_pod = "Execute shell";
1177
1170
  const search$1 = "Search";
1178
1171
  const edit_label$1 = "Edit label";
@@ -1226,18 +1219,18 @@ const dovetail$1 = {
1226
1219
  resume: resume$1,
1227
1220
  sessionAffinity: sessionAffinity$1,
1228
1221
  log: log$1,
1229
- ready: ready$1,
1230
- updating: updating$1,
1231
- completed: completed$1,
1232
- failed: failed$1,
1233
- suspended: suspended$1,
1234
- running: running$1,
1235
- terminating: terminating$1,
1236
- terminated: terminated$1,
1237
- succeeded: succeeded$1,
1238
- unknown: unknown$1,
1239
- pending: pending$1,
1240
- waiting: waiting$1,
1222
+ ready,
1223
+ updating,
1224
+ completed,
1225
+ failed,
1226
+ suspended,
1227
+ running,
1228
+ terminating,
1229
+ terminated,
1230
+ succeeded,
1231
+ unknown,
1232
+ pending,
1233
+ waiting,
1241
1234
  expand: expand$1,
1242
1235
  fold: fold$1,
1243
1236
  rule: rule$1,
@@ -1330,7 +1323,7 @@ const dovetail$1 = {
1330
1323
  path_type: path_type$1,
1331
1324
  only_support_one_yaml: only_support_one_yaml$1,
1332
1325
  not_support: not_support$1,
1333
- stopped: stopped$1,
1326
+ stopped,
1334
1327
  any_node_ip: any_node_ip$1,
1335
1328
  storage_class: storage_class$1,
1336
1329
  persistent_volume: persistent_volume$1,
@@ -1340,11 +1333,11 @@ const dovetail$1 = {
1340
1333
  volume_mode: volume_mode$1,
1341
1334
  access_mode: access_mode$1,
1342
1335
  block: block$1,
1343
- pv_phase_available: pv_phase_available$1,
1344
- pv_phase_bound: pv_phase_bound$1,
1345
- pv_phase_released: pv_phase_released$1,
1346
- pv_phase_failed: pv_phase_failed$1,
1347
- pv_phase_pending: pv_phase_pending$1,
1336
+ pv_phase_available,
1337
+ pv_phase_bound,
1338
+ pv_phase_released,
1339
+ pv_phase_failed,
1340
+ pv_phase_pending,
1348
1341
  exec_pod,
1349
1342
  search: search$1,
1350
1343
  edit_label: edit_label$1
@@ -1408,20 +1401,20 @@ const select_container = "选择容器";
1408
1401
  const fetch_schema_fail = "获取 schema 失败。";
1409
1402
  const obtain_data_error = "获取数据时遇到问题。";
1410
1403
  const retry = "重试";
1411
- const ready = "已就绪";
1412
- const updating = "更新中";
1413
- const completed = "已完成";
1414
- const failed = "异常";
1415
- const suspended = "已挂起";
1416
- const running = "运行中";
1417
- const terminating = "终止中";
1418
- const succeeded = "已成功终止";
1419
- const terminated = "已终止";
1420
- const unknown = "未知";
1421
- const pending = "待处理";
1422
- const waiting = "等待中";
1423
- const create_resource = "创建 {{resource}}";
1424
- const edit_resource = "编辑 {{resource}}";
1404
+ const ready_state = "已就绪";
1405
+ const updating_state = "更新中";
1406
+ const completed_state = "已完成";
1407
+ const abnormal_state = "异常";
1408
+ const suspended_state = "已挂起";
1409
+ const running_state = "运行中";
1410
+ const terminating_state = "终止中";
1411
+ const succeeded_state = "已成功终止";
1412
+ const terminated_state = "已终止";
1413
+ const unknown_state = "未知";
1414
+ const pending_state = "待处理";
1415
+ const waiting_state = "等待中";
1416
+ const create_resource = "创建{{resource}}";
1417
+ const edit_resource = "编辑{{resource}}";
1425
1418
  const sec = "秒";
1426
1419
  const min = "分";
1427
1420
  const hr = "小时";
@@ -1456,6 +1449,7 @@ const node_port = "NodePort";
1456
1449
  const protocol = "协议";
1457
1450
  const key = "键";
1458
1451
  const value = "值";
1452
+ const effect = "效果";
1459
1453
  const show_data_value = "显示数值";
1460
1454
  const hide_data_value = "隐藏数值";
1461
1455
  const path_type = "路径类型";
@@ -1504,7 +1498,7 @@ const out_external_name_desc = "ExternalName 展示 <strong>external-ip</strong>
1504
1498
  const only_support_one_yaml = "一次仅支持输入一个 YAML 配置。";
1505
1499
  const support = "支持";
1506
1500
  const not_support = "不支持";
1507
- const stopped = "已停止";
1501
+ const stopped_state = "已停止";
1508
1502
  const any_node_ip = "任意节点 IP";
1509
1503
  const storage_class = "存储类";
1510
1504
  const persistent_volume = "持久卷";
@@ -1515,11 +1509,11 @@ const distributed = "分配量";
1515
1509
  const volume_mode = "卷模式";
1516
1510
  const access_mode = "访问模式";
1517
1511
  const block = "块";
1518
- const pv_phase_available = "可用";
1519
- const pv_phase_bound = "已绑定";
1520
- const pv_phase_released = "已释放";
1521
- const pv_phase_failed = "失败";
1522
- const pv_phase_pending = "等待中";
1512
+ const available_state = "可用";
1513
+ const bound_state = "已绑定";
1514
+ const released_state = "已释放";
1515
+ const failed_state = "失败";
1516
+ const lost_state = "卷不可用";
1523
1517
  const font_size = "字体大小";
1524
1518
  const download_shell_content = "下载控制台日志";
1525
1519
  const clear_shell = "清空命令行";
@@ -1545,6 +1539,16 @@ const allow_expand = "卷扩容";
1545
1539
  const edit_distribute_storage = "编辑分配量";
1546
1540
  const edit_distribute_storage_success_toast = "编辑分配量成功";
1547
1541
  const edit_distribute_storage_failed_toast = "编辑分配量失败";
1542
+ const edit_node_taint = "编辑节点污点";
1543
+ const edit_node_taint_success_toast = "编辑节点 {{name}} 的污点成功";
1544
+ const node_taint_NoSchedule = "仅阻止调度";
1545
+ const node_taint_PreferNoSchedule = "尽可能阻止调度";
1546
+ const node_taint_NoExecute = "阻止调度并驱逐 Pod";
1547
+ const taint = "污点";
1548
+ const change_form_mode_alert = "从编辑 YAML 切回表单编辑,将无法保留对 YAML 文件做出的所有更改。";
1549
+ const pvc_storage_required = "请填写分配量。";
1550
+ const pvc_storage_min = "请输入正整数。";
1551
+ const pvc_storage_reduce_limit = "输入值不得小于当前数值。";
1548
1552
  const dovetail = {
1549
1553
  copy: copy$1,
1550
1554
  reset_arguments,
@@ -1603,18 +1607,18 @@ const dovetail = {
1603
1607
  fetch_schema_fail,
1604
1608
  obtain_data_error,
1605
1609
  retry,
1606
- ready,
1607
- updating,
1608
- completed,
1609
- failed,
1610
- suspended,
1611
- running,
1612
- terminating,
1613
- succeeded,
1614
- terminated,
1615
- unknown,
1616
- pending,
1617
- waiting,
1610
+ ready_state,
1611
+ updating_state,
1612
+ completed_state,
1613
+ abnormal_state,
1614
+ suspended_state,
1615
+ running_state,
1616
+ terminating_state,
1617
+ succeeded_state,
1618
+ terminated_state,
1619
+ unknown_state,
1620
+ pending_state,
1621
+ waiting_state,
1618
1622
  create_resource,
1619
1623
  edit_resource,
1620
1624
  sec,
@@ -1651,6 +1655,7 @@ const dovetail = {
1651
1655
  protocol,
1652
1656
  key,
1653
1657
  value,
1658
+ effect,
1654
1659
  show_data_value,
1655
1660
  hide_data_value,
1656
1661
  path_type,
@@ -1701,7 +1706,7 @@ const dovetail = {
1701
1706
  only_support_one_yaml,
1702
1707
  support,
1703
1708
  not_support,
1704
- stopped,
1709
+ stopped_state,
1705
1710
  any_node_ip,
1706
1711
  storage_class,
1707
1712
  persistent_volume,
@@ -1712,11 +1717,11 @@ const dovetail = {
1712
1717
  volume_mode,
1713
1718
  access_mode,
1714
1719
  block,
1715
- pv_phase_available,
1716
- pv_phase_bound,
1717
- pv_phase_released,
1718
- pv_phase_failed,
1719
- pv_phase_pending,
1720
+ available_state,
1721
+ bound_state,
1722
+ released_state,
1723
+ failed_state,
1724
+ lost_state,
1720
1725
  font_size,
1721
1726
  download_shell_content,
1722
1727
  clear_shell,
@@ -1741,7 +1746,17 @@ const dovetail = {
1741
1746
  allow_expand,
1742
1747
  edit_distribute_storage,
1743
1748
  edit_distribute_storage_success_toast,
1744
- edit_distribute_storage_failed_toast
1749
+ edit_distribute_storage_failed_toast,
1750
+ edit_node_taint,
1751
+ edit_node_taint_success_toast,
1752
+ node_taint_NoSchedule,
1753
+ node_taint_PreferNoSchedule,
1754
+ node_taint_NoExecute,
1755
+ taint,
1756
+ change_form_mode_alert,
1757
+ pvc_storage_required,
1758
+ pvc_storage_min,
1759
+ pvc_storage_reduce_limit
1745
1760
  };
1746
1761
  const ZH = {
1747
1762
  dovetail
@@ -6676,7 +6691,7 @@ lodash.exports;
6676
6691
  function isNull(value2) {
6677
6692
  return value2 === null;
6678
6693
  }
6679
- function isNil(value2) {
6694
+ function isNil2(value2) {
6680
6695
  return value2 == null;
6681
6696
  }
6682
6697
  function isNumber(value2) {
@@ -7743,7 +7758,7 @@ lodash.exports;
7743
7758
  lodash2.isMatchWith = isMatchWith;
7744
7759
  lodash2.isNaN = isNaN2;
7745
7760
  lodash2.isNative = isNative;
7746
- lodash2.isNil = isNil;
7761
+ lodash2.isNil = isNil2;
7747
7762
  lodash2.isNull = isNull;
7748
7763
  lodash2.isNumber = isNumber;
7749
7764
  lodash2.isObject = isObject2;
@@ -8844,15 +8859,15 @@ const WidgetErrorContent = (props) => {
8844
8859
  })
8845
8860
  });
8846
8861
  };
8847
- const TableWidgets_sc2nyo = "";
8862
+ const TableWidgets_zbqkvj = "";
8848
8863
  const AuxiliaryLine = /* @__PURE__ */ styled_default("div")({
8849
8864
  name: "AuxiliaryLine",
8850
- class: "ax1qopv",
8865
+ class: "a60f3dj",
8851
8866
  propsAsIs: false
8852
8867
  });
8853
- const index_dp43sd = "";
8854
- const TableContainerStyle = "t1upn1sz";
8855
- function Table(props) {
8868
+ const index_17chkj7 = "";
8869
+ const TableContainerStyle = "t47xc8k";
8870
+ function Table$1(props) {
8856
8871
  const {
8857
8872
  t: t2
8858
8873
  } = useTranslation();
@@ -8917,7 +8932,7 @@ function Table(props) {
8917
8932
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
8918
8933
  ref: wrapperRef,
8919
8934
  className: cx_default(TableContainerStyle, props.className, "table-wrapper"),
8920
- children: [/* @__PURE__ */ jsxRuntimeExports.jsx(Table$1, {
8935
+ children: [/* @__PURE__ */ jsxRuntimeExports.jsx(Table$2, {
8921
8936
  tableLayout: "fixed",
8922
8937
  columns: finalColumns,
8923
8938
  dataSource,
@@ -8969,7 +8984,7 @@ function useTableData({ data: data2, columns, pageSize = 10, defaultSorters }) {
8969
8984
  const PodSelectorTable = ({ podSelectors = {} }) => {
8970
8985
  const { t: t2 } = useTranslation();
8971
8986
  const component = useContext(ComponentContext);
8972
- const Table$12 = component.Table || Table;
8987
+ const Table2 = component.Table || Table$1;
8973
8988
  const currentSize = 10;
8974
8989
  const datas = Object.keys(podSelectors).map((key2) => ({
8975
8990
  id: key2,
@@ -9014,7 +9029,7 @@ const PodSelectorTable = ({ podSelectors = {} }) => {
9014
9029
  );
9015
9030
  }
9016
9031
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
9017
- Table$12,
9032
+ Table2,
9018
9033
  {
9019
9034
  tableKey: "podSelector",
9020
9035
  loading: false,
@@ -9034,7 +9049,7 @@ const PodSelectorTable = ({ podSelectors = {} }) => {
9034
9049
  const PortsTable = ({ service }) => {
9035
9050
  const { t: t2 } = useTranslation();
9036
9051
  const component = useContext(ComponentContext);
9037
- const Table$12 = component.Table || Table;
9052
+ const Table2 = component.Table || Table$1;
9038
9053
  const currentSize = 10;
9039
9054
  const columns = [
9040
9055
  {
@@ -9102,7 +9117,7 @@ const PortsTable = ({ service }) => {
9102
9117
  );
9103
9118
  }
9104
9119
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
9105
- Table$12,
9120
+ Table2,
9106
9121
  {
9107
9122
  tableKey: "ports",
9108
9123
  loading: false,
@@ -9119,6 +9134,409 @@ const PortsTable = ({ service }) => {
9119
9134
  }
9120
9135
  );
9121
9136
  };
9137
+ function FormErrorAlert(props) {
9138
+ const { title, errorMsgs, style, className, isEdit } = props;
9139
+ const { i18n: i18n2 } = useTranslation();
9140
+ return errorMsgs.length ? /* @__PURE__ */ jsxRuntimeExports.jsx(
9141
+ Alert,
9142
+ {
9143
+ message: /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
9144
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: title || i18n2.t(isEdit ? "dovetail.save_failed_tip" : "dovetail.create_failed_tip") }),
9145
+ errorMsgs.length > 1 ? /* @__PURE__ */ jsxRuntimeExports.jsx("ul", { children: errorMsgs.map((errorMsg, index2) => /* @__PURE__ */ jsxRuntimeExports.jsxs("li", { children: [
9146
+ index2 + 1 + ". ",
9147
+ " ",
9148
+ errorMsg
9149
+ ] }, errorMsg)) }) : first(errorMsgs)
9150
+ ] }),
9151
+ type: "error",
9152
+ style,
9153
+ className
9154
+ }
9155
+ ) : null;
9156
+ }
9157
+ var AccessControlAuth = /* @__PURE__ */ ((AccessControlAuth2) => {
9158
+ AccessControlAuth2["Edit"] = "Edit";
9159
+ AccessControlAuth2["Delete"] = "Delete";
9160
+ AccessControlAuth2["Create"] = "Create";
9161
+ return AccessControlAuth2;
9162
+ })(AccessControlAuth || {});
9163
+ function getCommonErrors(responseBody, i18n2) {
9164
+ var _a;
9165
+ 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))) {
9166
+ return [];
9167
+ }
9168
+ const causes = ((_a = responseBody.details) == null ? void 0 : _a.causes) || responseBody.graphQLErrors || [];
9169
+ if (causes.length) {
9170
+ return causes.map((cause) => {
9171
+ let params = {};
9172
+ let message2 = cause.message;
9173
+ try {
9174
+ const info = JSON.parse(cause.message);
9175
+ params = info.params;
9176
+ message2 = info.message;
9177
+ } catch {
9178
+ return i18n2.t(
9179
+ [
9180
+ `error.${cause.reason}`,
9181
+ `error.${cause.code}`,
9182
+ `${cause.field ? `${cause.field}: ` : ""}${message2}`
9183
+ ],
9184
+ {
9185
+ ...params,
9186
+ fallbackLng: ""
9187
+ }
9188
+ );
9189
+ }
9190
+ return i18n2.t(
9191
+ [
9192
+ `error.${cause.reason}`,
9193
+ `error.${cause.code}`,
9194
+ `${cause.field ? `${cause.field}: ` : ""}${message2}`
9195
+ ],
9196
+ {
9197
+ ...params,
9198
+ fallbackLng: ""
9199
+ }
9200
+ );
9201
+ });
9202
+ }
9203
+ return [
9204
+ i18n2.t(
9205
+ [`error.${responseBody.code}`, `error.${responseBody.reason}`, responseBody.message || ""],
9206
+ { fallbackLng: "" }
9207
+ )
9208
+ ];
9209
+ }
9210
+ function useSubmitForm(options) {
9211
+ const { formRef, onSubmitSuccess } = options;
9212
+ const { i18n: i18n2 } = useTranslation();
9213
+ const [submitting, setSubmitting] = useState(false);
9214
+ const [errorMsgs, setErrorMsgs] = useState([]);
9215
+ const reset = useCallback(() => {
9216
+ setSubmitting(false);
9217
+ setErrorMsgs([]);
9218
+ }, []);
9219
+ const onSubmit = useCallback(async () => {
9220
+ var _a;
9221
+ try {
9222
+ setSubmitting(true);
9223
+ const isFalsy = await ((_a = formRef.current) == null ? void 0 : _a.submit()) === false;
9224
+ if (isFalsy) {
9225
+ return;
9226
+ }
9227
+ onSubmitSuccess == null ? void 0 : onSubmitSuccess();
9228
+ reset();
9229
+ } catch (error) {
9230
+ if (error instanceof Object) {
9231
+ if ("response" in error && error.response instanceof Response) {
9232
+ const response = error.response;
9233
+ const body = await response.json();
9234
+ setErrorMsgs(getCommonErrors(body, i18n2));
9235
+ } else if ("message" in error && typeof error.message === "string") {
9236
+ setErrorMsgs([error.message]);
9237
+ }
9238
+ }
9239
+ } finally {
9240
+ setSubmitting(false);
9241
+ }
9242
+ }, [formRef, i18n2, reset, onSubmitSuccess]);
9243
+ return {
9244
+ submitting,
9245
+ errorMsgs,
9246
+ reset,
9247
+ onSubmit
9248
+ };
9249
+ }
9250
+ const index_10dq51k = "";
9251
+ const EditButtonStyle = "esoz3jw";
9252
+ function EditFieldModal(props) {
9253
+ const {
9254
+ title,
9255
+ formRef: form2,
9256
+ renderContent,
9257
+ fullscreen
9258
+ } = props;
9259
+ const {
9260
+ i18n: i18n2
9261
+ } = useTranslation();
9262
+ const popModal = usePopModal();
9263
+ const {
9264
+ submitting,
9265
+ errorMsgs,
9266
+ reset,
9267
+ onSubmit
9268
+ } = useSubmitForm({
9269
+ formRef: form2,
9270
+ onSubmitSuccess: () => {
9271
+ popModal();
9272
+ }
9273
+ });
9274
+ const close = useCallback(() => {
9275
+ popModal();
9276
+ reset();
9277
+ }, [reset]);
9278
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(Modal, {
9279
+ className: fullscreen ? FullscreenModalStyle : SmallModalStyle,
9280
+ title: title || i18n2.t("dovetail.edit"),
9281
+ confirmLoading: submitting,
9282
+ onOk: onSubmit,
9283
+ onCancel: close,
9284
+ okText: i18n2.t("dovetail.save"),
9285
+ normal: true,
9286
+ destroyOnClose: true,
9287
+ fullscreen,
9288
+ children: [renderContent(), /* @__PURE__ */ jsxRuntimeExports.jsx(FormErrorAlert, {
9289
+ style: {
9290
+ marginTop: 16
9291
+ },
9292
+ errorMsgs,
9293
+ isEdit: true
9294
+ })]
9295
+ });
9296
+ }
9297
+ function EditField(props) {
9298
+ const {
9299
+ modalProps
9300
+ } = props;
9301
+ const {
9302
+ i18n: i18n2
9303
+ } = useTranslation();
9304
+ const {
9305
+ resource
9306
+ } = useResource();
9307
+ const pushModal = usePushModal();
9308
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(CanAccess, {
9309
+ resource: resource == null ? void 0 : resource.name,
9310
+ action: AccessControlAuth.Edit,
9311
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(Button, {
9312
+ className: cx_default(EditButtonStyle, Typo.Label.l4_regular_title),
9313
+ type: "link",
9314
+ onClick: () => {
9315
+ pushModal({
9316
+ component: EditFieldModal,
9317
+ props: modalProps
9318
+ });
9319
+ },
9320
+ children: i18n2.t("dovetail.edit")
9321
+ })
9322
+ });
9323
+ }
9324
+ var StorageUnit = /* @__PURE__ */ ((StorageUnit2) => {
9325
+ StorageUnit2["Pi"] = "Pi";
9326
+ StorageUnit2["PiB"] = "PiB";
9327
+ StorageUnit2["Ti"] = "Ti";
9328
+ StorageUnit2["TiB"] = "TiB";
9329
+ StorageUnit2["Gi"] = "Gi";
9330
+ StorageUnit2["GiB"] = "GiB";
9331
+ StorageUnit2["Mi"] = "Mi";
9332
+ StorageUnit2["MiB"] = "MiB";
9333
+ StorageUnit2["Ki"] = "Ki";
9334
+ StorageUnit2["KiB"] = "KiB";
9335
+ return StorageUnit2;
9336
+ })(StorageUnit || {});
9337
+ const UNIT_FACTORS = {
9338
+ Pi: 1024 ** 5,
9339
+ PiB: 1024 ** 5,
9340
+ Ti: 1024 ** 4,
9341
+ TiB: 1024 ** 4,
9342
+ Gi: 1024 ** 3,
9343
+ GiB: 1024 ** 3,
9344
+ Mi: 1024 ** 2,
9345
+ MiB: 1024 ** 2,
9346
+ Ki: 1024,
9347
+ KiB: 1024,
9348
+ B: 1
9349
+ };
9350
+ function transformStorageUnit(value2, toUnit = "Gi") {
9351
+ const num = parseFloat(value2);
9352
+ const unit = Object.values(StorageUnit).find((u) => value2.includes(u)) || "Ki";
9353
+ return num / UNIT_FACTORS[unit] * UNIT_FACTORS[toUnit];
9354
+ }
9355
+ const UNITS = ["", "K", "M", "G", "T", "P"];
9356
+ const FRACTIONAL = ["", "m", "u", "n", "p", "f"];
9357
+ function formatSi(inValue, options) {
9358
+ const {
9359
+ increment = 1e3,
9360
+ suffix = null,
9361
+ firstSuffix = null,
9362
+ startingExponent = 0,
9363
+ minExponent = 0,
9364
+ maxPrecision = 2,
9365
+ atLeastOne = true
9366
+ } = options || {};
9367
+ let val = inValue;
9368
+ let exp = startingExponent;
9369
+ while (val >= increment && exp + 1 < UNITS.length || exp < minExponent) {
9370
+ val = val / increment;
9371
+ exp++;
9372
+ }
9373
+ let out = 0;
9374
+ if (val < 10 && maxPrecision >= 2) {
9375
+ out = Math.round(val * 100) / 100;
9376
+ } else if (val < 100 && maxPrecision >= 1) {
9377
+ out = Math.round(val * 10) / 10;
9378
+ } else {
9379
+ out = Math.round(val);
9380
+ }
9381
+ if (atLeastOne && out === 0) {
9382
+ out = 1;
9383
+ }
9384
+ let outStr = String(out);
9385
+ if (exp === 0 && firstSuffix !== null) {
9386
+ outStr += `${firstSuffix}`;
9387
+ } else {
9388
+ outStr += `${UNITS[exp]}${suffix}` || "";
9389
+ }
9390
+ return outStr;
9391
+ }
9392
+ function parseSi(inValue, increment = null, allowFractional = true) {
9393
+ if (!inValue || typeof inValue !== "string" || !inValue.length) {
9394
+ return NaN;
9395
+ }
9396
+ inValue = inValue.replace(/,/g, "");
9397
+ let [, valStr, unit, incStr] = inValue.match(/^([0-9.-]+)\s*([^0-9.-]?)([^0-9.-]?)/) || [];
9398
+ const val = parseFloat(valStr);
9399
+ if (!unit) {
9400
+ return val;
9401
+ }
9402
+ if (unit.charCodeAt(0) === 181) {
9403
+ unit = "u";
9404
+ }
9405
+ const divide = FRACTIONAL.includes(unit);
9406
+ const multiply = UNITS.includes(unit.toUpperCase());
9407
+ if (increment === null) {
9408
+ if ((multiply || divide) && incStr === "i") {
9409
+ increment = 1024;
9410
+ } else {
9411
+ increment = 1e3;
9412
+ }
9413
+ }
9414
+ if (divide && allowFractional) {
9415
+ const exp = FRACTIONAL.indexOf(unit);
9416
+ return val / Math.pow(increment, exp);
9417
+ }
9418
+ if (multiply) {
9419
+ const exp = UNITS.indexOf(unit.toUpperCase());
9420
+ return val * Math.pow(increment, exp);
9421
+ }
9422
+ return val;
9423
+ }
9424
+ const DistributeStorageForm = React__default.forwardRef(function DistributeStorageForm2(props, ref) {
9425
+ const { defaultValue, pvc: pvc2 } = props;
9426
+ const { resource } = useResource();
9427
+ const { mutateAsync } = useUpdate();
9428
+ const { t: t2 } = useTranslation();
9429
+ const [distributeStorage, setDistributeStorage] = useState(defaultValue);
9430
+ const [validateResult, setValidateResult] = useState({
9431
+ distributeStorage: ""
9432
+ });
9433
+ const validators = useMemo(() => {
9434
+ return {
9435
+ distributeStorage(value2) {
9436
+ if (isNil(value2)) {
9437
+ return t2("dovetail.pvc_storage_required");
9438
+ } else if (value2 < 1) {
9439
+ return t2("dovetail.pvc_storage_min");
9440
+ } else if (value2 < defaultValue) {
9441
+ return t2("dovetail.pvc_storage_reduce_limit");
9442
+ }
9443
+ return "";
9444
+ }
9445
+ };
9446
+ }, [t2, defaultValue]);
9447
+ const submit = useCallback(() => {
9448
+ const isInvalid = !!validators.distributeStorage(distributeStorage);
9449
+ if (isInvalid) {
9450
+ return false;
9451
+ }
9452
+ const v = pvc2.updateDistributeStorage(distributeStorage);
9453
+ const id = pvc2.id;
9454
+ pruneBeforeEdit(v);
9455
+ return mutateAsync({
9456
+ id,
9457
+ resource: (resource == null ? void 0 : resource.name) || "",
9458
+ values: v,
9459
+ successNotification() {
9460
+ return {
9461
+ message: t2("dovetail.edit_distribute_storage_success_toast", {
9462
+ kind: pvc2.kind,
9463
+ name: pvc2.id,
9464
+ interpolation: {
9465
+ escapeValue: false
9466
+ }
9467
+ }),
9468
+ type: "success"
9469
+ };
9470
+ },
9471
+ errorNotification: false
9472
+ });
9473
+ }, [pvc2, distributeStorage, resource == null ? void 0 : resource.name, validators, mutateAsync, t2]);
9474
+ useImperativeHandle(ref, () => ({
9475
+ submit
9476
+ }), [submit]);
9477
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
9478
+ Form.Item,
9479
+ {
9480
+ label: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { style: { width: "134px" }, children: t2("dovetail.distributed") }),
9481
+ colon: false,
9482
+ help: validateResult.distributeStorage,
9483
+ validateStatus: validateResult.distributeStorage ? "error" : "",
9484
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(
9485
+ Fields.Integer,
9486
+ {
9487
+ style: { width: "142px" },
9488
+ input: {
9489
+ name: "distributeStorage",
9490
+ value: distributeStorage,
9491
+ onChange: (value2) => {
9492
+ const v = Number(value2);
9493
+ setDistributeStorage(v);
9494
+ setValidateResult({
9495
+ distributeStorage: validators.distributeStorage(v)
9496
+ });
9497
+ },
9498
+ onBlur: () => {
9499
+ },
9500
+ onFocus: () => {
9501
+ }
9502
+ },
9503
+ min: 1,
9504
+ meta: {},
9505
+ suffix: "GiB",
9506
+ controls: true
9507
+ }
9508
+ )
9509
+ }
9510
+ );
9511
+ });
9512
+ function PVCDistributeStorage({ pvc: pvc2, editable }) {
9513
+ var _a, _b;
9514
+ const { t: t2 } = useTranslation();
9515
+ const formRef = useRef(null);
9516
+ const value2 = (_b = (_a = pvc2.spec.resources) == null ? void 0 : _a.requests) == null ? void 0 : _b.storage;
9517
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
9518
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Units.Byte, { rawValue: parseSi(value2), decimals: 1 }),
9519
+ editable && /* @__PURE__ */ jsxRuntimeExports.jsx(
9520
+ EditField,
9521
+ {
9522
+ modalProps: {
9523
+ formRef,
9524
+ title: t2("dovetail.edit_replicas"),
9525
+ renderContent() {
9526
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
9527
+ DistributeStorageForm,
9528
+ {
9529
+ ref: formRef,
9530
+ defaultValue: value2 ? transformStorageUnit(value2, StorageUnit.Gi) : 0,
9531
+ pvc: pvc2
9532
+ }
9533
+ );
9534
+ }
9535
+ }
9536
+ }
9537
+ )
9538
+ ] });
9539
+ }
9122
9540
  class ResourceModel {
9123
9541
  constructor(_rawYaml, _globalStore) {
9124
9542
  __publicField(this, "id");
@@ -9800,28 +10218,27 @@ const PVC_INIT_VALUE = {
9800
10218
  "storageClassName": "example"
9801
10219
  }
9802
10220
  };
9803
- var WorkloadState = /* @__PURE__ */ ((WorkloadState2) => {
9804
- WorkloadState2["Terminated"] = "terminated";
9805
- WorkloadState2["UPDATING"] = "updating";
9806
- WorkloadState2["READY"] = "ready";
9807
- WorkloadState2["COMPLETED"] = "completed";
9808
- WorkloadState2["FAILED"] = "failed";
9809
- WorkloadState2["SUSPENDED"] = "suspended";
9810
- WorkloadState2["RUNNING"] = "running";
9811
- WorkloadState2["SUCCEEDED"] = "succeeded";
9812
- WorkloadState2["UNKNOWN"] = "unknown";
9813
- WorkloadState2["TERMINATING"] = "terminating";
9814
- WorkloadState2["PENDING"] = "pending";
9815
- WorkloadState2["WAITING"] = "waiting";
9816
- WorkloadState2["STOPPED"] = "stopped";
9817
- return WorkloadState2;
9818
- })(WorkloadState || {});
9819
- var AccessControlAuth = /* @__PURE__ */ ((AccessControlAuth2) => {
9820
- AccessControlAuth2["Edit"] = "Edit";
9821
- AccessControlAuth2["Delete"] = "Delete";
9822
- AccessControlAuth2["Create"] = "Create";
9823
- return AccessControlAuth2;
9824
- })(AccessControlAuth || {});
10221
+ var ResourceState = /* @__PURE__ */ ((ResourceState2) => {
10222
+ ResourceState2["TERMINATED"] = "terminated";
10223
+ ResourceState2["UPDATING"] = "updating";
10224
+ ResourceState2["READY"] = "ready";
10225
+ ResourceState2["COMPLETED"] = "completed";
10226
+ ResourceState2["ABNORMAL"] = "abnormal";
10227
+ ResourceState2["FAILED"] = "failed";
10228
+ ResourceState2["SUSPENDED"] = "suspended";
10229
+ ResourceState2["RUNNING"] = "running";
10230
+ ResourceState2["SUCCEEDED"] = "succeeded";
10231
+ ResourceState2["UNKNOWN"] = "unknown";
10232
+ ResourceState2["TERMINATING"] = "terminating";
10233
+ ResourceState2["PENDING"] = "pending";
10234
+ ResourceState2["WAITING"] = "waiting";
10235
+ ResourceState2["STOPPED"] = "stopped";
10236
+ ResourceState2["AVAILABLE"] = "available";
10237
+ ResourceState2["BOUND"] = "bound";
10238
+ ResourceState2["RELEASED"] = "released";
10239
+ ResourceState2["LOST"] = "lost";
10240
+ return ResourceState2;
10241
+ })(ResourceState || {});
9825
10242
  function matchSelector(pod2, selector, namespace2 = "default") {
9826
10243
  var _a, _b, _c;
9827
10244
  let match = true;
@@ -9907,18 +10324,18 @@ class JobModel extends WorkloadBaseModel {
9907
10324
  get stateDisplay() {
9908
10325
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
9909
10326
  if (!((_a = this.spec) == null ? void 0 : _a.completions) && !((_b = this.status) == null ? void 0 : _b.succeeded)) {
9910
- return WorkloadState.RUNNING;
10327
+ return ResourceState.RUNNING;
9911
10328
  }
9912
10329
  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"))) {
9913
- return WorkloadState.COMPLETED;
10330
+ return ResourceState.COMPLETED;
9914
10331
  }
9915
10332
  if ((_h = (_g = this.status) == null ? void 0 : _g.conditions) == null ? void 0 : _h.some((c2) => c2.type === "Failed" && c2.status === "True")) {
9916
- return WorkloadState.FAILED;
10333
+ return ResourceState.ABNORMAL;
9917
10334
  }
9918
10335
  if ((_j = (_i = this.status) == null ? void 0 : _i.conditions) == null ? void 0 : _j.some((c2) => c2.type === "Suspended" && c2.status === "True")) {
9919
- return WorkloadState.SUSPENDED;
10336
+ return ResourceState.SUSPENDED;
9920
10337
  }
9921
- return WorkloadState.RUNNING;
10338
+ return ResourceState.RUNNING;
9922
10339
  }
9923
10340
  }
9924
10341
  class WorkloadModel extends WorkloadBaseModel {
@@ -9970,75 +10387,6 @@ class WorkloadModel extends WorkloadBaseModel {
9970
10387
  return newOne;
9971
10388
  }
9972
10389
  }
9973
- const UNITS = ["", "K", "M", "G", "T", "P"];
9974
- const FRACTIONAL = ["", "m", "u", "n", "p", "f"];
9975
- function formatSi(inValue, options) {
9976
- const {
9977
- increment = 1e3,
9978
- suffix = null,
9979
- firstSuffix = null,
9980
- startingExponent = 0,
9981
- minExponent = 0,
9982
- maxPrecision = 2,
9983
- atLeastOne = true
9984
- } = options || {};
9985
- let val = inValue;
9986
- let exp = startingExponent;
9987
- while (val >= increment && exp + 1 < UNITS.length || exp < minExponent) {
9988
- val = val / increment;
9989
- exp++;
9990
- }
9991
- let out = 0;
9992
- if (val < 10 && maxPrecision >= 2) {
9993
- out = Math.round(val * 100) / 100;
9994
- } else if (val < 100 && maxPrecision >= 1) {
9995
- out = Math.round(val * 10) / 10;
9996
- } else {
9997
- out = Math.round(val);
9998
- }
9999
- if (atLeastOne && out === 0) {
10000
- out = 1;
10001
- }
10002
- let outStr = String(out);
10003
- if (exp === 0 && firstSuffix !== null) {
10004
- outStr += `${firstSuffix}`;
10005
- } else {
10006
- outStr += `${UNITS[exp]}${suffix}` || "";
10007
- }
10008
- return outStr;
10009
- }
10010
- function parseSi(inValue, increment = null, allowFractional = true) {
10011
- if (!inValue || typeof inValue !== "string" || !inValue.length) {
10012
- return NaN;
10013
- }
10014
- inValue = inValue.replace(/,/g, "");
10015
- let [, valStr, unit, incStr] = inValue.match(/^([0-9.-]+)\s*([^0-9.-]?)([^0-9.-]?)/) || [];
10016
- const val = parseFloat(valStr);
10017
- if (!unit) {
10018
- return val;
10019
- }
10020
- if (unit.charCodeAt(0) === 181) {
10021
- unit = "u";
10022
- }
10023
- const divide = FRACTIONAL.includes(unit);
10024
- const multiply = UNITS.includes(unit.toUpperCase());
10025
- if (increment === null) {
10026
- if ((multiply || divide) && incStr === "i") {
10027
- increment = 1024;
10028
- } else {
10029
- increment = 1e3;
10030
- }
10031
- }
10032
- if (divide && allowFractional) {
10033
- const exp = FRACTIONAL.indexOf(unit);
10034
- return val / Math.pow(increment, exp);
10035
- }
10036
- if (multiply) {
10037
- const exp = UNITS.indexOf(unit.toUpperCase());
10038
- return val * Math.pow(increment, exp);
10039
- }
10040
- return val;
10041
- }
10042
10390
  class PodModel extends WorkloadBaseModel {
10043
10391
  constructor(_rawYaml, _globalStore) {
10044
10392
  var _a, _b, _c, _d, _e, _f, _g, _h, _i;
@@ -10116,9 +10464,9 @@ class PodModel extends WorkloadBaseModel {
10116
10464
  get stateDisplay() {
10117
10465
  var _a, _b;
10118
10466
  if (this.metadata.deletionTimestamp) {
10119
- return WorkloadState.TERMINATING;
10467
+ return ResourceState.TERMINATING;
10120
10468
  }
10121
- return ((_b = (_a = this.status) == null ? void 0 : _a.phase) == null ? void 0 : _b.toLowerCase()) || WorkloadState.UNKNOWN;
10469
+ return ((_b = (_a = this.status) == null ? void 0 : _a.phase) == null ? void 0 : _b.toLowerCase()) || ResourceState.UNKNOWN;
10122
10470
  }
10123
10471
  }
10124
10472
  class PodMetricsModel extends ResourceModel {
@@ -10158,9 +10506,9 @@ class CronJobModel extends WorkloadBaseModel {
10158
10506
  get stateDisplay() {
10159
10507
  var _a;
10160
10508
  if ((_a = this.spec) == null ? void 0 : _a.suspend) {
10161
- return WorkloadState.SUSPENDED;
10509
+ return ResourceState.SUSPENDED;
10162
10510
  }
10163
- return WorkloadState.RUNNING;
10511
+ return ResourceState.RUNNING;
10164
10512
  }
10165
10513
  suspend() {
10166
10514
  const newOne = lodashExports.cloneDeep(this._rawYaml);
@@ -10192,11 +10540,11 @@ class DeploymentModel extends WorkloadModel {
10192
10540
  get stateDisplay() {
10193
10541
  var _a, _b, _c;
10194
10542
  if (((_a = this.spec) == null ? void 0 : _a.replicas) === 0) {
10195
- return WorkloadState.STOPPED;
10543
+ return ResourceState.STOPPED;
10196
10544
  } else if (((_b = this.spec) == null ? void 0 : _b.replicas) !== ((_c = this.status) == null ? void 0 : _c.readyReplicas)) {
10197
- return WorkloadState.UPDATING;
10545
+ return ResourceState.UPDATING;
10198
10546
  }
10199
- return WorkloadState.READY;
10547
+ return ResourceState.READY;
10200
10548
  }
10201
10549
  }
10202
10550
  class DaemonSetModel extends WorkloadModel {
@@ -10207,9 +10555,9 @@ class DaemonSetModel extends WorkloadModel {
10207
10555
  get stateDisplay() {
10208
10556
  var _a, _b;
10209
10557
  if (((_a = this.status) == null ? void 0 : _a.desiredNumberScheduled) !== ((_b = this.status) == null ? void 0 : _b.numberReady)) {
10210
- return WorkloadState.UPDATING;
10558
+ return ResourceState.UPDATING;
10211
10559
  }
10212
- return WorkloadState.READY;
10560
+ return ResourceState.READY;
10213
10561
  }
10214
10562
  get replicas() {
10215
10563
  return this.status && "desiredNumberScheduled" in this.status ? this.status.desiredNumberScheduled : 0;
@@ -10226,11 +10574,11 @@ class StatefulSetModel extends WorkloadModel {
10226
10574
  get stateDisplay() {
10227
10575
  var _a, _b, _c;
10228
10576
  if (((_a = this.spec) == null ? void 0 : _a.replicas) === 0) {
10229
- return WorkloadState.STOPPED;
10577
+ return ResourceState.STOPPED;
10230
10578
  } else if (((_b = this.spec) == null ? void 0 : _b.replicas) !== ((_c = this.status) == null ? void 0 : _c.readyReplicas)) {
10231
- return WorkloadState.UPDATING;
10579
+ return ResourceState.UPDATING;
10232
10580
  }
10233
- return WorkloadState.READY;
10581
+ return ResourceState.READY;
10234
10582
  }
10235
10583
  }
10236
10584
  var ServiceTypeEnum = /* @__PURE__ */ ((ServiceTypeEnum2) => {
@@ -10279,7 +10627,7 @@ var NodeRole = /* @__PURE__ */ ((NodeRole2) => {
10279
10627
  NodeRole2["Worker"] = "Worker";
10280
10628
  return NodeRole2;
10281
10629
  })(NodeRole || {});
10282
- class NodeModel extends WorkloadBaseModel {
10630
+ class NodeModel extends ResourceModel {
10283
10631
  constructor(_rawYaml, _globalStore) {
10284
10632
  super(_rawYaml, _globalStore);
10285
10633
  this._rawYaml = _rawYaml;
@@ -10337,6 +10685,22 @@ class PersistentVolumeModel extends ResourceModel {
10337
10685
  get phase() {
10338
10686
  return this._rawYaml.status.phase;
10339
10687
  }
10688
+ get stateDisplay() {
10689
+ switch (this.phase) {
10690
+ case "Pending":
10691
+ return ResourceState.PENDING;
10692
+ case "Bound":
10693
+ return ResourceState.BOUND;
10694
+ case "Failed":
10695
+ return ResourceState.FAILED;
10696
+ case "Available":
10697
+ return ResourceState.AVAILABLE;
10698
+ case "Released":
10699
+ return ResourceState.RELEASED;
10700
+ default:
10701
+ return ResourceState.UNKNOWN;
10702
+ }
10703
+ }
10340
10704
  get csi() {
10341
10705
  var _a;
10342
10706
  return (_a = this._rawYaml.spec.csi) == null ? void 0 : _a.driver;
@@ -10345,6 +10709,10 @@ class PersistentVolumeModel extends ResourceModel {
10345
10709
  var _a;
10346
10710
  return (_a = this._rawYaml.spec.claimRef) == null ? void 0 : _a.name;
10347
10711
  }
10712
+ get pvcNamespace() {
10713
+ var _a;
10714
+ return (_a = this._rawYaml.spec.claimRef) == null ? void 0 : _a.namespace;
10715
+ }
10348
10716
  }
10349
10717
  class PersistentVolumeClaimModel extends ResourceModel {
10350
10718
  constructor(_rawYaml, _globalStore) {
@@ -10357,6 +10725,18 @@ class PersistentVolumeClaimModel extends ResourceModel {
10357
10725
  get pv() {
10358
10726
  return this._rawYaml.spec.volumeName;
10359
10727
  }
10728
+ get stateDisplay() {
10729
+ switch (this.phase) {
10730
+ case "Pending":
10731
+ return ResourceState.PENDING;
10732
+ case "Bound":
10733
+ return ResourceState.BOUND;
10734
+ case "Lost":
10735
+ return ResourceState.LOST;
10736
+ case "Failed":
10737
+ return ResourceState.FAILED;
10738
+ }
10739
+ }
10360
10740
  updateDistributeStorage(distributeStorage) {
10361
10741
  const yaml2 = cloneDeep(this._globalStore.restoreItem(this));
10362
10742
  return set$1(yaml2, "spec.resources.requests.storage", `${distributeStorage}Gi`);
@@ -10468,38 +10848,8 @@ const Tags = (props) => {
10468
10848
  children: tags
10469
10849
  });
10470
10850
  };
10471
- const StateTag_1o2atxo = "";
10472
- const StateTagStyle = "s8qkbck";
10473
- const StateTag = ({
10474
- state: state2 = WorkloadState.UPDATING,
10475
- hideBackground,
10476
- className
10477
- }) => {
10478
- const {
10479
- t: t2
10480
- } = useTranslation();
10481
- const statusMap = {
10482
- updating: "loading",
10483
- ready: "green",
10484
- completed: "gray",
10485
- failed: "red",
10486
- suspended: "warning",
10487
- running: "green",
10488
- succeeded: "blue",
10489
- unknown: "gray",
10490
- terminating: "loading",
10491
- pending: "warning",
10492
- waiting: "warning",
10493
- terminated: "red",
10494
- stopped: "gray"
10495
- };
10496
- return /* @__PURE__ */ jsxRuntimeExports.jsx(StatusCapsule, {
10497
- className: cx_default(className, StateTagStyle, hideBackground && "no-background"),
10498
- color: statusMap[state2] !== "loading" ? statusMap[state2] : void 0,
10499
- loading: statusMap[state2] === "loading",
10500
- children: t2(`dovetail.${state2 || "updating"}`)
10501
- });
10502
- };
10851
+ const tag_how7no = "";
10852
+ const StateTagStyle = "s82411";
10503
10853
  function addId(arr, idKey) {
10504
10854
  return arr.map((e2) => {
10505
10855
  return {
@@ -10617,7 +10967,7 @@ const Time = (props) => {
10617
10967
  const ConditionsTable = ({ conditions = [] }) => {
10618
10968
  const { t: t2 } = useTranslation();
10619
10969
  const component = useContext(ComponentContext);
10620
- const Table$12 = component.Table || Table;
10970
+ const Table2 = component.Table || Table$1;
10621
10971
  const conditionsWithId = addId(conditions, "type");
10622
10972
  const columns = [
10623
10973
  {
@@ -10693,7 +11043,7 @@ const ConditionsTable = ({ conditions = [] }) => {
10693
11043
  );
10694
11044
  }
10695
11045
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
10696
- Table$12,
11046
+ Table2,
10697
11047
  {
10698
11048
  tableKey: "condition",
10699
11049
  loading: false,
@@ -10810,184 +11160,6 @@ function useOpenForm(options) {
10810
11160
  }
10811
11161
  };
10812
11162
  }
10813
- function FormErrorAlert(props) {
10814
- const { title, errorMsgs, style, className, isEdit } = props;
10815
- const { i18n: i18n2 } = useTranslation();
10816
- return errorMsgs.length ? /* @__PURE__ */ jsxRuntimeExports.jsx(
10817
- Alert,
10818
- {
10819
- message: /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
10820
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: title || i18n2.t(isEdit ? "dovetail.save_failed_tip" : "dovetail.create_failed_tip") }),
10821
- errorMsgs.length > 1 ? /* @__PURE__ */ jsxRuntimeExports.jsx("ul", { children: errorMsgs.map((errorMsg, index2) => /* @__PURE__ */ jsxRuntimeExports.jsxs("li", { children: [
10822
- index2 + 1 + ". ",
10823
- " ",
10824
- errorMsg
10825
- ] }, errorMsg)) }) : first(errorMsgs)
10826
- ] }),
10827
- type: "error",
10828
- style,
10829
- className
10830
- }
10831
- ) : null;
10832
- }
10833
- function getCommonErrors(responseBody, i18n2) {
10834
- var _a;
10835
- 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))) {
10836
- return [];
10837
- }
10838
- const causes = ((_a = responseBody.details) == null ? void 0 : _a.causes) || responseBody.graphQLErrors || [];
10839
- if (causes.length) {
10840
- return causes.map((cause) => {
10841
- let params = {};
10842
- let message2 = cause.message;
10843
- try {
10844
- const info = JSON.parse(cause.message);
10845
- params = info.params;
10846
- message2 = info.message;
10847
- } catch {
10848
- return i18n2.t(
10849
- [
10850
- `error.${cause.reason}`,
10851
- `error.${cause.code}`,
10852
- `${cause.field ? `${cause.field}: ` : ""}${message2}`
10853
- ],
10854
- {
10855
- ...params,
10856
- fallbackLng: ""
10857
- }
10858
- );
10859
- }
10860
- return i18n2.t(
10861
- [
10862
- `error.${cause.reason}`,
10863
- `error.${cause.code}`,
10864
- `${cause.field ? `${cause.field}: ` : ""}${message2}`
10865
- ],
10866
- {
10867
- ...params,
10868
- fallbackLng: ""
10869
- }
10870
- );
10871
- });
10872
- }
10873
- return [
10874
- i18n2.t(
10875
- [`error.${responseBody.code}`, `error.${responseBody.reason}`, responseBody.message || ""],
10876
- { fallbackLng: "" }
10877
- )
10878
- ];
10879
- }
10880
- function useSubmitForm(options) {
10881
- const { formRef, onSubmitSuccess } = options;
10882
- const { i18n: i18n2 } = useTranslation();
10883
- const [submitting, setSubmitting] = useState(false);
10884
- const [errorMsgs, setErrorMsgs] = useState([]);
10885
- const reset = useCallback(() => {
10886
- setSubmitting(false);
10887
- setErrorMsgs([]);
10888
- }, []);
10889
- const onSubmit = useCallback(async () => {
10890
- var _a;
10891
- try {
10892
- setSubmitting(true);
10893
- await ((_a = formRef.current) == null ? void 0 : _a.submit());
10894
- onSubmitSuccess == null ? void 0 : onSubmitSuccess();
10895
- reset();
10896
- } catch (error) {
10897
- if (error instanceof Object) {
10898
- if ("response" in error && error.response instanceof Response) {
10899
- const response = error.response;
10900
- const body = await response.json();
10901
- setErrorMsgs(getCommonErrors(body, i18n2));
10902
- } else if ("message" in error && typeof error.message === "string") {
10903
- setErrorMsgs([error.message]);
10904
- }
10905
- }
10906
- } finally {
10907
- setSubmitting(false);
10908
- }
10909
- }, [formRef, i18n2, reset, onSubmitSuccess]);
10910
- return {
10911
- submitting,
10912
- errorMsgs,
10913
- reset,
10914
- onSubmit
10915
- };
10916
- }
10917
- const index_130sdg8 = "";
10918
- const EditButtonStyle = "esoz3jw";
10919
- function EditFieldModal(props) {
10920
- const {
10921
- title,
10922
- formRef: form2,
10923
- renderContent,
10924
- fullscreen
10925
- } = props;
10926
- const {
10927
- i18n: i18n2
10928
- } = useTranslation();
10929
- const popModal = usePopModal();
10930
- const {
10931
- submitting,
10932
- errorMsgs,
10933
- reset,
10934
- onSubmit
10935
- } = useSubmitForm({
10936
- formRef: form2,
10937
- onSubmitSuccess: () => {
10938
- popModal();
10939
- }
10940
- });
10941
- const close = useCallback(() => {
10942
- popModal();
10943
- reset();
10944
- }, [reset]);
10945
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(Modal, {
10946
- className: fullscreen ? FullscreenModalStyle : SmallModalStyle,
10947
- title: title || i18n2.t("dovetail.edit"),
10948
- confirmLoading: submitting,
10949
- onOk: onSubmit,
10950
- onCancel: close,
10951
- okText: i18n2.t("dovetail.save"),
10952
- normal: true,
10953
- destroyOnClose: true,
10954
- fullscreen,
10955
- children: [renderContent(), /* @__PURE__ */ jsxRuntimeExports.jsx(FormErrorAlert, {
10956
- style: {
10957
- marginTop: 16
10958
- },
10959
- errorMsgs,
10960
- isEdit: true
10961
- })]
10962
- });
10963
- }
10964
- function EditField(props) {
10965
- const {
10966
- modalProps
10967
- } = props;
10968
- const {
10969
- i18n: i18n2
10970
- } = useTranslation();
10971
- const {
10972
- resource
10973
- } = useResource();
10974
- const pushModal = usePushModal();
10975
- return /* @__PURE__ */ jsxRuntimeExports.jsx(CanAccess, {
10976
- resource: resource == null ? void 0 : resource.name,
10977
- action: AccessControlAuth.Edit,
10978
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(Button, {
10979
- className: EditButtonStyle,
10980
- type: "link",
10981
- onClick: () => {
10982
- pushModal({
10983
- component: EditFieldModal,
10984
- props: modalProps
10985
- });
10986
- },
10987
- children: i18n2.t("dovetail.edit")
10988
- })
10989
- });
10990
- }
10991
11163
  const EditLabelForm = React__default.forwardRef(
10992
11164
  function EditLabelForm2(props, ref) {
10993
11165
  var _a;
@@ -11048,12 +11220,12 @@ const EditLabelForm = React__default.forwardRef(
11048
11220
  columns: [
11049
11221
  {
11050
11222
  key: "key",
11051
- title: "Key",
11223
+ title: t2("dovetail.key"),
11052
11224
  type: "input"
11053
11225
  },
11054
11226
  {
11055
11227
  key: "value",
11056
- title: "Value",
11228
+ title: t2("dovetail.value"),
11057
11229
  type: "input"
11058
11230
  }
11059
11231
  ],
@@ -11120,7 +11292,7 @@ const EditAnnotationForm = React__default.forwardRef(
11120
11292
  value2.forEach(({ key: key2, value: value22 }) => {
11121
11293
  newAnnotations[key2] = value22;
11122
11294
  });
11123
- const newYaml = resourceModel.updateLabel(newAnnotations);
11295
+ const newYaml = resourceModel.updateAnnotation(newAnnotations);
11124
11296
  pruneBeforeEdit(newYaml);
11125
11297
  return mutateAsync({
11126
11298
  id: resourceModel.id,
@@ -11161,12 +11333,12 @@ const EditAnnotationForm = React__default.forwardRef(
11161
11333
  columns: [
11162
11334
  {
11163
11335
  key: "key",
11164
- title: "Key",
11336
+ title: t2("dovetail.key"),
11165
11337
  type: "input"
11166
11338
  },
11167
11339
  {
11168
11340
  key: "value",
11169
- title: "Value",
11341
+ title: t2("dovetail.value"),
11170
11342
  type: "input"
11171
11343
  }
11172
11344
  ],
@@ -11319,22 +11491,23 @@ function addDefaultRenderToColumns(columns) {
11319
11491
  }));
11320
11492
  }
11321
11493
  const useEagleTable = (params) => {
11322
- var _a, _b;
11323
- const { columns, tableProps, formatter, Dropdown: Dropdown2 = K8sDropdown, resource: resourceFromParams } = params;
11494
+ var _a, _b, _c;
11495
+ const { columns, tableProps, formatter, Dropdown: Dropdown2 = K8sDropdown } = params;
11324
11496
  const [selectedKeys, setSelectedKeys] = useState([]);
11325
11497
  const [currentPage, setCurrentPage] = useState((tableProps == null ? void 0 : tableProps.currentPage) || 1);
11326
11498
  const { resource } = useResource();
11327
11499
  const currentSize = (tableProps == null ? void 0 : tableProps.defaultSize) || 10;
11328
11500
  const useTableParams = useMemo(() => {
11501
+ var _a2;
11329
11502
  const mergedParams = merge(params.useTableParams, {
11330
11503
  pagination: {
11331
11504
  pageSize: currentSize,
11332
11505
  mode: "server"
11333
11506
  },
11334
- resource: resourceFromParams || (resource == null ? void 0 : resource.name)
11507
+ resource: ((_a2 = params.useTableParams) == null ? void 0 : _a2.resource) || (resource == null ? void 0 : resource.name)
11335
11508
  });
11336
11509
  return mergedParams;
11337
- }, [params.useTableParams, currentSize, resourceFromParams, resource]);
11510
+ }, [params.useTableParams, currentSize, resource]);
11338
11511
  const finalColumns = useMemo(
11339
11512
  () => addDefaultRenderToColumns(columns),
11340
11513
  [columns]
@@ -11364,7 +11537,7 @@ const useEagleTable = (params) => {
11364
11537
  const total = ((_b = table.tableQueryResult.data) == null ? void 0 : _b.total) || 0;
11365
11538
  const finalDataSource = formatter ? data2 == null ? void 0 : data2.map(formatter) : data2;
11366
11539
  const finalProps = {
11367
- tableKey: resourceFromParams || (resource == null ? void 0 : resource.name) || "table",
11540
+ tableKey: ((_c = params.useTableParams) == null ? void 0 : _c.resource) || (resource == null ? void 0 : resource.name) || "table",
11368
11541
  loading: table.tableQueryResult.isLoading,
11369
11542
  data: finalDataSource || [],
11370
11543
  columns: finalColumns,
@@ -11389,18 +11562,19 @@ const useEagleTable = (params) => {
11389
11562
  }, []);
11390
11563
  return { tableProps: finalProps, selectedKeys, ...table };
11391
11564
  };
11392
- function CreateButton() {
11565
+ function CreateButton(props) {
11393
11566
  var _a;
11394
11567
  const { t: t2 } = useTranslation();
11395
11568
  const openForm = useOpenForm();
11396
11569
  const { resource } = useResource();
11570
+ const label2 = props.label || ((_a = resource == null ? void 0 : resource.meta) == null ? void 0 : _a.kind);
11397
11571
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
11398
11572
  Button,
11399
11573
  {
11400
11574
  prefixIcon: /* @__PURE__ */ jsxRuntimeExports.jsx(PlusAddCreateNew16BoldOntintIcon, {}),
11401
11575
  type: "primary",
11402
11576
  onClick: openForm,
11403
- children: t2("dovetail.create_resource", { resource: (_a = resource == null ? void 0 : resource.meta) == null ? void 0 : _a.kind })
11577
+ children: t2("dovetail.create_resource", { resource: /^[a-zA-Z]/.test(label2) ? ` ${label2}` : label2 })
11404
11578
  }
11405
11579
  );
11406
11580
  }
@@ -11447,12 +11621,13 @@ const DeleteManyButton = (props) => {
11447
11621
  visible ? /* @__PURE__ */ jsxRuntimeExports.jsx(Modal, { ...modalProps }) : null
11448
11622
  ] });
11449
11623
  };
11450
- const TableToolBar_nvjftd = "";
11451
- const ToolbarWrapperStyle = "t1v3ienx";
11452
- const ToolbarStyle$3 = "tgejfwe";
11453
- const TitleStyle$2 = "tq6dc79";
11454
- const DescriptionStyle = "d1wqyhgc";
11624
+ const index_1wo1wv1 = "";
11625
+ const ToolbarWrapperStyle = "t1908hhn";
11626
+ const ToolbarStyle$3 = "t1ym1gqo";
11627
+ const TitleStyle$2 = "t38ugwl";
11628
+ const DescriptionStyle = "d13nfex0";
11455
11629
  const TableToolBar = ({
11630
+ title,
11456
11631
  description,
11457
11632
  selectedKeys,
11458
11633
  hideCreate
@@ -11467,14 +11642,16 @@ const TableToolBar = ({
11467
11642
  className: ToolbarStyle$3,
11468
11643
  children: [/* @__PURE__ */ jsxRuntimeExports.jsx("span", {
11469
11644
  className: cx_default(Typo.Display.d2_regular_title, TitleStyle$2),
11470
- children: (_a = resource == null ? void 0 : resource.meta) == null ? void 0 : _a.kind
11645
+ children: title || ((_a = resource == null ? void 0 : resource.meta) == null ? void 0 : _a.kind)
11471
11646
  }), /* @__PURE__ */ jsxRuntimeExports.jsxs(Space, {
11472
11647
  children: [selectedKeys.length > 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx(DeleteManyButton, {
11473
11648
  ids: selectedKeys
11474
11649
  }) : void 0, /* @__PURE__ */ jsxRuntimeExports.jsx(CanAccess, {
11475
11650
  resource: resource == null ? void 0 : resource.name,
11476
11651
  action: AccessControlAuth.Create,
11477
- children: !hideCreate ? /* @__PURE__ */ jsxRuntimeExports.jsx(CreateButton, {}) : null
11652
+ children: !hideCreate ? /* @__PURE__ */ jsxRuntimeExports.jsx(CreateButton, {
11653
+ label: title
11654
+ }) : null
11478
11655
  })]
11479
11656
  })]
11480
11657
  }), description ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
@@ -11505,7 +11682,7 @@ const CronjobJobsTable = ({
11505
11682
  } = useTranslation();
11506
11683
  const [selectedKeys] = useState([]);
11507
11684
  const component = useContext(ComponentContext);
11508
- const Table$12 = component.Table || Table;
11685
+ const Table2 = component.Table || Table$1;
11509
11686
  const columns = useMemo(() => [NameColumnRenderer(i18n2, "jobs"), StateDisplayColumnRenderer(i18n2), NameSpaceColumnRenderer(i18n2), {
11510
11687
  ...WorkloadImageColumnRenderer(i18n2),
11511
11688
  width: 238
@@ -11546,7 +11723,7 @@ const CronjobJobsTable = ({
11546
11723
  children: [hideToolBar ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(TableToolBar, {
11547
11724
  selectedKeys,
11548
11725
  hideCreate: true
11549
- }), /* @__PURE__ */ jsxRuntimeExports.jsx(Table$12, {
11726
+ }), /* @__PURE__ */ jsxRuntimeExports.jsx(Table2, {
11550
11727
  ...tableProps,
11551
11728
  tableKey: "cronjobs",
11552
11729
  showMenuColumn: false
@@ -11620,7 +11797,7 @@ const EventsTable = ({ uid }) => {
11620
11797
  }), [columns, uid]);
11621
11798
  const { tableProps } = useEagleTable(params);
11622
11799
  const component = useContext(ComponentContext);
11623
- const Table$12 = component.Table || Table;
11800
+ const Table2 = component.Table || Table$1;
11624
11801
  if (!((_a = tableProps.data) == null ? void 0 : _a.length) && !tableProps.loading) {
11625
11802
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
11626
11803
  WidgetErrorContent,
@@ -11630,7 +11807,7 @@ const EventsTable = ({ uid }) => {
11630
11807
  );
11631
11808
  }
11632
11809
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
11633
- Table$12,
11810
+ Table2,
11634
11811
  {
11635
11812
  ...tableProps,
11636
11813
  tableKey: "events",
@@ -11673,9 +11850,9 @@ const index_x36tts = "";
11673
11850
  const LinkStyle = "l1vnw9x0";
11674
11851
  const ResourceLink = (props) => {
11675
11852
  const {
11676
- resourceName,
11853
+ resourceKind: resourceName,
11677
11854
  namespace: namespace2,
11678
- resourceId
11855
+ name: resourceId
11679
11856
  } = props;
11680
11857
  const navigation = useNavigation();
11681
11858
  const go = useGo();
@@ -11702,7 +11879,7 @@ const IngressRulesTable = ({ ingress }) => {
11702
11879
  return addId(ingress.flattenedRules || [], "fullPath");
11703
11880
  }, [ingress.flattenedRules]);
11704
11881
  const component = useContext(ComponentContext);
11705
- const Table$12 = component.Table || Table;
11882
+ const Table2 = component.Table || Table$1;
11706
11883
  const currentSize = 10;
11707
11884
  const columns = [
11708
11885
  {
@@ -11735,9 +11912,9 @@ const IngressRulesTable = ({ ingress }) => {
11735
11912
  return record.serviceName ? /* @__PURE__ */ jsxRuntimeExports.jsx(
11736
11913
  ResourceLink,
11737
11914
  {
11738
- resourceName: "services",
11915
+ resourceKind: "services",
11739
11916
  namespace: ingress.metadata.namespace || "default",
11740
- resourceId: serviceName
11917
+ name: serviceName
11741
11918
  }
11742
11919
  ) : record.resourceName;
11743
11920
  }
@@ -11762,9 +11939,9 @@ const IngressRulesTable = ({ ingress }) => {
11762
11939
  return secretName ? /* @__PURE__ */ jsxRuntimeExports.jsx(
11763
11940
  ResourceLink,
11764
11941
  {
11765
- resourceName: "secrets",
11942
+ resourceKind: "secrets",
11766
11943
  namespace: ingress.metadata.namespace || "default",
11767
- resourceId: secretName
11944
+ name: secretName
11768
11945
  }
11769
11946
  ) : /* @__PURE__ */ jsxRuntimeExports.jsx(ValueDisplay, { value: "" });
11770
11947
  },
@@ -11791,7 +11968,7 @@ const IngressRulesTable = ({ ingress }) => {
11791
11968
  );
11792
11969
  }
11793
11970
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
11794
- Table$12,
11971
+ Table2,
11795
11972
  {
11796
11973
  tableKey: "ingressRules",
11797
11974
  loading: false,
@@ -11808,7 +11985,7 @@ const IngressRulesTable = ({ ingress }) => {
11808
11985
  }
11809
11986
  );
11810
11987
  };
11811
- const KeyValue_18l1y97 = "";
11988
+ const KeyValue_1cqk7i8 = "";
11812
11989
  const ContentBlockStyle = "c8jy7dc";
11813
11990
  const KeyStyle = "k2sddxl";
11814
11991
  const ValueStyle$2 = "v16vicsr";
@@ -11888,6 +12065,40 @@ function Tabs(props) {
11888
12065
  return /* @__PURE__ */ jsxRuntimeExports.jsx(TabsTabPane, { tab: tab.title, children: tab.children }, tab.title);
11889
12066
  }) });
11890
12067
  }
12068
+ const StateTag = (props) => {
12069
+ const { state: state2 = ResourceState.UPDATING, hideBackground, className, resourceKind } = props;
12070
+ const { t: t2 } = useTranslation();
12071
+ const defaultStateMap = {
12072
+ [ResourceState.UPDATING]: "loading",
12073
+ [ResourceState.READY]: "green",
12074
+ [ResourceState.COMPLETED]: "gray",
12075
+ [ResourceState.FAILED]: "red",
12076
+ [ResourceState.SUSPENDED]: "warning",
12077
+ [ResourceState.RUNNING]: "green",
12078
+ [ResourceState.SUCCEEDED]: "blue",
12079
+ [ResourceState.UNKNOWN]: "gray",
12080
+ [ResourceState.TERMINATING]: "loading",
12081
+ [ResourceState.PENDING]: "warning",
12082
+ [ResourceState.WAITING]: "warning",
12083
+ [ResourceState.TERMINATED]: "red",
12084
+ [ResourceState.STOPPED]: "gray",
12085
+ [ResourceState.AVAILABLE]: "blue",
12086
+ [ResourceState.BOUND]: "green",
12087
+ [ResourceState.RELEASED]: "gray",
12088
+ [ResourceState.LOST]: "red"
12089
+ };
12090
+ const resourceStateMap = {};
12091
+ const finalStateMap = resourceStateMap[resourceKind || ""] || defaultStateMap;
12092
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
12093
+ StatusCapsule,
12094
+ {
12095
+ className: cx_default(className, StateTagStyle, hideBackground && "no-background"),
12096
+ color: finalStateMap[state2] !== "loading" ? finalStateMap[state2] : void 0,
12097
+ loading: finalStateMap[state2] === "loading",
12098
+ children: t2(`dovetail.${state2 || "updating"}_state`)
12099
+ }
12100
+ );
12101
+ };
11891
12102
  const ShowContent_11g4jr2 = "";
11892
12103
  const ShowContentWrapperStyle = "s9agep2";
11893
12104
  const BackButton = "bo89gfi";
@@ -11920,7 +12131,7 @@ function ShowGroupComponent(props) {
11920
12131
  });
11921
12132
  }
11922
12133
  const ShowContent = (props) => {
11923
- var _a, _b, _c, _d;
12134
+ var _a, _b, _c, _d, _e;
11924
12135
  const {
11925
12136
  showConfig,
11926
12137
  formatter,
@@ -11949,6 +12160,8 @@ const ShowContent = (props) => {
11949
12160
  id
11950
12161
  });
11951
12162
  const Component = useContext(ComponentContext);
12163
+ const configs = useContext(ConfigsContext);
12164
+ const config = configs[(resource == null ? void 0 : resource.name) || ""];
11952
12165
  const Tabs$12 = Component.Tabs || Tabs;
11953
12166
  if (!(data2 == null ? void 0 : data2.data)) {
11954
12167
  return null;
@@ -12020,7 +12233,7 @@ const ShowContent = (props) => {
12020
12233
  },
12021
12234
  children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
12022
12235
  className: "button-text",
12023
- children: (_b = resource == null ? void 0 : resource.meta) == null ? void 0 : _b.kind
12236
+ children: (config == null ? void 0 : config.displayName) || ((_b = resource == null ? void 0 : resource.meta) == null ? void 0 : _b.kind)
12024
12237
  })
12025
12238
  })
12026
12239
  }), /* @__PURE__ */ jsxRuntimeExports.jsxs(Space, {
@@ -12033,10 +12246,11 @@ const ShowContent = (props) => {
12033
12246
  className: cx_default(Typo.Display.d2_regular_title, NameStyle),
12034
12247
  children: (_c = record == null ? void 0 : record.metadata) == null ? void 0 : _c.name
12035
12248
  }), stateDisplay ? /* @__PURE__ */ jsxRuntimeExports.jsx(StateTag, {
12036
- state: stateDisplay
12249
+ state: stateDisplay,
12250
+ resourceKind: (_d = resource == null ? void 0 : resource.meta) == null ? void 0 : _d.kind
12037
12251
  }) : void 0]
12038
12252
  }), /* @__PURE__ */ jsxRuntimeExports.jsxs(Space, {
12039
- children: [(_d = showConfig.renderExtraButton) == null ? void 0 : _d.call(showConfig, record), !showConfig.hideEditYamlButton ? /* @__PURE__ */ jsxRuntimeExports.jsx(CanAccess, {
12253
+ children: [(_e = showConfig.renderExtraButton) == null ? void 0 : _e.call(showConfig, record), !showConfig.hideEditYamlButton ? /* @__PURE__ */ jsxRuntimeExports.jsx(CanAccess, {
12040
12254
  resource: resource == null ? void 0 : resource.name,
12041
12255
  action: AccessControlAuth.Edit,
12042
12256
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(Button, {
@@ -12133,18 +12347,84 @@ function KeyValueSecret(props) {
12133
12347
  })
12134
12348
  });
12135
12349
  }
12136
- function PVPhaseDisplay(props) {
12137
- const { value: value2 } = props;
12138
- const i18n2 = useTranslation();
12139
- const map = {
12140
- Available: i18n2.t("dovetail.pv_phase_available"),
12141
- Bound: i18n2.t("dovetail.pv_phase_bound"),
12142
- Failed: i18n2.t("dovetail.pv_phase_released"),
12143
- Pending: i18n2.t("dovetail.pv_phase_failed"),
12144
- Released: i18n2.t("dovetail.pv_phase_pending")
12145
- };
12146
- return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: map[value2] || value2 });
12147
- }
12350
+ const NodeTaintsTable = ({ taints = [] }) => {
12351
+ const { t: t2 } = useTranslation();
12352
+ const component = useContext(ComponentContext);
12353
+ const Table2 = component.Table || Table$1;
12354
+ const taintsWithId = addId(taints, "key");
12355
+ const columns = [
12356
+ {
12357
+ key: "key",
12358
+ display: true,
12359
+ dataIndex: "key",
12360
+ title: t2("dovetail.key"),
12361
+ width: 120,
12362
+ sortable: true
12363
+ },
12364
+ {
12365
+ key: "value",
12366
+ display: true,
12367
+ dataIndex: "value",
12368
+ title: t2("dovetail.value"),
12369
+ width: 120,
12370
+ sortable: true
12371
+ },
12372
+ {
12373
+ key: "effect",
12374
+ display: true,
12375
+ dataIndex: "effect",
12376
+ title: t2("dovetail.effect"),
12377
+ width: 120,
12378
+ sortable: true,
12379
+ render: (value2) => {
12380
+ return t2(`dovetail.node_taint_${value2}`);
12381
+ }
12382
+ }
12383
+ ];
12384
+ const {
12385
+ data: finalData,
12386
+ currentPage,
12387
+ onPageChange,
12388
+ onSorterChange
12389
+ } = useTableData({
12390
+ data: taintsWithId,
12391
+ columns,
12392
+ defaultSorters: [
12393
+ {
12394
+ field: "lastUpdateTime",
12395
+ order: "desc"
12396
+ }
12397
+ ]
12398
+ });
12399
+ const currentSize = 10;
12400
+ if (taintsWithId.length === 0) {
12401
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
12402
+ WidgetErrorContent,
12403
+ {
12404
+ errorText: t2("dovetail.no_resource", { kind: t2("dovetail.taint") }),
12405
+ style: { padding: "15px 0" },
12406
+ type: ErrorContentType.Card
12407
+ }
12408
+ );
12409
+ }
12410
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
12411
+ Table2,
12412
+ {
12413
+ tableKey: "condition",
12414
+ loading: false,
12415
+ data: finalData,
12416
+ total: taintsWithId.length,
12417
+ columns: addDefaultRenderToColumns(columns),
12418
+ rowKey: "key",
12419
+ empty: t2("dovetail.empty"),
12420
+ defaultSize: currentSize,
12421
+ currentPage,
12422
+ onPageChange,
12423
+ onSorterChange,
12424
+ showMenuColumn: false
12425
+ }
12426
+ );
12427
+ };
12148
12428
  function PVVolumeModeDisplay(props) {
12149
12429
  const { value: value2 } = props;
12150
12430
  const i18n2 = useTranslation();
@@ -12154,18 +12434,42 @@ function PVVolumeModeDisplay(props) {
12154
12434
  };
12155
12435
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: map[value2] || value2 });
12156
12436
  }
12157
- function ResourceTable(props) {
12437
+ const GlobalStoreContext = createContext({});
12438
+ function Table(props) {
12158
12439
  var _a;
12440
+ const { tableProps, displayName, errorContentProps } = props;
12441
+ const { Table: TableComponent } = useContext(ComponentContext);
12442
+ const Table2 = TableComponent || Table$1;
12443
+ const { i18n: i18n2 } = useTranslation();
12444
+ const resourceType = /^[a-zA-Z]/.test(displayName) ? ` ${displayName}` : displayName;
12445
+ if (!((_a = tableProps.data) == null ? void 0 : _a.length) && !tableProps.loading) {
12446
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
12447
+ WidgetErrorContent,
12448
+ {
12449
+ errorText: tableProps.empty || i18n2.t("dovetail.no_resource", { kind: resourceType }),
12450
+ ...errorContentProps
12451
+ }
12452
+ );
12453
+ }
12454
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
12455
+ Table2,
12456
+ {
12457
+ ...tableProps,
12458
+ empty: tableProps.empty || i18n2.t("dovetail.no_resource", { kind: resourceType }),
12459
+ className: cx_default(tableProps.className)
12460
+ }
12461
+ );
12462
+ }
12463
+ function ResourceTable(props) {
12159
12464
  const { resource, useTableParams } = props;
12160
12465
  const configs = useContext(ConfigsContext);
12161
12466
  const config = configs[resource];
12162
12467
  const { formatter, columns, Dropdown: Dropdown2, noShow } = config;
12163
12468
  const { i18n: i18n2 } = useTranslation();
12164
- const { Table: TableComponent } = useContext(ComponentContext);
12165
- const Table$12 = TableComponent || Table;
12166
12469
  const nameRenderer = noShow ? PlainTextNameColumnRenderer(i18n2) : NameColumnRenderer(i18n2);
12167
12470
  const { tableProps } = useEagleTable({
12168
12471
  useTableParams: {
12472
+ resource,
12169
12473
  ...useTableParams
12170
12474
  },
12171
12475
  columns: [nameRenderer, ...(columns == null ? void 0 : columns()) || []],
@@ -12173,28 +12477,20 @@ function ResourceTable(props) {
12173
12477
  defaultSize: 10,
12174
12478
  ...config.tableProps
12175
12479
  },
12176
- resource,
12177
12480
  formatter,
12178
12481
  Dropdown: Dropdown2
12179
12482
  });
12180
12483
  useEffect(() => {
12181
12484
  tableProps.onPageChange(1);
12182
12485
  }, []);
12183
- if (!((_a = tableProps.data) == null ? void 0 : _a.length) && !tableProps.loading) {
12184
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
12185
- WidgetErrorContent,
12186
- {
12187
- errorText: tableProps.empty || i18n2.t("dovetail.no_resource", { kind: ` ${config.kind}` }),
12188
- type: ErrorContentType.Card
12189
- }
12190
- );
12191
- }
12192
12486
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
12193
- Table$12,
12487
+ Table,
12194
12488
  {
12195
- ...tableProps,
12196
- empty: tableProps.empty || i18n2.t("dovetail.no_resource", { kind: ` ${config.kind}` }),
12197
- className: cx_default(tableProps.className)
12489
+ tableProps,
12490
+ displayName: config.displayName || config.kind,
12491
+ errorContentProps: {
12492
+ type: ErrorContentType.Card
12493
+ }
12198
12494
  }
12199
12495
  );
12200
12496
  }
@@ -12202,7 +12498,8 @@ const WorkloadPodsTable_975j2t = "";
12202
12498
  const WorkloadPodsTable = ({
12203
12499
  namespace: namespace2,
12204
12500
  selector,
12205
- hideToolbar
12501
+ hideToolbar,
12502
+ filter
12206
12503
  }) => {
12207
12504
  var _a;
12208
12505
  const {
@@ -12210,7 +12507,7 @@ const WorkloadPodsTable = ({
12210
12507
  } = useTranslation();
12211
12508
  const [selectedKeys, setSelectedKeys] = useState([]);
12212
12509
  const component = useContext(ComponentContext);
12213
- const Table$12 = component.Table || Table;
12510
+ const Table2 = component.Table || Table$1;
12214
12511
  const currentSize = 10;
12215
12512
  const columns = [NameColumnRenderer(i18n2, "pods"), StateDisplayColumnRenderer(i18n2), {
12216
12513
  key: "ip",
@@ -12235,7 +12532,7 @@ const WorkloadPodsTable = ({
12235
12532
  field: "",
12236
12533
  value: "",
12237
12534
  fn(item) {
12238
- return matchSelector(item, selector, namespace2);
12535
+ return filter ? filter(item) : matchSelector(item, selector, namespace2);
12239
12536
  }
12240
12537
  }]
12241
12538
  }
@@ -12258,7 +12555,7 @@ const WorkloadPodsTable = ({
12258
12555
  children: [hideToolbar ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(TableToolBar, {
12259
12556
  selectedKeys,
12260
12557
  hideCreate: true
12261
- }), /* @__PURE__ */ jsxRuntimeExports.jsx(Table$12, {
12558
+ }), /* @__PURE__ */ jsxRuntimeExports.jsx(Table2, {
12262
12559
  ...tableProps,
12263
12560
  tableKey: "pods",
12264
12561
  onSelect: (keys) => setSelectedKeys(keys),
@@ -12436,126 +12733,6 @@ function WorkloadReplicas({
12436
12733
  })]
12437
12734
  });
12438
12735
  }
12439
- var StorageUnit = /* @__PURE__ */ ((StorageUnit2) => {
12440
- StorageUnit2["Pi"] = "Pi";
12441
- StorageUnit2["PiB"] = "PiB";
12442
- StorageUnit2["Ti"] = "Ti";
12443
- StorageUnit2["TiB"] = "TiB";
12444
- StorageUnit2["Gi"] = "Gi";
12445
- StorageUnit2["GiB"] = "GiB";
12446
- StorageUnit2["Mi"] = "Mi";
12447
- StorageUnit2["MiB"] = "MiB";
12448
- StorageUnit2["Ki"] = "Ki";
12449
- StorageUnit2["KiB"] = "KiB";
12450
- return StorageUnit2;
12451
- })(StorageUnit || {});
12452
- const UNIT_FACTORS = {
12453
- Pi: 1024 ** 5,
12454
- PiB: 1024 ** 5,
12455
- Ti: 1024 ** 4,
12456
- TiB: 1024 ** 4,
12457
- Gi: 1024 ** 3,
12458
- GiB: 1024 ** 3,
12459
- Mi: 1024 ** 2,
12460
- MiB: 1024 ** 2,
12461
- Ki: 1024,
12462
- KiB: 1024,
12463
- B: 1
12464
- };
12465
- function transformStorageUnit(value2, toUnit = "Gi") {
12466
- const num = parseFloat(value2);
12467
- const unit = Object.values(StorageUnit).find((u) => value2.includes(u)) || "Ki";
12468
- return num / UNIT_FACTORS[unit] * UNIT_FACTORS[toUnit];
12469
- }
12470
- const DistributeStorageForm = React__default.forwardRef(function DistributeStorageForm2(props, ref) {
12471
- const { defaultValue, pvc: pvc2 } = props;
12472
- const { resource } = useResource();
12473
- const { mutateAsync } = useUpdate();
12474
- const { t: t2 } = useTranslation();
12475
- const [distributeStorage, setDistributeStorage] = useState(defaultValue);
12476
- const submit = useCallback(() => {
12477
- const v = pvc2.updateDistributeStorage(distributeStorage);
12478
- const id = pvc2.id;
12479
- pruneBeforeEdit(v);
12480
- return mutateAsync({
12481
- id,
12482
- resource: (resource == null ? void 0 : resource.name) || "",
12483
- values: v,
12484
- successNotification() {
12485
- return {
12486
- message: t2("dovetail.edit_distribute_storage_success_toast", {
12487
- kind: pvc2.kind,
12488
- name: pvc2.id,
12489
- interpolation: {
12490
- escapeValue: false
12491
- }
12492
- }),
12493
- type: "success"
12494
- };
12495
- },
12496
- errorNotification: false
12497
- });
12498
- }, [pvc2, distributeStorage, resource == null ? void 0 : resource.name, mutateAsync, t2]);
12499
- useImperativeHandle(ref, () => ({
12500
- submit
12501
- }), [submit]);
12502
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
12503
- Form.Item,
12504
- {
12505
- label: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { style: { width: "134px" }, children: t2("dovetail.distributed") }),
12506
- colon: false,
12507
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(
12508
- Fields.Integer,
12509
- {
12510
- style: { width: "142px" },
12511
- input: {
12512
- name: "distributeStorage",
12513
- value: distributeStorage,
12514
- onChange: (value2) => {
12515
- setDistributeStorage(Number(value2));
12516
- },
12517
- onBlur: () => {
12518
- },
12519
- onFocus: () => {
12520
- }
12521
- },
12522
- min: 0,
12523
- meta: {},
12524
- suffix: "GiB",
12525
- controls: true
12526
- }
12527
- )
12528
- }
12529
- );
12530
- });
12531
- function PVCDistributeStorage({ pvc: pvc2, editable }) {
12532
- var _a, _b;
12533
- const { t: t2 } = useTranslation();
12534
- const formRef = useRef(null);
12535
- const value2 = (_b = (_a = pvc2.spec.resources) == null ? void 0 : _a.requests) == null ? void 0 : _b.storage;
12536
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
12537
- /* @__PURE__ */ jsxRuntimeExports.jsx(Units.Byte, { rawValue: parseSi(value2), decimals: 1 }),
12538
- editable && /* @__PURE__ */ jsxRuntimeExports.jsx(
12539
- EditField,
12540
- {
12541
- modalProps: {
12542
- formRef,
12543
- title: t2("dovetail.edit_replicas"),
12544
- renderContent() {
12545
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
12546
- DistributeStorageForm,
12547
- {
12548
- ref: formRef,
12549
- defaultValue: value2 ? transformStorageUnit(value2, StorageUnit.Gi) : 0,
12550
- pvc: pvc2
12551
- }
12552
- );
12553
- }
12554
- }
12555
- }
12556
- )
12557
- ] });
12558
- }
12559
12736
  var AreaType = /* @__PURE__ */ ((AreaType2) => {
12560
12737
  AreaType2["Inline"] = "Inline";
12561
12738
  AreaType2["Grid"] = "Grid";
@@ -12589,6 +12766,15 @@ const ConditionsField = () => {
12589
12766
  }
12590
12767
  };
12591
12768
  };
12769
+ const NodeTaintsField = () => {
12770
+ return {
12771
+ key: "NodeTaints",
12772
+ path: ["spec", "taints"],
12773
+ renderContent: (value2) => {
12774
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(NodeTaintsTable, { taints: value2 });
12775
+ }
12776
+ };
12777
+ };
12592
12778
  const PodsField = () => {
12593
12779
  return {
12594
12780
  key: "pods",
@@ -12818,13 +13004,15 @@ const StorageClassPvField = () => {
12818
13004
  resource: "persistentvolumes",
12819
13005
  useTableParams: {
12820
13006
  filters: {
12821
- permanent: [{
12822
- field: "",
12823
- value: "",
12824
- fn(pv2) {
12825
- return sc.filterPV(pv2, sc.metadata.name);
13007
+ permanent: [
13008
+ {
13009
+ field: "",
13010
+ value: "",
13011
+ fn(pv2) {
13012
+ return sc.filterPV(pv2, sc.metadata.name);
13013
+ }
12826
13014
  }
12827
- }]
13015
+ ]
12828
13016
  }
12829
13017
  }
12830
13018
  }
@@ -12865,17 +13053,24 @@ const PVStorageClassField = (i18n2) => {
12865
13053
  path: ["spec", "storageClassName"],
12866
13054
  title: i18n2.t("dovetail.storage_class"),
12867
13055
  renderContent(value2) {
12868
- return /* @__PURE__ */ jsxRuntimeExports.jsx(ResourceLink, { resourceName: "storageclasses", namespace: "", resourceId: value2 });
13056
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
13057
+ ResourceLink,
13058
+ {
13059
+ resourceKind: "storageclasses",
13060
+ namespace: "",
13061
+ name: value2
13062
+ }
13063
+ );
12869
13064
  }
12870
13065
  };
12871
13066
  };
12872
13067
  const PVPhaseField = (i18n2) => {
12873
13068
  return {
12874
13069
  key: "phase",
12875
- path: ["phase"],
13070
+ path: ["stateDisplay"],
12876
13071
  title: i18n2.t("dovetail.state"),
12877
13072
  renderContent(value2) {
12878
- return /* @__PURE__ */ jsxRuntimeExports.jsx(PVPhaseDisplay, { value: value2 });
13073
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(StateTag, { state: value2, resourceKind: "PersistentVolume", hideBackground: true });
12879
13074
  }
12880
13075
  };
12881
13076
  };
@@ -12893,14 +13088,49 @@ const PVAccessModeField = (i18n2) => {
12893
13088
  return {
12894
13089
  key: "accessMode",
12895
13090
  path: ["spec", "accessModes"],
12896
- title: i18n2.t("dovetail.access_mode")
13091
+ title: i18n2.t("dovetail.access_mode"),
13092
+ renderContent(value2) {
13093
+ return value2.join(", ");
13094
+ }
13095
+ };
13096
+ };
13097
+ const PVCPodsField = () => {
13098
+ return {
13099
+ key: "pods",
13100
+ path: [],
13101
+ renderContent: (_, record) => {
13102
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
13103
+ WorkloadPodsTable,
13104
+ {
13105
+ filter: (item) => {
13106
+ var _a, _b;
13107
+ return !!((_b = (_a = item.spec) == null ? void 0 : _a.volumes) == null ? void 0 : _b.some((v) => {
13108
+ var _a2;
13109
+ return ((_a2 = v.persistentVolumeClaim) == null ? void 0 : _a2.claimName) === record.metadata.name;
13110
+ }));
13111
+ },
13112
+ namespace: record.metadata.namespace,
13113
+ hideToolbar: true
13114
+ }
13115
+ );
13116
+ }
12897
13117
  };
12898
13118
  };
12899
13119
  const PVCRefField = (i18n2) => {
12900
13120
  return {
12901
13121
  key: "pvc",
12902
13122
  path: ["pvc"],
12903
- title: i18n2.t("dovetail.pvc")
13123
+ title: i18n2.t("dovetail.pvc"),
13124
+ renderContent(value2, pvc2) {
13125
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
13126
+ ResourceLink,
13127
+ {
13128
+ resourceKind: "persistentvolumeclaims",
13129
+ namespace: pvc2.pvcNamespace || "default",
13130
+ name: value2
13131
+ }
13132
+ );
13133
+ }
12904
13134
  };
12905
13135
  };
12906
13136
  const PVCSIRefField = (i18n2) => {
@@ -12949,13 +13179,7 @@ const ResourceTableField = (resource, useTableParams) => {
12949
13179
  key: resource,
12950
13180
  path: [],
12951
13181
  renderContent() {
12952
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
12953
- ResourceTable,
12954
- {
12955
- resource,
12956
- useTableParams
12957
- }
12958
- );
13182
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(ResourceTable, { resource, useTableParams });
12959
13183
  }
12960
13184
  };
12961
13185
  };
@@ -18994,7 +19218,7 @@ const PodContainersTable = ({
18994
19218
  }) => {
18995
19219
  const { i18n: i18n2 } = useTranslation();
18996
19220
  const component = useContext(ComponentContext);
18997
- const Table$12 = component.Table || Table;
19221
+ const Table2 = component.Table || Table$1;
18998
19222
  const currentSize = 10;
18999
19223
  const columns = useMemo(
19000
19224
  () => [
@@ -19089,7 +19313,7 @@ const PodContainersTable = ({
19089
19313
  );
19090
19314
  }
19091
19315
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
19092
- Table$12,
19316
+ Table2,
19093
19317
  {
19094
19318
  tableKey: "podContainers",
19095
19319
  loading: false,
@@ -19110,18 +19334,17 @@ const BasicGroup = (i18n2, {
19110
19334
  upAreas = [],
19111
19335
  downAreas = [],
19112
19336
  basicFields = []
19113
- } = {}) => ({
19337
+ } = {}, isShowNamespace = true) => ({
19114
19338
  title: i18n2.t("dovetail.basic_info"),
19115
19339
  areas: [
19116
19340
  ...upAreas,
19117
19341
  {
19118
- fields: [
19119
- NamespaceField(i18n2),
19342
+ fields: (isShowNamespace ? [NamespaceField(i18n2)] : []).concat([
19120
19343
  ...basicFields,
19121
19344
  LabelsField(i18n2),
19122
19345
  AnnotationsField(i18n2),
19123
19346
  AgeField(i18n2)
19124
- ]
19347
+ ])
19125
19348
  },
19126
19349
  ...downAreas
19127
19350
  ]
@@ -19165,6 +19388,14 @@ const ServicePodsGroup = () => ({
19165
19388
  }
19166
19389
  ]
19167
19390
  });
19391
+ const PVCPodsGroup = () => ({
19392
+ title: "Pod",
19393
+ areas: [
19394
+ {
19395
+ fields: [PVCPodsField()]
19396
+ }
19397
+ ]
19398
+ });
19168
19399
  const ConditionsGroup = (i18n2) => ({
19169
19400
  title: i18n2.t("dovetail.condition"),
19170
19401
  areas: [
@@ -19173,6 +19404,14 @@ const ConditionsGroup = (i18n2) => ({
19173
19404
  }
19174
19405
  ]
19175
19406
  });
19407
+ const NodeTaintsGroup = (i18n2) => ({
19408
+ title: i18n2.t("dovetail.taint"),
19409
+ areas: [
19410
+ {
19411
+ fields: [NodeTaintsField()]
19412
+ }
19413
+ ]
19414
+ });
19176
19415
  const SecretDataGroup = () => ({
19177
19416
  areas: [
19178
19417
  {
@@ -33010,7 +33249,6 @@ const Shell = React__default.forwardRef(function Shell2(props, ref) {
33010
33249
  })]
33011
33250
  });
33012
33251
  });
33013
- const GlobalStoreContext = createContext({});
33014
33252
  var buffer = {};
33015
33253
  var base64Js = {};
33016
33254
  base64Js.byteLength = byteLength;
@@ -35467,13 +35705,7 @@ function ListPage(props) {
35467
35705
  tableProps,
35468
35706
  contentClassName
35469
35707
  } = props;
35470
- const {
35471
- Table: TableComponent
35472
- } = useContext(ComponentContext);
35473
- const {
35474
- t: t2
35475
- } = useTranslation();
35476
- const Table$12 = TableComponent || Table;
35708
+ useTranslation();
35477
35709
  const {
35478
35710
  resource
35479
35711
  } = useResource();
@@ -35484,6 +35716,7 @@ function ListPage(props) {
35484
35716
  children: [!config.hideListToolBar ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
35485
35717
  children: [/* @__PURE__ */ jsxRuntimeExports.jsx(TableToolBar, {
35486
35718
  selectedKeys,
35719
+ title: config == null ? void 0 : config.displayName,
35487
35720
  description: config == null ? void 0 : config.description
35488
35721
  }), /* @__PURE__ */ jsxRuntimeExports.jsx(Divider, {
35489
35722
  style: {
@@ -35495,23 +35728,21 @@ function ListPage(props) {
35495
35728
  })]
35496
35729
  }) : void 0, /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
35497
35730
  className: cx_default(ListContentStyle, contentClassName),
35731
+ style: config.hideNamespacesFilter ? {
35732
+ paddingTop: 0
35733
+ } : {},
35498
35734
  children: [!config.hideNamespacesFilter ? /* @__PURE__ */ jsxRuntimeExports.jsx(NamespacesFilter, {
35499
35735
  className: NamespaceFilterStyle
35500
35736
  }) : void 0, /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
35501
35737
  className: TableStyle,
35502
- children: !(tableProps.data.length || tableProps.loading) ? /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent, {
35503
- errorText: tableProps.empty || t2("dovetail.no_resource", {
35504
- kind: ` ${config.kind}`
35505
- })
35506
- }) : /* @__PURE__ */ jsxRuntimeExports.jsx(Table$12, {
35507
- ...tableProps,
35508
- empty: tableProps.empty || t2("dovetail.no_resource", {
35509
- kind: ` ${config.kind}`
35510
- }),
35511
- className: cx_default(tableProps.className),
35512
- scroll: {
35513
- y: "calc(100% - 48px)"
35514
- }
35738
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(Table, {
35739
+ tableProps: {
35740
+ ...tableProps,
35741
+ scroll: {
35742
+ y: "calc(100% - 48px)"
35743
+ }
35744
+ },
35745
+ displayName: (config == null ? void 0 : config.displayName) || config.kind
35515
35746
  })
35516
35747
  })]
35517
35748
  })]
@@ -37954,7 +38185,7 @@ const Separator = () => {
37954
38185
  });
37955
38186
  };
37956
38187
  const MonacoYamlEditor = React__default.lazy(() => Promise.resolve().then(() => MonacoYamlEditor$2));
37957
- const MonacoYamlDiffEditor = React__default.lazy(() => import("./MonacoYamlDiffEditor-0f76e977.js"));
38188
+ const MonacoYamlDiffEditor = React__default.lazy(() => import("./MonacoYamlDiffEditor-effbc940.js"));
37958
38189
  const YamlEditorComponent = forwardRef(
37959
38190
  function YamlEditorComponent2(props, ref) {
37960
38191
  const {
@@ -38823,10 +39054,11 @@ function FormModal(props) {
38823
39054
  if (typeof ((_c2 = config.formConfig) == null ? void 0 : _c2.formTitle) === "function") {
38824
39055
  return (_d2 = config.formConfig) == null ? void 0 : _d2.formTitle(action);
38825
39056
  }
39057
+ const label2 = config.displayName || (config == null ? void 0 : config.kind);
38826
39058
  return i18n2.t(id ? "dovetail.edit_resource" : "dovetail.create_resource", {
38827
- resource: config == null ? void 0 : config.kind
39059
+ resource: /^[a-zA-Z]/.test(label2) ? ` ${label2}` : label2
38828
39060
  });
38829
- }, [action, config.formConfig, config == null ? void 0 : config.kind, i18n2, id]);
39061
+ }, [action, config.formConfig, config.displayName, config == null ? void 0 : config.kind, i18n2, id]);
38830
39062
  const desc = useMemo(() => {
38831
39063
  var _a2, _b2, _c2, _d2;
38832
39064
  if (typeof ((_a2 = config.formConfig) == null ? void 0 : _a2.formDesc) === "string")
@@ -38877,6 +39109,12 @@ function FormModal(props) {
38877
39109
  children: [desc ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
38878
39110
  className: FormDescStyle,
38879
39111
  children: desc
39112
+ }) : void 0, !isYamlForm && mode === "form" ? /* @__PURE__ */ jsxRuntimeExports.jsx(Alert, {
39113
+ type: "warning",
39114
+ message: i18n2.t("dovetail.change_form_mode_alert"),
39115
+ style: {
39116
+ marginBottom: "16px"
39117
+ }
38880
39118
  }) : void 0, formEle]
38881
39119
  });
38882
39120
  }
@@ -39189,8 +39427,8 @@ const ReferenceLink = (props) => {
39189
39427
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
39190
39428
  ResourceLink,
39191
39429
  {
39192
- resourceId: ownerReference.name,
39193
- resourceName: resource.name || "",
39430
+ name: ownerReference.name,
39431
+ resourceKind: resource.name || "",
39194
39432
  namespace: namespace2
39195
39433
  }
39196
39434
  );
@@ -39244,9 +39482,9 @@ const IngressRulesComponent = ({ ingress }) => {
39244
39482
  /* @__PURE__ */ jsxRuntimeExports.jsx(
39245
39483
  ResourceLink,
39246
39484
  {
39247
- resourceName: "services",
39485
+ resourceKind: "services",
39248
39486
  namespace: ingress.metadata.namespace || "default",
39249
- resourceId: r2.serviceName
39487
+ name: r2.serviceName
39250
39488
  }
39251
39489
  ),
39252
39490
  /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { children: [
@@ -39837,7 +40075,7 @@ const PVRefColumnRenderer = (i18n2) => {
39837
40075
  display: true,
39838
40076
  dataIndex: ["pv"],
39839
40077
  title: i18n2.t("dovetail.pv"),
39840
- width: 120,
40078
+ width: 160,
39841
40079
  sortable: true
39842
40080
  };
39843
40081
  };
@@ -39847,13 +40085,13 @@ const PVStorageClassColumnRenderer = (i18n2) => {
39847
40085
  display: true,
39848
40086
  dataIndex: ["spec", "storageClassName"],
39849
40087
  title: i18n2.t("dovetail.storage_class"),
39850
- width: 120,
40088
+ width: 160,
39851
40089
  sortable: true,
39852
40090
  render(value2) {
39853
40091
  return /* @__PURE__ */ jsxRuntimeExports.jsx(ResourceLink, {
39854
- resourceName: "storageclasses",
40092
+ resourceKind: "storageclasses",
39855
40093
  namespace: "",
39856
- resourceId: value2
40094
+ name: value2
39857
40095
  });
39858
40096
  }
39859
40097
  };
@@ -39862,13 +40100,15 @@ const PVPhaseColumnRenderer = (i18n2) => {
39862
40100
  return {
39863
40101
  key: "phase",
39864
40102
  display: true,
39865
- dataIndex: ["phase"],
40103
+ dataIndex: ["stateDisplay"],
39866
40104
  title: i18n2.t("dovetail.state"),
39867
40105
  width: 120,
39868
40106
  sortable: true,
39869
40107
  render(value2) {
39870
- return /* @__PURE__ */ jsxRuntimeExports.jsx(PVPhaseDisplay, {
39871
- value: value2
40108
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(StateTag, {
40109
+ state: value2,
40110
+ resourceKind: "PersistentVolume",
40111
+ hideBackground: true
39872
40112
  });
39873
40113
  }
39874
40114
  };
@@ -39879,8 +40119,15 @@ const PVCRefColumnRenderer = (i18n2) => {
39879
40119
  display: true,
39880
40120
  dataIndex: ["pvc"],
39881
40121
  title: i18n2.t("dovetail.pvc"),
39882
- width: 120,
39883
- sortable: true
40122
+ width: 160,
40123
+ sortable: true,
40124
+ render(value2, pv2) {
40125
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(ResourceLink, {
40126
+ resourceKind: "persistentvolumeclaims",
40127
+ namespace: pv2.pvcNamespace || "default",
40128
+ name: value2
40129
+ });
40130
+ }
39884
40131
  };
39885
40132
  };
39886
40133
  const PVCSIRefColumnRenderer = (i18n2) => {
@@ -39889,7 +40136,7 @@ const PVCSIRefColumnRenderer = (i18n2) => {
39889
40136
  display: true,
39890
40137
  dataIndex: ["csi"],
39891
40138
  title: i18n2.t("dovetail.csi"),
39892
- width: 120,
40139
+ width: 160,
39893
40140
  sortable: true
39894
40141
  };
39895
40142
  };
@@ -39915,7 +40162,15 @@ const PVAccessModeColumnRenderer = (i18n2) => {
39915
40162
  dataIndex: ["spec", "accessModes"],
39916
40163
  title: i18n2.t("dovetail.access_mode"),
39917
40164
  width: 120,
39918
- sortable: true
40165
+ sortable: true,
40166
+ render(value2) {
40167
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
40168
+ style: {
40169
+ whiteSpace: "pre-wrap"
40170
+ },
40171
+ children: value2.join("\n")
40172
+ });
40173
+ }
39919
40174
  };
39920
40175
  };
39921
40176
  const IsDefaultSCColumnRenderer = (i18n2) => {
@@ -39948,6 +40203,19 @@ const SCReclaimPolicyColumnRenderer = (i18n2) => {
39948
40203
  }
39949
40204
  };
39950
40205
  };
40206
+ const SCAllowExpandColumnRenderer = (i18n2) => {
40207
+ return {
40208
+ key: "​​allowVolumeExpansion",
40209
+ display: true,
40210
+ dataIndex: ["​​allowVolumeExpansion"],
40211
+ title: i18n2.t("dovetail.allow_expand"),
40212
+ width: 120,
40213
+ sortable: true,
40214
+ render(val) {
40215
+ return val ? i18n2.t("dovetail.support") : i18n2.t("dovetail.not_support");
40216
+ }
40217
+ };
40218
+ };
39951
40219
  const styles = "";
39952
40220
  const Dovetail = (props) => {
39953
40221
  const {
@@ -40186,7 +40454,7 @@ const relationPlugin = new RelationPlugin();
40186
40454
  const ProviderPlugins = [relationPlugin, modelPlugin];
40187
40455
  const dovetailRefineI18n = i18n;
40188
40456
  export {
40189
- Breadcrumb as $,
40457
+ index as $,
40190
40458
  AgeColumnRenderer as A,
40191
40459
  PVCStorageColumnRenderer as B,
40192
40460
  CommonSorter as C,
@@ -40203,214 +40471,218 @@ export {
40203
40471
  NameColumnRenderer as N,
40204
40472
  SCReclaimPolicyColumnRenderer as O,
40205
40473
  PlainTextNameColumnRenderer as P,
40206
- ColumnKeys as Q,
40474
+ SCAllowExpandColumnRenderer as Q,
40207
40475
  ReplicasColumnRenderer as R,
40208
40476
  StateDisplayColumnRenderer as S,
40209
- addDefaultRenderToColumns as T,
40210
- useEagleTable as U,
40211
- useDownloadYAML as V,
40477
+ ColumnKeys as T,
40478
+ addDefaultRenderToColumns as U,
40479
+ useEagleTable as V,
40212
40480
  WorkloadImageColumnRenderer as W,
40213
- useEdit as X,
40214
- useGlobalStore as Y,
40215
- useOpenForm as Z,
40216
- index as _,
40481
+ useDownloadYAML as X,
40482
+ useEdit as Y,
40483
+ useGlobalStore as Z,
40484
+ useOpenForm as _,
40217
40485
  useApiGroupSchema as a,
40218
- StorageClassPvField as a$,
40219
- NameInputWidget as a0,
40220
- dnsSubDomainRules as a1,
40221
- rfc1123LabelRules as a2,
40222
- rfc1035LabelRules as a3,
40223
- NamespaceSelectWidget as a4,
40224
- namespaceRules as a5,
40225
- KeyValueListWidget as a6,
40226
- MetadataForm as a7,
40227
- PageShow as a8,
40228
- Time as a9,
40229
- DeleteButton as aA,
40230
- Layout as aB,
40231
- AreaType as aC,
40232
- ImageField as aD,
40233
- ReplicaField as aE,
40234
- ConditionsField as aF,
40235
- PodsField as aG,
40236
- JobsField as aH,
40237
- DataField as aI,
40238
- SecretDataField as aJ,
40239
- StartTimeField as aK,
40240
- ServiceTypeField as aL,
40241
- ClusterIpField as aM,
40242
- SessionAffinityField as aN,
40243
- ServicePodsField as aO,
40244
- IngressRulesTableTabField as aP,
40245
- EventsTableTabField as aQ,
40246
- NamespaceField as aR,
40247
- AgeField as aS,
40248
- LabelsField as aT,
40249
- AnnotationsField as aU,
40250
- ServiceInnerClusterAccessField as aV,
40251
- ServiceOutClusterAccessField as aW,
40252
- PodSelectorField as aX,
40253
- PortsTableField as aY,
40254
- DurationField as aZ,
40255
- StorageClassProvisionerField as a_,
40256
- ConditionsTable as aa,
40257
- FormErrorAlert as ab,
40258
- PodContainersTable as ac,
40259
- WorkloadDropdown as ad,
40260
- ReplicasDropdown as ae,
40261
- PodDropdown as af,
40262
- CreateButton as ag,
40263
- ImageNames as ah,
40264
- ResourceList as ai,
40265
- ResourceShow as aj,
40266
- ResourceForm as ak,
40267
- ResourceCRUD as al,
40268
- WorkloadPodsTable as am,
40269
- CronJobDropdown as an,
40270
- K8sDropdown as ao,
40271
- EditLabelDropdownMenuItem as ap,
40272
- EditAnnotationDropdownMenuItem as aq,
40273
- ResourceUsageBar as ar,
40274
- WorkloadReplicasForm as as,
40275
- WorkloadReplicas as at,
40276
- CronjobJobsTable as au,
40277
- KeyValue as av,
40278
- KeyValueAnnotation as aw,
40279
- KeyValueSecret as ax,
40280
- Separator as ay,
40281
- YamlEditorComponent as az,
40486
+ DurationField as a$,
40487
+ Breadcrumb as a0,
40488
+ NameInputWidget as a1,
40489
+ dnsSubDomainRules as a2,
40490
+ rfc1123LabelRules as a3,
40491
+ rfc1035LabelRules as a4,
40492
+ NamespaceSelectWidget as a5,
40493
+ namespaceRules as a6,
40494
+ KeyValueListWidget as a7,
40495
+ MetadataForm as a8,
40496
+ PageShow as a9,
40497
+ YamlEditorComponent as aA,
40498
+ DeleteButton as aB,
40499
+ Layout as aC,
40500
+ AreaType as aD,
40501
+ ImageField as aE,
40502
+ ReplicaField as aF,
40503
+ ConditionsField as aG,
40504
+ NodeTaintsField as aH,
40505
+ PodsField as aI,
40506
+ JobsField as aJ,
40507
+ DataField as aK,
40508
+ SecretDataField as aL,
40509
+ StartTimeField as aM,
40510
+ ServiceTypeField as aN,
40511
+ ClusterIpField as aO,
40512
+ SessionAffinityField as aP,
40513
+ ServicePodsField as aQ,
40514
+ IngressRulesTableTabField as aR,
40515
+ EventsTableTabField as aS,
40516
+ NamespaceField as aT,
40517
+ AgeField as aU,
40518
+ LabelsField as aV,
40519
+ AnnotationsField as aW,
40520
+ ServiceInnerClusterAccessField as aX,
40521
+ ServiceOutClusterAccessField as aY,
40522
+ PodSelectorField as aZ,
40523
+ PortsTableField as a_,
40524
+ Time as aa,
40525
+ ConditionsTable as ab,
40526
+ FormErrorAlert as ac,
40527
+ PodContainersTable as ad,
40528
+ WorkloadDropdown as ae,
40529
+ ReplicasDropdown as af,
40530
+ PodDropdown as ag,
40531
+ CreateButton as ah,
40532
+ ImageNames as ai,
40533
+ ResourceList as aj,
40534
+ ResourceShow as ak,
40535
+ ResourceForm as al,
40536
+ ResourceCRUD as am,
40537
+ WorkloadPodsTable as an,
40538
+ CronJobDropdown as ao,
40539
+ K8sDropdown as ap,
40540
+ EditLabelDropdownMenuItem as aq,
40541
+ EditAnnotationDropdownMenuItem as ar,
40542
+ ResourceUsageBar as as,
40543
+ WorkloadReplicasForm as at,
40544
+ WorkloadReplicas as au,
40545
+ CronjobJobsTable as av,
40546
+ KeyValue as aw,
40547
+ KeyValueAnnotation as ax,
40548
+ KeyValueSecret as ay,
40549
+ Separator as az,
40282
40550
  useSchema as b,
40283
- PodShellModal as b$,
40284
- PVCapacityField as b0,
40285
- PVCStorageField as b1,
40286
- PVRefField as b2,
40287
- PVStorageClassField as b3,
40288
- PVPhaseField as b4,
40289
- PVVolumeModeField as b5,
40290
- PVAccessModeField as b6,
40291
- PVCRefField as b7,
40292
- PVCSIRefField as b8,
40293
- IsDefaultSCField as b9,
40294
- DrawerShow as bA,
40295
- Menu as bB,
40296
- EditButton as bC,
40297
- ReferenceLink as bD,
40298
- ResourceLink as bE,
40299
- NS_STORE_KEY as bF,
40300
- ALL_NS as bG,
40301
- useNamespacesFilter as bH,
40302
- NamespacesFilter as bI,
40303
- FormModal as bJ,
40304
- RefineFormContent as bK,
40305
- RefineFormPage as bL,
40306
- SchemaStrategy as bM,
40307
- YamlForm as bN,
40308
- useRefineForm as bO,
40309
- ServiceInClusterAccessComponent as bP,
40310
- ServiceOutClusterAccessComponent as bQ,
40311
- Tags as bR,
40312
- TextTags as bS,
40313
- PodLog as bT,
40314
- NetworkPolicyRulesViewer as bU,
40315
- PVPhaseDisplay as bV,
40316
- PVVolumeModeDisplay as bW,
40317
- Tabs as bX,
40318
- ResourceSelect as bY,
40319
- SocketStatus as bZ,
40320
- Shell as b_,
40321
- SCReclaimPolicyField as ba,
40322
- IsSCAllowVolumeExpansionField as bb,
40323
- ResourceTableField as bc,
40324
- EventsTab as bd,
40325
- PodLogTab as be,
40326
- BasicGroup as bf,
40327
- PodsGroup as bg,
40328
- PodContainersGroup as bh,
40329
- ServicePodsGroup as bi,
40330
- ConditionsGroup as bj,
40331
- SecretDataGroup as bk,
40332
- JobsGroup as bl,
40333
- IngressRulesGroup as bm,
40334
- PodSelectorGroup as bn,
40335
- PortsGroup as bo,
40336
- DataGroup as bp,
40337
- NetworkPolicyIngressRulesGroup as bq,
40338
- NetworkPolicyEgressRulesGroup as br,
40339
- StorageClassPvGroup as bs,
40340
- ResourceTableGroup as bt,
40341
- ShowGroupComponent as bu,
40342
- ShowContent as bv,
40343
- DeleteManyButton as bw,
40344
- ListPage as bx,
40345
- StateTagStyle as by,
40346
- StateTag as bz,
40551
+ Tabs as b$,
40552
+ StorageClassProvisionerField as b0,
40553
+ StorageClassPvField as b1,
40554
+ PVCapacityField as b2,
40555
+ PVCStorageField as b3,
40556
+ PVRefField as b4,
40557
+ PVStorageClassField as b5,
40558
+ PVPhaseField as b6,
40559
+ PVVolumeModeField as b7,
40560
+ PVAccessModeField as b8,
40561
+ PVCPodsField as b9,
40562
+ ShowContent as bA,
40563
+ DeleteManyButton as bB,
40564
+ ListPage as bC,
40565
+ StateTag as bD,
40566
+ DrawerShow as bE,
40567
+ Menu as bF,
40568
+ Table as bG,
40569
+ EditButton as bH,
40570
+ ReferenceLink as bI,
40571
+ ResourceLink as bJ,
40572
+ NS_STORE_KEY as bK,
40573
+ ALL_NS as bL,
40574
+ useNamespacesFilter as bM,
40575
+ NamespacesFilter as bN,
40576
+ FormModal as bO,
40577
+ RefineFormContent as bP,
40578
+ RefineFormPage as bQ,
40579
+ SchemaStrategy as bR,
40580
+ YamlForm as bS,
40581
+ useRefineForm as bT,
40582
+ ServiceInClusterAccessComponent as bU,
40583
+ ServiceOutClusterAccessComponent as bV,
40584
+ Tags as bW,
40585
+ TextTags as bX,
40586
+ PodLog as bY,
40587
+ NetworkPolicyRulesViewer as bZ,
40588
+ PVVolumeModeDisplay as b_,
40589
+ PVCRefField as ba,
40590
+ PVCSIRefField as bb,
40591
+ IsDefaultSCField as bc,
40592
+ SCReclaimPolicyField as bd,
40593
+ IsSCAllowVolumeExpansionField as be,
40594
+ ResourceTableField as bf,
40595
+ EventsTab as bg,
40596
+ PodLogTab as bh,
40597
+ BasicGroup as bi,
40598
+ PodsGroup as bj,
40599
+ PodContainersGroup as bk,
40600
+ ServicePodsGroup as bl,
40601
+ PVCPodsGroup as bm,
40602
+ ConditionsGroup as bn,
40603
+ NodeTaintsGroup as bo,
40604
+ SecretDataGroup as bp,
40605
+ JobsGroup as bq,
40606
+ IngressRulesGroup as br,
40607
+ PodSelectorGroup as bs,
40608
+ PortsGroup as bt,
40609
+ DataGroup as bu,
40610
+ NetworkPolicyIngressRulesGroup as bv,
40611
+ NetworkPolicyEgressRulesGroup as bw,
40612
+ StorageClassPvGroup as bx,
40613
+ ResourceTableGroup as by,
40614
+ ShowGroupComponent as bz,
40347
40615
  useDeleteModal as c,
40348
- generateSchemaTypeValue as c$,
40349
- PodShell as c0,
40350
- ResourceTable as c1,
40351
- BASE_INIT_VALUE as c2,
40352
- DEPLOYMENT_INIT_VALUE as c3,
40353
- CRONJOB_INIT_VALUE as c4,
40354
- DAEMONSET_INIT_VALUE as c5,
40355
- JOB_INIT_VALUE as c6,
40356
- STATEFULSET_INIT_VALUE as c7,
40357
- POD_INIT_VALUE as c8,
40358
- SERVICE_CLUSTER_IP_INIT_VALUE as c9,
40359
- ConfigsContext as cA,
40360
- IngressModel as cB,
40361
- NetworkPolicyModel as cC,
40362
- JobModel as cD,
40363
- WorkloadModel as cE,
40364
- WorkloadBaseModel as cF,
40365
- PodModel as cG,
40366
- PodMetricsModel as cH,
40367
- ResourceModel as cI,
40368
- CronJobModel as cJ,
40369
- EventModel as cK,
40370
- DeploymentModel as cL,
40371
- DaemonSetModel as cM,
40372
- StatefulSetModel as cN,
40373
- ServiceTypeEnum as cO,
40374
- ServiceModel as cP,
40375
- NodeRole as cQ,
40376
- NodeModel as cR,
40377
- StorageClassModel as cS,
40378
- PersistentVolumeModel as cT,
40379
- PersistentVolumeClaimModel as cU,
40380
- ProviderPlugins as cV,
40381
- ModelPlugin as cW,
40382
- modelPlugin as cX,
40383
- RelationPlugin as cY,
40384
- relationPlugin as cZ,
40385
- generateValueFromSchema as c_,
40386
- SERVICE_NODE_PORT_INIT_VALUE as ca,
40387
- SERVICE_LOAD_BALANCER_INIT_VALUE as cb,
40388
- SERVICE_EXTERNAL_NAME_INIT_VALUE as cc,
40389
- SERVICE_HEADLESS_INIT_VALUE as cd,
40390
- INGRESS_INIT_VALUE as ce,
40391
- NETWORK_POLICY_INIT_VALUE as cf,
40392
- CONFIG_MAP_INIT_VALUE as cg,
40393
- SERVER_INSTANCE_INIT_VALUE as ch,
40394
- REDEPLOY_TIMESTAMP_KEY as ci,
40395
- SECRET_OPAQUE_INIT_VALUE as cj,
40396
- SECRET_IMAGE_REPO_INIT_VALUE as ck,
40397
- SECRET_BASIC_AUTH_INIT_VALUE as cl,
40398
- SECRET_SSH_AUTH_INIT_VALUE as cm,
40399
- SECRET_TLS_INIT_VALUE as cn,
40400
- SECRET_CUSTOM_INIT_VALUE as co,
40401
- NODE_INIT_VALUE as cp,
40402
- STORAGE_CLASS_INIT_VALUE as cq,
40403
- PV_INIT_VALUE as cr,
40404
- PVC_INIT_VALUE as cs,
40405
- WorkloadState as ct,
40406
- AccessControlAuth as cu,
40407
- Dovetail as cv,
40408
- RESOURCE_GROUP as cw,
40409
- FormType as cx,
40410
- ComponentContext as cy,
40411
- GlobalStoreContext as cz,
40616
+ modelPlugin as c$,
40617
+ ResourceSelect as c0,
40618
+ SocketStatus as c1,
40619
+ Shell as c2,
40620
+ PodShellModal as c3,
40621
+ PodShell as c4,
40622
+ ResourceTable as c5,
40623
+ BASE_INIT_VALUE as c6,
40624
+ DEPLOYMENT_INIT_VALUE as c7,
40625
+ CRONJOB_INIT_VALUE as c8,
40626
+ DAEMONSET_INIT_VALUE as c9,
40627
+ RESOURCE_GROUP as cA,
40628
+ FormType as cB,
40629
+ ComponentContext as cC,
40630
+ GlobalStoreContext as cD,
40631
+ ConfigsContext as cE,
40632
+ IngressModel as cF,
40633
+ NetworkPolicyModel as cG,
40634
+ JobModel as cH,
40635
+ WorkloadModel as cI,
40636
+ WorkloadBaseModel as cJ,
40637
+ PodModel as cK,
40638
+ PodMetricsModel as cL,
40639
+ ResourceModel as cM,
40640
+ CronJobModel as cN,
40641
+ EventModel as cO,
40642
+ DeploymentModel as cP,
40643
+ DaemonSetModel as cQ,
40644
+ StatefulSetModel as cR,
40645
+ ServiceTypeEnum as cS,
40646
+ ServiceModel as cT,
40647
+ NodeRole as cU,
40648
+ NodeModel as cV,
40649
+ StorageClassModel as cW,
40650
+ PersistentVolumeModel as cX,
40651
+ PersistentVolumeClaimModel as cY,
40652
+ ProviderPlugins as cZ,
40653
+ ModelPlugin as c_,
40654
+ JOB_INIT_VALUE as ca,
40655
+ STATEFULSET_INIT_VALUE as cb,
40656
+ POD_INIT_VALUE as cc,
40657
+ SERVICE_CLUSTER_IP_INIT_VALUE as cd,
40658
+ SERVICE_NODE_PORT_INIT_VALUE as ce,
40659
+ SERVICE_LOAD_BALANCER_INIT_VALUE as cf,
40660
+ SERVICE_EXTERNAL_NAME_INIT_VALUE as cg,
40661
+ SERVICE_HEADLESS_INIT_VALUE as ch,
40662
+ INGRESS_INIT_VALUE as ci,
40663
+ NETWORK_POLICY_INIT_VALUE as cj,
40664
+ CONFIG_MAP_INIT_VALUE as ck,
40665
+ SERVER_INSTANCE_INIT_VALUE as cl,
40666
+ REDEPLOY_TIMESTAMP_KEY as cm,
40667
+ SECRET_OPAQUE_INIT_VALUE as cn,
40668
+ SECRET_IMAGE_REPO_INIT_VALUE as co,
40669
+ SECRET_BASIC_AUTH_INIT_VALUE as cp,
40670
+ SECRET_SSH_AUTH_INIT_VALUE as cq,
40671
+ SECRET_TLS_INIT_VALUE as cr,
40672
+ SECRET_CUSTOM_INIT_VALUE as cs,
40673
+ NODE_INIT_VALUE as ct,
40674
+ STORAGE_CLASS_INIT_VALUE as cu,
40675
+ PV_INIT_VALUE as cv,
40676
+ PVC_INIT_VALUE as cw,
40677
+ ResourceState as cx,
40678
+ AccessControlAuth as cy,
40679
+ Dovetail as cz,
40412
40680
  dovetailRefineI18n as d,
40413
- resolveRef as d0,
40681
+ RelationPlugin as d0,
40682
+ relationPlugin as d1,
40683
+ generateValueFromSchema as d2,
40684
+ generateSchemaTypeValue as d3,
40685
+ resolveRef as d4,
40414
40686
  NameSpaceColumnRenderer as e,
40415
40687
  WorkloadRestartsColumnRenderer as f,
40416
40688
  NodeNameColumnRenderer as g,