@dovetail-v2/refine 0.1.7 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{MonacoYamlDiffEditor-1593cfad.js → MonacoYamlDiffEditor-0f76e977.js} +1 -1
- package/dist/{index-45031697.js → index-aacb414b.js} +957 -528
- package/dist/refine.js +212 -196
- package/dist/refine.umd.cjs +758 -329
- package/lib/components/Form/YamlForm.d.ts +1 -1
- package/lib/components/Form/useReactHookForm.d.ts +2 -1
- package/lib/components/Form/useYamlForm.d.ts +1 -1
- package/lib/components/PVCDistributeStorage/index.d.ts +16 -0
- package/lib/components/ResourceCRUD/list/index.d.ts +2 -2
- package/lib/components/ResourceTable/index.d.ts +9 -0
- package/lib/components/ShowContent/fields.d.ts +8 -0
- package/lib/components/ShowContent/groups.d.ts +1 -0
- package/lib/components/index.d.ts +1 -0
- package/lib/constants/k8s.d.ts +36 -1
- package/lib/hooks/useEagleTable/columns.d.ts +5 -0
- package/lib/hooks/useEagleTable/useEagleTable.d.ts +1 -0
- package/lib/i18n.d.ts +12 -2
- package/lib/locales/en-US/index.d.ts +0 -1
- package/lib/locales/zh-CN/index.d.ts +12 -1
- package/lib/models/persistent-volume-claim.d.ts +4 -0
- package/lib/models/persistent-volume.d.ts +4 -0
- package/lib/models/storage-class.d.ts +4 -0
- package/lib/pages/storageclasses/index.d.ts +7 -4
- package/lib/types/resource.d.ts +2 -3
- package/lib/utils/storage.d.ts +13 -0
- package/package.json +2 -2
package/dist/refine.umd.cjs
CHANGED
|
@@ -31,301 +31,308 @@ var __publicField = (obj, key, value) => {
|
|
|
31
31
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
32
32
|
}
|
|
33
33
|
var dayjs_min = { exports: {} };
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
return
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
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();
|
|
112
|
-
}, m2.$utils = function() {
|
|
113
|
-
return b;
|
|
114
|
-
}, m2.isValid = function() {
|
|
115
|
-
return !(this.$d.toString() === l);
|
|
116
|
-
}, m2.isSame = function(t3, e3) {
|
|
117
|
-
var n3 = O(t3);
|
|
118
|
-
return this.startOf(e3) <= n3 && n3 <= this.endOf(e3);
|
|
119
|
-
}, m2.isAfter = function(t3, e3) {
|
|
120
|
-
return O(t3) < this.startOf(e3);
|
|
121
|
-
}, m2.isBefore = function(t3, e3) {
|
|
122
|
-
return this.endOf(e3) < O(t3);
|
|
123
|
-
}, m2.$g = function(t3, e3, n3) {
|
|
124
|
-
return b.u(t3) ? this[e3] : this.set(n3, t3);
|
|
125
|
-
}, m2.unix = function() {
|
|
126
|
-
return Math.floor(this.valueOf() / 1e3);
|
|
127
|
-
}, m2.valueOf = function() {
|
|
128
|
-
return this.$d.getTime();
|
|
129
|
-
}, m2.startOf = function(t3, e3) {
|
|
130
|
-
var n3 = this, r3 = !!b.u(e3) || e3, f2 = b.p(t3), l2 = function(t4, e4) {
|
|
131
|
-
var i3 = b.w(n3.$u ? Date.UTC(n3.$y, e4, t4) : new Date(n3.$y, e4, t4), n3);
|
|
132
|
-
return r3 ? i3 : i3.endOf(a2);
|
|
133
|
-
}, $2 = function(t4, e4) {
|
|
134
|
-
return b.w(n3.toDate()[t4].apply(n3.toDate("s"), (r3 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e4)), n3);
|
|
135
|
-
}, y2 = this.$W, M3 = this.$M, m3 = this.$D, v2 = "set" + (this.$u ? "UTC" : "");
|
|
136
|
-
switch (f2) {
|
|
137
|
-
case h:
|
|
138
|
-
return r3 ? l2(1, 0) : l2(31, 11);
|
|
139
|
-
case c2:
|
|
140
|
-
return r3 ? l2(1, M3) : l2(0, M3 + 1);
|
|
141
|
-
case o:
|
|
142
|
-
var g2 = this.$locale().weekStart || 0, D2 = (y2 < g2 ? y2 + 7 : y2) - g2;
|
|
143
|
-
return l2(r3 ? m3 - D2 : m3 + (6 - D2), M3);
|
|
144
|
-
case a2:
|
|
145
|
-
case d:
|
|
146
|
-
return $2(v2 + "Hours", 0);
|
|
147
|
-
case u:
|
|
148
|
-
return $2(v2 + "Minutes", 1);
|
|
149
|
-
case s2:
|
|
150
|
-
return $2(v2 + "Seconds", 2);
|
|
151
|
-
case i2:
|
|
152
|
-
return $2(v2 + "Milliseconds", 3);
|
|
153
|
-
default:
|
|
154
|
-
return this.clone();
|
|
155
|
-
}
|
|
156
|
-
}, m2.endOf = function(t3) {
|
|
157
|
-
return this.startOf(t3, false);
|
|
158
|
-
}, m2.$set = function(t3, e3) {
|
|
159
|
-
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[i2] = f2 + "Seconds", n3[r2] = f2 + "Milliseconds", n3)[o2], $2 = o2 === a2 ? this.$D + (e3 - this.$W) : e3;
|
|
160
|
-
if (o2 === c2 || o2 === h) {
|
|
161
|
-
var y2 = this.clone().set(d, 1);
|
|
162
|
-
y2.$d[l2]($2), y2.init(), this.$d = y2.set(d, Math.min(this.$D, y2.daysInMonth())).$d;
|
|
163
|
-
} else
|
|
164
|
-
l2 && this.$d[l2]($2);
|
|
165
|
-
return this.init(), this;
|
|
166
|
-
}, m2.set = function(t3, e3) {
|
|
167
|
-
return this.clone().$set(t3, e3);
|
|
168
|
-
}, m2.get = function(t3) {
|
|
169
|
-
return this[b.p(t3)]();
|
|
170
|
-
}, m2.add = function(r3, f2) {
|
|
171
|
-
var d2, l2 = this;
|
|
172
|
-
r3 = Number(r3);
|
|
173
|
-
var $2 = b.p(f2), y2 = function(t3) {
|
|
174
|
-
var e3 = O(l2);
|
|
175
|
-
return b.w(e3.date(e3.date() + Math.round(t3 * r3)), l2);
|
|
176
|
-
};
|
|
177
|
-
if ($2 === c2)
|
|
178
|
-
return this.set(c2, this.$M + r3);
|
|
179
|
-
if ($2 === h)
|
|
180
|
-
return this.set(h, this.$y + r3);
|
|
181
|
-
if ($2 === a2)
|
|
182
|
-
return y2(1);
|
|
183
|
-
if ($2 === o)
|
|
184
|
-
return y2(7);
|
|
185
|
-
var M3 = (d2 = {}, d2[s2] = e2, d2[u] = n2, d2[i2] = t2, d2)[$2] || 1, m3 = this.$d.getTime() + r3 * M3;
|
|
186
|
-
return b.w(m3, this);
|
|
187
|
-
}, m2.subtract = function(t3, e3) {
|
|
188
|
-
return this.add(-1 * t3, e3);
|
|
189
|
-
}, m2.format = function(t3) {
|
|
190
|
-
var e3 = this, n3 = this.$locale();
|
|
191
|
-
if (!this.isValid())
|
|
192
|
-
return n3.invalidDate || l;
|
|
193
|
-
var r3 = t3 || "YYYY-MM-DDTHH:mm:ssZ", i3 = 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, i4, s4) {
|
|
194
|
-
return t4 && (t4[n4] || t4(e3, r3)) || i4[n4].slice(0, s4);
|
|
195
|
-
}, d2 = function(t4) {
|
|
196
|
-
return b.s(s3 % 12 || 12, t4, "0");
|
|
197
|
-
}, $2 = f2 || function(t4, e4, n4) {
|
|
198
|
-
var r4 = t4 < 12 ? "AM" : "PM";
|
|
199
|
-
return n4 ? r4.toLowerCase() : r4;
|
|
200
|
-
};
|
|
201
|
-
return r3.replace(y, function(t4, r4) {
|
|
202
|
-
return r4 || function(t5) {
|
|
203
|
-
switch (t5) {
|
|
204
|
-
case "YY":
|
|
205
|
-
return String(e3.$y).slice(-2);
|
|
206
|
-
case "YYYY":
|
|
207
|
-
return b.s(e3.$y, 4, "0");
|
|
208
|
-
case "M":
|
|
209
|
-
return a3 + 1;
|
|
210
|
-
case "MM":
|
|
211
|
-
return b.s(a3 + 1, 2, "0");
|
|
212
|
-
case "MMM":
|
|
213
|
-
return h2(n3.monthsShort, a3, c3, 3);
|
|
214
|
-
case "MMMM":
|
|
215
|
-
return h2(c3, a3);
|
|
216
|
-
case "D":
|
|
217
|
-
return e3.$D;
|
|
218
|
-
case "DD":
|
|
219
|
-
return b.s(e3.$D, 2, "0");
|
|
220
|
-
case "d":
|
|
221
|
-
return String(e3.$W);
|
|
222
|
-
case "dd":
|
|
223
|
-
return h2(n3.weekdaysMin, e3.$W, o2, 2);
|
|
224
|
-
case "ddd":
|
|
225
|
-
return h2(n3.weekdaysShort, e3.$W, o2, 3);
|
|
226
|
-
case "dddd":
|
|
227
|
-
return o2[e3.$W];
|
|
228
|
-
case "H":
|
|
229
|
-
return String(s3);
|
|
230
|
-
case "HH":
|
|
231
|
-
return b.s(s3, 2, "0");
|
|
232
|
-
case "h":
|
|
233
|
-
return d2(1);
|
|
234
|
-
case "hh":
|
|
235
|
-
return d2(2);
|
|
236
|
-
case "a":
|
|
237
|
-
return $2(s3, u2, true);
|
|
238
|
-
case "A":
|
|
239
|
-
return $2(s3, u2, false);
|
|
240
|
-
case "m":
|
|
241
|
-
return String(u2);
|
|
242
|
-
case "mm":
|
|
243
|
-
return b.s(u2, 2, "0");
|
|
244
|
-
case "s":
|
|
245
|
-
return String(e3.$s);
|
|
246
|
-
case "ss":
|
|
247
|
-
return b.s(e3.$s, 2, "0");
|
|
248
|
-
case "SSS":
|
|
249
|
-
return b.s(e3.$ms, 3, "0");
|
|
250
|
-
case "Z":
|
|
251
|
-
return i3;
|
|
34
|
+
var hasRequiredDayjs_min;
|
|
35
|
+
function requireDayjs_min() {
|
|
36
|
+
if (hasRequiredDayjs_min)
|
|
37
|
+
return dayjs_min.exports;
|
|
38
|
+
hasRequiredDayjs_min = 1;
|
|
39
|
+
(function(module2, exports3) {
|
|
40
|
+
!function(t2, e2) {
|
|
41
|
+
module2.exports = e2();
|
|
42
|
+
}(commonjsGlobal, function() {
|
|
43
|
+
var t2 = 1e3, e2 = 6e4, n2 = 36e5, r2 = "millisecond", i2 = "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) {
|
|
44
|
+
var e3 = ["th", "st", "nd", "rd"], n3 = t3 % 100;
|
|
45
|
+
return "[" + t3 + (e3[(n3 - 20) % 10] || e3[n3] || e3[0]) + "]";
|
|
46
|
+
} }, m = function(t3, e3, n3) {
|
|
47
|
+
var r3 = String(t3);
|
|
48
|
+
return !r3 || r3.length >= e3 ? t3 : "" + Array(e3 + 1 - r3.length).join(n3) + t3;
|
|
49
|
+
}, v = { s: m, z: function(t3) {
|
|
50
|
+
var e3 = -t3.utcOffset(), n3 = Math.abs(e3), r3 = Math.floor(n3 / 60), i3 = n3 % 60;
|
|
51
|
+
return (e3 <= 0 ? "+" : "-") + m(r3, 2, "0") + ":" + m(i3, 2, "0");
|
|
52
|
+
}, m: function t3(e3, n3) {
|
|
53
|
+
if (e3.date() < n3.date())
|
|
54
|
+
return -t3(n3, e3);
|
|
55
|
+
var r3 = 12 * (n3.year() - e3.year()) + (n3.month() - e3.month()), i3 = e3.clone().add(r3, c2), s3 = n3 - i3 < 0, u2 = e3.clone().add(r3 + (s3 ? -1 : 1), c2);
|
|
56
|
+
return +(-(r3 + (n3 - i3) / (s3 ? i3 - u2 : u2 - i3)) || 0);
|
|
57
|
+
}, a: function(t3) {
|
|
58
|
+
return t3 < 0 ? Math.ceil(t3) || 0 : Math.floor(t3);
|
|
59
|
+
}, p: function(t3) {
|
|
60
|
+
return { M: c2, y: h, w: o, d: a2, D: d, h: u, m: s2, s: i2, ms: r2, Q: f }[t3] || String(t3 || "").toLowerCase().replace(/s$/, "");
|
|
61
|
+
}, u: function(t3) {
|
|
62
|
+
return void 0 === t3;
|
|
63
|
+
} }, g = "en", D = {};
|
|
64
|
+
D[g] = M;
|
|
65
|
+
var p = "$isDayjsObject", S = function(t3) {
|
|
66
|
+
return t3 instanceof _ || !(!t3 || !t3[p]);
|
|
67
|
+
}, w = function t3(e3, n3, r3) {
|
|
68
|
+
var i3;
|
|
69
|
+
if (!e3)
|
|
70
|
+
return g;
|
|
71
|
+
if ("string" == typeof e3) {
|
|
72
|
+
var s3 = e3.toLowerCase();
|
|
73
|
+
D[s3] && (i3 = s3), n3 && (D[s3] = n3, i3 = s3);
|
|
74
|
+
var u2 = e3.split("-");
|
|
75
|
+
if (!i3 && u2.length > 1)
|
|
76
|
+
return t3(u2[0]);
|
|
77
|
+
} else {
|
|
78
|
+
var a3 = e3.name;
|
|
79
|
+
D[a3] = e3, i3 = a3;
|
|
80
|
+
}
|
|
81
|
+
return !r3 && i3 && (g = i3), i3 || !r3 && g;
|
|
82
|
+
}, O = function(t3, e3) {
|
|
83
|
+
if (S(t3))
|
|
84
|
+
return t3.clone();
|
|
85
|
+
var n3 = "object" == typeof e3 ? e3 : {};
|
|
86
|
+
return n3.date = t3, n3.args = arguments, new _(n3);
|
|
87
|
+
}, b = v;
|
|
88
|
+
b.l = w, b.i = S, b.w = function(t3, e3) {
|
|
89
|
+
return O(t3, { locale: e3.$L, utc: e3.$u, x: e3.$x, $offset: e3.$offset });
|
|
90
|
+
};
|
|
91
|
+
var _ = function() {
|
|
92
|
+
function M2(t3) {
|
|
93
|
+
this.$L = w(t3.locale, null, true), this.parse(t3), this.$x = this.$x || t3.x || {}, this[p] = true;
|
|
94
|
+
}
|
|
95
|
+
var m2 = M2.prototype;
|
|
96
|
+
return m2.parse = function(t3) {
|
|
97
|
+
this.$d = function(t4) {
|
|
98
|
+
var e3 = t4.date, n3 = t4.utc;
|
|
99
|
+
if (null === e3)
|
|
100
|
+
return /* @__PURE__ */ new Date(NaN);
|
|
101
|
+
if (b.u(e3))
|
|
102
|
+
return /* @__PURE__ */ new Date();
|
|
103
|
+
if (e3 instanceof Date)
|
|
104
|
+
return new Date(e3);
|
|
105
|
+
if ("string" == typeof e3 && !/Z$/i.test(e3)) {
|
|
106
|
+
var r3 = e3.match($);
|
|
107
|
+
if (r3) {
|
|
108
|
+
var i3 = r3[2] - 1 || 0, s3 = (r3[7] || "0").substring(0, 3);
|
|
109
|
+
return n3 ? new Date(Date.UTC(r3[1], i3, r3[3] || 1, r3[4] || 0, r3[5] || 0, r3[6] || 0, s3)) : new Date(r3[1], i3, r3[3] || 1, r3[4] || 0, r3[5] || 0, r3[6] || 0, s3);
|
|
110
|
+
}
|
|
252
111
|
}
|
|
253
|
-
return
|
|
254
|
-
}(
|
|
255
|
-
})
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
112
|
+
return new Date(e3);
|
|
113
|
+
}(t3), this.init();
|
|
114
|
+
}, m2.init = function() {
|
|
115
|
+
var t3 = this.$d;
|
|
116
|
+
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();
|
|
117
|
+
}, m2.$utils = function() {
|
|
118
|
+
return b;
|
|
119
|
+
}, m2.isValid = function() {
|
|
120
|
+
return !(this.$d.toString() === l);
|
|
121
|
+
}, m2.isSame = function(t3, e3) {
|
|
122
|
+
var n3 = O(t3);
|
|
123
|
+
return this.startOf(e3) <= n3 && n3 <= this.endOf(e3);
|
|
124
|
+
}, m2.isAfter = function(t3, e3) {
|
|
125
|
+
return O(t3) < this.startOf(e3);
|
|
126
|
+
}, m2.isBefore = function(t3, e3) {
|
|
127
|
+
return this.endOf(e3) < O(t3);
|
|
128
|
+
}, m2.$g = function(t3, e3, n3) {
|
|
129
|
+
return b.u(t3) ? this[e3] : this.set(n3, t3);
|
|
130
|
+
}, m2.unix = function() {
|
|
131
|
+
return Math.floor(this.valueOf() / 1e3);
|
|
132
|
+
}, m2.valueOf = function() {
|
|
133
|
+
return this.$d.getTime();
|
|
134
|
+
}, m2.startOf = function(t3, e3) {
|
|
135
|
+
var n3 = this, r3 = !!b.u(e3) || e3, f2 = b.p(t3), l2 = function(t4, e4) {
|
|
136
|
+
var i3 = b.w(n3.$u ? Date.UTC(n3.$y, e4, t4) : new Date(n3.$y, e4, t4), n3);
|
|
137
|
+
return r3 ? i3 : i3.endOf(a2);
|
|
138
|
+
}, $2 = function(t4, e4) {
|
|
139
|
+
return b.w(n3.toDate()[t4].apply(n3.toDate("s"), (r3 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e4)), n3);
|
|
140
|
+
}, y2 = this.$W, M3 = this.$M, m3 = this.$D, v2 = "set" + (this.$u ? "UTC" : "");
|
|
141
|
+
switch (f2) {
|
|
142
|
+
case h:
|
|
143
|
+
return r3 ? l2(1, 0) : l2(31, 11);
|
|
144
|
+
case c2:
|
|
145
|
+
return r3 ? l2(1, M3) : l2(0, M3 + 1);
|
|
146
|
+
case o:
|
|
147
|
+
var g2 = this.$locale().weekStart || 0, D2 = (y2 < g2 ? y2 + 7 : y2) - g2;
|
|
148
|
+
return l2(r3 ? m3 - D2 : m3 + (6 - D2), M3);
|
|
149
|
+
case a2:
|
|
150
|
+
case d:
|
|
151
|
+
return $2(v2 + "Hours", 0);
|
|
152
|
+
case u:
|
|
153
|
+
return $2(v2 + "Minutes", 1);
|
|
154
|
+
case s2:
|
|
155
|
+
return $2(v2 + "Seconds", 2);
|
|
156
|
+
case i2:
|
|
157
|
+
return $2(v2 + "Milliseconds", 3);
|
|
158
|
+
default:
|
|
159
|
+
return this.clone();
|
|
160
|
+
}
|
|
161
|
+
}, m2.endOf = function(t3) {
|
|
162
|
+
return this.startOf(t3, false);
|
|
163
|
+
}, m2.$set = function(t3, e3) {
|
|
164
|
+
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[i2] = f2 + "Seconds", n3[r2] = f2 + "Milliseconds", n3)[o2], $2 = o2 === a2 ? this.$D + (e3 - this.$W) : e3;
|
|
165
|
+
if (o2 === c2 || o2 === h) {
|
|
166
|
+
var y2 = this.clone().set(d, 1);
|
|
167
|
+
y2.$d[l2]($2), y2.init(), this.$d = y2.set(d, Math.min(this.$D, y2.daysInMonth())).$d;
|
|
168
|
+
} else
|
|
169
|
+
l2 && this.$d[l2]($2);
|
|
170
|
+
return this.init(), this;
|
|
171
|
+
}, m2.set = function(t3, e3) {
|
|
172
|
+
return this.clone().$set(t3, e3);
|
|
173
|
+
}, m2.get = function(t3) {
|
|
174
|
+
return this[b.p(t3)]();
|
|
175
|
+
}, m2.add = function(r3, f2) {
|
|
176
|
+
var d2, l2 = this;
|
|
177
|
+
r3 = Number(r3);
|
|
178
|
+
var $2 = b.p(f2), y2 = function(t3) {
|
|
179
|
+
var e3 = O(l2);
|
|
180
|
+
return b.w(e3.date(e3.date() + Math.round(t3 * r3)), l2);
|
|
181
|
+
};
|
|
182
|
+
if ($2 === c2)
|
|
183
|
+
return this.set(c2, this.$M + r3);
|
|
184
|
+
if ($2 === h)
|
|
185
|
+
return this.set(h, this.$y + r3);
|
|
186
|
+
if ($2 === a2)
|
|
187
|
+
return y2(1);
|
|
188
|
+
if ($2 === o)
|
|
189
|
+
return y2(7);
|
|
190
|
+
var M3 = (d2 = {}, d2[s2] = e2, d2[u] = n2, d2[i2] = t2, d2)[$2] || 1, m3 = this.$d.getTime() + r3 * M3;
|
|
191
|
+
return b.w(m3, this);
|
|
192
|
+
}, m2.subtract = function(t3, e3) {
|
|
193
|
+
return this.add(-1 * t3, e3);
|
|
194
|
+
}, m2.format = function(t3) {
|
|
195
|
+
var e3 = this, n3 = this.$locale();
|
|
196
|
+
if (!this.isValid())
|
|
197
|
+
return n3.invalidDate || l;
|
|
198
|
+
var r3 = t3 || "YYYY-MM-DDTHH:mm:ssZ", i3 = 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, i4, s4) {
|
|
199
|
+
return t4 && (t4[n4] || t4(e3, r3)) || i4[n4].slice(0, s4);
|
|
200
|
+
}, d2 = function(t4) {
|
|
201
|
+
return b.s(s3 % 12 || 12, t4, "0");
|
|
202
|
+
}, $2 = f2 || function(t4, e4, n4) {
|
|
203
|
+
var r4 = t4 < 12 ? "AM" : "PM";
|
|
204
|
+
return n4 ? r4.toLowerCase() : r4;
|
|
205
|
+
};
|
|
206
|
+
return r3.replace(y, function(t4, r4) {
|
|
207
|
+
return r4 || function(t5) {
|
|
208
|
+
switch (t5) {
|
|
209
|
+
case "YY":
|
|
210
|
+
return String(e3.$y).slice(-2);
|
|
211
|
+
case "YYYY":
|
|
212
|
+
return b.s(e3.$y, 4, "0");
|
|
213
|
+
case "M":
|
|
214
|
+
return a3 + 1;
|
|
215
|
+
case "MM":
|
|
216
|
+
return b.s(a3 + 1, 2, "0");
|
|
217
|
+
case "MMM":
|
|
218
|
+
return h2(n3.monthsShort, a3, c3, 3);
|
|
219
|
+
case "MMMM":
|
|
220
|
+
return h2(c3, a3);
|
|
221
|
+
case "D":
|
|
222
|
+
return e3.$D;
|
|
223
|
+
case "DD":
|
|
224
|
+
return b.s(e3.$D, 2, "0");
|
|
225
|
+
case "d":
|
|
226
|
+
return String(e3.$W);
|
|
227
|
+
case "dd":
|
|
228
|
+
return h2(n3.weekdaysMin, e3.$W, o2, 2);
|
|
229
|
+
case "ddd":
|
|
230
|
+
return h2(n3.weekdaysShort, e3.$W, o2, 3);
|
|
231
|
+
case "dddd":
|
|
232
|
+
return o2[e3.$W];
|
|
233
|
+
case "H":
|
|
234
|
+
return String(s3);
|
|
235
|
+
case "HH":
|
|
236
|
+
return b.s(s3, 2, "0");
|
|
237
|
+
case "h":
|
|
238
|
+
return d2(1);
|
|
239
|
+
case "hh":
|
|
240
|
+
return d2(2);
|
|
241
|
+
case "a":
|
|
242
|
+
return $2(s3, u2, true);
|
|
243
|
+
case "A":
|
|
244
|
+
return $2(s3, u2, false);
|
|
245
|
+
case "m":
|
|
246
|
+
return String(u2);
|
|
247
|
+
case "mm":
|
|
248
|
+
return b.s(u2, 2, "0");
|
|
249
|
+
case "s":
|
|
250
|
+
return String(e3.$s);
|
|
251
|
+
case "ss":
|
|
252
|
+
return b.s(e3.$s, 2, "0");
|
|
253
|
+
case "SSS":
|
|
254
|
+
return b.s(e3.$ms, 3, "0");
|
|
255
|
+
case "Z":
|
|
256
|
+
return i3;
|
|
257
|
+
}
|
|
258
|
+
return null;
|
|
259
|
+
}(t4) || i3.replace(":", "");
|
|
260
|
+
});
|
|
261
|
+
}, m2.utcOffset = function() {
|
|
262
|
+
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
263
|
+
}, m2.diff = function(r3, d2, l2) {
|
|
264
|
+
var $2, y2 = this, M3 = b.p(d2), m3 = O(r3), v2 = (m3.utcOffset() - this.utcOffset()) * e2, g2 = this - m3, D2 = function() {
|
|
265
|
+
return b.m(y2, m3);
|
|
266
|
+
};
|
|
267
|
+
switch (M3) {
|
|
268
|
+
case h:
|
|
269
|
+
$2 = D2() / 12;
|
|
270
|
+
break;
|
|
271
|
+
case c2:
|
|
272
|
+
$2 = D2();
|
|
273
|
+
break;
|
|
274
|
+
case f:
|
|
275
|
+
$2 = D2() / 3;
|
|
276
|
+
break;
|
|
277
|
+
case o:
|
|
278
|
+
$2 = (g2 - v2) / 6048e5;
|
|
279
|
+
break;
|
|
280
|
+
case a2:
|
|
281
|
+
$2 = (g2 - v2) / 864e5;
|
|
282
|
+
break;
|
|
283
|
+
case u:
|
|
284
|
+
$2 = g2 / n2;
|
|
285
|
+
break;
|
|
286
|
+
case s2:
|
|
287
|
+
$2 = g2 / e2;
|
|
288
|
+
break;
|
|
289
|
+
case i2:
|
|
290
|
+
$2 = g2 / t2;
|
|
291
|
+
break;
|
|
292
|
+
default:
|
|
293
|
+
$2 = g2;
|
|
294
|
+
}
|
|
295
|
+
return l2 ? $2 : b.a($2);
|
|
296
|
+
}, m2.daysInMonth = function() {
|
|
297
|
+
return this.endOf(c2).$D;
|
|
298
|
+
}, m2.$locale = function() {
|
|
299
|
+
return D[this.$L];
|
|
300
|
+
}, m2.locale = function(t3, e3) {
|
|
301
|
+
if (!t3)
|
|
302
|
+
return this.$L;
|
|
303
|
+
var n3 = this.clone(), r3 = w(t3, e3, true);
|
|
304
|
+
return r3 && (n3.$L = r3), n3;
|
|
305
|
+
}, m2.clone = function() {
|
|
306
|
+
return b.w(this.$d, this);
|
|
307
|
+
}, m2.toDate = function() {
|
|
308
|
+
return new Date(this.valueOf());
|
|
309
|
+
}, m2.toJSON = function() {
|
|
310
|
+
return this.isValid() ? this.toISOString() : null;
|
|
311
|
+
}, m2.toISOString = function() {
|
|
312
|
+
return this.$d.toISOString();
|
|
313
|
+
}, m2.toString = function() {
|
|
314
|
+
return this.$d.toUTCString();
|
|
315
|
+
}, M2;
|
|
316
|
+
}(), k = _.prototype;
|
|
317
|
+
return O.prototype = k, [["$ms", r2], ["$s", i2], ["$m", s2], ["$H", u], ["$W", a2], ["$M", c2], ["$y", h], ["$D", d]].forEach(function(t3) {
|
|
318
|
+
k[t3[1]] = function(e3) {
|
|
319
|
+
return this.$g(e3, t3[0], t3[1]);
|
|
261
320
|
};
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
case o:
|
|
273
|
-
$2 = (g2 - v2) / 6048e5;
|
|
274
|
-
break;
|
|
275
|
-
case a2:
|
|
276
|
-
$2 = (g2 - v2) / 864e5;
|
|
277
|
-
break;
|
|
278
|
-
case u:
|
|
279
|
-
$2 = g2 / n2;
|
|
280
|
-
break;
|
|
281
|
-
case s2:
|
|
282
|
-
$2 = g2 / e2;
|
|
283
|
-
break;
|
|
284
|
-
case i2:
|
|
285
|
-
$2 = g2 / t2;
|
|
286
|
-
break;
|
|
287
|
-
default:
|
|
288
|
-
$2 = g2;
|
|
289
|
-
}
|
|
290
|
-
return l2 ? $2 : b.a($2);
|
|
291
|
-
}, m2.daysInMonth = function() {
|
|
292
|
-
return this.endOf(c2).$D;
|
|
293
|
-
}, m2.$locale = function() {
|
|
294
|
-
return D[this.$L];
|
|
295
|
-
}, m2.locale = function(t3, e3) {
|
|
296
|
-
if (!t3)
|
|
297
|
-
return this.$L;
|
|
298
|
-
var n3 = this.clone(), r3 = w(t3, e3, true);
|
|
299
|
-
return r3 && (n3.$L = r3), n3;
|
|
300
|
-
}, m2.clone = function() {
|
|
301
|
-
return b.w(this.$d, this);
|
|
302
|
-
}, m2.toDate = function() {
|
|
303
|
-
return new Date(this.valueOf());
|
|
304
|
-
}, m2.toJSON = function() {
|
|
305
|
-
return this.isValid() ? this.toISOString() : null;
|
|
306
|
-
}, m2.toISOString = function() {
|
|
307
|
-
return this.$d.toISOString();
|
|
308
|
-
}, m2.toString = function() {
|
|
309
|
-
return this.$d.toUTCString();
|
|
310
|
-
}, M2;
|
|
311
|
-
}(), k = _.prototype;
|
|
312
|
-
return O.prototype = k, [["$ms", r2], ["$s", i2], ["$m", s2], ["$H", u], ["$W", a2], ["$M", c2], ["$y", h], ["$D", d]].forEach(function(t3) {
|
|
313
|
-
k[t3[1]] = function(e3) {
|
|
314
|
-
return this.$g(e3, t3[0], t3[1]);
|
|
315
|
-
};
|
|
316
|
-
}), O.extend = function(t3, e3) {
|
|
317
|
-
return t3.$i || (t3(e3, _, O), t3.$i = true), O;
|
|
318
|
-
}, O.locale = w, O.isDayjs = S, O.unix = function(t3) {
|
|
319
|
-
return O(1e3 * t3);
|
|
320
|
-
}, O.en = D[g], O.Ls = D, O.p = {}, O;
|
|
321
|
-
});
|
|
322
|
-
})(dayjs_min);
|
|
323
|
-
var dayjs_minExports = dayjs_min.exports;
|
|
321
|
+
}), O.extend = function(t3, e3) {
|
|
322
|
+
return t3.$i || (t3(e3, _, O), t3.$i = true), O;
|
|
323
|
+
}, O.locale = w, O.isDayjs = S, O.unix = function(t3) {
|
|
324
|
+
return O(1e3 * t3);
|
|
325
|
+
}, O.en = D[g], O.Ls = D, O.p = {}, O;
|
|
326
|
+
});
|
|
327
|
+
})(dayjs_min);
|
|
328
|
+
return dayjs_min.exports;
|
|
329
|
+
}
|
|
330
|
+
var dayjs_minExports = requireDayjs_min();
|
|
324
331
|
const dayjs = /* @__PURE__ */ getDefaultExportFromCjs(dayjs_minExports);
|
|
325
332
|
var zh = { exports: {} };
|
|
326
333
|
(function(module2, exports3) {
|
|
327
334
|
!function(e2, _) {
|
|
328
|
-
module2.exports = _(
|
|
335
|
+
module2.exports = _(requireDayjs_min());
|
|
329
336
|
}(commonjsGlobal, function(e2) {
|
|
330
337
|
function _(e3) {
|
|
331
338
|
return e3 && "object" == typeof e3 && "default" in e3 ? e3 : { default: e3 };
|
|
@@ -1164,7 +1171,6 @@ var __publicField = (obj, key, value) => {
|
|
|
1164
1171
|
const provisioner$1 = "Provisioner";
|
|
1165
1172
|
const file_system$1 = "File system";
|
|
1166
1173
|
const capacity$1 = "Capacity";
|
|
1167
|
-
const phase$1 = "Phase";
|
|
1168
1174
|
const volume_mode$1 = "Volume mode";
|
|
1169
1175
|
const access_mode$1 = "Access mode";
|
|
1170
1176
|
const block$1 = "Block";
|
|
@@ -1337,7 +1343,6 @@ var __publicField = (obj, key, value) => {
|
|
|
1337
1343
|
provisioner: provisioner$1,
|
|
1338
1344
|
file_system: file_system$1,
|
|
1339
1345
|
capacity: capacity$1,
|
|
1340
|
-
phase: phase$1,
|
|
1341
1346
|
volume_mode: volume_mode$1,
|
|
1342
1347
|
access_mode: access_mode$1,
|
|
1343
1348
|
block: block$1,
|
|
@@ -1503,6 +1508,7 @@ var __publicField = (obj, key, value) => {
|
|
|
1503
1508
|
const out_cluster_lb_desc = "LoadBalancer 展示 <strong>ingress[*].ip</strong>。";
|
|
1504
1509
|
const out_external_name_desc = "ExternalName 展示 <strong>external-ip</strong>。";
|
|
1505
1510
|
const only_support_one_yaml = "一次仅支持输入一个 YAML 配置。";
|
|
1511
|
+
const support = "支持";
|
|
1506
1512
|
const not_support = "不支持";
|
|
1507
1513
|
const stopped = "已停止";
|
|
1508
1514
|
const any_node_ip = "任意节点 IP";
|
|
@@ -1511,7 +1517,7 @@ var __publicField = (obj, key, value) => {
|
|
|
1511
1517
|
const provisioner = "制备器";
|
|
1512
1518
|
const file_system = "文件系统";
|
|
1513
1519
|
const capacity = "容量";
|
|
1514
|
-
const
|
|
1520
|
+
const distributed = "分配量";
|
|
1515
1521
|
const volume_mode = "卷模式";
|
|
1516
1522
|
const access_mode = "访问模式";
|
|
1517
1523
|
const block = "块";
|
|
@@ -1535,6 +1541,16 @@ var __publicField = (obj, key, value) => {
|
|
|
1535
1541
|
const edit_label_success_toast = "编辑资源 {{name}} 的标签成功";
|
|
1536
1542
|
const edit_annotation = "编辑注解";
|
|
1537
1543
|
const edit_annotation_success_toast = "编辑资源 {{name}} 的注解成功";
|
|
1544
|
+
const pvc = "持久卷申领";
|
|
1545
|
+
const pv = "持久卷";
|
|
1546
|
+
const csi = "CSI";
|
|
1547
|
+
const retain = "保留";
|
|
1548
|
+
const default_sc = "默认存储类";
|
|
1549
|
+
const reclaim_policy = "回收策略";
|
|
1550
|
+
const allow_expand = "卷扩容";
|
|
1551
|
+
const edit_distribute_storage = "编辑分配量";
|
|
1552
|
+
const edit_distribute_storage_success_toast = "编辑分配量成功";
|
|
1553
|
+
const edit_distribute_storage_failed_toast = "编辑分配量失败";
|
|
1538
1554
|
const dovetail = {
|
|
1539
1555
|
copy: copy$1,
|
|
1540
1556
|
reset_arguments,
|
|
@@ -1689,6 +1705,7 @@ var __publicField = (obj, key, value) => {
|
|
|
1689
1705
|
out_cluster_lb_desc,
|
|
1690
1706
|
out_external_name_desc,
|
|
1691
1707
|
only_support_one_yaml,
|
|
1708
|
+
support,
|
|
1692
1709
|
not_support,
|
|
1693
1710
|
stopped,
|
|
1694
1711
|
any_node_ip,
|
|
@@ -1697,7 +1714,7 @@ var __publicField = (obj, key, value) => {
|
|
|
1697
1714
|
provisioner,
|
|
1698
1715
|
file_system,
|
|
1699
1716
|
capacity,
|
|
1700
|
-
|
|
1717
|
+
distributed,
|
|
1701
1718
|
volume_mode,
|
|
1702
1719
|
access_mode,
|
|
1703
1720
|
block,
|
|
@@ -1720,7 +1737,17 @@ var __publicField = (obj, key, value) => {
|
|
|
1720
1737
|
edit_label,
|
|
1721
1738
|
edit_label_success_toast,
|
|
1722
1739
|
edit_annotation,
|
|
1723
|
-
edit_annotation_success_toast
|
|
1740
|
+
edit_annotation_success_toast,
|
|
1741
|
+
pvc,
|
|
1742
|
+
pv,
|
|
1743
|
+
csi,
|
|
1744
|
+
retain,
|
|
1745
|
+
default_sc,
|
|
1746
|
+
reclaim_policy,
|
|
1747
|
+
allow_expand,
|
|
1748
|
+
edit_distribute_storage,
|
|
1749
|
+
edit_distribute_storage_success_toast,
|
|
1750
|
+
edit_distribute_storage_failed_toast
|
|
1724
1751
|
};
|
|
1725
1752
|
const ZH = {
|
|
1726
1753
|
dovetail
|
|
@@ -9734,11 +9761,50 @@ var __publicField = (obj, key, value) => {
|
|
|
9734
9761
|
const STORAGE_CLASS_INIT_VALUE = {
|
|
9735
9762
|
"apiVersion": "storage.k8s.io/v1",
|
|
9736
9763
|
"kind": "StorageClass",
|
|
9764
|
+
"metadata": {
|
|
9765
|
+
"name": "example"
|
|
9766
|
+
},
|
|
9767
|
+
"parameters": {},
|
|
9768
|
+
"provisioner": "example",
|
|
9769
|
+
"reclaimPolicy": "Delete",
|
|
9770
|
+
"allowVolumeExpansion": true,
|
|
9771
|
+
"volumeBindingMode": "Immediate"
|
|
9772
|
+
};
|
|
9773
|
+
const PV_INIT_VALUE = {
|
|
9774
|
+
"apiVersion": "v1",
|
|
9775
|
+
"kind": "PersistentVolume",
|
|
9776
|
+
"metadata": {
|
|
9777
|
+
"name": "example"
|
|
9778
|
+
},
|
|
9779
|
+
"spec": {
|
|
9780
|
+
"accessModes": [
|
|
9781
|
+
"ReadWriteOnce"
|
|
9782
|
+
],
|
|
9783
|
+
"capacity": {
|
|
9784
|
+
"storage": "40Gi"
|
|
9785
|
+
},
|
|
9786
|
+
"persistentVolumeReclaimPolicy": "Delete",
|
|
9787
|
+
"volumeMode": "Filesystem"
|
|
9788
|
+
}
|
|
9789
|
+
};
|
|
9790
|
+
const PVC_INIT_VALUE = {
|
|
9791
|
+
"apiVersion": "v1",
|
|
9792
|
+
"kind": "PersistentVolumeClaim",
|
|
9737
9793
|
"metadata": {
|
|
9738
9794
|
"name": "example",
|
|
9739
9795
|
"namespace": "default"
|
|
9740
9796
|
},
|
|
9741
|
-
"spec": {
|
|
9797
|
+
"spec": {
|
|
9798
|
+
"accessModes": [
|
|
9799
|
+
"ReadWriteOnce"
|
|
9800
|
+
],
|
|
9801
|
+
"resources": {
|
|
9802
|
+
"requests": {
|
|
9803
|
+
"storage": "40Gi"
|
|
9804
|
+
}
|
|
9805
|
+
},
|
|
9806
|
+
"storageClassName": "example"
|
|
9807
|
+
}
|
|
9742
9808
|
};
|
|
9743
9809
|
var WorkloadState = /* @__PURE__ */ ((WorkloadState2) => {
|
|
9744
9810
|
WorkloadState2["Terminated"] = "terminated";
|
|
@@ -10254,24 +10320,53 @@ var __publicField = (obj, key, value) => {
|
|
|
10254
10320
|
kind: "PersistentVolume"
|
|
10255
10321
|
});
|
|
10256
10322
|
this.pvs = pvs.items.filter(
|
|
10257
|
-
(
|
|
10258
|
-
var _a;
|
|
10259
|
-
return ((_a = pv.spec) == null ? void 0 : _a.storageClassName) === this.metadata.name;
|
|
10260
|
-
}
|
|
10323
|
+
(pv2) => this.filterPV(pv2, this.metadata.name)
|
|
10261
10324
|
);
|
|
10262
10325
|
}
|
|
10326
|
+
filterPV(pv2, scName) {
|
|
10327
|
+
var _a;
|
|
10328
|
+
return ((_a = pv2.spec) == null ? void 0 : _a.storageClassName) === scName;
|
|
10329
|
+
}
|
|
10330
|
+
get isDefaultSC() {
|
|
10331
|
+
var _a, _b;
|
|
10332
|
+
return (_b = (_a = this._rawYaml.metadata) == null ? void 0 : _a.annotations) == null ? void 0 : _b["storageclass.kubernetes.io/is-default-class"];
|
|
10333
|
+
}
|
|
10334
|
+
get reclaimPolicy() {
|
|
10335
|
+
return this._rawYaml.reclaimPolicy;
|
|
10336
|
+
}
|
|
10263
10337
|
}
|
|
10264
10338
|
class PersistentVolumeModel extends ResourceModel {
|
|
10265
10339
|
constructor(_rawYaml, _globalStore) {
|
|
10266
10340
|
super(_rawYaml, _globalStore);
|
|
10267
10341
|
this._rawYaml = _rawYaml;
|
|
10268
10342
|
}
|
|
10343
|
+
get phase() {
|
|
10344
|
+
return this._rawYaml.status.phase;
|
|
10345
|
+
}
|
|
10346
|
+
get csi() {
|
|
10347
|
+
var _a;
|
|
10348
|
+
return (_a = this._rawYaml.spec.csi) == null ? void 0 : _a.driver;
|
|
10349
|
+
}
|
|
10350
|
+
get pvc() {
|
|
10351
|
+
var _a;
|
|
10352
|
+
return (_a = this._rawYaml.spec.claimRef) == null ? void 0 : _a.name;
|
|
10353
|
+
}
|
|
10269
10354
|
}
|
|
10270
10355
|
class PersistentVolumeClaimModel extends ResourceModel {
|
|
10271
10356
|
constructor(_rawYaml, _globalStore) {
|
|
10272
10357
|
super(_rawYaml, _globalStore);
|
|
10273
10358
|
this._rawYaml = _rawYaml;
|
|
10274
10359
|
}
|
|
10360
|
+
get phase() {
|
|
10361
|
+
return this._rawYaml.status.phase;
|
|
10362
|
+
}
|
|
10363
|
+
get pv() {
|
|
10364
|
+
return this._rawYaml.spec.volumeName;
|
|
10365
|
+
}
|
|
10366
|
+
updateDistributeStorage(distributeStorage) {
|
|
10367
|
+
const yaml2 = lodashEs.cloneDeep(this._globalStore.restoreItem(this));
|
|
10368
|
+
return lodashEs.set(yaml2, "spec.resources.requests.storage", `${distributeStorage}Gi`);
|
|
10369
|
+
}
|
|
10275
10370
|
}
|
|
10276
10371
|
const index_1iq0dq9 = "";
|
|
10277
10372
|
const ServiceInClusterAccessComponent = ({
|
|
@@ -11231,7 +11326,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11231
11326
|
}
|
|
11232
11327
|
const useEagleTable = (params) => {
|
|
11233
11328
|
var _a, _b;
|
|
11234
|
-
const { columns, tableProps, formatter, Dropdown = K8sDropdown } = params;
|
|
11329
|
+
const { columns, tableProps, formatter, Dropdown = K8sDropdown, resource: resourceFromParams } = params;
|
|
11235
11330
|
const [selectedKeys, setSelectedKeys] = React.useState([]);
|
|
11236
11331
|
const [currentPage, setCurrentPage] = React.useState((tableProps == null ? void 0 : tableProps.currentPage) || 1);
|
|
11237
11332
|
const { resource } = core.useResource();
|
|
@@ -11241,10 +11336,11 @@ var __publicField = (obj, key, value) => {
|
|
|
11241
11336
|
pagination: {
|
|
11242
11337
|
pageSize: currentSize,
|
|
11243
11338
|
mode: "server"
|
|
11244
|
-
}
|
|
11339
|
+
},
|
|
11340
|
+
resource: resourceFromParams || (resource == null ? void 0 : resource.name)
|
|
11245
11341
|
});
|
|
11246
11342
|
return mergedParams;
|
|
11247
|
-
}, [params.useTableParams, currentSize]);
|
|
11343
|
+
}, [params.useTableParams, currentSize, resourceFromParams, resource]);
|
|
11248
11344
|
const finalColumns = React.useMemo(
|
|
11249
11345
|
() => addDefaultRenderToColumns(columns),
|
|
11250
11346
|
[columns]
|
|
@@ -11274,7 +11370,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11274
11370
|
const total = ((_b = table.tableQueryResult.data) == null ? void 0 : _b.total) || 0;
|
|
11275
11371
|
const finalDataSource = formatter ? data2 == null ? void 0 : data2.map(formatter) : data2;
|
|
11276
11372
|
const finalProps = {
|
|
11277
|
-
tableKey: (resource == null ? void 0 : resource.name) || "table",
|
|
11373
|
+
tableKey: resourceFromParams || (resource == null ? void 0 : resource.name) || "table",
|
|
11278
11374
|
loading: table.tableQueryResult.isLoading,
|
|
11279
11375
|
data: finalDataSource || [],
|
|
11280
11376
|
columns: finalColumns,
|
|
@@ -12064,6 +12160,50 @@ var __publicField = (obj, key, value) => {
|
|
|
12064
12160
|
};
|
|
12065
12161
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: map[value2] || value2 });
|
|
12066
12162
|
}
|
|
12163
|
+
function ResourceTable(props) {
|
|
12164
|
+
var _a;
|
|
12165
|
+
const { resource, useTableParams } = props;
|
|
12166
|
+
const configs = React.useContext(ConfigsContext);
|
|
12167
|
+
const config = configs[resource];
|
|
12168
|
+
const { formatter, columns, Dropdown, noShow } = config;
|
|
12169
|
+
const { i18n: i18n2 } = useTranslation();
|
|
12170
|
+
const { Table: TableComponent } = React.useContext(ComponentContext);
|
|
12171
|
+
const Table$1 = TableComponent || Table;
|
|
12172
|
+
const nameRenderer = noShow ? PlainTextNameColumnRenderer(i18n2) : NameColumnRenderer(i18n2);
|
|
12173
|
+
const { tableProps } = useEagleTable({
|
|
12174
|
+
useTableParams: {
|
|
12175
|
+
...useTableParams
|
|
12176
|
+
},
|
|
12177
|
+
columns: [nameRenderer, ...(columns == null ? void 0 : columns()) || []],
|
|
12178
|
+
tableProps: {
|
|
12179
|
+
defaultSize: 10,
|
|
12180
|
+
...config.tableProps
|
|
12181
|
+
},
|
|
12182
|
+
resource,
|
|
12183
|
+
formatter,
|
|
12184
|
+
Dropdown
|
|
12185
|
+
});
|
|
12186
|
+
React.useEffect(() => {
|
|
12187
|
+
tableProps.onPageChange(1);
|
|
12188
|
+
}, []);
|
|
12189
|
+
if (!((_a = tableProps.data) == null ? void 0 : _a.length) && !tableProps.loading) {
|
|
12190
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
12191
|
+
WidgetErrorContent,
|
|
12192
|
+
{
|
|
12193
|
+
errorText: tableProps.empty || i18n2.t("dovetail.no_resource", { kind: ` ${config.kind}` }),
|
|
12194
|
+
type: ErrorContentType.Card
|
|
12195
|
+
}
|
|
12196
|
+
);
|
|
12197
|
+
}
|
|
12198
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
12199
|
+
Table$1,
|
|
12200
|
+
{
|
|
12201
|
+
...tableProps,
|
|
12202
|
+
empty: tableProps.empty || i18n2.t("dovetail.no_resource", { kind: ` ${config.kind}` }),
|
|
12203
|
+
className: cx_default(tableProps.className)
|
|
12204
|
+
}
|
|
12205
|
+
);
|
|
12206
|
+
}
|
|
12067
12207
|
const WorkloadPodsTable_975j2t = "";
|
|
12068
12208
|
const WorkloadPodsTable = ({
|
|
12069
12209
|
namespace: namespace2,
|
|
@@ -12302,6 +12442,126 @@ var __publicField = (obj, key, value) => {
|
|
|
12302
12442
|
})]
|
|
12303
12443
|
});
|
|
12304
12444
|
}
|
|
12445
|
+
var StorageUnit = /* @__PURE__ */ ((StorageUnit2) => {
|
|
12446
|
+
StorageUnit2["Pi"] = "Pi";
|
|
12447
|
+
StorageUnit2["PiB"] = "PiB";
|
|
12448
|
+
StorageUnit2["Ti"] = "Ti";
|
|
12449
|
+
StorageUnit2["TiB"] = "TiB";
|
|
12450
|
+
StorageUnit2["Gi"] = "Gi";
|
|
12451
|
+
StorageUnit2["GiB"] = "GiB";
|
|
12452
|
+
StorageUnit2["Mi"] = "Mi";
|
|
12453
|
+
StorageUnit2["MiB"] = "MiB";
|
|
12454
|
+
StorageUnit2["Ki"] = "Ki";
|
|
12455
|
+
StorageUnit2["KiB"] = "KiB";
|
|
12456
|
+
return StorageUnit2;
|
|
12457
|
+
})(StorageUnit || {});
|
|
12458
|
+
const UNIT_FACTORS = {
|
|
12459
|
+
Pi: 1024 ** 5,
|
|
12460
|
+
PiB: 1024 ** 5,
|
|
12461
|
+
Ti: 1024 ** 4,
|
|
12462
|
+
TiB: 1024 ** 4,
|
|
12463
|
+
Gi: 1024 ** 3,
|
|
12464
|
+
GiB: 1024 ** 3,
|
|
12465
|
+
Mi: 1024 ** 2,
|
|
12466
|
+
MiB: 1024 ** 2,
|
|
12467
|
+
Ki: 1024,
|
|
12468
|
+
KiB: 1024,
|
|
12469
|
+
B: 1
|
|
12470
|
+
};
|
|
12471
|
+
function transformStorageUnit(value2, toUnit = "Gi") {
|
|
12472
|
+
const num = parseFloat(value2);
|
|
12473
|
+
const unit = Object.values(StorageUnit).find((u) => value2.includes(u)) || "Ki";
|
|
12474
|
+
return num / UNIT_FACTORS[unit] * UNIT_FACTORS[toUnit];
|
|
12475
|
+
}
|
|
12476
|
+
const DistributeStorageForm = React.forwardRef(function DistributeStorageForm2(props, ref) {
|
|
12477
|
+
const { defaultValue, pvc: pvc2 } = props;
|
|
12478
|
+
const { resource } = core.useResource();
|
|
12479
|
+
const { mutateAsync } = core.useUpdate();
|
|
12480
|
+
const { t: t2 } = useTranslation();
|
|
12481
|
+
const [distributeStorage, setDistributeStorage] = React.useState(defaultValue);
|
|
12482
|
+
const submit = React.useCallback(() => {
|
|
12483
|
+
const v = pvc2.updateDistributeStorage(distributeStorage);
|
|
12484
|
+
const id = pvc2.id;
|
|
12485
|
+
pruneBeforeEdit(v);
|
|
12486
|
+
return mutateAsync({
|
|
12487
|
+
id,
|
|
12488
|
+
resource: (resource == null ? void 0 : resource.name) || "",
|
|
12489
|
+
values: v,
|
|
12490
|
+
successNotification() {
|
|
12491
|
+
return {
|
|
12492
|
+
message: t2("dovetail.edit_distribute_storage_success_toast", {
|
|
12493
|
+
kind: pvc2.kind,
|
|
12494
|
+
name: pvc2.id,
|
|
12495
|
+
interpolation: {
|
|
12496
|
+
escapeValue: false
|
|
12497
|
+
}
|
|
12498
|
+
}),
|
|
12499
|
+
type: "success"
|
|
12500
|
+
};
|
|
12501
|
+
},
|
|
12502
|
+
errorNotification: false
|
|
12503
|
+
});
|
|
12504
|
+
}, [pvc2, distributeStorage, resource == null ? void 0 : resource.name, mutateAsync, t2]);
|
|
12505
|
+
React.useImperativeHandle(ref, () => ({
|
|
12506
|
+
submit
|
|
12507
|
+
}), [submit]);
|
|
12508
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
12509
|
+
eagle.Form.Item,
|
|
12510
|
+
{
|
|
12511
|
+
label: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { style: { width: "134px" }, children: t2("dovetail.distributed") }),
|
|
12512
|
+
colon: false,
|
|
12513
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
12514
|
+
eagle.Fields.Integer,
|
|
12515
|
+
{
|
|
12516
|
+
style: { width: "142px" },
|
|
12517
|
+
input: {
|
|
12518
|
+
name: "distributeStorage",
|
|
12519
|
+
value: distributeStorage,
|
|
12520
|
+
onChange: (value2) => {
|
|
12521
|
+
setDistributeStorage(Number(value2));
|
|
12522
|
+
},
|
|
12523
|
+
onBlur: () => {
|
|
12524
|
+
},
|
|
12525
|
+
onFocus: () => {
|
|
12526
|
+
}
|
|
12527
|
+
},
|
|
12528
|
+
min: 0,
|
|
12529
|
+
meta: {},
|
|
12530
|
+
suffix: "GiB",
|
|
12531
|
+
controls: true
|
|
12532
|
+
}
|
|
12533
|
+
)
|
|
12534
|
+
}
|
|
12535
|
+
);
|
|
12536
|
+
});
|
|
12537
|
+
function PVCDistributeStorage({ pvc: pvc2, editable }) {
|
|
12538
|
+
var _a, _b;
|
|
12539
|
+
const { t: t2 } = useTranslation();
|
|
12540
|
+
const formRef = React.useRef(null);
|
|
12541
|
+
const value2 = (_b = (_a = pvc2.spec.resources) == null ? void 0 : _a.requests) == null ? void 0 : _b.storage;
|
|
12542
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
12543
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Units.Byte, { rawValue: parseSi(value2), decimals: 1 }),
|
|
12544
|
+
editable && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
12545
|
+
EditField,
|
|
12546
|
+
{
|
|
12547
|
+
modalProps: {
|
|
12548
|
+
formRef,
|
|
12549
|
+
title: t2("dovetail.edit_replicas"),
|
|
12550
|
+
renderContent() {
|
|
12551
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
12552
|
+
DistributeStorageForm,
|
|
12553
|
+
{
|
|
12554
|
+
ref: formRef,
|
|
12555
|
+
defaultValue: value2 ? transformStorageUnit(value2, StorageUnit.Gi) : 0,
|
|
12556
|
+
pvc: pvc2
|
|
12557
|
+
}
|
|
12558
|
+
);
|
|
12559
|
+
}
|
|
12560
|
+
}
|
|
12561
|
+
}
|
|
12562
|
+
)
|
|
12563
|
+
] });
|
|
12564
|
+
}
|
|
12305
12565
|
var AreaType = /* @__PURE__ */ ((AreaType2) => {
|
|
12306
12566
|
AreaType2["Inline"] = "Inline";
|
|
12307
12567
|
AreaType2["Grid"] = "Grid";
|
|
@@ -12557,15 +12817,24 @@ var __publicField = (obj, key, value) => {
|
|
|
12557
12817
|
return {
|
|
12558
12818
|
key: "pvs",
|
|
12559
12819
|
path: ["pvs"],
|
|
12560
|
-
renderContent: (
|
|
12561
|
-
return
|
|
12562
|
-
|
|
12820
|
+
renderContent: (_, sc) => {
|
|
12821
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
12822
|
+
ResourceTable,
|
|
12563
12823
|
{
|
|
12564
|
-
|
|
12565
|
-
|
|
12566
|
-
|
|
12824
|
+
resource: "persistentvolumes",
|
|
12825
|
+
useTableParams: {
|
|
12826
|
+
filters: {
|
|
12827
|
+
permanent: [{
|
|
12828
|
+
field: "",
|
|
12829
|
+
value: "",
|
|
12830
|
+
fn(pv2) {
|
|
12831
|
+
return sc.filterPV(pv2, sc.metadata.name);
|
|
12832
|
+
}
|
|
12833
|
+
}]
|
|
12834
|
+
}
|
|
12835
|
+
}
|
|
12567
12836
|
}
|
|
12568
|
-
)
|
|
12837
|
+
);
|
|
12569
12838
|
}
|
|
12570
12839
|
};
|
|
12571
12840
|
};
|
|
@@ -12583,12 +12852,19 @@ var __publicField = (obj, key, value) => {
|
|
|
12583
12852
|
return {
|
|
12584
12853
|
key: "storage",
|
|
12585
12854
|
path: ["spec", "resources", "requests", "storage"],
|
|
12586
|
-
title: i18n2.t("dovetail.
|
|
12587
|
-
renderContent(value2) {
|
|
12588
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
12855
|
+
title: i18n2.t("dovetail.distributed"),
|
|
12856
|
+
renderContent(value2, pvc2) {
|
|
12857
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(PVCDistributeStorage, { pvc: pvc2, editable: true });
|
|
12589
12858
|
}
|
|
12590
12859
|
};
|
|
12591
12860
|
};
|
|
12861
|
+
const PVRefField = (i18n2) => {
|
|
12862
|
+
return {
|
|
12863
|
+
key: "pv",
|
|
12864
|
+
path: ["pv"],
|
|
12865
|
+
title: i18n2.t("dovetail.pv")
|
|
12866
|
+
};
|
|
12867
|
+
};
|
|
12592
12868
|
const PVStorageClassField = (i18n2) => {
|
|
12593
12869
|
return {
|
|
12594
12870
|
key: "storageClass",
|
|
@@ -12602,8 +12878,8 @@ var __publicField = (obj, key, value) => {
|
|
|
12602
12878
|
const PVPhaseField = (i18n2) => {
|
|
12603
12879
|
return {
|
|
12604
12880
|
key: "phase",
|
|
12605
|
-
path: ["
|
|
12606
|
-
title: i18n2.t("dovetail.
|
|
12881
|
+
path: ["phase"],
|
|
12882
|
+
title: i18n2.t("dovetail.state"),
|
|
12607
12883
|
renderContent(value2) {
|
|
12608
12884
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(PVPhaseDisplay, { value: value2 });
|
|
12609
12885
|
}
|
|
@@ -12626,6 +12902,69 @@ var __publicField = (obj, key, value) => {
|
|
|
12626
12902
|
title: i18n2.t("dovetail.access_mode")
|
|
12627
12903
|
};
|
|
12628
12904
|
};
|
|
12905
|
+
const PVCRefField = (i18n2) => {
|
|
12906
|
+
return {
|
|
12907
|
+
key: "pvc",
|
|
12908
|
+
path: ["pvc"],
|
|
12909
|
+
title: i18n2.t("dovetail.pvc")
|
|
12910
|
+
};
|
|
12911
|
+
};
|
|
12912
|
+
const PVCSIRefField = (i18n2) => {
|
|
12913
|
+
return {
|
|
12914
|
+
key: "csi",
|
|
12915
|
+
path: ["csi"],
|
|
12916
|
+
title: i18n2.t("dovetail.csi")
|
|
12917
|
+
};
|
|
12918
|
+
};
|
|
12919
|
+
const IsDefaultSCField = (i18n2) => {
|
|
12920
|
+
return {
|
|
12921
|
+
key: "isDefaultSC",
|
|
12922
|
+
path: ["isDefaultSC"],
|
|
12923
|
+
title: i18n2.t("dovetail.default_sc"),
|
|
12924
|
+
renderContent(val) {
|
|
12925
|
+
return val ? i18n2.t("dovetail.true") : i18n2.t("dovetail.false");
|
|
12926
|
+
}
|
|
12927
|
+
};
|
|
12928
|
+
};
|
|
12929
|
+
const SCReclaimPolicyField = (i18n2) => {
|
|
12930
|
+
return {
|
|
12931
|
+
key: "reclaimPolicy",
|
|
12932
|
+
path: ["reclaimPolicy"],
|
|
12933
|
+
title: i18n2.t("dovetail.reclaim_policy"),
|
|
12934
|
+
renderContent(val) {
|
|
12935
|
+
const map = {
|
|
12936
|
+
Delete: i18n2.t("dovetail.delete"),
|
|
12937
|
+
Retain: i18n2.t("dovetail.retain")
|
|
12938
|
+
};
|
|
12939
|
+
return map[val] || val;
|
|
12940
|
+
}
|
|
12941
|
+
};
|
|
12942
|
+
};
|
|
12943
|
+
const IsSCAllowVolumeExpansionField = (i18n2) => {
|
|
12944
|
+
return {
|
|
12945
|
+
key: "allowVolumeExpansion",
|
|
12946
|
+
path: ["allowVolumeExpansion"],
|
|
12947
|
+
title: i18n2.t("dovetail.allow_expand"),
|
|
12948
|
+
renderContent(val) {
|
|
12949
|
+
return val ? i18n2.t("dovetail.support") : i18n2.t("dovetail.not_support");
|
|
12950
|
+
}
|
|
12951
|
+
};
|
|
12952
|
+
};
|
|
12953
|
+
const ResourceTableField = (resource, useTableParams) => {
|
|
12954
|
+
return {
|
|
12955
|
+
key: resource,
|
|
12956
|
+
path: [],
|
|
12957
|
+
renderContent() {
|
|
12958
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
12959
|
+
ResourceTable,
|
|
12960
|
+
{
|
|
12961
|
+
resource,
|
|
12962
|
+
useTableParams
|
|
12963
|
+
}
|
|
12964
|
+
);
|
|
12965
|
+
}
|
|
12966
|
+
};
|
|
12967
|
+
};
|
|
12629
12968
|
function __rest(s2, e2) {
|
|
12630
12969
|
var t2 = {};
|
|
12631
12970
|
for (var p in s2)
|
|
@@ -18939,6 +19278,14 @@ var __publicField = (obj, key, value) => {
|
|
|
18939
19278
|
}
|
|
18940
19279
|
]
|
|
18941
19280
|
});
|
|
19281
|
+
const ResourceTableGroup = (resource, title) => ({
|
|
19282
|
+
title,
|
|
19283
|
+
areas: [
|
|
19284
|
+
{
|
|
19285
|
+
fields: [ResourceTableField(resource)]
|
|
19286
|
+
}
|
|
19287
|
+
]
|
|
19288
|
+
});
|
|
18942
19289
|
const PageShow = (props) => {
|
|
18943
19290
|
var _a;
|
|
18944
19291
|
const parsed = core.useParsed();
|
|
@@ -37443,6 +37790,7 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
37443
37790
|
refineCoreProps,
|
|
37444
37791
|
warnWhenUnsavedChanges: warnWhenUnsavedChangesProp,
|
|
37445
37792
|
disableServerSideValidation: disableServerSideValidationProp = false,
|
|
37793
|
+
transformApplyValues,
|
|
37446
37794
|
...rest
|
|
37447
37795
|
} = {}) => {
|
|
37448
37796
|
const { options } = core.useRefineContext();
|
|
@@ -37544,7 +37892,10 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
37544
37892
|
const saveButtonProps = {
|
|
37545
37893
|
disabled: formLoading,
|
|
37546
37894
|
onClick: (e2) => {
|
|
37547
|
-
handleSubmit(
|
|
37895
|
+
handleSubmit(
|
|
37896
|
+
(v) => onFinish(transformApplyValues ? transformApplyValues(v) : v),
|
|
37897
|
+
() => false
|
|
37898
|
+
)(e2);
|
|
37548
37899
|
}
|
|
37549
37900
|
};
|
|
37550
37901
|
return {
|
|
@@ -37555,7 +37906,7 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
37555
37906
|
};
|
|
37556
37907
|
};
|
|
37557
37908
|
const useRefineForm = (props) => {
|
|
37558
|
-
var _a;
|
|
37909
|
+
var _a, _b;
|
|
37559
37910
|
const { config, id, refineProps } = props;
|
|
37560
37911
|
const [responseErrorMsg, setResponseErrorMsg] = React.useState("");
|
|
37561
37912
|
const i18n2 = useTranslation();
|
|
@@ -37586,15 +37937,16 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
37586
37937
|
...refineProps
|
|
37587
37938
|
},
|
|
37588
37939
|
defaultValues: config == null ? void 0 : config.initValue,
|
|
37589
|
-
|
|
37940
|
+
transformApplyValues: (_a = config.formConfig) == null ? void 0 : _a.transformApplyValues,
|
|
37941
|
+
...(_b = config.formConfig) == null ? void 0 : _b.useFormProps
|
|
37590
37942
|
});
|
|
37591
37943
|
React.useEffect(() => {
|
|
37592
|
-
var _a2,
|
|
37944
|
+
var _a2, _b2;
|
|
37593
37945
|
const response = (_a2 = result.refineCore.mutationResult.error) == null ? void 0 : _a2.response;
|
|
37594
37946
|
if (response && !(response == null ? void 0 : response.bodyUsed)) {
|
|
37595
|
-
(
|
|
37596
|
-
var _a3,
|
|
37597
|
-
setResponseErrorMsg(((
|
|
37947
|
+
(_b2 = response.json) == null ? void 0 : _b2.call(response).then((body) => {
|
|
37948
|
+
var _a3, _b3;
|
|
37949
|
+
setResponseErrorMsg(((_b3 = (_a3 = config.formConfig) == null ? void 0 : _a3.formatError) == null ? void 0 : _b3.call(_a3, body)) || body.message);
|
|
37598
37950
|
});
|
|
37599
37951
|
}
|
|
37600
37952
|
}, [config.formConfig, result]);
|
|
@@ -38399,12 +38751,13 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
38399
38751
|
});
|
|
38400
38752
|
const yamlFormProps = React.useMemo(() => {
|
|
38401
38753
|
var _a2, _b2, _c2;
|
|
38754
|
+
const transformApplyValues = ((_a2 = config.formConfig) == null ? void 0 : _a2.transformApplyValues) || ((v) => v);
|
|
38402
38755
|
return {
|
|
38403
38756
|
...props.formProps,
|
|
38404
|
-
transformInitValues: (
|
|
38405
|
-
transformApplyValues
|
|
38406
|
-
initialValuesForCreate: isYamlMode ? refineFormResult.formResult.getValues() : ((_c2 = props.formProps) == null ? void 0 : _c2.initialValuesForCreate) || (config == null ? void 0 : config.initValue),
|
|
38407
|
-
initialValuesForEdit: isYamlMode ? refineFormResult.formResult.getValues() : void 0,
|
|
38757
|
+
transformInitValues: (_b2 = config.formConfig) == null ? void 0 : _b2.transformInitValues,
|
|
38758
|
+
transformApplyValues,
|
|
38759
|
+
initialValuesForCreate: isYamlMode ? transformApplyValues(refineFormResult.formResult.getValues()) : ((_c2 = props.formProps) == null ? void 0 : _c2.initialValuesForCreate) || (config == null ? void 0 : config.initValue),
|
|
38760
|
+
initialValuesForEdit: isYamlMode ? transformApplyValues(refineFormResult.formResult.getValues()) : void 0,
|
|
38408
38761
|
id,
|
|
38409
38762
|
action,
|
|
38410
38763
|
isShowLayout: false,
|
|
@@ -39472,7 +39825,7 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
39472
39825
|
key: "storage",
|
|
39473
39826
|
display: true,
|
|
39474
39827
|
dataIndex: ["spec", "resources", "requests", "storage"],
|
|
39475
|
-
title: i18n2.t("dovetail.
|
|
39828
|
+
title: i18n2.t("dovetail.distributed"),
|
|
39476
39829
|
width: 120,
|
|
39477
39830
|
sortable: true,
|
|
39478
39831
|
align: "right",
|
|
@@ -39484,6 +39837,16 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
39484
39837
|
}
|
|
39485
39838
|
};
|
|
39486
39839
|
};
|
|
39840
|
+
const PVRefColumnRenderer = (i18n2) => {
|
|
39841
|
+
return {
|
|
39842
|
+
key: "pv",
|
|
39843
|
+
display: true,
|
|
39844
|
+
dataIndex: ["pv"],
|
|
39845
|
+
title: i18n2.t("dovetail.pv"),
|
|
39846
|
+
width: 120,
|
|
39847
|
+
sortable: true
|
|
39848
|
+
};
|
|
39849
|
+
};
|
|
39487
39850
|
const PVStorageClassColumnRenderer = (i18n2) => {
|
|
39488
39851
|
return {
|
|
39489
39852
|
key: "storageClass",
|
|
@@ -39505,8 +39868,8 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
39505
39868
|
return {
|
|
39506
39869
|
key: "phase",
|
|
39507
39870
|
display: true,
|
|
39508
|
-
dataIndex: ["
|
|
39509
|
-
title: i18n2.t("dovetail.
|
|
39871
|
+
dataIndex: ["phase"],
|
|
39872
|
+
title: i18n2.t("dovetail.state"),
|
|
39510
39873
|
width: 120,
|
|
39511
39874
|
sortable: true,
|
|
39512
39875
|
render(value2) {
|
|
@@ -39516,6 +39879,26 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
39516
39879
|
}
|
|
39517
39880
|
};
|
|
39518
39881
|
};
|
|
39882
|
+
const PVCRefColumnRenderer = (i18n2) => {
|
|
39883
|
+
return {
|
|
39884
|
+
key: "pvc",
|
|
39885
|
+
display: true,
|
|
39886
|
+
dataIndex: ["pvc"],
|
|
39887
|
+
title: i18n2.t("dovetail.pvc"),
|
|
39888
|
+
width: 120,
|
|
39889
|
+
sortable: true
|
|
39890
|
+
};
|
|
39891
|
+
};
|
|
39892
|
+
const PVCSIRefColumnRenderer = (i18n2) => {
|
|
39893
|
+
return {
|
|
39894
|
+
key: "csi",
|
|
39895
|
+
display: true,
|
|
39896
|
+
dataIndex: ["csi"],
|
|
39897
|
+
title: i18n2.t("dovetail.csi"),
|
|
39898
|
+
width: 120,
|
|
39899
|
+
sortable: true
|
|
39900
|
+
};
|
|
39901
|
+
};
|
|
39519
39902
|
const PVVolumeModeColumnRenderer = (i18n2) => {
|
|
39520
39903
|
return {
|
|
39521
39904
|
key: "mode",
|
|
@@ -39541,6 +39924,36 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
39541
39924
|
sortable: true
|
|
39542
39925
|
};
|
|
39543
39926
|
};
|
|
39927
|
+
const IsDefaultSCColumnRenderer = (i18n2) => {
|
|
39928
|
+
return {
|
|
39929
|
+
key: "isDefaultSC",
|
|
39930
|
+
display: true,
|
|
39931
|
+
dataIndex: ["isDefaultSC"],
|
|
39932
|
+
title: i18n2.t("dovetail.default_sc"),
|
|
39933
|
+
width: 120,
|
|
39934
|
+
sortable: true,
|
|
39935
|
+
render(val) {
|
|
39936
|
+
return val ? i18n2.t("dovetail.true") : i18n2.t("dovetail.false");
|
|
39937
|
+
}
|
|
39938
|
+
};
|
|
39939
|
+
};
|
|
39940
|
+
const SCReclaimPolicyColumnRenderer = (i18n2) => {
|
|
39941
|
+
return {
|
|
39942
|
+
key: "reclaimPolicy",
|
|
39943
|
+
display: true,
|
|
39944
|
+
dataIndex: ["reclaimPolicy"],
|
|
39945
|
+
title: i18n2.t("dovetail.reclaim_policy"),
|
|
39946
|
+
width: 120,
|
|
39947
|
+
sortable: true,
|
|
39948
|
+
render(val) {
|
|
39949
|
+
const map = {
|
|
39950
|
+
Delete: i18n2.t("dovetail.delete"),
|
|
39951
|
+
Retain: i18n2.t("dovetail.retain")
|
|
39952
|
+
};
|
|
39953
|
+
return map[val] || val;
|
|
39954
|
+
}
|
|
39955
|
+
};
|
|
39956
|
+
};
|
|
39544
39957
|
const styles = "";
|
|
39545
39958
|
const Dovetail = (props) => {
|
|
39546
39959
|
const {
|
|
@@ -39875,6 +40288,9 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
39875
40288
|
exports2.IngressRulesGroup = IngressRulesGroup;
|
|
39876
40289
|
exports2.IngressRulesTableTabField = IngressRulesTableTabField;
|
|
39877
40290
|
exports2.IngressTlsColumnRenderer = IngressTlsColumnRenderer;
|
|
40291
|
+
exports2.IsDefaultSCColumnRenderer = IsDefaultSCColumnRenderer;
|
|
40292
|
+
exports2.IsDefaultSCField = IsDefaultSCField;
|
|
40293
|
+
exports2.IsSCAllowVolumeExpansionField = IsSCAllowVolumeExpansionField;
|
|
39878
40294
|
exports2.JOB_INIT_VALUE = JOB_INIT_VALUE;
|
|
39879
40295
|
exports2.JobModel = JobModel;
|
|
39880
40296
|
exports2.JobsField = JobsField;
|
|
@@ -39909,18 +40325,26 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
39909
40325
|
exports2.POD_INIT_VALUE = POD_INIT_VALUE;
|
|
39910
40326
|
exports2.PVAccessModeColumnRenderer = PVAccessModeColumnRenderer;
|
|
39911
40327
|
exports2.PVAccessModeField = PVAccessModeField;
|
|
40328
|
+
exports2.PVCRefColumnRenderer = PVCRefColumnRenderer;
|
|
40329
|
+
exports2.PVCRefField = PVCRefField;
|
|
40330
|
+
exports2.PVCSIRefColumnRenderer = PVCSIRefColumnRenderer;
|
|
40331
|
+
exports2.PVCSIRefField = PVCSIRefField;
|
|
39912
40332
|
exports2.PVCStorageColumnRenderer = PVCStorageColumnRenderer;
|
|
39913
40333
|
exports2.PVCStorageField = PVCStorageField;
|
|
40334
|
+
exports2.PVC_INIT_VALUE = PVC_INIT_VALUE;
|
|
39914
40335
|
exports2.PVCapacityColumnRenderer = PVCapacityColumnRenderer;
|
|
39915
40336
|
exports2.PVCapacityField = PVCapacityField;
|
|
39916
40337
|
exports2.PVPhaseColumnRenderer = PVPhaseColumnRenderer;
|
|
39917
40338
|
exports2.PVPhaseDisplay = PVPhaseDisplay;
|
|
39918
40339
|
exports2.PVPhaseField = PVPhaseField;
|
|
40340
|
+
exports2.PVRefColumnRenderer = PVRefColumnRenderer;
|
|
40341
|
+
exports2.PVRefField = PVRefField;
|
|
39919
40342
|
exports2.PVStorageClassColumnRenderer = PVStorageClassColumnRenderer;
|
|
39920
40343
|
exports2.PVStorageClassField = PVStorageClassField;
|
|
39921
40344
|
exports2.PVVolumeModeColumnRenderer = PVVolumeModeColumnRenderer;
|
|
39922
40345
|
exports2.PVVolumeModeDisplay = PVVolumeModeDisplay;
|
|
39923
40346
|
exports2.PVVolumeModeField = PVVolumeModeField;
|
|
40347
|
+
exports2.PV_INIT_VALUE = PV_INIT_VALUE;
|
|
39924
40348
|
exports2.PageShow = PageShow;
|
|
39925
40349
|
exports2.PersistentVolumeClaimModel = PersistentVolumeClaimModel;
|
|
39926
40350
|
exports2.PersistentVolumeModel = PersistentVolumeModel;
|
|
@@ -39961,8 +40385,13 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
39961
40385
|
exports2.ResourceModel = ResourceModel;
|
|
39962
40386
|
exports2.ResourceSelect = ResourceSelect;
|
|
39963
40387
|
exports2.ResourceShow = ResourceShow;
|
|
40388
|
+
exports2.ResourceTable = ResourceTable;
|
|
40389
|
+
exports2.ResourceTableField = ResourceTableField;
|
|
40390
|
+
exports2.ResourceTableGroup = ResourceTableGroup;
|
|
39964
40391
|
exports2.ResourceUsageBar = ResourceUsageBar;
|
|
39965
40392
|
exports2.RestartCountColumnRenderer = RestartCountColumnRenderer;
|
|
40393
|
+
exports2.SCReclaimPolicyColumnRenderer = SCReclaimPolicyColumnRenderer;
|
|
40394
|
+
exports2.SCReclaimPolicyField = SCReclaimPolicyField;
|
|
39966
40395
|
exports2.SECRET_BASIC_AUTH_INIT_VALUE = SECRET_BASIC_AUTH_INIT_VALUE;
|
|
39967
40396
|
exports2.SECRET_CUSTOM_INIT_VALUE = SECRET_CUSTOM_INIT_VALUE;
|
|
39968
40397
|
exports2.SECRET_IMAGE_REPO_INIT_VALUE = SECRET_IMAGE_REPO_INIT_VALUE;
|