@dovetail-v2/refine 0.0.35-beta.4 → 0.0.35

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.
@@ -7,11 +7,11 @@ var __publicField = (obj, key2, value2) => {
7
7
  import i18n from "i18next";
8
8
  import * as React from "react";
9
9
  import React__default, { createElement, isValidElement, cloneElement, Children, createContext, useContext, useState, useRef, useEffect, useCallback, useMemo, useImperativeHandle, memo, PureComponent, useLayoutEffect, forwardRef, Suspense } from "react";
10
- import { ResourceContext, matchResourceFromRoute, useResource, useDelete, useNavigation, useBreadcrumb, useList, useParsed, useGo, useDeleteMany, useShow, useUpdate, useDataProvider, useRefineContext, useTranslate, useWarnAboutChange, useForm as useForm$1, flattenObjectKeys, useInvalidate, useUserFriendlyName, useModal, pickNotDeprecated, useMenu, useTable, Refine } from "@refinedev/core";
10
+ import { ResourceContext, matchResourceFromRoute, useResource, useDelete, useNavigation, useBreadcrumb, useList, useParsed, useGo, useDeleteMany, CanAccess, useCan, useShow, useUpdate, useDataProvider, useRefineContext, useTranslate, useWarnAboutChange, useForm as useForm$1, flattenObjectKeys, useInvalidate, useUserFriendlyName, useModal, pickNotDeprecated, useMenu, useTable, 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
13
  import { Typo, useUIKit, kitContext, Link as Link$1, OverflowTooltip, Tooltip, StatusCapsule, pushModal, Button, Icon as Icon$1, popModal, Loading, Divider, Fields, Form, Space, Modal, useMessage, ModalStack, KitStoreProvider } from "@cloudtower/eagle";
14
- import { PlusAddCreateNew16BoldOntintIcon, EditPen16PrimaryIcon, Download16GradientBlueIcon, TrashBinDelete16Icon, MoreEllipsis324BoldSecondaryIcon, MoreEllipsis324BoldBlueIcon, MoreEllipsis316BoldBlueIcon, ArrowChevronLeft16BoldTertiaryIcon, ArrowChevronLeftSmall16BoldBlueIcon, EditPen16GradientBlueIcon, ViewEye16GrayIcon, RecoverContinue16GradientBlueIcon, SuspendedPause16GradientBlueIcon, Retry16GradientBlueIcon, HierarchyTriangleRight16GrayIcon, HierarchyTriangleRight16BlueIcon, ClipboardCopy16GradientGrayIcon, ClipboardCopy16GradientBlueIcon, Retry16GradientGrayIcon, EditPen16GradientGrayIcon, Showdiff16GradientGrayIcon, Showdiff16GradientBlueIcon, XmarkFailedSeriousWarningFill16RedIcon, ExclamationErrorCircleFill16RedIcon, Pause16GradientBlueIcon } from "@cloudtower/icons-react";
14
+ import { PlusAddCreateNew16BoldOntintIcon, EditPen16PrimaryIcon, Download16GradientBlueIcon, TrashBinDelete16Icon, MoreEllipsis324BoldSecondaryIcon, MoreEllipsis324BoldBlueIcon, MoreEllipsis316BoldBlueIcon, ArrowChevronLeft16BoldTertiaryIcon, ArrowChevronLeftSmall16BoldBlueIcon, EditPen16GradientBlueIcon, ViewEye16GrayIcon, EntityFilterIgnoreGradient16GrayIcon, RecoverContinue16GradientBlueIcon, SuspendedPause16GradientBlueIcon, Retry16GradientBlueIcon, HierarchyTriangleRight16GrayIcon, HierarchyTriangleRight16BlueIcon, ClipboardCopy16GradientGrayIcon, ClipboardCopy16GradientBlueIcon, Retry16GradientGrayIcon, EditPen16GradientGrayIcon, Showdiff16GradientGrayIcon, Showdiff16GradientBlueIcon, XmarkFailedSeriousWarningFill16RedIcon, ExclamationErrorCircleFill16RedIcon, Pause16GradientBlueIcon } from "@cloudtower/icons-react";
15
15
  import { get as get$2, first, debounce, last, isObject as isObject$2, merge, keyBy } from "lodash-es";
16
16
  import yaml from "js-yaml";
17
17
  import * as monaco from "monaco-editor";
@@ -25,301 +25,308 @@ 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
- (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
- } }, m2 = 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: m2, z: function(t3) {
39
- var e3 = -t3.utcOffset(), n3 = Math.abs(e3), r3 = Math.floor(n3 / 60), i3 = n3 % 60;
40
- return (e3 <= 0 ? "+" : "-") + m2(r3, 2, "0") + ":" + m2(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 m3 = M2.prototype;
85
- return m3.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)
93
- return new Date(e3);
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
- }, m3.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
- }, m3.$utils = function() {
107
- return b;
108
- }, m3.isValid = function() {
109
- return !(this.$d.toString() === l);
110
- }, m3.isSame = function(t3, e3) {
111
- var n3 = O(t3);
112
- return this.startOf(e3) <= n3 && n3 <= this.endOf(e3);
113
- }, m3.isAfter = function(t3, e3) {
114
- return O(t3) < this.startOf(e3);
115
- }, m3.isBefore = function(t3, e3) {
116
- return this.endOf(e3) < O(t3);
117
- }, m3.$g = function(t3, e3, n3) {
118
- return b.u(t3) ? this[e3] : this.set(n3, t3);
119
- }, m3.unix = function() {
120
- return Math.floor(this.valueOf() / 1e3);
121
- }, m3.valueOf = function() {
122
- return this.$d.getTime();
123
- }, m3.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, m4 = 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 ? m4 - D2 : m4 + (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
- }, m3.endOf = function(t3) {
151
- return this.startOf(t3, false);
152
- }, m3.$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
- }, m3.set = function(t3, e3) {
161
- return this.clone().$set(t3, e3);
162
- }, m3.get = function(t3) {
163
- return this[b.p(t3)]();
164
- }, m3.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);
170
- };
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, m4 = this.$d.getTime() + r3 * M3;
180
- return b.w(m4, this);
181
- }, m3.subtract = function(t3, e3) {
182
- return this.add(-1 * t3, e3);
183
- }, m3.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;
28
+ var hasRequiredDayjs_min;
29
+ function requireDayjs_min() {
30
+ if (hasRequiredDayjs_min)
31
+ return dayjs_min.exports;
32
+ hasRequiredDayjs_min = 1;
33
+ (function(module, exports) {
34
+ !function(t2, e2) {
35
+ module.exports = e2();
36
+ }(commonjsGlobal, function() {
37
+ var t2 = 1e3, e2 = 6e4, n2 = 36e5, r2 = "millisecond", 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) {
38
+ var e3 = ["th", "st", "nd", "rd"], n3 = t3 % 100;
39
+ return "[" + t3 + (e3[(n3 - 20) % 10] || e3[n3] || e3[0]) + "]";
40
+ } }, m2 = function(t3, e3, n3) {
41
+ var r3 = String(t3);
42
+ return !r3 || r3.length >= e3 ? t3 : "" + Array(e3 + 1 - r3.length).join(n3) + t3;
43
+ }, v = { s: m2, z: function(t3) {
44
+ var e3 = -t3.utcOffset(), n3 = Math.abs(e3), r3 = Math.floor(n3 / 60), i3 = n3 % 60;
45
+ return (e3 <= 0 ? "+" : "-") + m2(r3, 2, "0") + ":" + m2(i3, 2, "0");
46
+ }, m: function t3(e3, n3) {
47
+ if (e3.date() < n3.date())
48
+ return -t3(n3, e3);
49
+ var r3 = 12 * (n3.year() - e3.year()) + (n3.month() - e3.month()), i3 = e3.clone().add(r3, c2), s3 = n3 - i3 < 0, u2 = e3.clone().add(r3 + (s3 ? -1 : 1), c2);
50
+ return +(-(r3 + (n3 - i3) / (s3 ? i3 - u2 : u2 - i3)) || 0);
51
+ }, a: function(t3) {
52
+ return t3 < 0 ? Math.ceil(t3) || 0 : Math.floor(t3);
53
+ }, p: function(t3) {
54
+ return { M: c2, y: h, w: o, d: a2, D: d, h: u, m: s2, s: i2, ms: r2, Q: f }[t3] || String(t3 || "").toLowerCase().replace(/s$/, "");
55
+ }, u: function(t3) {
56
+ return void 0 === t3;
57
+ } }, g = "en", D = {};
58
+ D[g] = M;
59
+ var p = "$isDayjsObject", S = function(t3) {
60
+ return t3 instanceof _ || !(!t3 || !t3[p]);
61
+ }, w = function t3(e3, n3, r3) {
62
+ var i3;
63
+ if (!e3)
64
+ return g;
65
+ if ("string" == typeof e3) {
66
+ var s3 = e3.toLowerCase();
67
+ D[s3] && (i3 = s3), n3 && (D[s3] = n3, i3 = s3);
68
+ var u2 = e3.split("-");
69
+ if (!i3 && u2.length > 1)
70
+ return t3(u2[0]);
71
+ } else {
72
+ var a3 = e3.name;
73
+ D[a3] = e3, i3 = a3;
74
+ }
75
+ return !r3 && i3 && (g = i3), i3 || !r3 && g;
76
+ }, O = function(t3, e3) {
77
+ if (S(t3))
78
+ return t3.clone();
79
+ var n3 = "object" == typeof e3 ? e3 : {};
80
+ return n3.date = t3, n3.args = arguments, new _(n3);
81
+ }, b = v;
82
+ b.l = w, b.i = S, b.w = function(t3, e3) {
83
+ return O(t3, { locale: e3.$L, utc: e3.$u, x: e3.$x, $offset: e3.$offset });
84
+ };
85
+ var _ = function() {
86
+ function M2(t3) {
87
+ this.$L = w(t3.locale, null, true), this.parse(t3), this.$x = this.$x || t3.x || {}, this[p] = true;
88
+ }
89
+ var m3 = M2.prototype;
90
+ return m3.parse = function(t3) {
91
+ this.$d = function(t4) {
92
+ var e3 = t4.date, n3 = t4.utc;
93
+ if (null === e3)
94
+ return /* @__PURE__ */ new Date(NaN);
95
+ if (b.u(e3))
96
+ return /* @__PURE__ */ new Date();
97
+ if (e3 instanceof Date)
98
+ return new Date(e3);
99
+ if ("string" == typeof e3 && !/Z$/i.test(e3)) {
100
+ var r3 = e3.match($);
101
+ if (r3) {
102
+ var 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
+ }
246
105
  }
247
- return null;
248
- }(t4) || i3.replace(":", "");
249
- });
250
- }, m3.utcOffset = function() {
251
- return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
252
- }, m3.diff = function(r3, d2, l2) {
253
- var $2, y2 = this, M3 = b.p(d2), m4 = O(r3), v2 = (m4.utcOffset() - this.utcOffset()) * e2, g2 = this - m4, D2 = function() {
254
- return b.m(y2, m4);
106
+ return new Date(e3);
107
+ }(t3), this.init();
108
+ }, m3.init = function() {
109
+ var t3 = this.$d;
110
+ this.$y = t3.getFullYear(), this.$M = t3.getMonth(), this.$D = t3.getDate(), this.$W = t3.getDay(), this.$H = t3.getHours(), this.$m = t3.getMinutes(), this.$s = t3.getSeconds(), this.$ms = t3.getMilliseconds();
111
+ }, m3.$utils = function() {
112
+ return b;
113
+ }, m3.isValid = function() {
114
+ return !(this.$d.toString() === l);
115
+ }, m3.isSame = function(t3, e3) {
116
+ var n3 = O(t3);
117
+ return this.startOf(e3) <= n3 && n3 <= this.endOf(e3);
118
+ }, m3.isAfter = function(t3, e3) {
119
+ return O(t3) < this.startOf(e3);
120
+ }, m3.isBefore = function(t3, e3) {
121
+ return this.endOf(e3) < O(t3);
122
+ }, m3.$g = function(t3, e3, n3) {
123
+ return b.u(t3) ? this[e3] : this.set(n3, t3);
124
+ }, m3.unix = function() {
125
+ return Math.floor(this.valueOf() / 1e3);
126
+ }, m3.valueOf = function() {
127
+ return this.$d.getTime();
128
+ }, m3.startOf = function(t3, e3) {
129
+ var n3 = this, r3 = !!b.u(e3) || e3, f2 = b.p(t3), l2 = function(t4, e4) {
130
+ var i3 = b.w(n3.$u ? Date.UTC(n3.$y, e4, t4) : new Date(n3.$y, e4, t4), n3);
131
+ return r3 ? i3 : i3.endOf(a2);
132
+ }, $2 = function(t4, e4) {
133
+ return b.w(n3.toDate()[t4].apply(n3.toDate("s"), (r3 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e4)), n3);
134
+ }, y2 = this.$W, M3 = this.$M, m4 = this.$D, v2 = "set" + (this.$u ? "UTC" : "");
135
+ switch (f2) {
136
+ case h:
137
+ return r3 ? l2(1, 0) : l2(31, 11);
138
+ case c2:
139
+ return r3 ? l2(1, M3) : l2(0, M3 + 1);
140
+ case o:
141
+ var g2 = this.$locale().weekStart || 0, D2 = (y2 < g2 ? y2 + 7 : y2) - g2;
142
+ return l2(r3 ? m4 - D2 : m4 + (6 - D2), M3);
143
+ case a2:
144
+ case d:
145
+ return $2(v2 + "Hours", 0);
146
+ case u:
147
+ return $2(v2 + "Minutes", 1);
148
+ case s2:
149
+ return $2(v2 + "Seconds", 2);
150
+ case i2:
151
+ return $2(v2 + "Milliseconds", 3);
152
+ default:
153
+ return this.clone();
154
+ }
155
+ }, m3.endOf = function(t3) {
156
+ return this.startOf(t3, false);
157
+ }, m3.$set = function(t3, e3) {
158
+ var n3, o2 = b.p(t3), f2 = "set" + (this.$u ? "UTC" : ""), l2 = (n3 = {}, n3[a2] = f2 + "Date", n3[d] = f2 + "Date", n3[c2] = f2 + "Month", n3[h] = f2 + "FullYear", n3[u] = f2 + "Hours", n3[s2] = f2 + "Minutes", n3[i2] = f2 + "Seconds", n3[r2] = f2 + "Milliseconds", n3)[o2], $2 = o2 === a2 ? this.$D + (e3 - this.$W) : e3;
159
+ if (o2 === c2 || o2 === h) {
160
+ var y2 = this.clone().set(d, 1);
161
+ y2.$d[l2]($2), y2.init(), this.$d = y2.set(d, Math.min(this.$D, y2.daysInMonth())).$d;
162
+ } else
163
+ l2 && this.$d[l2]($2);
164
+ return this.init(), this;
165
+ }, m3.set = function(t3, e3) {
166
+ return this.clone().$set(t3, e3);
167
+ }, m3.get = function(t3) {
168
+ return this[b.p(t3)]();
169
+ }, m3.add = function(r3, f2) {
170
+ var d2, l2 = this;
171
+ r3 = Number(r3);
172
+ var $2 = b.p(f2), y2 = function(t3) {
173
+ var e3 = O(l2);
174
+ return b.w(e3.date(e3.date() + Math.round(t3 * r3)), l2);
175
+ };
176
+ if ($2 === c2)
177
+ return this.set(c2, this.$M + r3);
178
+ if ($2 === h)
179
+ return this.set(h, this.$y + r3);
180
+ if ($2 === a2)
181
+ return y2(1);
182
+ if ($2 === o)
183
+ return y2(7);
184
+ var M3 = (d2 = {}, d2[s2] = e2, d2[u] = n2, d2[i2] = t2, d2)[$2] || 1, m4 = this.$d.getTime() + r3 * M3;
185
+ return b.w(m4, this);
186
+ }, m3.subtract = function(t3, e3) {
187
+ return this.add(-1 * t3, e3);
188
+ }, m3.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
+ }, m3.utcOffset = function() {
256
+ return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
257
+ }, m3.diff = function(r3, d2, l2) {
258
+ var $2, y2 = this, M3 = b.p(d2), m4 = O(r3), v2 = (m4.utcOffset() - this.utcOffset()) * e2, g2 = this - m4, D2 = function() {
259
+ return b.m(y2, m4);
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
+ }, m3.daysInMonth = function() {
291
+ return this.endOf(c2).$D;
292
+ }, m3.$locale = function() {
293
+ return D[this.$L];
294
+ }, m3.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
+ }, m3.clone = function() {
300
+ return b.w(this.$d, this);
301
+ }, m3.toDate = function() {
302
+ return new Date(this.valueOf());
303
+ }, m3.toJSON = function() {
304
+ return this.isValid() ? this.toISOString() : null;
305
+ }, m3.toISOString = function() {
306
+ return this.$d.toISOString();
307
+ }, m3.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]);
255
314
  };
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
- }, m3.daysInMonth = function() {
286
- return this.endOf(c2).$D;
287
- }, m3.$locale = function() {
288
- return D[this.$L];
289
- }, m3.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
- }, m3.clone = function() {
295
- return b.w(this.$d, this);
296
- }, m3.toDate = function() {
297
- return new Date(this.valueOf());
298
- }, m3.toJSON = function() {
299
- return this.isValid() ? this.toISOString() : null;
300
- }, m3.toISOString = function() {
301
- return this.$d.toISOString();
302
- }, m3.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;
315
+ }), O.extend = function(t3, e3) {
316
+ return t3.$i || (t3(e3, _, O), t3.$i = true), O;
317
+ }, O.locale = w, O.isDayjs = S, O.unix = function(t3) {
318
+ return O(1e3 * t3);
319
+ }, O.en = D[g], O.Ls = D, O.p = {}, O;
320
+ });
321
+ })(dayjs_min);
322
+ return dayjs_min.exports;
323
+ }
324
+ var dayjs_minExports = requireDayjs_min();
318
325
  const dayjs = /* @__PURE__ */ getDefaultExportFromCjs(dayjs_minExports);
319
326
  var zh = { exports: {} };
320
327
  (function(module, exports) {
321
328
  !function(e2, _) {
322
- module.exports = _(dayjs_minExports);
329
+ module.exports = _(requireDayjs_min());
323
330
  }(commonjsGlobal, function(e2) {
324
331
  function _(e3) {
325
332
  return e3 && "object" == typeof e3 && "default" in e3 ? e3 : { default: e3 };
@@ -1385,11 +1392,11 @@ const no_resource = "无{{kind}}";
1385
1392
  const port_mapping_title_tooltip = "Service 端口与 Pod 端口的映射关系。";
1386
1393
  const in_cluster_desc = "ClusterIP、NodePort 和 LoadBalancer 类型的服务,展示 ClusterIP 字段,为虚拟 IP 地址,只能在集群内部使用。";
1387
1394
  const in_cluster_ip_desc = "ClusterIP 为无头服务时,内容为空。";
1388
- const in_cluster_external_name_desc = "ExternalName 类型展示的是 externalName 字段。";
1395
+ const in_cluster_external_name_desc = "ExternalName 类型展示的是 DNS 记录。";
1389
1396
  const out_cluster_ip_desc = "ClusterIP 不支持集群外部访问。";
1390
1397
  const out_cluster_node_port_desc = "NodePort 展示<strong>节点 IP:nodeport</strong>。";
1391
- const out_cluster_lb_desc = "LoadBalancer 展示 <strong>external-IP</strong>。";
1392
- const out_external_name_desc = "ExternalName 展示为空。";
1398
+ const out_cluster_lb_desc = "LoadBalancer 展示 <strong>ingress[*].ip</strong>。";
1399
+ const out_external_name_desc = "ExternalName 展示 <strong>external-ip</strong>。";
1393
1400
  const dovetail = {
1394
1401
  copy,
1395
1402
  reset_arguments,
@@ -7934,11 +7941,12 @@ class K8sOpenAPI {
7934
7941
  return response.json();
7935
7942
  }
7936
7943
  async findSchema(kind) {
7944
+ var _a;
7937
7945
  const result = this.response || await this.fetch();
7938
7946
  const schema = Object.values(result.components.schemas).find(
7939
7947
  (schema2) => {
7940
- var _a;
7941
- return (_a = schema2["x-kubernetes-group-version-kind"]) == null ? void 0 : _a.some(
7948
+ var _a2;
7949
+ return (_a2 = schema2["x-kubernetes-group-version-kind"]) == null ? void 0 : _a2.some(
7942
7950
  ({ kind: schemaKind, version: schemaVersion, group: schemaGroup }) => kind === schemaKind && this.apiVersion === `${schemaGroup ? schemaGroup + "/" : ""}${schemaVersion}`
7943
7951
  );
7944
7952
  }
@@ -7954,6 +7962,9 @@ class K8sOpenAPI {
7954
7962
  }
7955
7963
  });
7956
7964
  }
7965
+ if ((_a = schema == null ? void 0 : schema.properties) == null ? void 0 : _a.status) {
7966
+ schema == null ? true : delete schema.properties.status;
7967
+ }
7957
7968
  return schema;
7958
7969
  }
7959
7970
  }
@@ -8520,8 +8531,7 @@ const ErrorContent$1 = /* @__PURE__ */ styled_default("div")({
8520
8531
  const WidgetErrorContent$1 = (props) => {
8521
8532
  const {
8522
8533
  refetch,
8523
- errorText,
8524
- hiddenRetry
8534
+ errorText
8525
8535
  } = props;
8526
8536
  const kit = useContext(kitContext);
8527
8537
  const {
@@ -8534,7 +8544,7 @@ const WidgetErrorContent$1 = (props) => {
8534
8544
  children: [/* @__PURE__ */ jsxRuntimeExports.jsx("p", {
8535
8545
  className: cx_default(Typo.Label.l1_regular_title, "title"),
8536
8546
  children: errorText || t2("dovetail.obtain_data_error")
8537
- }), hiddenRetry ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(kit.button, {
8547
+ }), !refetch ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(kit.button, {
8538
8548
  size: "small",
8539
8549
  type: "ordinary",
8540
8550
  onClick: (e2) => {
@@ -8702,8 +8712,7 @@ const PodSelectorTable = ({ podSelectors = {} }) => {
8702
8712
  WidgetErrorContent$1,
8703
8713
  {
8704
8714
  errorText: t2("dovetail.no_resource", { kind: ` ${t2("dovetail.pod_selector")}` }),
8705
- style: { padding: "15px 0" },
8706
- hiddenRetry: true
8715
+ style: { padding: "15px 0" }
8707
8716
  }
8708
8717
  );
8709
8718
  }
@@ -8770,7 +8779,7 @@ const PortsTable = ({ service }) => {
8770
8779
  id: port2.name || ""
8771
8780
  }));
8772
8781
  if ((ports == null ? void 0 : ports.length) === 0) {
8773
- return /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent$1, { errorText: t2("dovetail.no_resource", { kind: t2("dovetail.port") }), style: { padding: "15px 0" }, hiddenRetry: true });
8782
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent$1, { errorText: t2("dovetail.no_resource", { kind: t2("dovetail.port") }), style: { padding: "15px 0" } });
8774
8783
  }
8775
8784
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
8776
8785
  Table$1,
@@ -9399,6 +9408,12 @@ var WorkloadState = /* @__PURE__ */ ((WorkloadState2) => {
9399
9408
  WorkloadState2["WAITING"] = "waiting";
9400
9409
  return WorkloadState2;
9401
9410
  })(WorkloadState || {});
9411
+ var AccessControlAuth = /* @__PURE__ */ ((AccessControlAuth2) => {
9412
+ AccessControlAuth2["Edit"] = "Edit";
9413
+ AccessControlAuth2["Delete"] = "Delete";
9414
+ AccessControlAuth2["Create"] = "Create";
9415
+ return AccessControlAuth2;
9416
+ })(AccessControlAuth || {});
9402
9417
  function matchSelector(pod2, selector) {
9403
9418
  var _a, _b, _c;
9404
9419
  let match = true;
@@ -9823,8 +9838,9 @@ class ServiceModel extends ResourceModel {
9823
9838
  this._globalStore = _globalStore;
9824
9839
  }
9825
9840
  get displayType() {
9826
- const type2 = this._rawYaml.spec.type;
9827
- if (type2 === "ClusterIP" && !this._rawYaml.spec.clusterIP) {
9841
+ const spec = this._rawYaml.spec;
9842
+ const type2 = spec.type;
9843
+ if (type2 === "ClusterIP" && (!spec.clusterIP || spec.clusterIP === "None")) {
9828
9844
  return "Headless";
9829
9845
  }
9830
9846
  return type2;
@@ -9836,22 +9852,26 @@ class ServiceModel extends ResourceModel {
9836
9852
  var _a;
9837
9853
  return (_a = this._rawYaml.spec.ports) == null ? void 0 : _a.map((p) => {
9838
9854
  let servicePort = `${p.port}`;
9839
- if (this._rawYaml.spec.clusterIP) {
9855
+ if (this._rawYaml.spec.clusterIP && this._rawYaml.spec.clusterIP !== "None") {
9840
9856
  servicePort = `${this._rawYaml.spec.clusterIP}:${p.port}`;
9841
9857
  }
9842
- return `${servicePort} > ${p.targetPort}/${p.protocol}`;
9858
+ return {
9859
+ servicePort,
9860
+ targetPort: p.targetPort,
9861
+ protocol: p.protocol
9862
+ };
9843
9863
  });
9844
9864
  }
9845
9865
  }
9846
- const index_1lzkrja = "";
9866
+ const index_w8956m = "";
9847
9867
  const ServiceInClusterAccessComponent = ({
9848
9868
  service
9849
9869
  }) => {
9850
9870
  const spec = service._rawYaml.spec;
9851
9871
  switch (spec.type) {
9852
9872
  case ServiceTypeEnum.ExternalName:
9853
- return /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
9854
- children: spec.externalName
9873
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(ValueDisplay, {
9874
+ value: service.dnsRecord
9855
9875
  });
9856
9876
  default:
9857
9877
  return /* @__PURE__ */ jsxRuntimeExports.jsx(ValueDisplay, {
@@ -9860,22 +9880,25 @@ const ServiceInClusterAccessComponent = ({
9860
9880
  }
9861
9881
  };
9862
9882
  const BreakLineStyle = "b1vtjd4k";
9883
+ const LinkStyle = "luro4rx";
9863
9884
  const ServiceOutClusterAccessComponent = ({
9864
9885
  service,
9865
9886
  clusterVip,
9866
9887
  breakLine = true
9867
9888
  }) => {
9868
- var _a, _b;
9889
+ var _a, _b, _c, _d;
9869
9890
  const spec = service._rawYaml.spec;
9891
+ const status = service._rawYaml.status;
9870
9892
  let content = "-";
9871
9893
  switch (spec.type) {
9872
9894
  case ServiceTypeEnum.NodePort:
9873
9895
  content = (_a = spec.ports) == null ? void 0 : _a.filter((v) => !!v).map((p, index) => /* @__PURE__ */ jsxRuntimeExports.jsx(Link$1, {
9874
9896
  target: "_blank",
9875
9897
  href: `http://${clusterVip}:${p.nodePort}`,
9876
- className: breakLine ? BreakLineStyle : "",
9898
+ className: cx_default(breakLine ? BreakLineStyle : "", LinkStyle),
9877
9899
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(OverflowTooltip, {
9878
- content: /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
9900
+ content: /* @__PURE__ */ jsxRuntimeExports.jsxs("span", {
9901
+ className: Typo.Label.l4_regular_title,
9879
9902
  children: [clusterVip, ":", p.nodePort, !breakLine && index !== (spec.ports || []).length - 1 ? ", " : ""]
9880
9903
  }),
9881
9904
  tooltip: `${clusterVip}:${p.nodePort}`
@@ -9884,8 +9907,17 @@ const ServiceOutClusterAccessComponent = ({
9884
9907
  return /* @__PURE__ */ jsxRuntimeExports.jsx("ul", {
9885
9908
  children: content
9886
9909
  });
9910
+ case ServiceTypeEnum.ExternalName:
9911
+ content = /* @__PURE__ */ jsxRuntimeExports.jsx(ValueDisplay, {
9912
+ value: (_b = spec.externalIPs) == null ? void 0 : _b.join(breakLine ? "\n" : ", ")
9913
+ });
9914
+ break;
9887
9915
  case ServiceTypeEnum.LoadBalancer:
9888
- content = (_b = spec.externalIPs) == null ? void 0 : _b.join(breakLine ? "\n" : ", ");
9916
+ content = /* @__PURE__ */ jsxRuntimeExports.jsx(ValueDisplay, {
9917
+ value: (_d = (_c = status.loadBalancer) == null ? void 0 : _c.ingress) == null ? void 0 : _d.map(({
9918
+ ip
9919
+ }) => ip).join(breakLine ? "\n" : ", ")
9920
+ });
9889
9921
  break;
9890
9922
  default:
9891
9923
  content = /* @__PURE__ */ jsxRuntimeExports.jsx(ValueDisplay, {
@@ -10309,7 +10341,11 @@ const TableToolBar = ({
10309
10341
  }), /* @__PURE__ */ jsxRuntimeExports.jsxs(kit.space, {
10310
10342
  children: [selectedKeys.length > 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx(DeleteManyButton, {
10311
10343
  ids: selectedKeys
10312
- }) : void 0, !hideCreate ? /* @__PURE__ */ jsxRuntimeExports.jsx(CreateButton, {}) : null]
10344
+ }) : void 0, /* @__PURE__ */ jsxRuntimeExports.jsx(CanAccess, {
10345
+ resource: resource == null ? void 0 : resource.name,
10346
+ action: AccessControlAuth.Create,
10347
+ children: !hideCreate ? /* @__PURE__ */ jsxRuntimeExports.jsx(CreateButton, {}) : null
10348
+ })]
10313
10349
  })]
10314
10350
  }), description ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
10315
10351
  className: DescriptionStyle,
@@ -10434,8 +10470,7 @@ const EventsTable = ({}) => {
10434
10470
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
10435
10471
  WidgetErrorContent$1,
10436
10472
  {
10437
- errorText: i18n2.t("dovetail.no_resource", { kind: i18n2.t("dovetail.event") }),
10438
- hiddenRetry: true
10473
+ errorText: i18n2.t("dovetail.no_resource", { kind: i18n2.t("dovetail.event") })
10439
10474
  }
10440
10475
  );
10441
10476
  }
@@ -10556,7 +10591,7 @@ const IngressRulesTable = ({ ingress }) => {
10556
10591
  }
10557
10592
  ];
10558
10593
  if ((rows == null ? void 0 : rows.length) === 0) {
10559
- return /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent$1, { errorText: t2("dovetail.no_resource", { kind: t2("dovetail.rule") }), style: { padding: "15px 0" }, hiddenRetry: true });
10594
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent$1, { errorText: t2("dovetail.no_resource", { kind: t2("dovetail.rule") }), style: { padding: "15px 0" } });
10560
10595
  }
10561
10596
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
10562
10597
  Table$1,
@@ -10599,8 +10634,7 @@ const KeyValue = (props) => {
10599
10634
  }, key2));
10600
10635
  if (!result.length) {
10601
10636
  return /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent$1, {
10602
- errorText: empty2 || t2("dovetail.empty"),
10603
- hiddenRetry: true
10637
+ errorText: empty2 || t2("dovetail.empty")
10604
10638
  });
10605
10639
  }
10606
10640
  return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {
@@ -10681,12 +10715,20 @@ function K8sDropdown(props) {
10681
10715
  const { t: t2 } = useTranslation();
10682
10716
  const openForm = useOpenForm({ id: record.id });
10683
10717
  const isInShowPage = useResourceResult.action === "show";
10718
+ const { data: canEditData } = useCan({
10719
+ resource: resource == null ? void 0 : resource.name,
10720
+ action: AccessControlAuth.Edit
10721
+ });
10722
+ const { data: canDeleteData } = useCan({
10723
+ resource: resource == null ? void 0 : resource.name,
10724
+ action: AccessControlAuth.Delete
10725
+ });
10684
10726
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
10685
10727
  /* @__PURE__ */ jsxRuntimeExports.jsx(
10686
10728
  kit.dropdown,
10687
10729
  {
10688
10730
  overlay: /* @__PURE__ */ jsxRuntimeExports.jsxs(kit.menu, { children: [
10689
- isInShowPage ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(
10731
+ isInShowPage || (canEditData == null ? void 0 : canEditData.can) === false ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(
10690
10732
  kit.menuItem,
10691
10733
  {
10692
10734
  onClick: openForm,
@@ -10709,8 +10751,8 @@ function K8sDropdown(props) {
10709
10751
  }
10710
10752
  ),
10711
10753
  props.children,
10712
- /* @__PURE__ */ jsxRuntimeExports.jsx(kit.divider, { style: { margin: 0 } }),
10713
- /* @__PURE__ */ jsxRuntimeExports.jsx(
10754
+ (canDeleteData == null ? void 0 : canDeleteData.can) !== false ? /* @__PURE__ */ jsxRuntimeExports.jsx(kit.divider, { style: { margin: 0 } }) : null,
10755
+ (canDeleteData == null ? void 0 : canDeleteData.can) !== false ? /* @__PURE__ */ jsxRuntimeExports.jsx(
10714
10756
  kit.menuItem,
10715
10757
  {
10716
10758
  danger: true,
@@ -10719,12 +10761,13 @@ function K8sDropdown(props) {
10719
10761
  },
10720
10762
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(Icon$1, { src: TrashBinDelete16Icon, children: t2("dovetail.delete") })
10721
10763
  }
10722
- )
10764
+ ) : null
10723
10765
  ] }),
10766
+ trigger: ["click"],
10724
10767
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(
10725
10768
  kit.button,
10726
10769
  {
10727
- type: size === "large" ? "quiet" : "tertiary",
10770
+ type: "quiet",
10728
10771
  size: size === "large" ? "middle" : "small",
10729
10772
  prefixIcon: size === "large" ? /* @__PURE__ */ jsxRuntimeExports.jsx(
10730
10773
  Icon$1,
@@ -10895,13 +10938,17 @@ const ShowContent = (props) => {
10895
10938
  state: stateDisplay
10896
10939
  }) : void 0]
10897
10940
  }), /* @__PURE__ */ jsxRuntimeExports.jsxs(kit.space, {
10898
- children: [/* @__PURE__ */ jsxRuntimeExports.jsx(kit.button, {
10899
- style: {
10900
- marginRight: 8
10901
- },
10902
- onClick: openForm,
10903
- prefixIcon: /* @__PURE__ */ jsxRuntimeExports.jsx(EditPen16GradientBlueIcon, {}),
10904
- children: t2("dovetail.edit_yaml")
10941
+ children: [/* @__PURE__ */ jsxRuntimeExports.jsx(CanAccess, {
10942
+ resource: resource == null ? void 0 : resource.name,
10943
+ action: AccessControlAuth.Edit,
10944
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(kit.button, {
10945
+ style: {
10946
+ marginRight: 8
10947
+ },
10948
+ onClick: openForm,
10949
+ prefixIcon: /* @__PURE__ */ jsxRuntimeExports.jsx(EditPen16GradientBlueIcon, {}),
10950
+ children: t2("dovetail.edit_yaml")
10951
+ })
10905
10952
  }), /* @__PURE__ */ jsxRuntimeExports.jsx(Dropdown, {
10906
10953
  record,
10907
10954
  size: "large"
@@ -10952,7 +10999,7 @@ function KeyValueSecret(props) {
10952
10999
  Button,
10953
11000
  {
10954
11001
  type: "quiet",
10955
- prefixIcon: /* @__PURE__ */ jsxRuntimeExports.jsx(Icon$1, { src: ViewEye16GrayIcon }),
11002
+ prefixIcon: /* @__PURE__ */ jsxRuntimeExports.jsx(Icon$1, { src: hideSecret ? ViewEye16GrayIcon : EntityFilterIgnoreGradient16GrayIcon }),
10956
11003
  onClick: () => setHideSecret((v) => !v),
10957
11004
  children: hideSecret ? i18n2.t("dovetail.show_data_value") : i18n2.t("dovetail.hide_data_value")
10958
11005
  }
@@ -11003,8 +11050,7 @@ const WorkloadPodsTable = ({
11003
11050
  }),
11004
11051
  style: {
11005
11052
  padding: "15px 0"
11006
- },
11007
- hiddenRetry: true
11053
+ }
11008
11054
  });
11009
11055
  }
11010
11056
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(kit.space, {
@@ -11188,16 +11234,23 @@ function EditField(props) {
11188
11234
  const {
11189
11235
  i18n: i18n2
11190
11236
  } = useTranslation();
11191
- return /* @__PURE__ */ jsxRuntimeExports.jsx(kit.button, {
11192
- className: EditButtonStyle,
11193
- type: "link",
11194
- onClick: () => {
11195
- pushModal({
11196
- component: EditFieldModal,
11197
- props: modalProps
11198
- });
11199
- },
11200
- children: i18n2.t("dovetail.edit")
11237
+ const {
11238
+ resource
11239
+ } = useResource();
11240
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(CanAccess, {
11241
+ resource: resource == null ? void 0 : resource.name,
11242
+ action: AccessControlAuth.Edit,
11243
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(kit.button, {
11244
+ className: EditButtonStyle,
11245
+ type: "link",
11246
+ onClick: () => {
11247
+ pushModal({
11248
+ component: EditFieldModal,
11249
+ props: modalProps
11250
+ });
11251
+ },
11252
+ children: i18n2.t("dovetail.edit")
11253
+ })
11201
11254
  });
11202
11255
  }
11203
11256
  const index_c9frt4 = "";
@@ -11565,17 +11618,17 @@ const AnnotationsField = (i18n2) => ({
11565
11618
  return /* @__PURE__ */ jsxRuntimeExports.jsx(KeyValueAnnotation, { data: value2, expandable: true });
11566
11619
  }
11567
11620
  });
11568
- const ServiceInnerClusterAccessField = (i18n2) => ({
11621
+ const ServiceInnerClusterAccessField = () => ({
11569
11622
  key: "innerClusterAccess",
11570
- title: i18n2.t("dovetail.in_cluster_access"),
11623
+ title: /* @__PURE__ */ jsxRuntimeExports.jsx(ServiceInClusterAccessTitle, {}),
11571
11624
  path: [],
11572
11625
  renderContent: (_, record) => {
11573
11626
  return /* @__PURE__ */ jsxRuntimeExports.jsx(ServiceInClusterAccessComponent, { service: record });
11574
11627
  }
11575
11628
  });
11576
- const ServiceOutClusterAccessField = (i18n2, clusterVip) => ({
11629
+ const ServiceOutClusterAccessField = (clusterVip) => ({
11577
11630
  key: "innerClusterAccess",
11578
- title: i18n2.t("dovetail.out_cluster_access"),
11631
+ title: /* @__PURE__ */ jsxRuntimeExports.jsx(ServiceOutClusterAccessTitle, {}),
11579
11632
  path: [],
11580
11633
  renderContent: (_, record) => {
11581
11634
  return /* @__PURE__ */ jsxRuntimeExports.jsx(ServiceOutClusterAccessComponent, { service: record, clusterVip, breakLine: false });
@@ -17266,6 +17319,10 @@ const PodLog = ({
17266
17319
  signal
17267
17320
  }).then((response) => {
17268
17321
  var _a3;
17322
+ if (response.status !== 200) {
17323
+ setLogs([]);
17324
+ return;
17325
+ }
17269
17326
  const reader = (_a3 = response.body) == null ? void 0 : _a3.getReader();
17270
17327
  if (!reader) {
17271
17328
  return;
@@ -17286,6 +17343,7 @@ const PodLog = ({
17286
17343
  }
17287
17344
  const total = buffer + chunk.slice(0, lastIndex);
17288
17345
  buffer = chunk.slice(lastIndex + 1);
17346
+ console.log(total);
17289
17347
  const formattedLogs = total.split("\n").filter(Boolean).map((line) => {
17290
17348
  const [timestamps, ...content] = line.split(" ");
17291
17349
  const t22 = new Date(timestamps).toLocaleString();
@@ -17375,8 +17433,7 @@ const PodLog = ({
17375
17433
  },
17376
17434
  errorText: t2("dovetail.no_resource", {
17377
17435
  kind: t2("dovetail.previous_log")
17378
- }),
17379
- hiddenRetry: true
17436
+ })
17380
17437
  }) : /* @__PURE__ */ jsxRuntimeExports.jsx(LogViewer, {
17381
17438
  innerRef: logViewerRef,
17382
17439
  height: "100%",
@@ -17493,7 +17550,7 @@ const MonacoYamlEditor$1 = (props) => {
17493
17550
  model.dispose();
17494
17551
  editor.dispose();
17495
17552
  };
17496
- }, [defaultValue, schema, id, readOnly, isScrollOnFocus, getInstance]);
17553
+ }, [schema, id, readOnly, isScrollOnFocus, getInstance]);
17497
17554
  useEffect(() => {
17498
17555
  const editor = instanceRef.current.editor;
17499
17556
  if (editor) {
@@ -17602,8 +17659,7 @@ const NetworkPolicyRulesViewer = ({
17602
17659
  }),
17603
17660
  style: {
17604
17661
  padding: "15px 0"
17605
- },
17606
- hiddenRetry: true
17662
+ }
17607
17663
  });
17608
17664
  }
17609
17665
  return /* @__PURE__ */ jsxRuntimeExports.jsx(MonacoYamlEditor$1, {
@@ -17684,7 +17740,7 @@ const PodContainersTable = ({
17684
17740
  [containerStatuses, initContainerStatuses]
17685
17741
  );
17686
17742
  if (dataSource.length === 0) {
17687
- return /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent$1, { errorText: i18n2.t("dovetail.no_resource", { kind: i18n2.t("dovetail.container") }), style: { padding: "15px 0" }, hiddenRetry: true });
17743
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent$1, { errorText: i18n2.t("dovetail.no_resource", { kind: i18n2.t("dovetail.container") }), style: { padding: "15px 0" } });
17688
17744
  }
17689
17745
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
17690
17746
  Table$1,
@@ -17922,8 +17978,12 @@ function WorkloadDropdown(props) {
17922
17978
  const { resource } = useResource();
17923
17979
  const { mutateAsync } = useUpdate();
17924
17980
  const { t: t2 } = useTranslation();
17981
+ const { data: canEditData } = useCan({
17982
+ resource: resource == null ? void 0 : resource.name,
17983
+ action: AccessControlAuth.Edit
17984
+ });
17925
17985
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(K8sDropdown, { record, size, children: [
17926
- /* @__PURE__ */ jsxRuntimeExports.jsx(
17986
+ (canEditData == null ? void 0 : canEditData.can) !== false ? /* @__PURE__ */ jsxRuntimeExports.jsx(
17927
17987
  kit.menu.Item,
17928
17988
  {
17929
17989
  onClick: async () => {
@@ -17962,7 +18022,7 @@ function WorkloadDropdown(props) {
17962
18022
  },
17963
18023
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(Icon$1, { src: Retry16GradientBlueIcon, children: t2("dovetail.redeploy") })
17964
18024
  }
17965
- ),
18025
+ ) : null,
17966
18026
  children
17967
18027
  ] });
17968
18028
  }
@@ -17971,10 +18031,14 @@ function ReplicasDropdown(props) {
17971
18031
  const kit = useUIKit();
17972
18032
  const { t: t2 } = useTranslation();
17973
18033
  const formRef = useRef(null);
17974
- const { action } = useResource();
18034
+ const { action, resource } = useResource();
17975
18035
  const isInShowPage = action === "show";
18036
+ const { data: canEditData } = useCan({
18037
+ resource: resource == null ? void 0 : resource.name,
18038
+ action: AccessControlAuth.Edit
18039
+ });
17976
18040
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(WorkloadDropdown, { record, size, children: [
17977
- isInShowPage ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(
18041
+ isInShowPage || (canEditData == null ? void 0 : canEditData.can) === false ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(
17978
18042
  kit.menu.Item,
17979
18043
  {
17980
18044
  onClick: () => {
@@ -18133,7 +18197,7 @@ function parseJSON(value2) {
18133
18197
  return void 0;
18134
18198
  }
18135
18199
  }
18136
- const index_p3hly3 = "";
18200
+ const index_ccf0kl = "";
18137
18201
  const SelectStyle = "sj0ggy";
18138
18202
  const SearchInputStyle = "s1eo8uqs";
18139
18203
  const SelectContentStyle = "s64gojc";
@@ -18217,7 +18281,7 @@ const NamespacesFilter = ({
18217
18281
  },
18218
18282
  children: label2
18219
18283
  }) : /* @__PURE__ */ jsxRuntimeExports.jsx(kit.token, {
18220
- className: isCountToken ? CountTokenStyle : TokenStyle,
18284
+ className: cx_default(isCountToken ? CountTokenStyle : TokenStyle, isCountToken ? "" : "closable-token"),
18221
18285
  closable,
18222
18286
  onClose,
18223
18287
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(kit.overflowTooltip, {
@@ -18227,6 +18291,8 @@ const NamespacesFilter = ({
18227
18291
  },
18228
18292
  maxTagCount: 1,
18229
18293
  optionLabelProp: "label",
18294
+ showArrow: true,
18295
+ showSearch: false,
18230
18296
  multiple: true,
18231
18297
  children: [/* @__PURE__ */ jsxRuntimeExports.jsx(kit.option, {
18232
18298
  value: "_all",
@@ -18297,8 +18363,7 @@ function ListPage(props) {
18297
18363
  children: !(tableProps.data.length || tableProps.loading) ? /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent$1, {
18298
18364
  errorText: tableProps.empty || t2("dovetail.no_resource", {
18299
18365
  kind: ` ${config.kind}`
18300
- }),
18301
- hiddenRetry: true
18366
+ })
18302
18367
  }) : /* @__PURE__ */ jsxRuntimeExports.jsx(Table$1, {
18303
18368
  ...tableProps,
18304
18369
  empty: tableProps.empty || t2("dovetail.no_resource", {
@@ -18314,7 +18379,7 @@ function ListPage(props) {
18314
18379
  });
18315
18380
  }
18316
18381
  function ResourceList(props) {
18317
- const { formatter, name: name2, columns, Dropdown, noShow } = props.config;
18382
+ const { formatter, columns, Dropdown, noShow } = props.config;
18318
18383
  const { i18n: i18n2 } = useTranslation();
18319
18384
  const nameRenderer = noShow ? PlainTextNameColumnRenderer(i18n2) : NameColumnRenderer(i18n2);
18320
18385
  const { tableProps, selectedKeys } = useEagleTable({
@@ -22184,7 +22249,7 @@ const Separator = () => {
22184
22249
  });
22185
22250
  };
22186
22251
  const MonacoYamlEditor = React__default.lazy(() => Promise.resolve().then(() => MonacoYamlEditor$2));
22187
- const MonacoYamlDiffEditor = React__default.lazy(() => import("./MonacoYamlDiffEditor-68b40e77.js"));
22252
+ const MonacoYamlDiffEditor = React__default.lazy(() => import("./MonacoYamlDiffEditor-1aeca078.js"));
22188
22253
  const YamlEditorComponent = forwardRef(
22189
22254
  function YamlEditorComponent2(props, ref) {
22190
22255
  const {
@@ -22387,7 +22452,7 @@ const YamlEditorComponent = forwardRef(
22387
22452
  ]
22388
22453
  }
22389
22454
  ),
22390
- /* @__PURE__ */ jsxRuntimeExports.jsx(
22455
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
22391
22456
  "div",
22392
22457
  {
22393
22458
  style: {
@@ -22396,29 +22461,32 @@ const YamlEditorComponent = forwardRef(
22396
22461
  height: height || "500px",
22397
22462
  zIndex: 1
22398
22463
  },
22399
- children: isDiff ? /* @__PURE__ */ jsxRuntimeExports.jsx(Suspense, { fallback: /* @__PURE__ */ jsxRuntimeExports.jsx("pre", { className: PlainCodeStyle, children: value2 }), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
22400
- MonacoYamlDiffEditor,
22401
- {
22402
- id: props.id,
22403
- origin: defaultValue,
22404
- modified: value2,
22405
- height
22406
- }
22407
- ) }) : /* @__PURE__ */ jsxRuntimeExports.jsx(Suspense, { fallback: /* @__PURE__ */ jsxRuntimeExports.jsx("pre", { className: PlainCodeStyle, children: value2 }), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
22408
- MonacoYamlEditor,
22409
- {
22410
- id: props.id,
22411
- getInstance,
22412
- defaultValue,
22413
- height,
22414
- onChange,
22415
- onValidate,
22416
- onEditorCreate,
22417
- onBlur: props.onBlur,
22418
- schema,
22419
- readOnly
22420
- }
22421
- ) })
22464
+ children: [
22465
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Suspense, { fallback: /* @__PURE__ */ jsxRuntimeExports.jsx("pre", { className: PlainCodeStyle, children: value2 }), children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { display: isDiff ? "none" : "block" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
22466
+ MonacoYamlEditor,
22467
+ {
22468
+ id: props.id,
22469
+ getInstance,
22470
+ defaultValue: value2,
22471
+ height,
22472
+ onChange,
22473
+ onValidate,
22474
+ onEditorCreate,
22475
+ onBlur: props.onBlur,
22476
+ schema,
22477
+ readOnly
22478
+ }
22479
+ ) }) }),
22480
+ isDiff ? /* @__PURE__ */ jsxRuntimeExports.jsx(Suspense, { fallback: /* @__PURE__ */ jsxRuntimeExports.jsx("pre", { className: PlainCodeStyle, children: value2 }), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
22481
+ MonacoYamlDiffEditor,
22482
+ {
22483
+ id: props.id,
22484
+ origin: defaultValue,
22485
+ modified: value2,
22486
+ height
22487
+ }
22488
+ ) }) : null
22489
+ ]
22422
22490
  }
22423
22491
  )
22424
22492
  ]
@@ -23035,8 +23103,12 @@ function CronJobDropdown(props) {
23035
23103
  const { resource } = useResource();
23036
23104
  const { mutateAsync } = useUpdate();
23037
23105
  const { t: t2 } = useTranslation();
23106
+ const { data: canEditData } = useCan({
23107
+ resource: resource == null ? void 0 : resource.name,
23108
+ action: AccessControlAuth.Edit
23109
+ });
23038
23110
  const suspended2 = Boolean(spec == null ? void 0 : spec.suspend);
23039
- return /* @__PURE__ */ jsxRuntimeExports.jsx(K8sDropdown, { record, size, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
23111
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(K8sDropdown, { record, size, children: (canEditData == null ? void 0 : canEditData.can) !== false ? /* @__PURE__ */ jsxRuntimeExports.jsx(
23040
23112
  kit.menu.Item,
23041
23113
  {
23042
23114
  onClick: async () => {
@@ -23075,7 +23147,7 @@ function CronJobDropdown(props) {
23075
23147
  },
23076
23148
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(Icon$1, { src: suspended2 ? RecoverContinue16GradientBlueIcon : Pause16GradientBlueIcon, children: t2(suspended2 ? "dovetail.resume" : "dovetail.suspend") })
23077
23149
  }
23078
- ) });
23150
+ ) : null });
23079
23151
  }
23080
23152
  const index_1wzdp7m = "";
23081
23153
  const WrapperStyle = "wfg6u6g";
@@ -23575,32 +23647,38 @@ const ServiceTypeColumnRenderer = (i18n2) => {
23575
23647
  sorter: CommonSorter(dataIndex)
23576
23648
  };
23577
23649
  };
23578
- const ServiceInClusterAccessColumnRenderer = (i18n2) => {
23579
- return {
23580
- key: "inClusterAccess",
23581
- title: /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, {
23582
- overlayClassName: ServiceClusterTooltipStyle,
23583
- title: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
23650
+ function ServiceInClusterAccessTitle() {
23651
+ const {
23652
+ i18n: i18n2
23653
+ } = useTranslation();
23654
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, {
23655
+ overlayClassName: ServiceClusterTooltipStyle,
23656
+ title: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
23657
+ style: {
23658
+ lineHeight: "22px"
23659
+ },
23660
+ children: [/* @__PURE__ */ jsxRuntimeExports.jsx("div", {
23661
+ children: i18n2.t("dovetail.in_cluster_desc")
23662
+ }), /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
23663
+ children: i18n2.t("dovetail.in_cluster_ip_desc")
23664
+ }), /* @__PURE__ */ jsxRuntimeExports.jsx(Divider, {
23584
23665
  style: {
23585
- lineHeight: "22px"
23586
- },
23587
- children: [/* @__PURE__ */ jsxRuntimeExports.jsx("div", {
23588
- children: i18n2.t("dovetail.in_cluster_desc")
23589
- }), /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
23590
- children: i18n2.t("dovetail.in_cluster_ip_desc")
23591
- }), /* @__PURE__ */ jsxRuntimeExports.jsx(Divider, {
23592
- style: {
23593
- margin: "6px 0"
23594
- }
23595
- }), /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
23596
- children: i18n2.t("dovetail.in_cluster_external_name_desc")
23597
- })]
23598
- }),
23599
- children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
23600
- className: DashedTitleStyle,
23601
- children: i18n2.t("dovetail.in_cluster_access")
23602
- })
23666
+ margin: "6px 0"
23667
+ }
23668
+ }), /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
23669
+ children: i18n2.t("dovetail.in_cluster_external_name_desc")
23670
+ })]
23603
23671
  }),
23672
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
23673
+ className: DashedTitleStyle,
23674
+ children: i18n2.t("dovetail.in_cluster_access")
23675
+ })
23676
+ });
23677
+ }
23678
+ const ServiceInClusterAccessColumnRenderer = () => {
23679
+ return {
23680
+ key: "inClusterAccess",
23681
+ title: /* @__PURE__ */ jsxRuntimeExports.jsx(ServiceInClusterAccessTitle, {}),
23604
23682
  display: true,
23605
23683
  dataIndex: [],
23606
23684
  width: 160,
@@ -23611,34 +23689,40 @@ const ServiceInClusterAccessColumnRenderer = (i18n2) => {
23611
23689
  }
23612
23690
  };
23613
23691
  };
23614
- const ServiceOutClusterAccessColumnRenderer = (i18n2, clusterVip) => {
23692
+ function ServiceOutClusterAccessTitle() {
23693
+ const {
23694
+ i18n: i18n2
23695
+ } = useTranslation();
23696
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, {
23697
+ overlayClassName: ServiceClusterTooltipStyle,
23698
+ title: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
23699
+ style: {
23700
+ lineHeight: "22px"
23701
+ },
23702
+ children: [/* @__PURE__ */ jsxRuntimeExports.jsx("div", {
23703
+ children: i18n2.t("dovetail.out_cluster_ip_desc")
23704
+ }), /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
23705
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(Trans, {
23706
+ i18nKey: "dovetail.out_cluster_node_port_desc"
23707
+ })
23708
+ }), /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
23709
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(Trans, {
23710
+ i18nKey: "dovetail.out_cluster_lb_desc"
23711
+ })
23712
+ }), /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
23713
+ children: i18n2.t("dovetail.out_external_name_desc")
23714
+ })]
23715
+ }),
23716
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
23717
+ className: DashedTitleStyle,
23718
+ children: i18n2.t("dovetail.out_cluster_access")
23719
+ })
23720
+ });
23721
+ }
23722
+ const ServiceOutClusterAccessColumnRenderer = (clusterVip) => {
23615
23723
  return {
23616
23724
  key: "outClusterAccess",
23617
- title: /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, {
23618
- overlayClassName: ServiceClusterTooltipStyle,
23619
- title: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
23620
- style: {
23621
- lineHeight: "22px"
23622
- },
23623
- children: [/* @__PURE__ */ jsxRuntimeExports.jsx("div", {
23624
- children: i18n2.t("dovetail.out_cluster_ip_desc")
23625
- }), /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
23626
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(Trans, {
23627
- i18nKey: "dovetail.out_cluster_node_port_desc"
23628
- })
23629
- }), /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
23630
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(Trans, {
23631
- i18nKey: "dovetail.out_cluster_lb_desc"
23632
- })
23633
- }), /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
23634
- children: i18n2.t("dovetail.out_external_name_desc")
23635
- })]
23636
- }),
23637
- children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
23638
- className: DashedTitleStyle,
23639
- children: i18n2.t("dovetail.out_cluster_access")
23640
- })
23641
- }),
23725
+ title: /* @__PURE__ */ jsxRuntimeExports.jsx(ServiceOutClusterAccessTitle, {}),
23642
23726
  display: true,
23643
23727
  dataIndex: [],
23644
23728
  width: 160,
@@ -23661,6 +23745,11 @@ const PodWorkloadColumnRenderer = (i18n2) => {
23661
23745
  sorter: CommonSorter(dataIndex),
23662
23746
  width: 160,
23663
23747
  render(value2, record) {
23748
+ if (!(value2 == null ? void 0 : value2.length)) {
23749
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(ValueDisplay, {
23750
+ value: ""
23751
+ });
23752
+ }
23664
23753
  return value2.map((o) => /* @__PURE__ */ jsxRuntimeExports.jsx(ReferenceLink, {
23665
23754
  ownerReference: o,
23666
23755
  namespace: record.metadata.namespace || "default"
@@ -23795,10 +23884,21 @@ const PortMappingColumnRenderer = (i18n2) => {
23795
23884
  display: true,
23796
23885
  dataIndex: ["displayPortMapping"],
23797
23886
  width: 300,
23798
- render(value2) {
23799
- const content = value2.map((v) => /* @__PURE__ */ jsxRuntimeExports.jsx(OverflowTooltip, {
23800
- content: v
23801
- }, v));
23887
+ render(value2, record) {
23888
+ var _a;
23889
+ const content = (_a = record.displayPortMapping) == null ? void 0 : _a.map((v) => /* @__PURE__ */ jsxRuntimeExports.jsx(OverflowTooltip, {
23890
+ content: /* @__PURE__ */ jsxRuntimeExports.jsxs("span", {
23891
+ style: {
23892
+ whiteSpace: "pre"
23893
+ },
23894
+ children: [record.displayType === "NodePort" ? /* @__PURE__ */ jsxRuntimeExports.jsx(Link$1, {
23895
+ href: `//${v.servicePort}`,
23896
+ target: "_blank",
23897
+ children: v.servicePort
23898
+ }) : v.servicePort, " > ", v.targetPort, "/", v.protocol]
23899
+ }),
23900
+ tooltip: `${v.servicePort} > ${v.targetPort}/${v.protocol}`
23901
+ }, v.servicePort));
23802
23902
  return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {
23803
23903
  children: content
23804
23904
  });
@@ -23888,7 +23988,7 @@ const useEagleTable = (params) => {
23888
23988
  };
23889
23989
  const styles = "";
23890
23990
  const Dovetail = (props) => {
23891
- const { resourcesConfig, urlPrefix = "", Layout: Layout2, history, globalStore } = props;
23991
+ const { resourcesConfig, urlPrefix = "", Layout: Layout2, history, globalStore, accessControlProvider } = props;
23892
23992
  const msg = useMessage();
23893
23993
  const notCustomResources = useMemo(() => {
23894
23994
  return resourcesConfig.filter((c2) => !c2.isCustom);
@@ -23932,6 +24032,7 @@ const Dovetail = (props) => {
23932
24032
  liveMode: "auto",
23933
24033
  disableTelemetry: true
23934
24034
  },
24035
+ accessControlProvider,
23935
24036
  resources: resourcesConfig.map((c2) => {
23936
24037
  return {
23937
24038
  name: c2.name,
@@ -24087,187 +24188,190 @@ const relationPlugin = new RelationPlugin();
24087
24188
  const ProviderPlugins = [relationPlugin, modelPlugin];
24088
24189
  const dovetailRefineI18n = i18n;
24089
24190
  export {
24090
- ResourceList as $,
24191
+ CreateButton as $,
24091
24192
  AgeColumnRenderer as A,
24092
- useOpenForm as B,
24193
+ useEdit as B,
24093
24194
  CommonSorter as C,
24094
24195
  DurationColumnRenderer as D,
24095
- Breadcrumb as E,
24096
- NameInputWidget as F,
24097
- dnsSubDomainRules as G,
24098
- rfc1123LabelRules as H,
24196
+ useGlobalStore as E,
24197
+ useOpenForm as F,
24198
+ Breadcrumb as G,
24199
+ NameInputWidget as H,
24099
24200
  IngressRulesColumnRenderer as I,
24100
- rfc1035LabelRules as J,
24101
- NamespaceSelectWidget as K,
24102
- namespaceRules as L,
24103
- KeyValueListWidget as M,
24201
+ dnsSubDomainRules as J,
24202
+ rfc1123LabelRules as K,
24203
+ rfc1035LabelRules as L,
24204
+ NamespaceSelectWidget as M,
24104
24205
  NameColumnRenderer as N,
24105
- MetadataForm as O,
24206
+ namespaceRules as O,
24106
24207
  PlainTextNameColumnRenderer as P,
24107
- PageShow as Q,
24208
+ KeyValueListWidget as Q,
24108
24209
  ReplicasColumnRenderer as R,
24109
24210
  StateDisplayColumnRenderer as S,
24110
- Time as T,
24111
- ConditionsTable as U,
24112
- PodContainersTable as V,
24211
+ MetadataForm as T,
24212
+ PageShow as U,
24213
+ Time as V,
24113
24214
  WorkloadImageColumnRenderer as W,
24114
- WorkloadDropdown as X,
24115
- ReplicasDropdown as Y,
24116
- CreateButton as Z,
24117
- ImageNames as _,
24215
+ ConditionsTable as X,
24216
+ PodContainersTable as Y,
24217
+ WorkloadDropdown as Z,
24218
+ ReplicasDropdown as _,
24118
24219
  useDeleteModal as a,
24119
- EditButton as a$,
24120
- ResourceShow as a0,
24121
- ResourceForm as a1,
24122
- ResourceCRUD as a2,
24123
- WorkloadPodsTable as a3,
24124
- CronJobDropdown as a4,
24125
- ResourceUsageBar as a5,
24126
- WorkloadReplicasForm as a6,
24127
- WorkloadReplicas as a7,
24128
- CronjobJobsTable as a8,
24129
- KeyValue as a9,
24130
- ServiceOutClusterAccessField as aA,
24131
- PodSelectorField as aB,
24132
- PortsTableField as aC,
24133
- DurationField as aD,
24134
- EventsTab as aE,
24135
- PodLogTab as aF,
24136
- BasicGroup as aG,
24137
- PodsGroup as aH,
24138
- PodContainersGroup as aI,
24139
- ServicePodsGroup as aJ,
24140
- ConditionsGroup as aK,
24141
- SecretDataGroup as aL,
24142
- JobsGroup as aM,
24143
- IngressRulesGroup as aN,
24144
- PodSelectorGroup as aO,
24145
- PortsGroup as aP,
24146
- DataGroup as aQ,
24147
- NetworkPolicyIngressRulesGroup as aR,
24148
- NetworkPolicyEgressRulesGroup as aS,
24149
- ShowGroupComponent as aT,
24150
- ShowContent as aU,
24151
- DeleteManyButton as aV,
24152
- ListPage as aW,
24153
- StateTagStyle as aX,
24154
- StateTag as aY,
24155
- DrawerShow as aZ,
24156
- Menu as a_,
24157
- KeyValueAnnotation as aa,
24158
- KeyValueSecret as ab,
24159
- Separator as ac,
24160
- YamlEditorComponent as ad,
24161
- DeleteButton as ae,
24162
- Layout as af,
24163
- AreaType as ag,
24164
- ImageField as ah,
24165
- ReplicaField as ai,
24166
- ConditionsField as aj,
24167
- PodsField as ak,
24168
- JobsField as al,
24169
- DataField as am,
24170
- SecretDataField as an,
24171
- StartTimeField as ao,
24172
- ServiceTypeField as ap,
24173
- ClusterIpField as aq,
24174
- SessionAffinityField as ar,
24175
- ServicePodsField as as,
24176
- IngressRulesTableTabField as at,
24177
- EventsTableTabField as au,
24178
- NamespaceField as av,
24179
- AgeField as aw,
24180
- LabelsField as ax,
24181
- AnnotationsField as ay,
24182
- ServiceInnerClusterAccessField as az,
24220
+ DrawerShow as a$,
24221
+ ImageNames as a0,
24222
+ ResourceList as a1,
24223
+ ResourceShow as a2,
24224
+ ResourceForm as a3,
24225
+ ResourceCRUD as a4,
24226
+ WorkloadPodsTable as a5,
24227
+ CronJobDropdown as a6,
24228
+ ResourceUsageBar as a7,
24229
+ WorkloadReplicasForm as a8,
24230
+ WorkloadReplicas as a9,
24231
+ AnnotationsField as aA,
24232
+ ServiceInnerClusterAccessField as aB,
24233
+ ServiceOutClusterAccessField as aC,
24234
+ PodSelectorField as aD,
24235
+ PortsTableField as aE,
24236
+ DurationField as aF,
24237
+ EventsTab as aG,
24238
+ PodLogTab as aH,
24239
+ BasicGroup as aI,
24240
+ PodsGroup as aJ,
24241
+ PodContainersGroup as aK,
24242
+ ServicePodsGroup as aL,
24243
+ ConditionsGroup as aM,
24244
+ SecretDataGroup as aN,
24245
+ JobsGroup as aO,
24246
+ IngressRulesGroup as aP,
24247
+ PodSelectorGroup as aQ,
24248
+ PortsGroup as aR,
24249
+ DataGroup as aS,
24250
+ NetworkPolicyIngressRulesGroup as aT,
24251
+ NetworkPolicyEgressRulesGroup as aU,
24252
+ ShowGroupComponent as aV,
24253
+ ShowContent as aW,
24254
+ DeleteManyButton as aX,
24255
+ ListPage as aY,
24256
+ StateTagStyle as aZ,
24257
+ StateTag as a_,
24258
+ CronjobJobsTable as aa,
24259
+ KeyValue as ab,
24260
+ KeyValueAnnotation as ac,
24261
+ KeyValueSecret as ad,
24262
+ Separator as ae,
24263
+ YamlEditorComponent as af,
24264
+ DeleteButton as ag,
24265
+ Layout as ah,
24266
+ AreaType as ai,
24267
+ ImageField as aj,
24268
+ ReplicaField as ak,
24269
+ ConditionsField as al,
24270
+ PodsField as am,
24271
+ JobsField as an,
24272
+ DataField as ao,
24273
+ SecretDataField as ap,
24274
+ StartTimeField as aq,
24275
+ ServiceTypeField as ar,
24276
+ ClusterIpField as as,
24277
+ SessionAffinityField as at,
24278
+ ServicePodsField as au,
24279
+ IngressRulesTableTabField as av,
24280
+ EventsTableTabField as aw,
24281
+ NamespaceField as ax,
24282
+ AgeField as ay,
24283
+ LabelsField as az,
24183
24284
  NameSpaceColumnRenderer as b,
24184
- ServiceModel as b$,
24185
- ReferenceLink as b0,
24186
- ResourceLink as b1,
24187
- NS_STORE_KEY as b2,
24188
- ALL_NS as b3,
24189
- useNamespacesFilter as b4,
24190
- NamespacesFilter as b5,
24191
- FormModal as b6,
24192
- RefineFormContent as b7,
24193
- RefineFormPage as b8,
24194
- SchemaStrategy as b9,
24195
- SECRET_OPAQUE_INIT_VALUE as bA,
24196
- SECRET_IMAGE_REPO_INIT_VALUE as bB,
24197
- SECRET_BASIC_AUTH_INIT_VALUE as bC,
24198
- SECRET_SSH_AUTH_INIT_VALUE as bD,
24199
- SECRET_TLS_INIT_VALUE as bE,
24200
- SECRET_CUSTOM_INIT_VALUE as bF,
24201
- WorkloadState as bG,
24202
- Dovetail as bH,
24203
- RESOURCE_GROUP as bI,
24204
- FormType as bJ,
24205
- ComponentContext as bK,
24206
- GlobalStoreContext as bL,
24207
- ConfigsContext as bM,
24208
- IngressModel as bN,
24209
- NetworkPolicyModel as bO,
24210
- JobModel as bP,
24211
- WorkloadModel as bQ,
24212
- WorkloadBaseModel as bR,
24213
- PodModel as bS,
24214
- PodMetricsModel as bT,
24215
- ResourceModel as bU,
24216
- CronJobModel as bV,
24217
- EventModel as bW,
24218
- DeploymentModel as bX,
24219
- DaemonSetModel as bY,
24220
- StatefulSetModel as bZ,
24221
- ServiceTypeEnum as b_,
24222
- YamlForm as ba,
24223
- useRefineForm as bb,
24224
- ServiceInClusterAccessComponent as bc,
24225
- ServiceOutClusterAccessComponent as bd,
24226
- Tags as be,
24227
- TextTags as bf,
24228
- PodLog as bg,
24229
- NetworkPolicyRulesViewer as bh,
24230
- Tabs as bi,
24231
- BASE_INIT_VALUE as bj,
24232
- DEPLOYMENT_INIT_VALUE as bk,
24233
- CRONJOB_INIT_VALUE as bl,
24234
- DAEMONSET_INIT_VALUE as bm,
24235
- JOB_INIT_VALUE as bn,
24236
- STATEFULSET_INIT_VALUE as bo,
24237
- POD_INIT_VALUE as bp,
24238
- SERVICE_CLUSTER_IP_INIT_VALUE as bq,
24239
- SERVICE_NODE_PORT_INIT_VALUE as br,
24240
- SERVICE_LOAD_BALANCER_INIT_VALUE as bs,
24241
- SERVICE_EXTERNAL_NAME_INIT_VALUE as bt,
24242
- SERVICE_HEADLESS_INIT_VALUE as bu,
24243
- INGRESS_INIT_VALUE as bv,
24244
- NETWORK_POLICY_INIT_VALUE as bw,
24245
- CONFIG_MAP_INIT_VALUE as bx,
24246
- SERVER_INSTANCE_INIT_VALUE as by,
24247
- TIMESTAMP_LABEL as bz,
24285
+ DaemonSetModel as b$,
24286
+ Menu as b0,
24287
+ EditButton as b1,
24288
+ ReferenceLink as b2,
24289
+ ResourceLink as b3,
24290
+ NS_STORE_KEY as b4,
24291
+ ALL_NS as b5,
24292
+ useNamespacesFilter as b6,
24293
+ NamespacesFilter as b7,
24294
+ FormModal as b8,
24295
+ RefineFormContent as b9,
24296
+ SERVER_INSTANCE_INIT_VALUE as bA,
24297
+ TIMESTAMP_LABEL as bB,
24298
+ SECRET_OPAQUE_INIT_VALUE as bC,
24299
+ SECRET_IMAGE_REPO_INIT_VALUE as bD,
24300
+ SECRET_BASIC_AUTH_INIT_VALUE as bE,
24301
+ SECRET_SSH_AUTH_INIT_VALUE as bF,
24302
+ SECRET_TLS_INIT_VALUE as bG,
24303
+ SECRET_CUSTOM_INIT_VALUE as bH,
24304
+ WorkloadState as bI,
24305
+ AccessControlAuth as bJ,
24306
+ Dovetail as bK,
24307
+ RESOURCE_GROUP as bL,
24308
+ FormType as bM,
24309
+ ComponentContext as bN,
24310
+ GlobalStoreContext as bO,
24311
+ ConfigsContext as bP,
24312
+ IngressModel as bQ,
24313
+ NetworkPolicyModel as bR,
24314
+ JobModel as bS,
24315
+ WorkloadModel as bT,
24316
+ WorkloadBaseModel as bU,
24317
+ PodModel as bV,
24318
+ PodMetricsModel as bW,
24319
+ ResourceModel as bX,
24320
+ CronJobModel as bY,
24321
+ EventModel as bZ,
24322
+ DeploymentModel as b_,
24323
+ RefineFormPage as ba,
24324
+ SchemaStrategy as bb,
24325
+ YamlForm as bc,
24326
+ useRefineForm as bd,
24327
+ ServiceInClusterAccessComponent as be,
24328
+ ServiceOutClusterAccessComponent as bf,
24329
+ Tags as bg,
24330
+ TextTags as bh,
24331
+ PodLog as bi,
24332
+ NetworkPolicyRulesViewer as bj,
24333
+ Tabs as bk,
24334
+ BASE_INIT_VALUE as bl,
24335
+ DEPLOYMENT_INIT_VALUE as bm,
24336
+ CRONJOB_INIT_VALUE as bn,
24337
+ DAEMONSET_INIT_VALUE as bo,
24338
+ JOB_INIT_VALUE as bp,
24339
+ STATEFULSET_INIT_VALUE as bq,
24340
+ POD_INIT_VALUE as br,
24341
+ SERVICE_CLUSTER_IP_INIT_VALUE as bs,
24342
+ SERVICE_NODE_PORT_INIT_VALUE as bt,
24343
+ SERVICE_LOAD_BALANCER_INIT_VALUE as bu,
24344
+ SERVICE_EXTERNAL_NAME_INIT_VALUE as bv,
24345
+ SERVICE_HEADLESS_INIT_VALUE as bw,
24346
+ INGRESS_INIT_VALUE as bx,
24347
+ NETWORK_POLICY_INIT_VALUE as by,
24348
+ CONFIG_MAP_INIT_VALUE as bz,
24248
24349
  WorkloadRestartsColumnRenderer as c,
24249
- ProviderPlugins as c0,
24350
+ StatefulSetModel as c0,
24351
+ ServiceTypeEnum as c1,
24352
+ ServiceModel as c2,
24353
+ ProviderPlugins as c3,
24250
24354
  dovetailRefineI18n as d,
24251
24355
  NodeNameColumnRenderer as e,
24252
24356
  RestartCountColumnRenderer as f,
24253
24357
  CompletionsCountColumnRenderer as g,
24254
24358
  ServiceTypeColumnRenderer as h,
24255
- ServiceInClusterAccessColumnRenderer as i,
24359
+ ServiceInClusterAccessTitle as i,
24256
24360
  jsxRuntimeExports as j,
24257
- ServiceOutClusterAccessColumnRenderer as k,
24258
- PodWorkloadColumnRenderer as l,
24259
- IngressDefaultBackendColumnRenderer as m,
24260
- IngressClassColumnRenderer as n,
24261
- IngressTlsColumnRenderer as o,
24262
- PodContainersNumColumnRenderer as p,
24263
- DataKeysColumnRenderer as q,
24361
+ ServiceInClusterAccessColumnRenderer as k,
24362
+ ServiceOutClusterAccessTitle as l,
24363
+ ServiceOutClusterAccessColumnRenderer as m,
24364
+ PodWorkloadColumnRenderer as n,
24365
+ IngressDefaultBackendColumnRenderer as o,
24366
+ IngressClassColumnRenderer as p,
24367
+ IngressTlsColumnRenderer as q,
24264
24368
  routerProvider as r,
24265
- PortMappingColumnRenderer as s,
24266
- ColumnKeys as t,
24369
+ PodContainersNumColumnRenderer as s,
24370
+ DataKeysColumnRenderer as t,
24267
24371
  useSchema as u,
24268
- addDefaultRenderToColumns as v,
24269
- useEagleTable as w,
24270
- useDownloadYAML as x,
24271
- useEdit as y,
24272
- useGlobalStore as z
24372
+ PortMappingColumnRenderer as v,
24373
+ ColumnKeys as w,
24374
+ addDefaultRenderToColumns as x,
24375
+ useEagleTable as y,
24376
+ useDownloadYAML as z
24273
24377
  };