@dovetail-v2/refine 0.0.64 → 0.0.65
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.
|
@@ -10,7 +10,7 @@ import React__default, { createElement, isValidElement, cloneElement, Children,
|
|
|
10
10
|
import { ResourceContext, matchResourceFromRoute, useResource, useDelete, useNavigation, useBreadcrumb, useList, useParsed, useGo, useCan, useTable, useDeleteMany, CanAccess, useShow, useUpdate, 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,
|
|
13
|
+
import { Typo, Tag, Input, Select, AntdOption, Button, Form, Space, TextArea, kitContext, Loading, Table as Table$1, Pagination, OverflowTooltip, StatusCapsule, Tooltip, usePushModal, Dropdown, Menu as Menu$1, Icon as Icon$1, Divider, Modal, Link as Link$1, Tabs as Tabs$1, TabsTabPane, Row, Col, Alert, usePopModal, Fields, DonutChart, SegmentControl, Checkbox, SearchInput, Token, AntdSelectOptGroup, MenuItemGroup, Layout as Layout$1, Time as Time$1, useMessage, ModalStack, KitStoreProvider } from "@cloudtower/eagle";
|
|
14
14
|
import { EditPen16PrimaryIcon, Download16GradientBlueIcon, TrashBinDelete16Icon, MoreEllipsis324BoldSecondaryIcon, MoreEllipsis324BoldBlueIcon, MoreEllipsis316BoldBlueIcon, PlusAddCreateNew16BoldOntintIcon, ArrowChevronLeft16BoldTertiaryIcon, ArrowChevronLeftSmall16BoldBlueIcon, EditPen16GradientBlueIcon, ViewEye16GradientGrayIcon, EntityFilterIgnoreGradient16GrayIcon, RecoverContinue16GradientBlueIcon, SuspendedPause16GradientBlueIcon, Retry16GradientBlueIcon, HierarchyTriangleRight16GrayIcon, HierarchyTriangleRight16BlueIcon, ClipboardCopy16GradientGrayIcon, ClipboardCopy16GradientBlueIcon, Retry16GradientGrayIcon, EditPen16GradientGrayIcon, Showdiff16GradientGrayIcon, Showdiff16GradientBlueIcon, XmarkFailedSeriousWarningFill16RedIcon, ExclamationErrorCircleFill16RedIcon, Pause16GradientBlueIcon } from "@cloudtower/icons-react";
|
|
15
15
|
import { omit as omit$1, merge, get as get$3, first, debounce, last, isObject as isObject$4, keyBy } from "lodash-es";
|
|
16
16
|
import yaml from "js-yaml";
|
|
@@ -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
|
-
|
|
29
|
-
function
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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
|
-
function
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
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 i3 = r3[2] - 1 || 0, s3 = (r3[7] || "0").substring(0, 3);
|
|
103
|
-
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);
|
|
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", 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) {
|
|
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), i3 = n3 % 60;
|
|
40
|
+
return (e3 <= 0 ? "+" : "-") + m(r3, 2, "0") + ":" + m(i3, 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()), i3 = e3.clone().add(r3, c2), s3 = n3 - i3 < 0, u2 = e3.clone().add(r3 + (s3 ? -1 : 1), c2);
|
|
45
|
+
return +(-(r3 + (n3 - i3) / (s3 ? i3 - u2 : u2 - i3)) || 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: i2, 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 i3;
|
|
58
|
+
if (!e3)
|
|
59
|
+
return g;
|
|
60
|
+
if ("string" == typeof e3) {
|
|
61
|
+
var s3 = e3.toLowerCase();
|
|
62
|
+
D[s3] && (i3 = s3), n3 && (D[s3] = n3, i3 = s3);
|
|
63
|
+
var u2 = e3.split("-");
|
|
64
|
+
if (!i3 && u2.length > 1)
|
|
65
|
+
return t3(u2[0]);
|
|
66
|
+
} else {
|
|
67
|
+
var a3 = e3.name;
|
|
68
|
+
D[a3] = e3, i3 = a3;
|
|
69
|
+
}
|
|
70
|
+
return !r3 && i3 && (g = i3), i3 || !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
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
return
|
|
115
|
-
},
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
return y2(7);
|
|
184
|
-
var M3 = (d2 = {}, d2[s2] = e2, d2[u] = n2, d2[i2] = 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", 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) {
|
|
193
|
-
return t4 && (t4[n4] || t4(e3, r3)) || i4[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 i3;
|
|
251
|
-
}
|
|
252
|
-
return null;
|
|
253
|
-
}(t4) || i3.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 i2:
|
|
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", i2], ["$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 i3 = r3[2] - 1 || 0, s3 = (r3[7] || "0").substring(0, 3);
|
|
98
|
+
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);
|
|
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 i3 = b.w(n3.$u ? Date.UTC(n3.$y, e4, t4) : new Date(n3.$y, e4, t4), n3);
|
|
126
|
+
return r3 ? i3 : i3.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 i2:
|
|
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[i2] = 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
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
}
|
|
324
|
-
|
|
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[i2] = 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", 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) {
|
|
188
|
+
return t4 && (t4[n4] || t4(e3, r3)) || i4[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 i3;
|
|
246
|
+
}
|
|
247
|
+
return null;
|
|
248
|
+
}(t4) || i3.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 i2:
|
|
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", i2], ["$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 = _(
|
|
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 };
|
|
@@ -8326,9 +8319,8 @@ function Breadcrumb(props) {
|
|
|
8326
8319
|
});
|
|
8327
8320
|
}
|
|
8328
8321
|
function NameInputWidget(props) {
|
|
8329
|
-
const kit = useUIKit();
|
|
8330
8322
|
const { action } = useResource();
|
|
8331
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
8323
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Input, { ...props, disabled: action === "edit" });
|
|
8332
8324
|
}
|
|
8333
8325
|
const dnsSubDomainRules = [
|
|
8334
8326
|
{
|
|
@@ -8373,7 +8365,6 @@ const rfc1035LabelRules = [
|
|
|
8373
8365
|
}
|
|
8374
8366
|
];
|
|
8375
8367
|
function NamespaceSelectWidget(props) {
|
|
8376
|
-
const kit = useUIKit();
|
|
8377
8368
|
const { action } = useResource();
|
|
8378
8369
|
const { data: data2 } = useList({
|
|
8379
8370
|
resource: "namespaces",
|
|
@@ -8385,7 +8376,7 @@ function NamespaceSelectWidget(props) {
|
|
|
8385
8376
|
mode: "off"
|
|
8386
8377
|
}
|
|
8387
8378
|
});
|
|
8388
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
8379
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Select, { input: props, disabled: action === "edit", children: data2 == null ? void 0 : data2.data.map((namespace2) => /* @__PURE__ */ jsxRuntimeExports.jsx(AntdOption, { value: namespace2.metadata.name, children: namespace2.metadata.name }, namespace2.metadata.name)) });
|
|
8389
8380
|
}
|
|
8390
8381
|
const namespaceRules = [
|
|
8391
8382
|
{
|
|
@@ -8395,7 +8386,6 @@ const namespaceRules = [
|
|
|
8395
8386
|
];
|
|
8396
8387
|
function KeyValueInput(props) {
|
|
8397
8388
|
const { children, item } = props;
|
|
8398
|
-
const kit = useUIKit();
|
|
8399
8389
|
const onKeyChange = useCallback(
|
|
8400
8390
|
(event2) => {
|
|
8401
8391
|
var _a;
|
|
@@ -8418,14 +8408,13 @@ function KeyValueInput(props) {
|
|
|
8418
8408
|
},
|
|
8419
8409
|
[item, props]
|
|
8420
8410
|
);
|
|
8421
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
8422
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
8423
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
8411
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(Space, { children: [
|
|
8412
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Input, { value: item.key, onChange: onKeyChange }),
|
|
8413
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TextArea, { value: item.value, onChange: onValueChange }),
|
|
8424
8414
|
children
|
|
8425
8415
|
] });
|
|
8426
8416
|
}
|
|
8427
8417
|
function KeyValueListWidget(props) {
|
|
8428
|
-
const kit = useUIKit();
|
|
8429
8418
|
const { value: value2 } = props;
|
|
8430
8419
|
const items = useMemo(() => {
|
|
8431
8420
|
return Object.entries(value2 || {}).map(([key2, value22]) => ({
|
|
@@ -8467,7 +8456,7 @@ function KeyValueListWidget(props) {
|
|
|
8467
8456
|
onChange(temp);
|
|
8468
8457
|
},
|
|
8469
8458
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
8470
|
-
|
|
8459
|
+
Button,
|
|
8471
8460
|
{
|
|
8472
8461
|
onClick: () => {
|
|
8473
8462
|
onRemove(index2);
|
|
@@ -8480,15 +8469,14 @@ function KeyValueListWidget(props) {
|
|
|
8480
8469
|
index2
|
|
8481
8470
|
);
|
|
8482
8471
|
}),
|
|
8483
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
8472
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Form.Item, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { type: "primary", onClick: onAdd, children: "Add" }) })
|
|
8484
8473
|
] });
|
|
8485
8474
|
}
|
|
8486
8475
|
function MetadataForm() {
|
|
8487
|
-
const kit = useUIKit();
|
|
8488
8476
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
8489
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
8477
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Form.Item, { label: "Name", name: ["metadata", "name"], rules: rfc1123LabelRules, children: /* @__PURE__ */ jsxRuntimeExports.jsx(NameInputWidget, {}) }),
|
|
8490
8478
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
8491
|
-
|
|
8479
|
+
Form.Item,
|
|
8492
8480
|
{
|
|
8493
8481
|
label: "Namespace",
|
|
8494
8482
|
name: ["metadata", "namespace"],
|
|
@@ -8496,8 +8484,8 @@ function MetadataForm() {
|
|
|
8496
8484
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(NamespaceSelectWidget, {})
|
|
8497
8485
|
}
|
|
8498
8486
|
),
|
|
8499
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
8500
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
8487
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Form.Item, { name: ["metadata", "labels"], label: "Labels", children: /* @__PURE__ */ jsxRuntimeExports.jsx(KeyValueListWidget, {}) }),
|
|
8488
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Form.Item, { name: ["metadata", "annotations"], label: "Annotations", children: /* @__PURE__ */ jsxRuntimeExports.jsx(KeyValueListWidget, {}) })
|
|
8501
8489
|
] });
|
|
8502
8490
|
}
|
|
8503
8491
|
function memoize$2(fn) {
|
|
@@ -8687,7 +8675,6 @@ const AuxiliaryLine = /* @__PURE__ */ styled_default("div")({
|
|
|
8687
8675
|
const index_dmbxj3 = "";
|
|
8688
8676
|
const TableContainerStyle = "t1upn1sz";
|
|
8689
8677
|
function Table(props) {
|
|
8690
|
-
const kit = useUIKit();
|
|
8691
8678
|
const {
|
|
8692
8679
|
t: t2
|
|
8693
8680
|
} = useTranslation();
|
|
@@ -8732,7 +8719,7 @@ function Table(props) {
|
|
|
8732
8719
|
return columns;
|
|
8733
8720
|
}, [columns, RowMenu]);
|
|
8734
8721
|
if (loading) {
|
|
8735
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
8722
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Loading, {});
|
|
8736
8723
|
} else if (error) {
|
|
8737
8724
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent, {
|
|
8738
8725
|
errorText: t2("dovetail.retry_when_access_data_failed"),
|
|
@@ -8752,7 +8739,7 @@ function Table(props) {
|
|
|
8752
8739
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
|
|
8753
8740
|
ref: wrapperRef,
|
|
8754
8741
|
className: cx_default(TableContainerStyle, props.className, "table-wrapper"),
|
|
8755
|
-
children: [/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
8742
|
+
children: [/* @__PURE__ */ jsxRuntimeExports.jsx(Table$1, {
|
|
8756
8743
|
tableLayout: "fixed",
|
|
8757
8744
|
columns: finalColumns,
|
|
8758
8745
|
dataSource,
|
|
@@ -8763,7 +8750,7 @@ function Table(props) {
|
|
|
8763
8750
|
scroll
|
|
8764
8751
|
}), /* @__PURE__ */ jsxRuntimeExports.jsx(AuxiliaryLine, {
|
|
8765
8752
|
ref: auxiliaryLineRef
|
|
8766
|
-
}), /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
8753
|
+
}), /* @__PURE__ */ jsxRuntimeExports.jsx(Pagination, {
|
|
8767
8754
|
current: currentPage,
|
|
8768
8755
|
size: defaultSize,
|
|
8769
8756
|
count: total,
|
|
@@ -8804,7 +8791,7 @@ function useTableData({ data: data2, columns, pageSize = 10, defaultSorters }) {
|
|
|
8804
8791
|
const PodSelectorTable = ({ podSelectors = {} }) => {
|
|
8805
8792
|
const { t: t2 } = useTranslation();
|
|
8806
8793
|
const component = useContext(ComponentContext);
|
|
8807
|
-
const Table$
|
|
8794
|
+
const Table$12 = component.Table || Table;
|
|
8808
8795
|
const currentSize = 10;
|
|
8809
8796
|
const datas = Object.keys(podSelectors).map((key2) => ({
|
|
8810
8797
|
id: key2,
|
|
@@ -8849,7 +8836,7 @@ const PodSelectorTable = ({ podSelectors = {} }) => {
|
|
|
8849
8836
|
);
|
|
8850
8837
|
}
|
|
8851
8838
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
8852
|
-
Table$
|
|
8839
|
+
Table$12,
|
|
8853
8840
|
{
|
|
8854
8841
|
tableKey: "podSelector",
|
|
8855
8842
|
loading: false,
|
|
@@ -8869,7 +8856,7 @@ const PodSelectorTable = ({ podSelectors = {} }) => {
|
|
|
8869
8856
|
const PortsTable = ({ service }) => {
|
|
8870
8857
|
const { t: t2 } = useTranslation();
|
|
8871
8858
|
const component = useContext(ComponentContext);
|
|
8872
|
-
const Table$
|
|
8859
|
+
const Table$12 = component.Table || Table;
|
|
8873
8860
|
const currentSize = 10;
|
|
8874
8861
|
const columns = [
|
|
8875
8862
|
{
|
|
@@ -8937,7 +8924,7 @@ const PortsTable = ({ service }) => {
|
|
|
8937
8924
|
);
|
|
8938
8925
|
}
|
|
8939
8926
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
8940
|
-
Table$
|
|
8927
|
+
Table$12,
|
|
8941
8928
|
{
|
|
8942
8929
|
tableKey: "ports",
|
|
8943
8930
|
loading: false,
|
|
@@ -10214,14 +10201,13 @@ const Tags = (props) => {
|
|
|
10214
10201
|
const {
|
|
10215
10202
|
value: value2
|
|
10216
10203
|
} = props;
|
|
10217
|
-
const kit = useUIKit();
|
|
10218
10204
|
if (!value2) {
|
|
10219
10205
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(ValueDisplay, {
|
|
10220
10206
|
value: ""
|
|
10221
10207
|
});
|
|
10222
10208
|
}
|
|
10223
10209
|
const tags = Object.keys(value2).map((key2) => {
|
|
10224
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10210
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Tag.SplitTag, {
|
|
10225
10211
|
className: TagStyle,
|
|
10226
10212
|
primaryContent: key2,
|
|
10227
10213
|
secondaryContent: value2[key2],
|
|
@@ -10229,7 +10215,7 @@ const Tags = (props) => {
|
|
|
10229
10215
|
color: "gray"
|
|
10230
10216
|
}, key2);
|
|
10231
10217
|
});
|
|
10232
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10218
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Space, {
|
|
10233
10219
|
className: TagWrapper,
|
|
10234
10220
|
size: 8,
|
|
10235
10221
|
children: tags
|
|
@@ -10242,7 +10228,6 @@ const StateTag = ({
|
|
|
10242
10228
|
hideBackground,
|
|
10243
10229
|
className
|
|
10244
10230
|
}) => {
|
|
10245
|
-
const kit = useUIKit();
|
|
10246
10231
|
const {
|
|
10247
10232
|
t: t2
|
|
10248
10233
|
} = useTranslation();
|
|
@@ -10261,7 +10246,7 @@ const StateTag = ({
|
|
|
10261
10246
|
terminated: "red",
|
|
10262
10247
|
stopped: "gray"
|
|
10263
10248
|
};
|
|
10264
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10249
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(StatusCapsule, {
|
|
10265
10250
|
className: cx_default(className, StateTagStyle, hideBackground && "no-background"),
|
|
10266
10251
|
color: statusMap[state2] !== "loading" ? statusMap[state2] : void 0,
|
|
10267
10252
|
loading: statusMap[state2] === "loading",
|
|
@@ -10385,7 +10370,7 @@ const Time = (props) => {
|
|
|
10385
10370
|
const ConditionsTable = ({ conditions = [] }) => {
|
|
10386
10371
|
const { t: t2 } = useTranslation();
|
|
10387
10372
|
const component = useContext(ComponentContext);
|
|
10388
|
-
const Table$
|
|
10373
|
+
const Table$12 = component.Table || Table;
|
|
10389
10374
|
const conditionsWithId = addId(conditions, "type");
|
|
10390
10375
|
const columns = [
|
|
10391
10376
|
{
|
|
@@ -10461,7 +10446,7 @@ const ConditionsTable = ({ conditions = [] }) => {
|
|
|
10461
10446
|
);
|
|
10462
10447
|
}
|
|
10463
10448
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10464
|
-
Table$
|
|
10449
|
+
Table$12,
|
|
10465
10450
|
{
|
|
10466
10451
|
tableKey: "condition",
|
|
10467
10452
|
loading: false,
|
|
@@ -10580,7 +10565,6 @@ function useOpenForm(options) {
|
|
|
10580
10565
|
}
|
|
10581
10566
|
function K8sDropdown(props) {
|
|
10582
10567
|
const { record, size = "normal" } = props;
|
|
10583
|
-
const kit = useUIKit();
|
|
10584
10568
|
const { globalStore } = useGlobalStore();
|
|
10585
10569
|
const useResourceResult = useResource();
|
|
10586
10570
|
const resource = useResourceResult.resource;
|
|
@@ -10601,18 +10585,18 @@ function K8sDropdown(props) {
|
|
|
10601
10585
|
});
|
|
10602
10586
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
10603
10587
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10604
|
-
|
|
10588
|
+
Dropdown,
|
|
10605
10589
|
{
|
|
10606
|
-
overlay: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
10590
|
+
overlay: /* @__PURE__ */ jsxRuntimeExports.jsxs(Menu$1, { children: [
|
|
10607
10591
|
isInShowPage || (canEditData == null ? void 0 : canEditData.can) === false ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10608
|
-
|
|
10592
|
+
Menu$1.Item,
|
|
10609
10593
|
{
|
|
10610
10594
|
onClick: openForm,
|
|
10611
10595
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Icon$1, { src: EditPen16PrimaryIcon, children: t2("dovetail.edit_yaml") })
|
|
10612
10596
|
}
|
|
10613
10597
|
),
|
|
10614
10598
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10615
|
-
|
|
10599
|
+
Menu$1.Item,
|
|
10616
10600
|
{
|
|
10617
10601
|
onClick: () => {
|
|
10618
10602
|
var _a;
|
|
@@ -10627,9 +10611,9 @@ function K8sDropdown(props) {
|
|
|
10627
10611
|
}
|
|
10628
10612
|
),
|
|
10629
10613
|
props.children,
|
|
10630
|
-
(canDeleteData == null ? void 0 : canDeleteData.can) !== false ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10614
|
+
(canDeleteData == null ? void 0 : canDeleteData.can) !== false ? /* @__PURE__ */ jsxRuntimeExports.jsx(Divider, { style: { margin: 0 } }) : null,
|
|
10631
10615
|
(canDeleteData == null ? void 0 : canDeleteData.can) !== false ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10632
|
-
|
|
10616
|
+
Menu$1.Item,
|
|
10633
10617
|
{
|
|
10634
10618
|
danger: true,
|
|
10635
10619
|
onClick: () => {
|
|
@@ -10641,7 +10625,7 @@ function K8sDropdown(props) {
|
|
|
10641
10625
|
] }),
|
|
10642
10626
|
trigger: ["click"],
|
|
10643
10627
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10644
|
-
|
|
10628
|
+
Button,
|
|
10645
10629
|
{
|
|
10646
10630
|
type: "quiet",
|
|
10647
10631
|
size: size === "large" ? "middle" : "small",
|
|
@@ -10658,7 +10642,7 @@ function K8sDropdown(props) {
|
|
|
10658
10642
|
)
|
|
10659
10643
|
}
|
|
10660
10644
|
),
|
|
10661
|
-
visible ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10645
|
+
visible ? /* @__PURE__ */ jsxRuntimeExports.jsx(Modal, { ...modalProps }) : null
|
|
10662
10646
|
] });
|
|
10663
10647
|
}
|
|
10664
10648
|
var ColumnKeys = /* @__PURE__ */ ((ColumnKeys2) => {
|
|
@@ -10686,7 +10670,7 @@ function addDefaultRenderToColumns(columns) {
|
|
|
10686
10670
|
}
|
|
10687
10671
|
const useEagleTable = (params) => {
|
|
10688
10672
|
var _a, _b;
|
|
10689
|
-
const { columns, tableProps, formatter, Dropdown = K8sDropdown } = params;
|
|
10673
|
+
const { columns, tableProps, formatter, Dropdown: Dropdown2 = K8sDropdown } = params;
|
|
10690
10674
|
const [selectedKeys, setSelectedKeys] = useState([]);
|
|
10691
10675
|
const [currentPage, setCurrentPage] = useState((tableProps == null ? void 0 : tableProps.currentPage) || 1);
|
|
10692
10676
|
const { resource } = useResource();
|
|
@@ -10742,7 +10726,7 @@ const useEagleTable = (params) => {
|
|
|
10742
10726
|
setSelectedKeys(keys);
|
|
10743
10727
|
},
|
|
10744
10728
|
total,
|
|
10745
|
-
RowMenu:
|
|
10729
|
+
RowMenu: Dropdown2,
|
|
10746
10730
|
...tableProps,
|
|
10747
10731
|
defaultSize: currentSize
|
|
10748
10732
|
};
|
|
@@ -10756,12 +10740,11 @@ const useEagleTable = (params) => {
|
|
|
10756
10740
|
};
|
|
10757
10741
|
function CreateButton() {
|
|
10758
10742
|
var _a;
|
|
10759
|
-
const kit = useUIKit();
|
|
10760
10743
|
const { t: t2 } = useTranslation();
|
|
10761
10744
|
const openForm = useOpenForm();
|
|
10762
10745
|
const { resource } = useResource();
|
|
10763
10746
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10764
|
-
|
|
10747
|
+
Button,
|
|
10765
10748
|
{
|
|
10766
10749
|
prefixIcon: /* @__PURE__ */ jsxRuntimeExports.jsx(PlusAddCreateNew16BoldOntintIcon, {}),
|
|
10767
10750
|
type: "primary",
|
|
@@ -10800,7 +10783,6 @@ const useDeleteManyModal = (resource, ids) => {
|
|
|
10800
10783
|
};
|
|
10801
10784
|
const DeleteManyButton = (props) => {
|
|
10802
10785
|
const { resource } = useResource();
|
|
10803
|
-
const kit = useUIKit();
|
|
10804
10786
|
const { t: t2 } = useTranslation();
|
|
10805
10787
|
const { modalProps, visible, setVisible } = useDeleteManyModal(
|
|
10806
10788
|
(resource == null ? void 0 : resource.name) || "",
|
|
@@ -10810,8 +10792,8 @@ const DeleteManyButton = (props) => {
|
|
|
10810
10792
|
setVisible(true);
|
|
10811
10793
|
}, [setVisible]);
|
|
10812
10794
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
10813
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10814
|
-
visible ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10795
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Button, { type: "primary", danger: true, onClick, children: t2("dovetail.delete") }),
|
|
10796
|
+
visible ? /* @__PURE__ */ jsxRuntimeExports.jsx(Modal, { ...modalProps }) : null
|
|
10815
10797
|
] });
|
|
10816
10798
|
};
|
|
10817
10799
|
const TableToolBar_4s5vf2 = "";
|
|
@@ -10825,18 +10807,17 @@ const TableToolBar = ({
|
|
|
10825
10807
|
hideCreate
|
|
10826
10808
|
}) => {
|
|
10827
10809
|
var _a;
|
|
10828
|
-
const kit = useUIKit();
|
|
10829
10810
|
const {
|
|
10830
10811
|
resource
|
|
10831
10812
|
} = useResource();
|
|
10832
10813
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
|
|
10833
10814
|
className: cx_default(ToolbarWrapperStyle, "table-toolbar"),
|
|
10834
|
-
children: [/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
10815
|
+
children: [/* @__PURE__ */ jsxRuntimeExports.jsxs(Space, {
|
|
10835
10816
|
className: ToolbarStyle$1,
|
|
10836
10817
|
children: [/* @__PURE__ */ jsxRuntimeExports.jsx("span", {
|
|
10837
10818
|
className: cx_default(Typo.Display.d2_regular_title, TitleStyle$2),
|
|
10838
10819
|
children: (_a = resource == null ? void 0 : resource.meta) == null ? void 0 : _a.kind
|
|
10839
|
-
}), /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
10820
|
+
}), /* @__PURE__ */ jsxRuntimeExports.jsxs(Space, {
|
|
10840
10821
|
children: [selectedKeys.length > 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx(DeleteManyButton, {
|
|
10841
10822
|
ids: selectedKeys
|
|
10842
10823
|
}) : void 0, /* @__PURE__ */ jsxRuntimeExports.jsx(CanAccess, {
|
|
@@ -10871,10 +10852,9 @@ const CronjobJobsTable = ({
|
|
|
10871
10852
|
const {
|
|
10872
10853
|
i18n: i18n2
|
|
10873
10854
|
} = useTranslation();
|
|
10874
|
-
const kit = useUIKit();
|
|
10875
10855
|
const [selectedKeys] = useState([]);
|
|
10876
10856
|
const component = useContext(ComponentContext);
|
|
10877
|
-
const Table$
|
|
10857
|
+
const Table$12 = component.Table || Table;
|
|
10878
10858
|
const columns = useMemo(() => [NameColumnRenderer(i18n2, "jobs"), StateDisplayColumnRenderer(i18n2), NameSpaceColumnRenderer(i18n2), {
|
|
10879
10859
|
...WorkloadImageColumnRenderer(i18n2),
|
|
10880
10860
|
width: 238
|
|
@@ -10909,13 +10889,13 @@ const CronjobJobsTable = ({
|
|
|
10909
10889
|
type: ErrorContentType.Card
|
|
10910
10890
|
});
|
|
10911
10891
|
}
|
|
10912
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
10892
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(Space, {
|
|
10913
10893
|
direction: "vertical",
|
|
10914
10894
|
className: WrapperStyle$5,
|
|
10915
10895
|
children: [hideToolBar ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(TableToolBar, {
|
|
10916
10896
|
selectedKeys,
|
|
10917
10897
|
hideCreate: true
|
|
10918
|
-
}), /* @__PURE__ */ jsxRuntimeExports.jsx(Table$
|
|
10898
|
+
}), /* @__PURE__ */ jsxRuntimeExports.jsx(Table$12, {
|
|
10919
10899
|
...tableProps,
|
|
10920
10900
|
tableKey: "cronjobs",
|
|
10921
10901
|
showMenuColumn: false
|
|
@@ -10989,7 +10969,7 @@ const EventsTable = ({ uid }) => {
|
|
|
10989
10969
|
}), [columns, uid]);
|
|
10990
10970
|
const { tableProps } = useEagleTable(params);
|
|
10991
10971
|
const component = useContext(ComponentContext);
|
|
10992
|
-
const Table$
|
|
10972
|
+
const Table$12 = component.Table || Table;
|
|
10993
10973
|
if (!((_a = tableProps.data) == null ? void 0 : _a.length) && !tableProps.loading) {
|
|
10994
10974
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10995
10975
|
WidgetErrorContent,
|
|
@@ -10999,7 +10979,7 @@ const EventsTable = ({ uid }) => {
|
|
|
10999
10979
|
);
|
|
11000
10980
|
}
|
|
11001
10981
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11002
|
-
Table$
|
|
10982
|
+
Table$12,
|
|
11003
10983
|
{
|
|
11004
10984
|
...tableProps,
|
|
11005
10985
|
tableKey: "events",
|
|
@@ -11046,7 +11026,6 @@ const ResourceLink = (props) => {
|
|
|
11046
11026
|
namespace: namespace2,
|
|
11047
11027
|
resourceId
|
|
11048
11028
|
} = props;
|
|
11049
|
-
const kit = useUIKit();
|
|
11050
11029
|
const navigation = useNavigation();
|
|
11051
11030
|
const go = useGo();
|
|
11052
11031
|
const onClick = () => {
|
|
@@ -11060,7 +11039,7 @@ const ResourceLink = (props) => {
|
|
|
11060
11039
|
}
|
|
11061
11040
|
});
|
|
11062
11041
|
};
|
|
11063
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11042
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Link$1, {
|
|
11064
11043
|
className: LinkStyle,
|
|
11065
11044
|
onClick,
|
|
11066
11045
|
children: resourceId
|
|
@@ -11072,7 +11051,7 @@ const IngressRulesTable = ({ ingress }) => {
|
|
|
11072
11051
|
return addId(ingress.flattenedRules || [], "fullPath");
|
|
11073
11052
|
}, [ingress.flattenedRules]);
|
|
11074
11053
|
const component = useContext(ComponentContext);
|
|
11075
|
-
const Table$
|
|
11054
|
+
const Table$12 = component.Table || Table;
|
|
11076
11055
|
const currentSize = 10;
|
|
11077
11056
|
const columns = [
|
|
11078
11057
|
{
|
|
@@ -11161,7 +11140,7 @@ const IngressRulesTable = ({ ingress }) => {
|
|
|
11161
11140
|
);
|
|
11162
11141
|
}
|
|
11163
11142
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11164
|
-
Table$
|
|
11143
|
+
Table$12,
|
|
11165
11144
|
{
|
|
11166
11145
|
tableKey: "ingressRules",
|
|
11167
11146
|
loading: false,
|
|
@@ -11254,9 +11233,8 @@ function KeyValueAnnotation(props) {
|
|
|
11254
11233
|
}
|
|
11255
11234
|
function Tabs(props) {
|
|
11256
11235
|
const { tabs, className } = props;
|
|
11257
|
-
|
|
11258
|
-
|
|
11259
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(kit.tabsTabPane, { tab: tab.title, children: tab.children }, tab.title);
|
|
11236
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Tabs$1, { className, children: tabs.map((tab) => {
|
|
11237
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(TabsTabPane, { tab: tab.title, children: tab.children }, tab.title);
|
|
11260
11238
|
}) });
|
|
11261
11239
|
}
|
|
11262
11240
|
const ShowContent_1u0cbxv = "";
|
|
@@ -11295,9 +11273,8 @@ const ShowContent = (props) => {
|
|
|
11295
11273
|
const {
|
|
11296
11274
|
showConfig,
|
|
11297
11275
|
formatter,
|
|
11298
|
-
Dropdown = K8sDropdown
|
|
11276
|
+
Dropdown: Dropdown2 = K8sDropdown
|
|
11299
11277
|
} = props;
|
|
11300
|
-
const kit = useUIKit();
|
|
11301
11278
|
const parsed = useParsed();
|
|
11302
11279
|
const {
|
|
11303
11280
|
resource
|
|
@@ -11321,7 +11298,7 @@ const ShowContent = (props) => {
|
|
|
11321
11298
|
id
|
|
11322
11299
|
});
|
|
11323
11300
|
const Component = useContext(ComponentContext);
|
|
11324
|
-
const Tabs$
|
|
11301
|
+
const Tabs$12 = Component.Tabs || Tabs;
|
|
11325
11302
|
if (!(data2 == null ? void 0 : data2.data)) {
|
|
11326
11303
|
return null;
|
|
11327
11304
|
}
|
|
@@ -11340,7 +11317,7 @@ const ShowContent = (props) => {
|
|
|
11340
11317
|
} else {
|
|
11341
11318
|
content = get$3(record, field.path);
|
|
11342
11319
|
}
|
|
11343
|
-
return hasCol ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11320
|
+
return hasCol ? /* @__PURE__ */ jsxRuntimeExports.jsx(Col, {
|
|
11344
11321
|
flex: areaType === AreaType.Inline ? "none" : "",
|
|
11345
11322
|
span: field.col || 24,
|
|
11346
11323
|
children: field.render ? field.render(value2, record, field) : /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
|
|
@@ -11395,7 +11372,7 @@ const ShowContent = (props) => {
|
|
|
11395
11372
|
children: (_b = resource == null ? void 0 : resource.meta) == null ? void 0 : _b.kind
|
|
11396
11373
|
})
|
|
11397
11374
|
})
|
|
11398
|
-
}), /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
11375
|
+
}), /* @__PURE__ */ jsxRuntimeExports.jsxs(Space, {
|
|
11399
11376
|
className: TopBarStyle,
|
|
11400
11377
|
children: [/* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
|
|
11401
11378
|
style: {
|
|
@@ -11407,11 +11384,11 @@ const ShowContent = (props) => {
|
|
|
11407
11384
|
}), stateDisplay ? /* @__PURE__ */ jsxRuntimeExports.jsx(StateTag, {
|
|
11408
11385
|
state: stateDisplay
|
|
11409
11386
|
}) : void 0]
|
|
11410
|
-
}), /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
11387
|
+
}), /* @__PURE__ */ jsxRuntimeExports.jsxs(Space, {
|
|
11411
11388
|
children: [(_d = showConfig.renderExtraButton) == null ? void 0 : _d.call(showConfig, record), !showConfig.hideEditYamlButton ? /* @__PURE__ */ jsxRuntimeExports.jsx(CanAccess, {
|
|
11412
11389
|
resource: resource == null ? void 0 : resource.name,
|
|
11413
11390
|
action: AccessControlAuth.Edit,
|
|
11414
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11391
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Button, {
|
|
11415
11392
|
style: {
|
|
11416
11393
|
marginRight: 8
|
|
11417
11394
|
},
|
|
@@ -11419,14 +11396,14 @@ const ShowContent = (props) => {
|
|
|
11419
11396
|
prefixIcon: /* @__PURE__ */ jsxRuntimeExports.jsx(EditPen16GradientBlueIcon, {}),
|
|
11420
11397
|
children: t2("dovetail.edit_yaml")
|
|
11421
11398
|
})
|
|
11422
|
-
}) : null, /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11399
|
+
}) : null, /* @__PURE__ */ jsxRuntimeExports.jsx(Dropdown2, {
|
|
11423
11400
|
record,
|
|
11424
11401
|
size: "large"
|
|
11425
11402
|
})]
|
|
11426
11403
|
})]
|
|
11427
11404
|
})]
|
|
11428
11405
|
});
|
|
11429
|
-
const tabs = /* @__PURE__ */ jsxRuntimeExports.jsx(Tabs$
|
|
11406
|
+
const tabs = /* @__PURE__ */ jsxRuntimeExports.jsx(Tabs$12, {
|
|
11430
11407
|
tabs: (showConfig.tabs || []).map((tab) => {
|
|
11431
11408
|
var _a2;
|
|
11432
11409
|
return {
|
|
@@ -11436,7 +11413,7 @@ const ShowContent = (props) => {
|
|
|
11436
11413
|
className: cx_default(TabContentStyle, tab.groups.length <= 1 && FullTabContentStyle),
|
|
11437
11414
|
children: (_a2 = tab.groups) == null ? void 0 : _a2.map((group) => {
|
|
11438
11415
|
const GroupContainer = group.title ? ShowGroupComponent : React__default.Fragment;
|
|
11439
|
-
const FieldContainer = group.title ?
|
|
11416
|
+
const FieldContainer = group.title ? Row : React__default.Fragment;
|
|
11440
11417
|
const groupContainerProps = group.title ? {
|
|
11441
11418
|
title: group.title || ""
|
|
11442
11419
|
} : {};
|
|
@@ -11449,7 +11426,7 @@ const ShowContent = (props) => {
|
|
|
11449
11426
|
children: [/* @__PURE__ */ jsxRuntimeExports.jsx(FieldContainer, {
|
|
11450
11427
|
...fieldContainerProps,
|
|
11451
11428
|
children: renderFields(area.fields, area.type, !!group.title)
|
|
11452
|
-
}, index2), index2 !== group.areas.length - 1 ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11429
|
+
}, index2), index2 !== group.areas.length - 1 ? /* @__PURE__ */ jsxRuntimeExports.jsx(Divider, {
|
|
11453
11430
|
style: {
|
|
11454
11431
|
margin: "8px 0 12px 0"
|
|
11455
11432
|
}
|
|
@@ -11464,7 +11441,7 @@ const ShowContent = (props) => {
|
|
|
11464
11441
|
});
|
|
11465
11442
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
|
|
11466
11443
|
className: ShowContentWrapperStyle,
|
|
11467
|
-
children: [/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11444
|
+
children: [/* @__PURE__ */ jsxRuntimeExports.jsx(Space, {
|
|
11468
11445
|
direction: "vertical",
|
|
11469
11446
|
className: ShowContentHeaderStyle,
|
|
11470
11447
|
children: topBar
|
|
@@ -11515,10 +11492,9 @@ const WorkloadPodsTable = ({
|
|
|
11515
11492
|
const {
|
|
11516
11493
|
i18n: i18n2
|
|
11517
11494
|
} = useTranslation();
|
|
11518
|
-
const kit = useUIKit();
|
|
11519
11495
|
const [selectedKeys, setSelectedKeys] = useState([]);
|
|
11520
11496
|
const component = useContext(ComponentContext);
|
|
11521
|
-
const Table$
|
|
11497
|
+
const Table$12 = component.Table || Table;
|
|
11522
11498
|
const currentSize = 10;
|
|
11523
11499
|
const columns = [NameColumnRenderer(i18n2, "pods"), StateDisplayColumnRenderer(i18n2), {
|
|
11524
11500
|
key: "ip",
|
|
@@ -11560,13 +11536,13 @@ const WorkloadPodsTable = ({
|
|
|
11560
11536
|
type: ErrorContentType.Card
|
|
11561
11537
|
});
|
|
11562
11538
|
}
|
|
11563
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
11539
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(Space, {
|
|
11564
11540
|
direction: "vertical",
|
|
11565
11541
|
className: "c1dicff8",
|
|
11566
11542
|
children: [hideToolbar ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(TableToolBar, {
|
|
11567
11543
|
selectedKeys,
|
|
11568
11544
|
hideCreate: true
|
|
11569
|
-
}), /* @__PURE__ */ jsxRuntimeExports.jsx(Table$
|
|
11545
|
+
}), /* @__PURE__ */ jsxRuntimeExports.jsx(Table$12, {
|
|
11570
11546
|
...tableProps,
|
|
11571
11547
|
tableKey: "pods",
|
|
11572
11548
|
onSelect: (keys) => setSelectedKeys(keys),
|
|
@@ -11578,9 +11554,8 @@ const WorkloadPodsTable = ({
|
|
|
11578
11554
|
function FormErrorAlert(props) {
|
|
11579
11555
|
const { errorMsgs, style, className, isEdit } = props;
|
|
11580
11556
|
const { i18n: i18n2 } = useTranslation();
|
|
11581
|
-
const kit = useUIKit();
|
|
11582
11557
|
return errorMsgs.length ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11583
|
-
|
|
11558
|
+
Alert,
|
|
11584
11559
|
{
|
|
11585
11560
|
message: /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
11586
11561
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: i18n2.t(isEdit ? "dovetail.save_failed_tip" : "dovetail.create_failed_tip") }),
|
|
@@ -11688,7 +11663,6 @@ function EditFieldModal(props) {
|
|
|
11688
11663
|
formRef: form,
|
|
11689
11664
|
renderContent
|
|
11690
11665
|
} = props;
|
|
11691
|
-
const kit = useUIKit();
|
|
11692
11666
|
const {
|
|
11693
11667
|
i18n: i18n2
|
|
11694
11668
|
} = useTranslation();
|
|
@@ -11708,7 +11682,7 @@ function EditFieldModal(props) {
|
|
|
11708
11682
|
popModal();
|
|
11709
11683
|
reset();
|
|
11710
11684
|
}, [reset]);
|
|
11711
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
11685
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(Modal, {
|
|
11712
11686
|
className: ModalStyle,
|
|
11713
11687
|
title: title || i18n2.t("dovetail.edit"),
|
|
11714
11688
|
confirmLoading: submitting,
|
|
@@ -11730,7 +11704,6 @@ function EditField(props) {
|
|
|
11730
11704
|
const {
|
|
11731
11705
|
modalProps
|
|
11732
11706
|
} = props;
|
|
11733
|
-
const kit = useUIKit();
|
|
11734
11707
|
const {
|
|
11735
11708
|
i18n: i18n2
|
|
11736
11709
|
} = useTranslation();
|
|
@@ -11741,7 +11714,7 @@ function EditField(props) {
|
|
|
11741
11714
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(CanAccess, {
|
|
11742
11715
|
resource: resource == null ? void 0 : resource.name,
|
|
11743
11716
|
action: AccessControlAuth.Edit,
|
|
11744
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11717
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Button, {
|
|
11745
11718
|
className: EditButtonStyle,
|
|
11746
11719
|
type: "link",
|
|
11747
11720
|
onClick: () => {
|
|
@@ -11770,7 +11743,6 @@ const WorkloadReplicasForm = React__default.forwardRef(function WorkloadReplicas
|
|
|
11770
11743
|
record,
|
|
11771
11744
|
label: label2
|
|
11772
11745
|
} = props;
|
|
11773
|
-
const kit = useUIKit();
|
|
11774
11746
|
const {
|
|
11775
11747
|
resource
|
|
11776
11748
|
} = useResource();
|
|
@@ -11807,7 +11779,7 @@ const WorkloadReplicasForm = React__default.forwardRef(function WorkloadReplicas
|
|
|
11807
11779
|
useImperativeHandle(ref, () => ({
|
|
11808
11780
|
submit
|
|
11809
11781
|
}), [submit]);
|
|
11810
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11782
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Form.Item, {
|
|
11811
11783
|
label: /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
|
|
11812
11784
|
style: {
|
|
11813
11785
|
width: "134px"
|
|
@@ -11815,7 +11787,7 @@ const WorkloadReplicasForm = React__default.forwardRef(function WorkloadReplicas
|
|
|
11815
11787
|
children: label2
|
|
11816
11788
|
}),
|
|
11817
11789
|
colon: false,
|
|
11818
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11790
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Fields.Integer, {
|
|
11819
11791
|
style: {
|
|
11820
11792
|
width: "142px"
|
|
11821
11793
|
},
|
|
@@ -11840,7 +11812,6 @@ function WorkloadReplicas({
|
|
|
11840
11812
|
record,
|
|
11841
11813
|
editable
|
|
11842
11814
|
}) {
|
|
11843
|
-
const kit = useUIKit();
|
|
11844
11815
|
const {
|
|
11845
11816
|
t: t2
|
|
11846
11817
|
} = useTranslation();
|
|
@@ -11868,7 +11839,7 @@ function WorkloadReplicas({
|
|
|
11868
11839
|
className: WorkloadReplicasWrapperStyle,
|
|
11869
11840
|
children: [/* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
11870
11841
|
className: DonutChartWrapperStyle,
|
|
11871
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11842
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(DonutChart, {
|
|
11872
11843
|
className: DonutChartStyle,
|
|
11873
11844
|
data: donutData,
|
|
11874
11845
|
width: 70,
|
|
@@ -17799,7 +17770,6 @@ const PodLog = ({
|
|
|
17799
17770
|
pod: pod2
|
|
17800
17771
|
}) => {
|
|
17801
17772
|
var _a, _b, _c, _d, _e;
|
|
17802
|
-
const kit = useUIKit();
|
|
17803
17773
|
const [selectedContainer, setSelectedContainer] = useState(((_b = (_a = pod2.spec) == null ? void 0 : _a.containers[0]) == null ? void 0 : _b.name) || "");
|
|
17804
17774
|
const [logs, setLogs] = useState([]);
|
|
17805
17775
|
const [logType, setLogType] = useState("realtime");
|
|
@@ -17922,7 +17892,7 @@ const PodLog = ({
|
|
|
17922
17892
|
className: ToolbarStyle,
|
|
17923
17893
|
children: [/* @__PURE__ */ jsxRuntimeExports.jsxs("span", {
|
|
17924
17894
|
className: ToolbarAreaStyle,
|
|
17925
|
-
children: [/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
17895
|
+
children: [/* @__PURE__ */ jsxRuntimeExports.jsx(SegmentControl, {
|
|
17926
17896
|
options: [{
|
|
17927
17897
|
label: t2("dovetail.realtime_log"),
|
|
17928
17898
|
value: "realtime"
|
|
@@ -17935,7 +17905,7 @@ const PodLog = ({
|
|
|
17935
17905
|
setLogType(value2);
|
|
17936
17906
|
setLogs([]);
|
|
17937
17907
|
}
|
|
17938
|
-
}), /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
17908
|
+
}), /* @__PURE__ */ jsxRuntimeExports.jsxs(Select, {
|
|
17939
17909
|
input: {
|
|
17940
17910
|
onChange: (newValue) => {
|
|
17941
17911
|
stopFetchingLogs();
|
|
@@ -17949,22 +17919,22 @@ const PodLog = ({
|
|
|
17949
17919
|
style: {
|
|
17950
17920
|
width: 200
|
|
17951
17921
|
},
|
|
17952
|
-
children: [/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
17922
|
+
children: [/* @__PURE__ */ jsxRuntimeExports.jsx(AntdOption, {
|
|
17953
17923
|
value: "",
|
|
17954
17924
|
disabled: true,
|
|
17955
17925
|
children: t2("dovetail.select_container")
|
|
17956
|
-
}), (((_e = pod2.spec) == null ? void 0 : _e.containers) || []).map((container2) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
17926
|
+
}), (((_e = pod2.spec) == null ? void 0 : _e.containers) || []).map((container2) => /* @__PURE__ */ jsxRuntimeExports.jsx(AntdOption, {
|
|
17957
17927
|
value: container2.name,
|
|
17958
17928
|
children: container2.name
|
|
17959
17929
|
}, container2.name))]
|
|
17960
17930
|
})]
|
|
17961
17931
|
}), /* @__PURE__ */ jsxRuntimeExports.jsxs("span", {
|
|
17962
17932
|
className: ToolbarAreaStyle,
|
|
17963
|
-
children: [/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
17933
|
+
children: [/* @__PURE__ */ jsxRuntimeExports.jsx(Checkbox, {
|
|
17964
17934
|
checked: wrap,
|
|
17965
17935
|
onChange: (e2) => setWrap(e2.target.checked),
|
|
17966
17936
|
children: t2("dovetail.auto_wrap")
|
|
17967
|
-
}), /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
17937
|
+
}), /* @__PURE__ */ jsxRuntimeExports.jsx(Button, {
|
|
17968
17938
|
onClick: () => setPaused((prev) => !prev),
|
|
17969
17939
|
prefixIcon: paused ? /* @__PURE__ */ jsxRuntimeExports.jsx(RecoverContinue16GradientBlueIcon, {}) : /* @__PURE__ */ jsxRuntimeExports.jsx(SuspendedPause16GradientBlueIcon, {}),
|
|
17970
17940
|
size: "middle",
|
|
@@ -18226,7 +18196,7 @@ const PodContainersTable = ({
|
|
|
18226
18196
|
}) => {
|
|
18227
18197
|
const { i18n: i18n2 } = useTranslation();
|
|
18228
18198
|
const component = useContext(ComponentContext);
|
|
18229
|
-
const Table$
|
|
18199
|
+
const Table$12 = component.Table || Table;
|
|
18230
18200
|
const currentSize = 10;
|
|
18231
18201
|
const columns = useMemo(
|
|
18232
18202
|
() => [
|
|
@@ -18321,7 +18291,7 @@ const PodContainersTable = ({
|
|
|
18321
18291
|
);
|
|
18322
18292
|
}
|
|
18323
18293
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
18324
|
-
Table$
|
|
18294
|
+
Table$12,
|
|
18325
18295
|
{
|
|
18326
18296
|
tableKey: "podContainers",
|
|
18327
18297
|
loading: false,
|
|
@@ -18545,7 +18515,6 @@ function FormLayout(props) {
|
|
|
18545
18515
|
const {
|
|
18546
18516
|
saveButtonProps
|
|
18547
18517
|
} = props;
|
|
18548
|
-
const kit = useUIKit();
|
|
18549
18518
|
const {
|
|
18550
18519
|
resource,
|
|
18551
18520
|
action
|
|
@@ -18558,8 +18527,8 @@ function FormLayout(props) {
|
|
|
18558
18527
|
children: [/* @__PURE__ */ jsxRuntimeExports.jsxs("span", {
|
|
18559
18528
|
className: cx_default(Typo.Display.d2_bold_title, TitleStyle),
|
|
18560
18529
|
children: [(_a = resource == null ? void 0 : resource.meta) == null ? void 0 : _a.kind, ":", " ", action === "create" ? t2("dovetail.create") : t2("dovetail.edit")]
|
|
18561
|
-
}), /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
18562
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
18530
|
+
}), /* @__PURE__ */ jsxRuntimeExports.jsx(Divider, {}), props.children, /* @__PURE__ */ jsxRuntimeExports.jsx(Form.Item, {
|
|
18531
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Button, {
|
|
18563
18532
|
type: "primary",
|
|
18564
18533
|
...saveButtonProps,
|
|
18565
18534
|
children: t2("dovetail.save")
|
|
@@ -18569,7 +18538,6 @@ function FormLayout(props) {
|
|
|
18569
18538
|
}
|
|
18570
18539
|
function WorkloadDropdown(props) {
|
|
18571
18540
|
const { record, size, children } = props;
|
|
18572
|
-
const kit = useUIKit();
|
|
18573
18541
|
const { resource } = useResource();
|
|
18574
18542
|
const { mutateAsync } = useUpdate();
|
|
18575
18543
|
const { t: t2 } = useTranslation();
|
|
@@ -18579,7 +18547,7 @@ function WorkloadDropdown(props) {
|
|
|
18579
18547
|
});
|
|
18580
18548
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(K8sDropdown, { record, size, children: [
|
|
18581
18549
|
(canEditData == null ? void 0 : canEditData.can) !== false ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
18582
|
-
|
|
18550
|
+
Menu$1.Item,
|
|
18583
18551
|
{
|
|
18584
18552
|
onClick: async () => {
|
|
18585
18553
|
const v = record.redeploy();
|
|
@@ -18623,7 +18591,6 @@ function WorkloadDropdown(props) {
|
|
|
18623
18591
|
}
|
|
18624
18592
|
function ReplicasDropdown(props) {
|
|
18625
18593
|
const { record, size, children } = props;
|
|
18626
|
-
const kit = useUIKit();
|
|
18627
18594
|
const { t: t2 } = useTranslation();
|
|
18628
18595
|
const pushModal = usePushModal();
|
|
18629
18596
|
const formRef = useRef(null);
|
|
@@ -18635,7 +18602,7 @@ function ReplicasDropdown(props) {
|
|
|
18635
18602
|
});
|
|
18636
18603
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(WorkloadDropdown, { record, size, children: [
|
|
18637
18604
|
isInShowPage || (canEditData == null ? void 0 : canEditData.can) === false ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
18638
|
-
|
|
18605
|
+
Menu$1.Item,
|
|
18639
18606
|
{
|
|
18640
18607
|
onClick: () => {
|
|
18641
18608
|
const modalProps = {
|
|
@@ -18825,7 +18792,6 @@ const useNamespacesFilter = () => {
|
|
|
18825
18792
|
const NamespacesFilter = ({
|
|
18826
18793
|
className
|
|
18827
18794
|
}) => {
|
|
18828
|
-
const kit = useUIKit();
|
|
18829
18795
|
const {
|
|
18830
18796
|
t: t2
|
|
18831
18797
|
} = useTranslation();
|
|
@@ -18874,7 +18840,7 @@ const NamespacesFilter = ({
|
|
|
18874
18840
|
}, [calcTagMaxWidth]);
|
|
18875
18841
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
18876
18842
|
className: WRAPPER_CLASS,
|
|
18877
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
18843
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Select, {
|
|
18878
18844
|
loading: isLoading,
|
|
18879
18845
|
className: cx_default(SelectStyle, SELECT_CLASS, className),
|
|
18880
18846
|
style: {
|
|
@@ -18895,14 +18861,14 @@ const NamespacesFilter = ({
|
|
|
18895
18861
|
},
|
|
18896
18862
|
dropdownRender: (menu) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
|
|
18897
18863
|
className: SelectContentStyle,
|
|
18898
|
-
children: [/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
18864
|
+
children: [/* @__PURE__ */ jsxRuntimeExports.jsx(SearchInput, {
|
|
18899
18865
|
style: {
|
|
18900
18866
|
width: "100%"
|
|
18901
18867
|
},
|
|
18902
18868
|
className: SearchInputStyle,
|
|
18903
18869
|
onChange: debouncedSetSearch,
|
|
18904
18870
|
placeholder: t2("dovetail.please_input")
|
|
18905
|
-
}), menu, isLoading ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
18871
|
+
}), menu, isLoading ? /* @__PURE__ */ jsxRuntimeExports.jsx(Loading, {}) : null]
|
|
18906
18872
|
}),
|
|
18907
18873
|
tagRender: ({
|
|
18908
18874
|
label: label2,
|
|
@@ -18921,17 +18887,17 @@ const NamespacesFilter = ({
|
|
|
18921
18887
|
marginLeft: 8
|
|
18922
18888
|
},
|
|
18923
18889
|
children: label2
|
|
18924
|
-
}) : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
18890
|
+
}) : /* @__PURE__ */ jsxRuntimeExports.jsx(Token, {
|
|
18925
18891
|
className: cx_default(isCountToken ? CountTokenStyle : TokenStyle, isCountToken ? "" : "closable-token"),
|
|
18926
18892
|
closable,
|
|
18927
18893
|
size: "medium",
|
|
18928
18894
|
onClose,
|
|
18929
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
18930
|
-
content: isCountToken ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
18895
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(OverflowTooltip, {
|
|
18896
|
+
content: isCountToken ? /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, {
|
|
18931
18897
|
title: isCountToken ? value2.slice(MAX_TAG_COUNT).map((namespace2, index2) => /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
|
|
18932
18898
|
children: [/* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
18933
18899
|
children: namespace2
|
|
18934
|
-
}), index2 !== value2.length - 1 - MAX_TAG_COUNT ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
18900
|
+
}), index2 !== value2.length - 1 - MAX_TAG_COUNT ? /* @__PURE__ */ jsxRuntimeExports.jsx(Divider, {
|
|
18935
18901
|
style: {
|
|
18936
18902
|
margin: "6px 0",
|
|
18937
18903
|
borderColor: "rgba(107, 128, 167, 0.60)"
|
|
@@ -18956,26 +18922,26 @@ const NamespacesFilter = ({
|
|
|
18956
18922
|
setOpen(open2);
|
|
18957
18923
|
},
|
|
18958
18924
|
multiple: true,
|
|
18959
|
-
children: [/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
18925
|
+
children: [/* @__PURE__ */ jsxRuntimeExports.jsx(AntdOption, {
|
|
18960
18926
|
value: "_all",
|
|
18961
18927
|
label: t2("dovetail.all_namespaces"),
|
|
18962
18928
|
className: AllNamespaceOptionStyle,
|
|
18963
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
18929
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(OverflowTooltip, {
|
|
18964
18930
|
content: t2("dovetail.all_namespaces"),
|
|
18965
18931
|
className: LabelWrapperStyle
|
|
18966
18932
|
})
|
|
18967
|
-
}, "_all"), /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
18933
|
+
}, "_all"), /* @__PURE__ */ jsxRuntimeExports.jsx(AntdSelectOptGroup, {
|
|
18968
18934
|
label: "",
|
|
18969
18935
|
className: SelectOptionGroupStyle,
|
|
18970
18936
|
children: data2 == null ? void 0 : data2.data.map((namespace2) => {
|
|
18971
18937
|
const {
|
|
18972
18938
|
name: name2
|
|
18973
18939
|
} = namespace2.metadata;
|
|
18974
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
18940
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(AntdOption, {
|
|
18975
18941
|
value: name2,
|
|
18976
18942
|
label: name2,
|
|
18977
18943
|
className: OptionStyle,
|
|
18978
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
18944
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(OverflowTooltip, {
|
|
18979
18945
|
content: name2,
|
|
18980
18946
|
className: LabelWrapperStyle
|
|
18981
18947
|
})
|
|
@@ -19017,7 +18983,7 @@ function ListPage(props) {
|
|
|
19017
18983
|
const {
|
|
19018
18984
|
t: t2
|
|
19019
18985
|
} = useTranslation();
|
|
19020
|
-
const Table$
|
|
18986
|
+
const Table$12 = TableComponent || Table;
|
|
19021
18987
|
const {
|
|
19022
18988
|
resource
|
|
19023
18989
|
} = useResource();
|
|
@@ -19047,7 +19013,7 @@ function ListPage(props) {
|
|
|
19047
19013
|
errorText: tableProps.empty || t2("dovetail.no_resource", {
|
|
19048
19014
|
kind: ` ${config.kind}`
|
|
19049
19015
|
})
|
|
19050
|
-
}) : /* @__PURE__ */ jsxRuntimeExports.jsx(Table$
|
|
19016
|
+
}) : /* @__PURE__ */ jsxRuntimeExports.jsx(Table$12, {
|
|
19051
19017
|
...tableProps,
|
|
19052
19018
|
empty: tableProps.empty || t2("dovetail.no_resource", {
|
|
19053
19019
|
kind: ` ${config.kind}`
|
|
@@ -19062,7 +19028,7 @@ function ListPage(props) {
|
|
|
19062
19028
|
});
|
|
19063
19029
|
}
|
|
19064
19030
|
function ResourceList(props) {
|
|
19065
|
-
const { formatter, columns, Dropdown, noShow } = props.config;
|
|
19031
|
+
const { formatter, columns, Dropdown: Dropdown2, noShow } = props.config;
|
|
19066
19032
|
const { i18n: i18n2 } = useTranslation();
|
|
19067
19033
|
const nameRenderer = noShow ? PlainTextNameColumnRenderer(i18n2) : NameColumnRenderer(i18n2);
|
|
19068
19034
|
const filters = useNamespaceRefineFilter();
|
|
@@ -19076,7 +19042,7 @@ function ResourceList(props) {
|
|
|
19076
19042
|
...props.config.tableProps
|
|
19077
19043
|
},
|
|
19078
19044
|
formatter,
|
|
19079
|
-
Dropdown
|
|
19045
|
+
Dropdown: Dropdown2
|
|
19080
19046
|
});
|
|
19081
19047
|
useEffect(() => {
|
|
19082
19048
|
tableProps.onPageChange(1);
|
|
@@ -19084,13 +19050,13 @@ function ResourceList(props) {
|
|
|
19084
19050
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(ListPage, { selectedKeys, tableProps });
|
|
19085
19051
|
}
|
|
19086
19052
|
function ResourceShow(props) {
|
|
19087
|
-
const { formatter, showConfig, Dropdown } = props.config;
|
|
19053
|
+
const { formatter, showConfig, Dropdown: Dropdown2 } = props.config;
|
|
19088
19054
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
19089
19055
|
PageShow,
|
|
19090
19056
|
{
|
|
19091
19057
|
showConfig: (showConfig == null ? void 0 : showConfig()) || {},
|
|
19092
19058
|
formatter,
|
|
19093
|
-
Dropdown
|
|
19059
|
+
Dropdown: Dropdown2
|
|
19094
19060
|
}
|
|
19095
19061
|
);
|
|
19096
19062
|
}
|
|
@@ -23103,7 +23069,7 @@ const Separator = () => {
|
|
|
23103
23069
|
});
|
|
23104
23070
|
};
|
|
23105
23071
|
const MonacoYamlEditor = React__default.lazy(() => Promise.resolve().then(() => MonacoYamlEditor$2));
|
|
23106
|
-
const MonacoYamlDiffEditor = React__default.lazy(() => import("./MonacoYamlDiffEditor-
|
|
23072
|
+
const MonacoYamlDiffEditor = React__default.lazy(() => import("./MonacoYamlDiffEditor-da40ae05.js"));
|
|
23107
23073
|
const YamlEditorComponent = forwardRef(
|
|
23108
23074
|
function YamlEditorComponent2(props, ref) {
|
|
23109
23075
|
const {
|
|
@@ -23118,7 +23084,6 @@ const YamlEditorComponent = forwardRef(
|
|
|
23118
23084
|
eleRef,
|
|
23119
23085
|
className
|
|
23120
23086
|
} = props;
|
|
23121
|
-
const kit = useUIKit();
|
|
23122
23087
|
const { t: t2 } = useTranslation();
|
|
23123
23088
|
const [isCollapsed, setIsCollapsed] = useState(
|
|
23124
23089
|
collapsable ? isDefaultCollapsed : false
|
|
@@ -23178,14 +23143,14 @@ const YamlEditorComponent = forwardRef(
|
|
|
23178
23143
|
ref: eleRef,
|
|
23179
23144
|
children: [
|
|
23180
23145
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
23181
|
-
|
|
23146
|
+
Space,
|
|
23182
23147
|
{
|
|
23183
23148
|
className: cx_default(ToolBarStyle, isCollapsed ? "collapsed" : ""),
|
|
23184
23149
|
direction: "vertical",
|
|
23185
23150
|
size: 0,
|
|
23186
23151
|
children: [
|
|
23187
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
23188
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
23152
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Space, { className: ToolBarHeaderStyle, children: [
|
|
23153
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Space, { size: 8, children: [
|
|
23189
23154
|
collapsable && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
23190
23155
|
Icon$1,
|
|
23191
23156
|
{
|
|
@@ -23199,10 +23164,10 @@ const YamlEditorComponent = forwardRef(
|
|
|
23199
23164
|
),
|
|
23200
23165
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: cx_default(TitleStyle$1, "yaml-editor-title"), children: title || t2("dovetail.configure_file") })
|
|
23201
23166
|
] }),
|
|
23202
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
23167
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Space, { size: 14, children: [
|
|
23203
23168
|
isDiff ? void 0 : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
23204
23169
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
23205
|
-
|
|
23170
|
+
Tooltip,
|
|
23206
23171
|
{
|
|
23207
23172
|
title: isCollapsed ? "" : copyTooltip,
|
|
23208
23173
|
onVisibleChange: (visible) => {
|
|
@@ -23233,7 +23198,7 @@ const YamlEditorComponent = forwardRef(
|
|
|
23233
23198
|
),
|
|
23234
23199
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Separator, {}),
|
|
23235
23200
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
23236
|
-
|
|
23201
|
+
Tooltip,
|
|
23237
23202
|
{
|
|
23238
23203
|
title: isCollapsed ? "" : resetTooltip,
|
|
23239
23204
|
onVisibleChange: (visible) => {
|
|
@@ -23266,7 +23231,7 @@ const YamlEditorComponent = forwardRef(
|
|
|
23266
23231
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Separator, {})
|
|
23267
23232
|
] }),
|
|
23268
23233
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
23269
|
-
|
|
23234
|
+
Tooltip,
|
|
23270
23235
|
{
|
|
23271
23236
|
title: isCollapsed ? "" : isDiff ? t2("dovetail.back_to_edit") : t2("dovetail.view_changes"),
|
|
23272
23237
|
children: isDiff ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -23296,7 +23261,7 @@ const YamlEditorComponent = forwardRef(
|
|
|
23296
23261
|
)
|
|
23297
23262
|
] })
|
|
23298
23263
|
] }),
|
|
23299
|
-
errorMsgs.length ? /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
23264
|
+
errorMsgs.length ? /* @__PURE__ */ jsxRuntimeExports.jsxs(Space, { className: ErrorWrapperStyle, size: 8, align: "start", children: [
|
|
23300
23265
|
/* @__PURE__ */ jsxRuntimeExports.jsx(XmarkFailedSeriousWarningFill16RedIcon, { className: ErrorIconStyle }),
|
|
23301
23266
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: errorMsgs.map((errorMsg, index2) => /* @__PURE__ */ jsxRuntimeExports.jsxs("pre", { className: ErrorMsgStyle, children: [
|
|
23302
23267
|
errorMsgs.length > 1 ? `${index2 + 1}. ` : "",
|
|
@@ -23483,7 +23448,6 @@ const useYamlForm = ({
|
|
|
23483
23448
|
const [errorResponseBody, setErrorResponseBody] = useState(null);
|
|
23484
23449
|
const useResourceResult = useResource();
|
|
23485
23450
|
const { globalStore } = useGlobalStore();
|
|
23486
|
-
const kit = useUIKit();
|
|
23487
23451
|
const {
|
|
23488
23452
|
schema,
|
|
23489
23453
|
loading: isLoadingSchema,
|
|
@@ -23492,7 +23456,7 @@ const useYamlForm = ({
|
|
|
23492
23456
|
} = useSchema({
|
|
23493
23457
|
skip: editorOptions == null ? void 0 : editorOptions.isSkipSchema
|
|
23494
23458
|
});
|
|
23495
|
-
const [formAnt] =
|
|
23459
|
+
const [formAnt] = Form.useForm();
|
|
23496
23460
|
const formSF = useForm$3({
|
|
23497
23461
|
form: formAnt
|
|
23498
23462
|
});
|
|
@@ -23726,7 +23690,6 @@ function YamlForm(props) {
|
|
|
23726
23690
|
},
|
|
23727
23691
|
...useFormProps
|
|
23728
23692
|
});
|
|
23729
|
-
const kit = useUIKit();
|
|
23730
23693
|
const {
|
|
23731
23694
|
t: t2,
|
|
23732
23695
|
i18n: i18n2
|
|
@@ -23762,7 +23725,7 @@ function YamlForm(props) {
|
|
|
23762
23725
|
}, [responseErrors, onErrorsChange]);
|
|
23763
23726
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(FormWrapper, {
|
|
23764
23727
|
...formWrapperProps,
|
|
23765
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
23728
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Form, {
|
|
23766
23729
|
...formProps,
|
|
23767
23730
|
initialValues: formProps.initialValues,
|
|
23768
23731
|
layout: "horizontal",
|
|
@@ -23770,10 +23733,10 @@ function YamlForm(props) {
|
|
|
23770
23733
|
onFinish,
|
|
23771
23734
|
children: (() => {
|
|
23772
23735
|
if (isLoadingSchema || (queryResult == null ? void 0 : queryResult.isLoading) && action === "edit") {
|
|
23773
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
23736
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Loading, {});
|
|
23774
23737
|
}
|
|
23775
23738
|
return editorProps.schema || schemaStrategy !== "Required" ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
|
|
23776
|
-
children: [/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
23739
|
+
children: [/* @__PURE__ */ jsxRuntimeExports.jsx(Form.Item, {
|
|
23777
23740
|
style: {
|
|
23778
23741
|
flex: 1
|
|
23779
23742
|
},
|
|
@@ -23783,7 +23746,7 @@ function YamlForm(props) {
|
|
|
23783
23746
|
schema,
|
|
23784
23747
|
collapsable: false
|
|
23785
23748
|
})
|
|
23786
|
-
}), /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
23749
|
+
}), /* @__PURE__ */ jsxRuntimeExports.jsx(Form.Item, {
|
|
23787
23750
|
children: mutationResult.error && /* @__PURE__ */ jsxRuntimeExports.jsx(FormErrorAlert, {
|
|
23788
23751
|
errorMsgs: errorResponseBody ? responseErrors : [mutationResult.error.message],
|
|
23789
23752
|
style: {
|
|
@@ -24007,7 +23970,6 @@ function ResourceCRUD(props) {
|
|
|
24007
23970
|
function CronJobDropdown(props) {
|
|
24008
23971
|
const { record, size } = props;
|
|
24009
23972
|
const { spec } = record;
|
|
24010
|
-
const kit = useUIKit();
|
|
24011
23973
|
const { resource } = useResource();
|
|
24012
23974
|
const { mutateAsync } = useUpdate();
|
|
24013
23975
|
const { t: t2 } = useTranslation();
|
|
@@ -24017,7 +23979,7 @@ function CronJobDropdown(props) {
|
|
|
24017
23979
|
});
|
|
24018
23980
|
const suspended2 = Boolean(spec == null ? void 0 : spec.suspend);
|
|
24019
23981
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(K8sDropdown, { record, size, children: (canEditData == null ? void 0 : canEditData.can) !== false ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
24020
|
-
|
|
23982
|
+
Menu$1.Item,
|
|
24021
23983
|
{
|
|
24022
23984
|
onClick: async () => {
|
|
24023
23985
|
const v = suspended2 ? record.resume() : record.suspend();
|
|
@@ -24123,36 +24085,34 @@ const ResourceUsageBar = (props) => {
|
|
|
24123
24085
|
const DeleteButton = () => {
|
|
24124
24086
|
const { resource } = useResource();
|
|
24125
24087
|
const { id } = useParsed();
|
|
24126
|
-
const kit = useUIKit();
|
|
24127
24088
|
const { t: t2 } = useTranslation();
|
|
24128
24089
|
const { modalProps, visible, openDeleteConfirmModal } = useDeleteModal(
|
|
24129
24090
|
(resource == null ? void 0 : resource.name) || ""
|
|
24130
24091
|
);
|
|
24131
24092
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
24132
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
24133
|
-
visible ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
24093
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Button, { type: "primary", danger: true, onClick: () => openDeleteConfirmModal(id || ""), children: t2("dovetail.delete") }),
|
|
24094
|
+
visible ? /* @__PURE__ */ jsxRuntimeExports.jsx(Modal, { ...modalProps }) : null
|
|
24134
24095
|
] });
|
|
24135
24096
|
};
|
|
24136
24097
|
const index_1wt5px2 = "";
|
|
24137
24098
|
const MenuStyle = "mdppgn0";
|
|
24138
24099
|
const Menu = () => {
|
|
24139
|
-
const kit = useUIKit();
|
|
24140
24100
|
const {
|
|
24141
24101
|
menuItems,
|
|
24142
24102
|
selectedKey
|
|
24143
24103
|
} = useMenu();
|
|
24144
24104
|
function renderMenuItems(items) {
|
|
24145
|
-
return items.map((item) => item.list ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
24105
|
+
return items.map((item) => item.list ? /* @__PURE__ */ jsxRuntimeExports.jsx(Menu$1.Item, {
|
|
24146
24106
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(NavLink, {
|
|
24147
24107
|
to: item.route || "",
|
|
24148
24108
|
children: item.label
|
|
24149
24109
|
})
|
|
24150
|
-
}, item.key) : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
24110
|
+
}, item.key) : /* @__PURE__ */ jsxRuntimeExports.jsx(MenuItemGroup, {
|
|
24151
24111
|
title: item.name,
|
|
24152
24112
|
children: renderMenuItems(item.children)
|
|
24153
24113
|
}, item.key));
|
|
24154
24114
|
}
|
|
24155
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
24115
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Menu$1, {
|
|
24156
24116
|
className: MenuStyle,
|
|
24157
24117
|
theme: "light",
|
|
24158
24118
|
selectedKeys: [selectedKey],
|
|
@@ -24167,21 +24127,20 @@ const ContentStyle = "cyc9hl2";
|
|
|
24167
24127
|
const Layout = ({
|
|
24168
24128
|
children
|
|
24169
24129
|
}) => {
|
|
24170
|
-
const kit = useUIKit();
|
|
24171
24130
|
const [collapsed, setCollapsed] = useState(false);
|
|
24172
24131
|
const {
|
|
24173
24132
|
Header,
|
|
24174
24133
|
Content,
|
|
24175
24134
|
Sider
|
|
24176
|
-
} =
|
|
24177
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
24135
|
+
} = Layout$1;
|
|
24136
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(Layout$1, {
|
|
24178
24137
|
style: {
|
|
24179
24138
|
height: "100%"
|
|
24180
24139
|
},
|
|
24181
24140
|
children: [/* @__PURE__ */ jsxRuntimeExports.jsx(Header, {
|
|
24182
24141
|
className: cx_default(HeaderStyle, Typo.Heading.h1_bold_title),
|
|
24183
24142
|
children: "Dovetail 2"
|
|
24184
|
-
}), /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
24143
|
+
}), /* @__PURE__ */ jsxRuntimeExports.jsxs(Layout$1, {
|
|
24185
24144
|
className: ContentLayoutStyle,
|
|
24186
24145
|
children: [/* @__PURE__ */ jsxRuntimeExports.jsx(Sider, {
|
|
24187
24146
|
width: 256,
|
|
@@ -24199,7 +24158,6 @@ const Layout = ({
|
|
|
24199
24158
|
};
|
|
24200
24159
|
const DrawerShow = (props) => {
|
|
24201
24160
|
var _a, _b;
|
|
24202
|
-
const kit = useUIKit();
|
|
24203
24161
|
const parsed = useParsed();
|
|
24204
24162
|
const nav = useNavigation();
|
|
24205
24163
|
const { queryResult } = useShow({ id: (_a = parsed == null ? void 0 : parsed.params) == null ? void 0 : _a.id });
|
|
@@ -24212,16 +24170,15 @@ const DrawerShow = (props) => {
|
|
|
24212
24170
|
onClose: () => nav.goBack(),
|
|
24213
24171
|
width: "50%",
|
|
24214
24172
|
visible: !!((_b = parsed == null ? void 0 : parsed.params) == null ? void 0 : _b.id),
|
|
24215
|
-
children: isLoading ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
24173
|
+
children: isLoading ? /* @__PURE__ */ jsxRuntimeExports.jsx(Loading, {}) : /* @__PURE__ */ jsxRuntimeExports.jsx(ShowContent, { ...props })
|
|
24216
24174
|
}
|
|
24217
24175
|
);
|
|
24218
24176
|
};
|
|
24219
24177
|
const EditButton = () => {
|
|
24220
24178
|
const { id } = useParsed();
|
|
24221
|
-
const kit = useUIKit();
|
|
24222
24179
|
const { edit: edit2 } = useEdit();
|
|
24223
24180
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
24224
|
-
|
|
24181
|
+
Button,
|
|
24225
24182
|
{
|
|
24226
24183
|
type: "primary",
|
|
24227
24184
|
onClick: () => {
|
|
@@ -24288,11 +24245,10 @@ function ResourceSelect(props) {
|
|
|
24288
24245
|
);
|
|
24289
24246
|
}
|
|
24290
24247
|
const IngressRulesComponent = ({ ingress }) => {
|
|
24291
|
-
const kit = useUIKit();
|
|
24292
24248
|
const result = ingress.flattenedRules.map((r2) => {
|
|
24293
24249
|
const divider = " > ";
|
|
24294
24250
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
24295
|
-
|
|
24251
|
+
OverflowTooltip,
|
|
24296
24252
|
{
|
|
24297
24253
|
content: /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
24298
24254
|
/* @__PURE__ */ jsxRuntimeExports.jsx(LinkFallback, { fullPath: r2.fullPath }),
|
|
@@ -24329,12 +24285,11 @@ const NameLink = (props) => {
|
|
|
24329
24285
|
id,
|
|
24330
24286
|
resource
|
|
24331
24287
|
} = props;
|
|
24332
|
-
const kit = useUIKit();
|
|
24333
24288
|
const go = useGo();
|
|
24334
24289
|
const navigation = useNavigation();
|
|
24335
24290
|
const parsed = useParsed();
|
|
24336
24291
|
const resourceName = resource || ((_a = parsed.resource) == null ? void 0 : _a.name) || "";
|
|
24337
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
24292
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Button, {
|
|
24338
24293
|
type: "link",
|
|
24339
24294
|
onClick: () => {
|
|
24340
24295
|
go({
|
|
@@ -24479,7 +24434,6 @@ const AgeColumnRenderer = (i18n2, config, {
|
|
|
24479
24434
|
isRelativeTime = true
|
|
24480
24435
|
} = {}) => {
|
|
24481
24436
|
const dataIndex = ["metadata", "creationTimestamp"];
|
|
24482
|
-
const kit = useUIKit();
|
|
24483
24437
|
return {
|
|
24484
24438
|
key: "creationTimestamp",
|
|
24485
24439
|
display: true,
|
|
@@ -24491,7 +24445,7 @@ const AgeColumnRenderer = (i18n2, config, {
|
|
|
24491
24445
|
return isRelativeTime ? /* @__PURE__ */ jsxRuntimeExports.jsx(Time, {
|
|
24492
24446
|
date: new Date(value2)
|
|
24493
24447
|
}) : /* @__PURE__ */ jsxRuntimeExports.jsx(ValueDisplay, {
|
|
24494
|
-
value: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
24448
|
+
value: /* @__PURE__ */ jsxRuntimeExports.jsx(Time$1, {
|
|
24495
24449
|
date: value2,
|
|
24496
24450
|
timeTemplate: "HH:mm:ss",
|
|
24497
24451
|
dateTemplate: "YYYY-MM-DD"
|