@dovetail-v2/refine 0.0.46-alpha.2 → 0.0.47

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (209) hide show
  1. package/dist/{MonacoYamlDiffEditor-a0787f8d.js → MonacoYamlDiffEditor-9ad1c844.js} +1 -1
  2. package/dist/{index-9a6fb2d3.js → index-1a40b2a8.js} +701 -612
  3. package/dist/refine.js +176 -175
  4. package/dist/refine.umd.cjs +525 -436
  5. package/dist/style.css +4 -4
  6. package/lib/src/App.js +91 -0
  7. package/lib/src/Dovetail.js +45 -0
  8. package/lib/src/components/Breadcrumb/index.js +20 -0
  9. package/lib/src/components/ConditionsTable/ConditionsTable.js +56 -0
  10. package/lib/src/components/ConditionsTable/index.js +1 -0
  11. package/lib/src/components/CreateButton/index.js +10 -0
  12. package/lib/src/components/CronJobDropdown/index.js +26 -0
  13. package/lib/src/components/CronjobJobsTable/index.js +49 -0
  14. package/lib/src/components/DeleteButton/index.js +13 -0
  15. package/lib/src/components/DeleteManyButton/index.js +16 -0
  16. package/lib/src/components/DrawerShow/DrawerShow.js +13 -0
  17. package/lib/src/components/DrawerShow/index.js +1 -0
  18. package/lib/src/components/EditButton/index.js +13 -0
  19. package/lib/src/components/EditField/index.js +47 -0
  20. package/lib/src/components/ErrorContent/index.js +36 -0
  21. package/lib/src/components/EventsTable/EventsTable.d.ts +5 -1
  22. package/lib/src/components/EventsTable/EventsTable.js +59 -0
  23. package/lib/src/components/EventsTable/index.js +1 -0
  24. package/lib/src/components/Form/KeyValueListWidget.js +56 -0
  25. package/lib/src/components/Form/MetadataForm.js +9 -0
  26. package/lib/src/components/Form/NameInputWidget.js +50 -0
  27. package/lib/src/components/Form/NamespaceSelectWidget.js +21 -0
  28. package/lib/src/components/Form/index.js +4 -0
  29. package/lib/src/components/Form/widget.js +1 -0
  30. package/lib/src/components/FormErrorAlert/index.js +8 -0
  31. package/lib/src/components/FormLayout/index.js +21 -0
  32. package/lib/src/components/FormModal/index.js +51 -0
  33. package/lib/src/components/ImageNames/index.js +14 -0
  34. package/lib/src/components/IngressRulesComponent/index.js +11 -0
  35. package/lib/src/components/IngressRulesTable/IngressRulesTable.js +51 -0
  36. package/lib/src/components/IngressRulesTable/index.js +1 -0
  37. package/lib/src/components/K8sDropdown/index.js +31 -0
  38. package/lib/src/components/KeyValue/KeyValue.js +27 -0
  39. package/lib/src/components/KeyValue/index.js +1 -0
  40. package/lib/src/components/KeyValueData/index.js +50 -0
  41. package/lib/src/components/Layout/index.js +39 -0
  42. package/lib/src/components/ListPage/index.js +25 -0
  43. package/lib/src/components/Menu/index.js +36 -0
  44. package/lib/src/components/NamespacesFilter/index.js +34 -0
  45. package/lib/src/components/NetworkPolicyRulesTable/NetworkPolicyRulesTable.d.ts +1 -2
  46. package/lib/src/components/NetworkPolicyRulesTable/NetworkPolicyRulesTable.js +77 -0
  47. package/lib/src/components/NetworkPolicyRulesTable/index.js +1 -0
  48. package/lib/src/components/PageShow/PageShow.js +11 -0
  49. package/lib/src/components/PageShow/index.js +1 -0
  50. package/lib/src/components/PodContainersTable/PodContainersTable.js +78 -0
  51. package/lib/src/components/PodContainersTable/index.js +1 -0
  52. package/lib/src/components/PodLog/index.js +136 -0
  53. package/lib/src/components/ReferenceLink/index.js +17 -0
  54. package/lib/src/components/RefineForm/RefineFormContent.d.ts +10 -0
  55. package/lib/src/components/RefineForm/RefineFormModal.d.ts +8 -0
  56. package/lib/src/components/RefineForm/RefineFormPage.d.ts +7 -0
  57. package/lib/src/components/RefineForm/index.d.ts +3 -0
  58. package/lib/src/components/RefineForm/type.d.ts +20 -0
  59. package/lib/src/components/RefineForm/useRefineForm.d.ts +10 -0
  60. package/lib/src/components/ResourceCRUD/ResourceCRUD.js +15 -0
  61. package/lib/src/components/ResourceCRUD/create/index.js +13 -0
  62. package/lib/src/components/ResourceCRUD/index.js +4 -0
  63. package/lib/src/components/ResourceCRUD/list/index.js +19 -0
  64. package/lib/src/components/ResourceCRUD/show/index.js +6 -0
  65. package/lib/src/components/ResourceLink/index.js +21 -0
  66. package/lib/src/components/ResourceUsageBar/index.js +81 -0
  67. package/lib/src/components/Separator/index.js +11 -0
  68. package/lib/src/components/ShowContent/ShowContent.d.ts +0 -2
  69. package/lib/src/components/ShowContent/ShowContent.js +157 -0
  70. package/lib/src/components/ShowContent/fields.js +157 -0
  71. package/lib/src/components/ShowContent/index.js +2 -0
  72. package/lib/src/components/StateTag/StateTag.js +22 -0
  73. package/lib/src/components/StateTag/index.js +1 -0
  74. package/lib/src/components/Table/ErrorContent.js +36 -0
  75. package/lib/src/components/Table/TableToolBar.js +14 -0
  76. package/lib/src/components/Table/TableWidgets.js +28 -0
  77. package/lib/src/components/Table/index.js +69 -0
  78. package/lib/src/components/Tags/index.js +22 -0
  79. package/lib/src/components/Time/index.js +14 -0
  80. package/lib/src/components/WorkloadDropdown/index.js +24 -0
  81. package/lib/src/components/WorkloadPodsTable/WorkloadPodsTable.d.ts +1 -0
  82. package/lib/src/components/WorkloadPodsTable/WorkloadPodsTable.js +39 -0
  83. package/lib/src/components/WorkloadPodsTable/index.js +1 -0
  84. package/lib/src/components/WorkloadReplicas/index.js +50 -0
  85. package/lib/src/components/YamlEditor/MonacoYamlDiffEditor.js +34 -0
  86. package/lib/src/components/YamlEditor/MonacoYamlEditor.js +149 -0
  87. package/lib/src/components/YamlEditor/YamlEditorComponent.js +90 -0
  88. package/lib/src/components/YamlEditor/index.js +1 -0
  89. package/lib/src/components/YamlEditor/style.js +102 -0
  90. package/lib/src/components/YamlEditor/yaml.worker.js +1 -0
  91. package/lib/src/components/YamlForm/index.d.ts +0 -4
  92. package/lib/src/components/YamlForm/index.js +61 -0
  93. package/lib/src/components/index.js +38 -0
  94. package/lib/src/constants/index.js +2 -0
  95. package/lib/src/constants/k8s.js +203 -0
  96. package/lib/src/constants/state.js +15 -0
  97. package/lib/src/contexts/component.js +3 -0
  98. package/lib/src/contexts/configs.js +3 -0
  99. package/lib/src/contexts/global-store.js +3 -0
  100. package/lib/src/contexts/index.js +3 -0
  101. package/lib/src/hooks/index.d.ts +1 -0
  102. package/lib/src/hooks/index.js +7 -0
  103. package/lib/src/hooks/useDeleteModal/index.js +1 -0
  104. package/lib/src/hooks/useDeleteModal/useDeleteManyModal.js +31 -0
  105. package/lib/src/hooks/useDeleteModal/useDeleteModal.js +38 -0
  106. package/lib/src/hooks/useDownloadYAML.js +10 -0
  107. package/lib/src/hooks/useEagleForm.d.ts +1 -2
  108. package/lib/src/hooks/useEagleForm.js +177 -0
  109. package/lib/src/hooks/useEagleTable/columns.js +246 -0
  110. package/lib/src/hooks/useEagleTable/index.js +2 -0
  111. package/lib/src/hooks/useEagleTable/useEagleTable.js +63 -0
  112. package/lib/src/hooks/useEdit.js +19 -0
  113. package/lib/src/hooks/useGlobalStore.js +5 -0
  114. package/lib/src/hooks/useK8sYamlEditor.js +37 -0
  115. package/lib/src/hooks/useNamespaceRefineFilter.d.ts +5 -0
  116. package/lib/src/hooks/useOpenForm.js +43 -0
  117. package/lib/src/hooks/useSchema.js +37 -0
  118. package/lib/src/hooks/useSubmitForm.js +42 -0
  119. package/lib/src/i18n.d.ts +70 -34
  120. package/lib/src/i18n.js +19 -0
  121. package/lib/src/index.js +13 -0
  122. package/lib/src/locales/en-US/dovetail.json +18 -0
  123. package/lib/src/locales/en-US/index.d.ts +68 -34
  124. package/lib/src/locales/en-US/index.js +4 -0
  125. package/lib/src/locales/index.js +6 -0
  126. package/lib/src/locales/zh-CN/dovetail.json +91 -0
  127. package/lib/src/locales/zh-CN/index.d.ts +2 -0
  128. package/lib/src/locales/zh-CN/index.js +4 -0
  129. package/lib/src/main.js +12 -0
  130. package/lib/src/models/cronjob-model.js +32 -0
  131. package/lib/src/models/daemonset-model.js +17 -0
  132. package/lib/src/models/deployment-model.js +17 -0
  133. package/lib/src/models/event-model.js +11 -0
  134. package/lib/src/models/index.js +14 -0
  135. package/lib/src/models/ingress-model.js +24 -0
  136. package/lib/src/models/job-model.js +56 -0
  137. package/lib/src/models/network-policy-model.js +10 -0
  138. package/lib/src/models/pod-metrics-model.js +34 -0
  139. package/lib/src/models/pod-model.js +78 -0
  140. package/lib/src/models/resource-model.js +34 -0
  141. package/lib/src/models/server-instance-model.d.ts +10 -0
  142. package/lib/src/models/service-model.js +17 -0
  143. package/lib/src/models/statefulset-model.js +17 -0
  144. package/lib/src/models/types/index.js +1 -0
  145. package/lib/src/models/types/metric.js +1 -0
  146. package/lib/src/models/workload-base-model.js +22 -0
  147. package/lib/src/models/workload-model.js +51 -0
  148. package/lib/src/pages/configmaps/index.js +15 -0
  149. package/lib/src/pages/cronjobs/create/index.js +6 -0
  150. package/lib/src/pages/cronjobs/index.js +3 -0
  151. package/lib/src/pages/cronjobs/list/index.js +42 -0
  152. package/lib/src/pages/cronjobs/show/index.js +16 -0
  153. package/lib/src/pages/daemonsets/create/index.js +6 -0
  154. package/lib/src/pages/daemonsets/index.js +3 -0
  155. package/lib/src/pages/daemonsets/list/index.js +32 -0
  156. package/lib/src/pages/daemonsets/show/index.js +16 -0
  157. package/lib/src/pages/deployments/create/index.js +7 -0
  158. package/lib/src/pages/deployments/index.js +3 -0
  159. package/lib/src/pages/deployments/list/index.js +26 -0
  160. package/lib/src/pages/deployments/show/index.js +16 -0
  161. package/lib/src/pages/ingresses/index.js +26 -0
  162. package/lib/src/pages/jobs/index.js +34 -0
  163. package/lib/src/pages/networkPolicies/index.js +67 -0
  164. package/lib/src/pages/pods/create/index.js +6 -0
  165. package/lib/src/pages/pods/index.js +3 -0
  166. package/lib/src/pages/pods/list/index.js +81 -0
  167. package/lib/src/pages/pods/show/index.js +54 -0
  168. package/lib/src/pages/secrets/index.js +15 -0
  169. package/lib/src/pages/services/index.js +26 -0
  170. package/lib/src/pages/statefulsets/create/index.js +6 -0
  171. package/lib/src/pages/statefulsets/index.js +3 -0
  172. package/lib/src/pages/statefulsets/list/index.js +26 -0
  173. package/lib/src/pages/statefulsets/show/index.js +16 -0
  174. package/lib/src/plugins/index.js +3 -0
  175. package/lib/src/plugins/model-plugin.js +46 -0
  176. package/lib/src/plugins/relation-plugin.js +81 -0
  177. package/lib/src/plugins/type.js +1 -0
  178. package/lib/src/providers/index.js +1 -0
  179. package/lib/src/providers/router-provider/index.js +100 -0
  180. package/lib/src/types/index.js +1 -0
  181. package/lib/src/types/resource.js +12 -0
  182. package/lib/src/utils/addId.js +8 -0
  183. package/lib/src/utils/download.js +9 -0
  184. package/lib/src/utils/error.js +53 -0
  185. package/lib/src/utils/form.js +9 -0
  186. package/lib/src/utils/k8s.js +6 -0
  187. package/lib/src/utils/labels.js +15 -0
  188. package/lib/src/utils/match-selector.d.ts +1 -1
  189. package/lib/src/utils/match-selector.js +12 -0
  190. package/lib/src/utils/openapi.js +33 -0
  191. package/lib/src/utils/schema.js +117 -0
  192. package/lib/src/utils/selector.js +12 -0
  193. package/lib/src/utils/string.js +6 -0
  194. package/lib/src/utils/time.js +46 -0
  195. package/lib/src/utils/unit.js +69 -0
  196. package/lib/src/utils/yaml.js +44 -0
  197. package/lib/vite.config.js +60 -0
  198. package/package.json +2 -2
  199. package/lib/src/components/ModalContextProvider/index.d.ts +0 -12
  200. package/lib/src/hooks/useModal.d.ts +0 -0
  201. package/lib/src/hooks/useNamespaceFilter.d.ts +0 -5
  202. package/lib/src/model/cronjob-model.d.ts +0 -9
  203. package/lib/src/model/index.d.ts +0 -6
  204. package/lib/src/model/job-model.d.ts +0 -10
  205. package/lib/src/model/pod-metrics-model.d.ts +0 -7
  206. package/lib/src/model/pod-model.d.ts +0 -15
  207. package/lib/src/model/resource-model.d.ts +0 -17
  208. package/lib/src/model/workload-model.d.ts +0 -17
  209. package/lib/src/types/metric.d.ts +0 -25
@@ -31,308 +31,301 @@ var __publicField = (obj, key, value) => {
31
31
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
32
32
  }
33
33
  var dayjs_min = { exports: {} };
34
- var hasRequiredDayjs_min;
35
- function requireDayjs_min() {
36
- if (hasRequiredDayjs_min)
37
- return dayjs_min.exports;
38
- hasRequiredDayjs_min = 1;
39
- (function(module2, exports3) {
40
- !function(t2, e2) {
41
- module2.exports = e2();
42
- }(commonjsGlobal, function() {
43
- var t2 = 1e3, e2 = 6e4, n2 = 36e5, r2 = "millisecond", i2 = "second", s2 = "minute", u = "hour", a2 = "day", o = "week", c2 = "month", f = "quarter", h = "year", d = "date", l = "Invalid Date", $ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(t3) {
44
- var e3 = ["th", "st", "nd", "rd"], n3 = t3 % 100;
45
- return "[" + t3 + (e3[(n3 - 20) % 10] || e3[n3] || e3[0]) + "]";
46
- } }, m = function(t3, e3, n3) {
47
- var r3 = String(t3);
48
- return !r3 || r3.length >= e3 ? t3 : "" + Array(e3 + 1 - r3.length).join(n3) + t3;
49
- }, v = { s: m, z: function(t3) {
50
- var e3 = -t3.utcOffset(), n3 = Math.abs(e3), r3 = Math.floor(n3 / 60), i3 = n3 % 60;
51
- return (e3 <= 0 ? "+" : "-") + m(r3, 2, "0") + ":" + m(i3, 2, "0");
52
- }, m: function t3(e3, n3) {
53
- if (e3.date() < n3.date())
54
- return -t3(n3, e3);
55
- var r3 = 12 * (n3.year() - e3.year()) + (n3.month() - e3.month()), i3 = e3.clone().add(r3, c2), s3 = n3 - i3 < 0, u2 = e3.clone().add(r3 + (s3 ? -1 : 1), c2);
56
- return +(-(r3 + (n3 - i3) / (s3 ? i3 - u2 : u2 - i3)) || 0);
57
- }, a: function(t3) {
58
- return t3 < 0 ? Math.ceil(t3) || 0 : Math.floor(t3);
59
- }, p: function(t3) {
60
- return { M: c2, y: h, w: o, d: a2, D: d, h: u, m: s2, s: i2, ms: r2, Q: f }[t3] || String(t3 || "").toLowerCase().replace(/s$/, "");
61
- }, u: function(t3) {
62
- return void 0 === t3;
63
- } }, g = "en", D = {};
64
- D[g] = M;
65
- var p = "$isDayjsObject", S = function(t3) {
66
- return t3 instanceof _ || !(!t3 || !t3[p]);
67
- }, w = function t3(e3, n3, r3) {
68
- var i3;
69
- if (!e3)
70
- return g;
71
- if ("string" == typeof e3) {
72
- var s3 = e3.toLowerCase();
73
- D[s3] && (i3 = s3), n3 && (D[s3] = n3, i3 = s3);
74
- var u2 = e3.split("-");
75
- if (!i3 && u2.length > 1)
76
- return t3(u2[0]);
77
- } else {
78
- var a3 = e3.name;
79
- D[a3] = e3, i3 = a3;
80
- }
81
- return !r3 && i3 && (g = i3), i3 || !r3 && g;
82
- }, O = function(t3, e3) {
83
- if (S(t3))
84
- return t3.clone();
85
- var n3 = "object" == typeof e3 ? e3 : {};
86
- return n3.date = t3, n3.args = arguments, new _(n3);
87
- }, b = v;
88
- b.l = w, b.i = S, b.w = function(t3, e3) {
89
- return O(t3, { locale: e3.$L, utc: e3.$u, x: e3.$x, $offset: e3.$offset });
90
- };
91
- var _ = function() {
92
- function M2(t3) {
93
- this.$L = w(t3.locale, null, true), this.parse(t3), this.$x = this.$x || t3.x || {}, this[p] = true;
94
- }
95
- var m2 = M2.prototype;
96
- return m2.parse = function(t3) {
97
- this.$d = function(t4) {
98
- var e3 = t4.date, n3 = t4.utc;
99
- if (null === e3)
100
- return /* @__PURE__ */ new Date(NaN);
101
- if (b.u(e3))
102
- return /* @__PURE__ */ new Date();
103
- if (e3 instanceof Date)
104
- return new Date(e3);
105
- if ("string" == typeof e3 && !/Z$/i.test(e3)) {
106
- var r3 = e3.match($);
107
- if (r3) {
108
- var i3 = r3[2] - 1 || 0, s3 = (r3[7] || "0").substring(0, 3);
109
- return n3 ? new Date(Date.UTC(r3[1], i3, r3[3] || 1, r3[4] || 0, r3[5] || 0, r3[6] || 0, s3)) : new Date(r3[1], i3, r3[3] || 1, r3[4] || 0, r3[5] || 0, r3[6] || 0, s3);
110
- }
111
- }
34
+ (function(module2, exports3) {
35
+ !function(t2, e2) {
36
+ module2.exports = e2();
37
+ }(commonjsGlobal, function() {
38
+ 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) {
39
+ var e3 = ["th", "st", "nd", "rd"], n3 = t3 % 100;
40
+ return "[" + t3 + (e3[(n3 - 20) % 10] || e3[n3] || e3[0]) + "]";
41
+ } }, m = function(t3, e3, n3) {
42
+ var r3 = String(t3);
43
+ return !r3 || r3.length >= e3 ? t3 : "" + Array(e3 + 1 - r3.length).join(n3) + t3;
44
+ }, v = { s: m, z: function(t3) {
45
+ var e3 = -t3.utcOffset(), n3 = Math.abs(e3), r3 = Math.floor(n3 / 60), i3 = n3 % 60;
46
+ return (e3 <= 0 ? "+" : "-") + m(r3, 2, "0") + ":" + m(i3, 2, "0");
47
+ }, m: function t3(e3, n3) {
48
+ if (e3.date() < n3.date())
49
+ return -t3(n3, e3);
50
+ 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);
51
+ return +(-(r3 + (n3 - i3) / (s3 ? i3 - u2 : u2 - i3)) || 0);
52
+ }, a: function(t3) {
53
+ return t3 < 0 ? Math.ceil(t3) || 0 : Math.floor(t3);
54
+ }, p: function(t3) {
55
+ 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$/, "");
56
+ }, u: function(t3) {
57
+ return void 0 === t3;
58
+ } }, g = "en", D = {};
59
+ D[g] = M;
60
+ var p = "$isDayjsObject", S = function(t3) {
61
+ return t3 instanceof _ || !(!t3 || !t3[p]);
62
+ }, w = function t3(e3, n3, r3) {
63
+ var i3;
64
+ if (!e3)
65
+ return g;
66
+ if ("string" == typeof e3) {
67
+ var s3 = e3.toLowerCase();
68
+ D[s3] && (i3 = s3), n3 && (D[s3] = n3, i3 = s3);
69
+ var u2 = e3.split("-");
70
+ if (!i3 && u2.length > 1)
71
+ return t3(u2[0]);
72
+ } else {
73
+ var a3 = e3.name;
74
+ D[a3] = e3, i3 = a3;
75
+ }
76
+ return !r3 && i3 && (g = i3), i3 || !r3 && g;
77
+ }, O = function(t3, e3) {
78
+ if (S(t3))
79
+ return t3.clone();
80
+ var n3 = "object" == typeof e3 ? e3 : {};
81
+ return n3.date = t3, n3.args = arguments, new _(n3);
82
+ }, b = v;
83
+ b.l = w, b.i = S, b.w = function(t3, e3) {
84
+ return O(t3, { locale: e3.$L, utc: e3.$u, x: e3.$x, $offset: e3.$offset });
85
+ };
86
+ var _ = function() {
87
+ function M2(t3) {
88
+ this.$L = w(t3.locale, null, true), this.parse(t3), this.$x = this.$x || t3.x || {}, this[p] = true;
89
+ }
90
+ var m2 = M2.prototype;
91
+ return m2.parse = function(t3) {
92
+ this.$d = function(t4) {
93
+ var e3 = t4.date, n3 = t4.utc;
94
+ if (null === e3)
95
+ return /* @__PURE__ */ new Date(NaN);
96
+ if (b.u(e3))
97
+ return /* @__PURE__ */ new Date();
98
+ if (e3 instanceof Date)
112
99
  return new Date(e3);
113
- }(t3), this.init();
114
- }, m2.init = function() {
115
- var t3 = this.$d;
116
- this.$y = t3.getFullYear(), this.$M = t3.getMonth(), this.$D = t3.getDate(), this.$W = t3.getDay(), this.$H = t3.getHours(), this.$m = t3.getMinutes(), this.$s = t3.getSeconds(), this.$ms = t3.getMilliseconds();
117
- }, m2.$utils = function() {
118
- return b;
119
- }, m2.isValid = function() {
120
- return !(this.$d.toString() === l);
121
- }, m2.isSame = function(t3, e3) {
122
- var n3 = O(t3);
123
- return this.startOf(e3) <= n3 && n3 <= this.endOf(e3);
124
- }, m2.isAfter = function(t3, e3) {
125
- return O(t3) < this.startOf(e3);
126
- }, m2.isBefore = function(t3, e3) {
127
- return this.endOf(e3) < O(t3);
128
- }, m2.$g = function(t3, e3, n3) {
129
- return b.u(t3) ? this[e3] : this.set(n3, t3);
130
- }, m2.unix = function() {
131
- return Math.floor(this.valueOf() / 1e3);
132
- }, m2.valueOf = function() {
133
- return this.$d.getTime();
134
- }, m2.startOf = function(t3, e3) {
135
- var n3 = this, r3 = !!b.u(e3) || e3, f2 = b.p(t3), l2 = function(t4, e4) {
136
- var i3 = b.w(n3.$u ? Date.UTC(n3.$y, e4, t4) : new Date(n3.$y, e4, t4), n3);
137
- return r3 ? i3 : i3.endOf(a2);
138
- }, $2 = function(t4, e4) {
139
- return b.w(n3.toDate()[t4].apply(n3.toDate("s"), (r3 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e4)), n3);
140
- }, y2 = this.$W, M3 = this.$M, m3 = this.$D, v2 = "set" + (this.$u ? "UTC" : "");
141
- switch (f2) {
142
- case h:
143
- return r3 ? l2(1, 0) : l2(31, 11);
144
- case c2:
145
- return r3 ? l2(1, M3) : l2(0, M3 + 1);
146
- case o:
147
- var g2 = this.$locale().weekStart || 0, D2 = (y2 < g2 ? y2 + 7 : y2) - g2;
148
- return l2(r3 ? m3 - D2 : m3 + (6 - D2), M3);
149
- case a2:
150
- case d:
151
- return $2(v2 + "Hours", 0);
152
- case u:
153
- return $2(v2 + "Minutes", 1);
154
- case s2:
155
- return $2(v2 + "Seconds", 2);
156
- case i2:
157
- return $2(v2 + "Milliseconds", 3);
158
- default:
159
- return this.clone();
160
- }
161
- }, m2.endOf = function(t3) {
162
- return this.startOf(t3, false);
163
- }, m2.$set = function(t3, e3) {
164
- var n3, o2 = b.p(t3), f2 = "set" + (this.$u ? "UTC" : ""), l2 = (n3 = {}, n3[a2] = f2 + "Date", n3[d] = f2 + "Date", n3[c2] = f2 + "Month", n3[h] = f2 + "FullYear", n3[u] = f2 + "Hours", n3[s2] = f2 + "Minutes", n3[i2] = f2 + "Seconds", n3[r2] = f2 + "Milliseconds", n3)[o2], $2 = o2 === a2 ? this.$D + (e3 - this.$W) : e3;
165
- if (o2 === c2 || o2 === h) {
166
- var y2 = this.clone().set(d, 1);
167
- y2.$d[l2]($2), y2.init(), this.$d = y2.set(d, Math.min(this.$D, y2.daysInMonth())).$d;
168
- } else
169
- l2 && this.$d[l2]($2);
170
- return this.init(), this;
171
- }, m2.set = function(t3, e3) {
172
- return this.clone().$set(t3, e3);
173
- }, m2.get = function(t3) {
174
- return this[b.p(t3)]();
175
- }, m2.add = function(r3, f2) {
176
- var d2, l2 = this;
177
- r3 = Number(r3);
178
- var $2 = b.p(f2), y2 = function(t3) {
179
- var e3 = O(l2);
180
- return b.w(e3.date(e3.date() + Math.round(t3 * r3)), l2);
181
- };
182
- if ($2 === c2)
183
- return this.set(c2, this.$M + r3);
184
- if ($2 === h)
185
- return this.set(h, this.$y + r3);
186
- if ($2 === a2)
187
- return y2(1);
188
- if ($2 === o)
189
- return y2(7);
190
- var M3 = (d2 = {}, d2[s2] = e2, d2[u] = n2, d2[i2] = t2, d2)[$2] || 1, m3 = this.$d.getTime() + r3 * M3;
191
- return b.w(m3, this);
192
- }, m2.subtract = function(t3, e3) {
193
- return this.add(-1 * t3, e3);
194
- }, m2.format = function(t3) {
195
- var e3 = this, n3 = this.$locale();
196
- if (!this.isValid())
197
- return n3.invalidDate || l;
198
- var r3 = t3 || "YYYY-MM-DDTHH:mm:ssZ", i3 = b.z(this), s3 = this.$H, u2 = this.$m, a3 = this.$M, o2 = n3.weekdays, c3 = n3.months, f2 = n3.meridiem, h2 = function(t4, n4, i4, s4) {
199
- return t4 && (t4[n4] || t4(e3, r3)) || i4[n4].slice(0, s4);
200
- }, d2 = function(t4) {
201
- return b.s(s3 % 12 || 12, t4, "0");
202
- }, $2 = f2 || function(t4, e4, n4) {
203
- var r4 = t4 < 12 ? "AM" : "PM";
204
- return n4 ? r4.toLowerCase() : r4;
205
- };
206
- return r3.replace(y, function(t4, r4) {
207
- return r4 || function(t5) {
208
- switch (t5) {
209
- case "YY":
210
- return String(e3.$y).slice(-2);
211
- case "YYYY":
212
- return b.s(e3.$y, 4, "0");
213
- case "M":
214
- return a3 + 1;
215
- case "MM":
216
- return b.s(a3 + 1, 2, "0");
217
- case "MMM":
218
- return h2(n3.monthsShort, a3, c3, 3);
219
- case "MMMM":
220
- return h2(c3, a3);
221
- case "D":
222
- return e3.$D;
223
- case "DD":
224
- return b.s(e3.$D, 2, "0");
225
- case "d":
226
- return String(e3.$W);
227
- case "dd":
228
- return h2(n3.weekdaysMin, e3.$W, o2, 2);
229
- case "ddd":
230
- return h2(n3.weekdaysShort, e3.$W, o2, 3);
231
- case "dddd":
232
- return o2[e3.$W];
233
- case "H":
234
- return String(s3);
235
- case "HH":
236
- return b.s(s3, 2, "0");
237
- case "h":
238
- return d2(1);
239
- case "hh":
240
- return d2(2);
241
- case "a":
242
- return $2(s3, u2, true);
243
- case "A":
244
- return $2(s3, u2, false);
245
- case "m":
246
- return String(u2);
247
- case "mm":
248
- return b.s(u2, 2, "0");
249
- case "s":
250
- return String(e3.$s);
251
- case "ss":
252
- return b.s(e3.$s, 2, "0");
253
- case "SSS":
254
- return b.s(e3.$ms, 3, "0");
255
- case "Z":
256
- return i3;
257
- }
258
- return null;
259
- }(t4) || i3.replace(":", "");
260
- });
261
- }, m2.utcOffset = function() {
262
- return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
263
- }, m2.diff = function(r3, d2, l2) {
264
- var $2, y2 = this, M3 = b.p(d2), m3 = O(r3), v2 = (m3.utcOffset() - this.utcOffset()) * e2, g2 = this - m3, D2 = function() {
265
- return b.m(y2, m3);
266
- };
267
- switch (M3) {
268
- case h:
269
- $2 = D2() / 12;
270
- break;
271
- case c2:
272
- $2 = D2();
273
- break;
274
- case f:
275
- $2 = D2() / 3;
276
- break;
277
- case o:
278
- $2 = (g2 - v2) / 6048e5;
279
- break;
280
- case a2:
281
- $2 = (g2 - v2) / 864e5;
282
- break;
283
- case u:
284
- $2 = g2 / n2;
285
- break;
286
- case s2:
287
- $2 = g2 / e2;
288
- break;
289
- case i2:
290
- $2 = g2 / t2;
291
- break;
292
- default:
293
- $2 = g2;
294
- }
295
- return l2 ? $2 : b.a($2);
296
- }, m2.daysInMonth = function() {
297
- return this.endOf(c2).$D;
298
- }, m2.$locale = function() {
299
- return D[this.$L];
300
- }, m2.locale = function(t3, e3) {
301
- if (!t3)
302
- return this.$L;
303
- var n3 = this.clone(), r3 = w(t3, e3, true);
304
- return r3 && (n3.$L = r3), n3;
305
- }, m2.clone = function() {
306
- return b.w(this.$d, this);
307
- }, m2.toDate = function() {
308
- return new Date(this.valueOf());
309
- }, m2.toJSON = function() {
310
- return this.isValid() ? this.toISOString() : null;
311
- }, m2.toISOString = function() {
312
- return this.$d.toISOString();
313
- }, m2.toString = function() {
314
- return this.$d.toUTCString();
315
- }, M2;
316
- }(), k = _.prototype;
317
- return O.prototype = k, [["$ms", r2], ["$s", i2], ["$m", s2], ["$H", u], ["$W", a2], ["$M", c2], ["$y", h], ["$D", d]].forEach(function(t3) {
318
- k[t3[1]] = function(e3) {
319
- return this.$g(e3, t3[0], t3[1]);
100
+ if ("string" == typeof e3 && !/Z$/i.test(e3)) {
101
+ var r3 = e3.match($);
102
+ if (r3) {
103
+ var i3 = r3[2] - 1 || 0, s3 = (r3[7] || "0").substring(0, 3);
104
+ 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);
105
+ }
106
+ }
107
+ return new Date(e3);
108
+ }(t3), this.init();
109
+ }, m2.init = function() {
110
+ var t3 = this.$d;
111
+ this.$y = t3.getFullYear(), this.$M = t3.getMonth(), this.$D = t3.getDate(), this.$W = t3.getDay(), this.$H = t3.getHours(), this.$m = t3.getMinutes(), this.$s = t3.getSeconds(), this.$ms = t3.getMilliseconds();
112
+ }, m2.$utils = function() {
113
+ return b;
114
+ }, m2.isValid = function() {
115
+ return !(this.$d.toString() === l);
116
+ }, m2.isSame = function(t3, e3) {
117
+ var n3 = O(t3);
118
+ return this.startOf(e3) <= n3 && n3 <= this.endOf(e3);
119
+ }, m2.isAfter = function(t3, e3) {
120
+ return O(t3) < this.startOf(e3);
121
+ }, m2.isBefore = function(t3, e3) {
122
+ return this.endOf(e3) < O(t3);
123
+ }, m2.$g = function(t3, e3, n3) {
124
+ return b.u(t3) ? this[e3] : this.set(n3, t3);
125
+ }, m2.unix = function() {
126
+ return Math.floor(this.valueOf() / 1e3);
127
+ }, m2.valueOf = function() {
128
+ return this.$d.getTime();
129
+ }, m2.startOf = function(t3, e3) {
130
+ var n3 = this, r3 = !!b.u(e3) || e3, f2 = b.p(t3), l2 = function(t4, e4) {
131
+ var i3 = b.w(n3.$u ? Date.UTC(n3.$y, e4, t4) : new Date(n3.$y, e4, t4), n3);
132
+ return r3 ? i3 : i3.endOf(a2);
133
+ }, $2 = function(t4, e4) {
134
+ return b.w(n3.toDate()[t4].apply(n3.toDate("s"), (r3 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e4)), n3);
135
+ }, y2 = this.$W, M3 = this.$M, m3 = this.$D, v2 = "set" + (this.$u ? "UTC" : "");
136
+ switch (f2) {
137
+ case h:
138
+ return r3 ? l2(1, 0) : l2(31, 11);
139
+ case c2:
140
+ return r3 ? l2(1, M3) : l2(0, M3 + 1);
141
+ case o:
142
+ var g2 = this.$locale().weekStart || 0, D2 = (y2 < g2 ? y2 + 7 : y2) - g2;
143
+ return l2(r3 ? m3 - D2 : m3 + (6 - D2), M3);
144
+ case a2:
145
+ case d:
146
+ return $2(v2 + "Hours", 0);
147
+ case u:
148
+ return $2(v2 + "Minutes", 1);
149
+ case s2:
150
+ return $2(v2 + "Seconds", 2);
151
+ case i2:
152
+ return $2(v2 + "Milliseconds", 3);
153
+ default:
154
+ return this.clone();
155
+ }
156
+ }, m2.endOf = function(t3) {
157
+ return this.startOf(t3, false);
158
+ }, m2.$set = function(t3, e3) {
159
+ var n3, o2 = b.p(t3), f2 = "set" + (this.$u ? "UTC" : ""), l2 = (n3 = {}, n3[a2] = f2 + "Date", n3[d] = f2 + "Date", n3[c2] = f2 + "Month", n3[h] = f2 + "FullYear", n3[u] = f2 + "Hours", n3[s2] = f2 + "Minutes", n3[i2] = f2 + "Seconds", n3[r2] = f2 + "Milliseconds", n3)[o2], $2 = o2 === a2 ? this.$D + (e3 - this.$W) : e3;
160
+ if (o2 === c2 || o2 === h) {
161
+ var y2 = this.clone().set(d, 1);
162
+ y2.$d[l2]($2), y2.init(), this.$d = y2.set(d, Math.min(this.$D, y2.daysInMonth())).$d;
163
+ } else
164
+ l2 && this.$d[l2]($2);
165
+ return this.init(), this;
166
+ }, m2.set = function(t3, e3) {
167
+ return this.clone().$set(t3, e3);
168
+ }, m2.get = function(t3) {
169
+ return this[b.p(t3)]();
170
+ }, m2.add = function(r3, f2) {
171
+ var d2, l2 = this;
172
+ r3 = Number(r3);
173
+ var $2 = b.p(f2), y2 = function(t3) {
174
+ var e3 = O(l2);
175
+ return b.w(e3.date(e3.date() + Math.round(t3 * r3)), l2);
320
176
  };
321
- }), O.extend = function(t3, e3) {
322
- return t3.$i || (t3(e3, _, O), t3.$i = true), O;
323
- }, O.locale = w, O.isDayjs = S, O.unix = function(t3) {
324
- return O(1e3 * t3);
325
- }, O.en = D[g], O.Ls = D, O.p = {}, O;
326
- });
327
- })(dayjs_min);
328
- return dayjs_min.exports;
329
- }
330
- var dayjs_minExports = requireDayjs_min();
177
+ if ($2 === c2)
178
+ return this.set(c2, this.$M + r3);
179
+ if ($2 === h)
180
+ return this.set(h, this.$y + r3);
181
+ if ($2 === a2)
182
+ return y2(1);
183
+ if ($2 === o)
184
+ return y2(7);
185
+ var M3 = (d2 = {}, d2[s2] = e2, d2[u] = n2, d2[i2] = t2, d2)[$2] || 1, m3 = this.$d.getTime() + r3 * M3;
186
+ return b.w(m3, this);
187
+ }, m2.subtract = function(t3, e3) {
188
+ return this.add(-1 * t3, e3);
189
+ }, m2.format = function(t3) {
190
+ var e3 = this, n3 = this.$locale();
191
+ if (!this.isValid())
192
+ return n3.invalidDate || l;
193
+ var r3 = t3 || "YYYY-MM-DDTHH:mm:ssZ", i3 = b.z(this), s3 = this.$H, u2 = this.$m, a3 = this.$M, o2 = n3.weekdays, c3 = n3.months, f2 = n3.meridiem, h2 = function(t4, n4, i4, s4) {
194
+ return t4 && (t4[n4] || t4(e3, r3)) || i4[n4].slice(0, s4);
195
+ }, d2 = function(t4) {
196
+ return b.s(s3 % 12 || 12, t4, "0");
197
+ }, $2 = f2 || function(t4, e4, n4) {
198
+ var r4 = t4 < 12 ? "AM" : "PM";
199
+ return n4 ? r4.toLowerCase() : r4;
200
+ };
201
+ return r3.replace(y, function(t4, r4) {
202
+ return r4 || function(t5) {
203
+ switch (t5) {
204
+ case "YY":
205
+ return String(e3.$y).slice(-2);
206
+ case "YYYY":
207
+ return b.s(e3.$y, 4, "0");
208
+ case "M":
209
+ return a3 + 1;
210
+ case "MM":
211
+ return b.s(a3 + 1, 2, "0");
212
+ case "MMM":
213
+ return h2(n3.monthsShort, a3, c3, 3);
214
+ case "MMMM":
215
+ return h2(c3, a3);
216
+ case "D":
217
+ return e3.$D;
218
+ case "DD":
219
+ return b.s(e3.$D, 2, "0");
220
+ case "d":
221
+ return String(e3.$W);
222
+ case "dd":
223
+ return h2(n3.weekdaysMin, e3.$W, o2, 2);
224
+ case "ddd":
225
+ return h2(n3.weekdaysShort, e3.$W, o2, 3);
226
+ case "dddd":
227
+ return o2[e3.$W];
228
+ case "H":
229
+ return String(s3);
230
+ case "HH":
231
+ return b.s(s3, 2, "0");
232
+ case "h":
233
+ return d2(1);
234
+ case "hh":
235
+ return d2(2);
236
+ case "a":
237
+ return $2(s3, u2, true);
238
+ case "A":
239
+ return $2(s3, u2, false);
240
+ case "m":
241
+ return String(u2);
242
+ case "mm":
243
+ return b.s(u2, 2, "0");
244
+ case "s":
245
+ return String(e3.$s);
246
+ case "ss":
247
+ return b.s(e3.$s, 2, "0");
248
+ case "SSS":
249
+ return b.s(e3.$ms, 3, "0");
250
+ case "Z":
251
+ return i3;
252
+ }
253
+ return null;
254
+ }(t4) || i3.replace(":", "");
255
+ });
256
+ }, m2.utcOffset = function() {
257
+ return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
258
+ }, m2.diff = function(r3, d2, l2) {
259
+ var $2, y2 = this, M3 = b.p(d2), m3 = O(r3), v2 = (m3.utcOffset() - this.utcOffset()) * e2, g2 = this - m3, D2 = function() {
260
+ return b.m(y2, m3);
261
+ };
262
+ switch (M3) {
263
+ case h:
264
+ $2 = D2() / 12;
265
+ break;
266
+ case c2:
267
+ $2 = D2();
268
+ break;
269
+ case f:
270
+ $2 = D2() / 3;
271
+ break;
272
+ case o:
273
+ $2 = (g2 - v2) / 6048e5;
274
+ break;
275
+ case a2:
276
+ $2 = (g2 - v2) / 864e5;
277
+ break;
278
+ case u:
279
+ $2 = g2 / n2;
280
+ break;
281
+ case s2:
282
+ $2 = g2 / e2;
283
+ break;
284
+ case i2:
285
+ $2 = g2 / t2;
286
+ break;
287
+ default:
288
+ $2 = g2;
289
+ }
290
+ return l2 ? $2 : b.a($2);
291
+ }, m2.daysInMonth = function() {
292
+ return this.endOf(c2).$D;
293
+ }, m2.$locale = function() {
294
+ return D[this.$L];
295
+ }, m2.locale = function(t3, e3) {
296
+ if (!t3)
297
+ return this.$L;
298
+ var n3 = this.clone(), r3 = w(t3, e3, true);
299
+ return r3 && (n3.$L = r3), n3;
300
+ }, m2.clone = function() {
301
+ return b.w(this.$d, this);
302
+ }, m2.toDate = function() {
303
+ return new Date(this.valueOf());
304
+ }, m2.toJSON = function() {
305
+ return this.isValid() ? this.toISOString() : null;
306
+ }, m2.toISOString = function() {
307
+ return this.$d.toISOString();
308
+ }, m2.toString = function() {
309
+ return this.$d.toUTCString();
310
+ }, M2;
311
+ }(), k = _.prototype;
312
+ return O.prototype = k, [["$ms", r2], ["$s", i2], ["$m", s2], ["$H", u], ["$W", a2], ["$M", c2], ["$y", h], ["$D", d]].forEach(function(t3) {
313
+ k[t3[1]] = function(e3) {
314
+ return this.$g(e3, t3[0], t3[1]);
315
+ };
316
+ }), O.extend = function(t3, e3) {
317
+ return t3.$i || (t3(e3, _, O), t3.$i = true), O;
318
+ }, O.locale = w, O.isDayjs = S, O.unix = function(t3) {
319
+ return O(1e3 * t3);
320
+ }, O.en = D[g], O.Ls = D, O.p = {}, O;
321
+ });
322
+ })(dayjs_min);
323
+ var dayjs_minExports = dayjs_min.exports;
331
324
  const dayjs = /* @__PURE__ */ getDefaultExportFromCjs(dayjs_minExports);
332
325
  var zh = { exports: {} };
333
326
  (function(module2, exports3) {
334
327
  !function(e2, _) {
335
- module2.exports = _(requireDayjs_min());
328
+ module2.exports = _(dayjs_minExports);
336
329
  }(commonjsGlobal, function(e2) {
337
330
  function _(e3) {
338
331
  return e3 && "object" == typeof e3 && "default" in e3 ? e3 : { default: e3 };
@@ -1029,15 +1022,14 @@ var __publicField = (obj, key, value) => {
1029
1022
  const retry$1 = "Retry";
1030
1023
  const create_resource$1 = "Create {{resource}}";
1031
1024
  const edit_resource$1 = "Edit {{resource}}";
1032
- const state$1 = "State";
1025
+ const state$1 = "Status";
1033
1026
  const name$1 = "Name";
1034
1027
  const pod$1 = "Pod";
1035
1028
  const cancel$1 = "Cancel";
1036
1029
  const create$1 = "Create";
1037
- const confirm_delete_text$1 = "确定要删除 {{target}} 吗?";
1038
- const edit$1 = "edit";
1030
+ const confirm_delete_text$1 = "Are you sure you want to delete the {{kind}} <0>{{target}}</0>?";
1031
+ const edit$1 = "Edit";
1039
1032
  const namespace$1 = "Namespace";
1040
- const image$1 = "Image";
1041
1033
  const created_time$1 = "Creation time";
1042
1034
  const label$1 = "Label";
1043
1035
  const annotation$1 = "Annotation";
@@ -1049,32 +1041,20 @@ var __publicField = (obj, key, value) => {
1049
1041
  const condition$1 = "Condition";
1050
1042
  const download_yaml$1 = "Download YAML";
1051
1043
  const detail$1 = "Detail";
1052
- const restarts$1 = "Restart Count";
1053
- const updated_time$1 = "Transition Time";
1054
1044
  const message$1 = "Message";
1055
1045
  const save$1 = "Save";
1056
- const more = "更多";
1057
1046
  const workload$1 = "Workload";
1058
- const all_namespaces$1 = "所有名字空间";
1059
1047
  const empty$1 = "No data available";
1060
1048
  const schedule$1 = "Schedule";
1061
1049
  const lastScheduleTime$1 = "Last Schedule";
1062
1050
  const duration$1 = "Duration";
1063
- const started$1 = "开始时间";
1064
- const init_container$1 = "Init Container";
1065
- const regular_container$1 = "Regular Container";
1051
+ const started$1 = "Start time";
1066
1052
  const container$1 = "Container";
1067
1053
  const redeploy$1 = "Redeploy";
1068
1054
  const data$1 = "Data";
1069
- const suspend$1 = "Suspended";
1070
1055
  const resume$1 = "Resume";
1071
- const clusterIp$1 = "集群 IP";
1072
1056
  const sessionAffinity$1 = "会话保持";
1073
1057
  const log$1 = "Log";
1074
- const select_container$1 = "选择容器";
1075
- const wrap = "折叠";
1076
- const resume_log = "继续";
1077
- const log_new_lines = ",并展示 {{ count }} 行新日志";
1078
1058
  const ready$1 = "Ready";
1079
1059
  const updating$1 = "Updating";
1080
1060
  const completed$1 = "Completed";
@@ -1087,38 +1067,17 @@ var __publicField = (obj, key, value) => {
1087
1067
  const unknown$1 = "Unknown";
1088
1068
  const pending$1 = "Pending";
1089
1069
  const waiting$1 = "Waiting";
1090
- const sec$1 = "秒";
1091
- const min$1 = "分";
1092
- const hr$1 = "小时";
1093
- const day$1 = "天";
1094
1070
  const expand$1 = "Expand";
1095
1071
  const fold$1 = "Collapse";
1096
1072
  const rule$1 = "Rule";
1097
- const default_backend$1 = "Default Backend";
1098
- const ingress_class$1 = "Ingress Class";
1099
1073
  const port$1 = "Port";
1100
- const pod_ready_num$1 = "Ready Pod";
1101
- const pod_replicas_num$1 = "Desired Pod";
1102
- const edit_replicas$1 = "编辑副本数";
1103
1074
  const cert$1 = "Certificate";
1104
- const dns_record$1 = "DNS Record";
1105
- const port_mapping$1 = "端口映射";
1106
- const out_cluster_access$1 = "集群外访问方式";
1107
- const in_cluster_access$1 = "集群内访问方式";
1108
- const fail_get_detail$1 = "{{resource}} {{name}} 已不存在";
1109
- const basic_info$1 = "Basic Information";
1110
- const pod_selector$1 = "Pod Selector";
1111
- const ingress_rule$1 = "Ingress Rule";
1112
- const egress_rule$1 = "Egress Rule";
1113
- const ip_address$1 = "IP Address";
1075
+ const ip_address$1 = "IP address";
1114
1076
  const last_seen$1 = "Last Seen";
1115
- const service_port$1 = "Service Port";
1116
- const pod_port$1 = "Pod Port";
1117
1077
  const node_port$1 = "NodePort";
1118
1078
  const protocol$1 = "Protocol";
1119
1079
  const key$1 = "Key";
1120
1080
  const value$1 = "Value";
1121
- const path_type$1 = "Path Type";
1122
1081
  const path$1 = "Path";
1123
1082
  const backend$1 = "Backend";
1124
1083
  const belong_to_node$1 = "Node";
@@ -1130,6 +1089,74 @@ var __publicField = (obj, key, value) => {
1130
1089
  const username$1 = "Username";
1131
1090
  const host$1 = "Host";
1132
1091
  const no_resource$1 = "No {{kind}}";
1092
+ const all_namespaces$1 = "All namespaces";
1093
+ const clusterIp$1 = "Cluster IP";
1094
+ const select_container$1 = "Select container";
1095
+ const sec$1 = "sec";
1096
+ const min$1 = "min";
1097
+ const hr$1 = "hr";
1098
+ const day$1 = "d";
1099
+ const port_mapping$1 = "Port mapping";
1100
+ const out_cluster_access$1 = "Access outside cluster";
1101
+ const in_cluster_access$1 = "Access within cluster";
1102
+ const fail_get_detail$1 = "{{resource}} {{name}} no longer exists";
1103
+ const pod_num$1 = "Pods";
1104
+ const show_data_value$1 = "Show";
1105
+ const hide_data_value$1 = "Hide";
1106
+ const please_input$1 = "Please enter…";
1107
+ const create_failed$1 = "Creation failed.";
1108
+ const create_failed_tip$1 = "Please address the following issues and try again: ";
1109
+ const save_failed$1 = "Failed to save.";
1110
+ const save_failed_tip$1 = "Please address the following issues and try again: ";
1111
+ const completion_num_tooltip$1 = "Completed/Expected";
1112
+ const ready_num_tooltip$1 = "Ready/Expected";
1113
+ const realtime_log$1 = "Real-time logs";
1114
+ const previous_log$1 = "Last startup logs";
1115
+ const auto_wrap$1 = "Auto wrap";
1116
+ const container_num$1 = "Containers";
1117
+ const edit_resource_success$1 = "{{resource}} {{name}} was edited successfully";
1118
+ const redeploy_success_toast$1 = "{{kind}} was redeployed successfully";
1119
+ const redeploy_failed_toast$1 = "Failed to redeploy {{kind}} {{name}}";
1120
+ const pause_success_toast$1 = "Successfully suspended";
1121
+ const pause_failed_toast$1 = "Failed to suspend";
1122
+ const resume_success_toast$1 = "Successfully resumed";
1123
+ const resume_failed_toast$1 = "Failed to resume";
1124
+ const delete_success_toast$1 = "{{kind}} {{name}} was deleted successfully";
1125
+ const delete_failed_toast$1 = "Failed to delete {{kind}} {{name}}";
1126
+ const create_success_toast$1 = "{{kind}} {{name}} was created successfully";
1127
+ const save_yaml_success_toast$1 = "YAML editing was successfully saved";
1128
+ const save_replicas_success_toast$1 = "The expected number of replicas was edited successfully";
1129
+ const save_replicas_failed_toast$1 = "Failed to edit the expected number of replicas";
1130
+ const port_mapping_title_tooltip$1 = "The mapping between the service port and the pod port.";
1131
+ const in_cluster_desc$1 = "Services of types ClusterIP, NodePort, and LoadBalancer will show the ClusterIP field, which represents a virtual IP address only accessible within the cluster.";
1132
+ const in_cluster_ip_desc$1 = "If ClusterIP is a headless service, it will display as blank.";
1133
+ const in_cluster_external_name_desc$1 = "For an ExternalName type service, it displays DNS records.";
1134
+ const out_cluster_ip_desc$1 = "ClusterIP doesn't support external cluster access.";
1135
+ const out_cluster_node_port_desc$1 = "For a NodePort type service, it displays <strong>Node IP:nodeport</strong>.";
1136
+ const out_cluster_lb_desc$1 = "For a LoadBalancer type service, it displays <strong>ingress[*].ip</strong>.";
1137
+ const out_external_name_desc$1 = "For an ExternalName type service, it displays <strong>external-ip</strong>.";
1138
+ const image$1 = "Container image";
1139
+ const restarts$1 = "Restart count";
1140
+ const updated_time$1 = "Transition time";
1141
+ const init_container$1 = "Init container";
1142
+ const regular_container$1 = "Regular container";
1143
+ const suspend$1 = "Suspend";
1144
+ const default_backend$1 = "Default backend";
1145
+ const ingress_class$1 = "IngressClass";
1146
+ const pod_ready_num$1 = "Ready Pod";
1147
+ const pod_complete_num$1 = "Completion Pod";
1148
+ const pod_replicas_num$1 = "Desired Pod";
1149
+ const edit_replicas$1 = "Edit expected number of replicas";
1150
+ const dns_record$1 = "DNS record";
1151
+ const basic_info$1 = "Basic information";
1152
+ const pod_selector$1 = "Pod selector";
1153
+ const ingress_rule$1 = "Ingress rule";
1154
+ const egress_rule$1 = "Egress rule";
1155
+ const service_port$1 = "Service port";
1156
+ const pod_port$1 = "Pod port";
1157
+ const path_type$1 = "Path type";
1158
+ const only_support_one_yaml$1 = "Only one YAML configuration is supported at a time.";
1159
+ const not_support$1 = "Not supported";
1133
1160
  const dovetail$1 = {
1134
1161
  copy: copy$1,
1135
1162
  reset_arguments: reset_arguments$1,
@@ -1155,7 +1182,6 @@ var __publicField = (obj, key, value) => {
1155
1182
  confirm_delete_text: confirm_delete_text$1,
1156
1183
  edit: edit$1,
1157
1184
  namespace: namespace$1,
1158
- image: image$1,
1159
1185
  created_time: created_time$1,
1160
1186
  label: label$1,
1161
1187
  annotation: annotation$1,
@@ -1167,32 +1193,20 @@ var __publicField = (obj, key, value) => {
1167
1193
  condition: condition$1,
1168
1194
  download_yaml: download_yaml$1,
1169
1195
  detail: detail$1,
1170
- restarts: restarts$1,
1171
- updated_time: updated_time$1,
1172
1196
  message: message$1,
1173
1197
  save: save$1,
1174
- more,
1175
1198
  workload: workload$1,
1176
- all_namespaces: all_namespaces$1,
1177
1199
  empty: empty$1,
1178
1200
  schedule: schedule$1,
1179
1201
  lastScheduleTime: lastScheduleTime$1,
1180
1202
  duration: duration$1,
1181
1203
  started: started$1,
1182
- init_container: init_container$1,
1183
- regular_container: regular_container$1,
1184
1204
  container: container$1,
1185
1205
  redeploy: redeploy$1,
1186
1206
  data: data$1,
1187
- suspend: suspend$1,
1188
1207
  resume: resume$1,
1189
- clusterIp: clusterIp$1,
1190
1208
  sessionAffinity: sessionAffinity$1,
1191
1209
  log: log$1,
1192
- select_container: select_container$1,
1193
- wrap,
1194
- resume_log,
1195
- log_new_lines,
1196
1210
  ready: ready$1,
1197
1211
  updating: updating$1,
1198
1212
  completed: completed$1,
@@ -1205,38 +1219,17 @@ var __publicField = (obj, key, value) => {
1205
1219
  unknown: unknown$1,
1206
1220
  pending: pending$1,
1207
1221
  waiting: waiting$1,
1208
- sec: sec$1,
1209
- min: min$1,
1210
- hr: hr$1,
1211
- day: day$1,
1212
1222
  expand: expand$1,
1213
1223
  fold: fold$1,
1214
1224
  rule: rule$1,
1215
- default_backend: default_backend$1,
1216
- ingress_class: ingress_class$1,
1217
1225
  port: port$1,
1218
- pod_ready_num: pod_ready_num$1,
1219
- pod_replicas_num: pod_replicas_num$1,
1220
- edit_replicas: edit_replicas$1,
1221
1226
  cert: cert$1,
1222
- dns_record: dns_record$1,
1223
- port_mapping: port_mapping$1,
1224
- out_cluster_access: out_cluster_access$1,
1225
- in_cluster_access: in_cluster_access$1,
1226
- fail_get_detail: fail_get_detail$1,
1227
- basic_info: basic_info$1,
1228
- pod_selector: pod_selector$1,
1229
- ingress_rule: ingress_rule$1,
1230
- egress_rule: egress_rule$1,
1231
1227
  ip_address: ip_address$1,
1232
1228
  last_seen: last_seen$1,
1233
- service_port: service_port$1,
1234
- pod_port: pod_port$1,
1235
1229
  node_port: node_port$1,
1236
1230
  protocol: protocol$1,
1237
1231
  key: key$1,
1238
1232
  value: value$1,
1239
- path_type: path_type$1,
1240
1233
  path: path$1,
1241
1234
  backend: backend$1,
1242
1235
  belong_to_node: belong_to_node$1,
@@ -1249,7 +1242,75 @@ var __publicField = (obj, key, value) => {
1249
1242
  password: password$1,
1250
1243
  username: username$1,
1251
1244
  host: host$1,
1252
- no_resource: no_resource$1
1245
+ no_resource: no_resource$1,
1246
+ all_namespaces: all_namespaces$1,
1247
+ clusterIp: clusterIp$1,
1248
+ select_container: select_container$1,
1249
+ sec: sec$1,
1250
+ min: min$1,
1251
+ hr: hr$1,
1252
+ day: day$1,
1253
+ port_mapping: port_mapping$1,
1254
+ out_cluster_access: out_cluster_access$1,
1255
+ in_cluster_access: in_cluster_access$1,
1256
+ fail_get_detail: fail_get_detail$1,
1257
+ pod_num: pod_num$1,
1258
+ show_data_value: show_data_value$1,
1259
+ hide_data_value: hide_data_value$1,
1260
+ please_input: please_input$1,
1261
+ create_failed: create_failed$1,
1262
+ create_failed_tip: create_failed_tip$1,
1263
+ save_failed: save_failed$1,
1264
+ save_failed_tip: save_failed_tip$1,
1265
+ completion_num_tooltip: completion_num_tooltip$1,
1266
+ ready_num_tooltip: ready_num_tooltip$1,
1267
+ realtime_log: realtime_log$1,
1268
+ previous_log: previous_log$1,
1269
+ auto_wrap: auto_wrap$1,
1270
+ container_num: container_num$1,
1271
+ edit_resource_success: edit_resource_success$1,
1272
+ redeploy_success_toast: redeploy_success_toast$1,
1273
+ redeploy_failed_toast: redeploy_failed_toast$1,
1274
+ pause_success_toast: pause_success_toast$1,
1275
+ pause_failed_toast: pause_failed_toast$1,
1276
+ resume_success_toast: resume_success_toast$1,
1277
+ resume_failed_toast: resume_failed_toast$1,
1278
+ delete_success_toast: delete_success_toast$1,
1279
+ delete_failed_toast: delete_failed_toast$1,
1280
+ create_success_toast: create_success_toast$1,
1281
+ save_yaml_success_toast: save_yaml_success_toast$1,
1282
+ save_replicas_success_toast: save_replicas_success_toast$1,
1283
+ save_replicas_failed_toast: save_replicas_failed_toast$1,
1284
+ port_mapping_title_tooltip: port_mapping_title_tooltip$1,
1285
+ in_cluster_desc: in_cluster_desc$1,
1286
+ in_cluster_ip_desc: in_cluster_ip_desc$1,
1287
+ in_cluster_external_name_desc: in_cluster_external_name_desc$1,
1288
+ out_cluster_ip_desc: out_cluster_ip_desc$1,
1289
+ out_cluster_node_port_desc: out_cluster_node_port_desc$1,
1290
+ out_cluster_lb_desc: out_cluster_lb_desc$1,
1291
+ out_external_name_desc: out_external_name_desc$1,
1292
+ image: image$1,
1293
+ restarts: restarts$1,
1294
+ updated_time: updated_time$1,
1295
+ init_container: init_container$1,
1296
+ regular_container: regular_container$1,
1297
+ suspend: suspend$1,
1298
+ default_backend: default_backend$1,
1299
+ ingress_class: ingress_class$1,
1300
+ pod_ready_num: pod_ready_num$1,
1301
+ pod_complete_num: pod_complete_num$1,
1302
+ pod_replicas_num: pod_replicas_num$1,
1303
+ edit_replicas: edit_replicas$1,
1304
+ dns_record: dns_record$1,
1305
+ basic_info: basic_info$1,
1306
+ pod_selector: pod_selector$1,
1307
+ ingress_rule: ingress_rule$1,
1308
+ egress_rule: egress_rule$1,
1309
+ service_port: service_port$1,
1310
+ pod_port: pod_port$1,
1311
+ path_type: path_type$1,
1312
+ only_support_one_yaml: only_support_one_yaml$1,
1313
+ not_support: not_support$1
1253
1314
  };
1254
1315
  const EN = {
1255
1316
  dovetail: dovetail$1
@@ -1403,6 +1464,8 @@ var __publicField = (obj, key, value) => {
1403
1464
  const out_cluster_node_port_desc = "NodePort 展示<strong>节点 IP:nodeport</strong>。";
1404
1465
  const out_cluster_lb_desc = "LoadBalancer 展示 <strong>ingress[*].ip</strong>。";
1405
1466
  const out_external_name_desc = "ExternalName 展示 <strong>external-ip</strong>。";
1467
+ const only_support_one_yaml = "一次仅支持输入一个 YAML 配置。";
1468
+ const not_support = "不支持";
1406
1469
  const dovetail = {
1407
1470
  copy,
1408
1471
  reset_arguments,
@@ -1555,7 +1618,9 @@ var __publicField = (obj, key, value) => {
1555
1618
  out_cluster_ip_desc,
1556
1619
  out_cluster_node_port_desc,
1557
1620
  out_cluster_lb_desc,
1558
- out_external_name_desc
1621
+ out_external_name_desc,
1622
+ only_support_one_yaml,
1623
+ not_support
1559
1624
  };
1560
1625
  const ZH = {
1561
1626
  dovetail
@@ -6356,7 +6421,7 @@ var __publicField = (obj, key, value) => {
6356
6421
  function unary(func) {
6357
6422
  return ary(func, 1);
6358
6423
  }
6359
- function wrap2(value2, wrapper) {
6424
+ function wrap(value2, wrapper) {
6360
6425
  return partial(castFunction(wrapper), value2);
6361
6426
  }
6362
6427
  function castArray() {
@@ -7479,7 +7544,7 @@ var __publicField = (obj, key, value) => {
7479
7544
  lodash2.valuesIn = valuesIn;
7480
7545
  lodash2.without = without;
7481
7546
  lodash2.words = words;
7482
- lodash2.wrap = wrap2;
7547
+ lodash2.wrap = wrap;
7483
7548
  lodash2.xor = xor;
7484
7549
  lodash2.xorBy = xorBy;
7485
7550
  lodash2.xorWith = xorWith;
@@ -8040,7 +8105,7 @@ var __publicField = (obj, key, value) => {
8040
8105
  };
8041
8106
  var cx_default = cx;
8042
8107
  const ConfigsContext = React.createContext({});
8043
- const useDeleteModal_v7eb93 = "";
8108
+ const useDeleteModal_vv2pzj = "";
8044
8109
  const TextStyle = "t1vq0ett";
8045
8110
  const TipStyle = "t139onst";
8046
8111
  const NameStyle$1 = "n18lzor8";
@@ -8532,7 +8597,7 @@ var __publicField = (obj, key, value) => {
8532
8597
  return o(prop);
8533
8598
  }
8534
8599
  }) : styled;
8535
- const index_1rdsv5g = "";
8600
+ const index_6dotpx = "";
8536
8601
  const ErrorWrapper = /* @__PURE__ */ styled_default("div")({
8537
8602
  name: "ErrorWrapper",
8538
8603
  class: "egn3dbn",
@@ -9486,15 +9551,17 @@ var __publicField = (obj, key, value) => {
9486
9551
  AccessControlAuth2["Create"] = "Create";
9487
9552
  return AccessControlAuth2;
9488
9553
  })(AccessControlAuth || {});
9489
- function matchSelector(pod2, selector) {
9554
+ function matchSelector(pod2, selector, namespace2 = "default") {
9490
9555
  var _a, _b, _c;
9491
9556
  let match = true;
9492
- for (const key2 in selector.matchLabels) {
9493
- if (!((_b = (_a = pod2.metadata) == null ? void 0 : _a.labels) == null ? void 0 : _b[key2]) || ((_c = pod2.metadata.labels) == null ? void 0 : _c[key2]) !== selector.matchLabels[key2]) {
9494
- match = false;
9557
+ if (selector) {
9558
+ for (const key2 in selector.matchLabels) {
9559
+ if (!((_b = (_a = pod2.metadata) == null ? void 0 : _a.labels) == null ? void 0 : _b[key2]) || ((_c = pod2.metadata.labels) == null ? void 0 : _c[key2]) !== selector.matchLabels[key2]) {
9560
+ match = false;
9561
+ }
9495
9562
  }
9496
9563
  }
9497
- return match;
9564
+ return match && pod2.metadata.namespace === namespace2;
9498
9565
  }
9499
9566
  function shortenedImage(image2) {
9500
9567
  return (image2 || "").replace(/^(index\.)?docker.io\/(library\/)?/, "").replace(/:latest$/, "").replace(/^(.*@sha256:)([0-9a-f]{8})[0-9a-f]+$/i, "$1$2…");
@@ -9534,8 +9601,8 @@ var __publicField = (obj, key, value) => {
9534
9601
  });
9535
9602
  const myPods = pods.items.filter(
9536
9603
  (p) => {
9537
- var _a, _b;
9538
- return ((_a = this.spec) == null ? void 0 : _a.selector) ? matchSelector(p, (_b = this.spec) == null ? void 0 : _b.selector) : false;
9604
+ var _a;
9605
+ return matchSelector(p, (_a = this.spec) == null ? void 0 : _a.selector, this.metadata.namespace);
9539
9606
  }
9540
9607
  );
9541
9608
  const result = lodashExports.sumBy(myPods, "restartCount");
@@ -9599,8 +9666,8 @@ var __publicField = (obj, key, value) => {
9599
9666
  });
9600
9667
  const myPods = pods.items.filter(
9601
9668
  (p) => {
9602
- var _a, _b;
9603
- return ((_a = this.spec) == null ? void 0 : _a.selector) ? matchSelector(p, (_b = this.spec) == null ? void 0 : _b.selector) : false;
9669
+ var _a;
9670
+ return matchSelector(p, (_a = this.spec) == null ? void 0 : _a.selector, this.metadata.namespace);
9604
9671
  }
9605
9672
  );
9606
9673
  const result = lodashExports.sumBy(myPods, "restartCount");
@@ -9757,7 +9824,10 @@ var __publicField = (obj, key, value) => {
9757
9824
  get restartCount() {
9758
9825
  var _a, _b;
9759
9826
  if ((_a = this._rawYaml.status) == null ? void 0 : _a.containerStatuses) {
9760
- return ((_b = this._rawYaml.status) == null ? void 0 : _b.containerStatuses[0].restartCount) || 0;
9827
+ return ((_b = this._rawYaml.status) == null ? void 0 : _b.containerStatuses.reduce((count, container2) => {
9828
+ count += container2.restartCount;
9829
+ return count;
9830
+ }, 0)) || 0;
9761
9831
  }
9762
9832
  return 0;
9763
9833
  }
@@ -9940,11 +10010,15 @@ var __publicField = (obj, key, value) => {
9940
10010
  service
9941
10011
  }) => {
9942
10012
  const spec = service._rawYaml.spec;
9943
- switch (spec.type) {
10013
+ switch (service.displayType) {
9944
10014
  case ServiceTypeEnum.ExternalName:
9945
10015
  return /* @__PURE__ */ jsxRuntimeExports.jsx(ValueDisplay, {
9946
10016
  value: service.dnsRecord
9947
10017
  });
10018
+ case ServiceTypeEnum.Headless:
10019
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(ValueDisplay, {
10020
+ value: ""
10021
+ });
9948
10022
  default:
9949
10023
  return /* @__PURE__ */ jsxRuntimeExports.jsx(ValueDisplay, {
9950
10024
  value: spec.clusterIP
@@ -9959,6 +10033,9 @@ var __publicField = (obj, key, value) => {
9959
10033
  breakLine = true
9960
10034
  }) => {
9961
10035
  var _a, _b, _c, _d;
10036
+ const {
10037
+ i18n: i18n2
10038
+ } = useTranslation();
9962
10039
  const spec = service._rawYaml.spec;
9963
10040
  const status = service._rawYaml.status;
9964
10041
  let content = "-";
@@ -9991,6 +10068,9 @@ var __publicField = (obj, key, value) => {
9991
10068
  }) => ip).join(breakLine ? "\n" : ", ")
9992
10069
  });
9993
10070
  break;
10071
+ case ServiceTypeEnum.ClusterIP:
10072
+ content = i18n2.t("dovetail.not_support");
10073
+ break;
9994
10074
  default:
9995
10075
  content = /* @__PURE__ */ jsxRuntimeExports.jsx(ValueDisplay, {
9996
10076
  value: ""
@@ -10162,6 +10242,7 @@ var __publicField = (obj, key, value) => {
10162
10242
  setText(dayjs(date).fromNow());
10163
10243
  };
10164
10244
  i18n2.on("languageChanged", onChange);
10245
+ setText(dayjs(date).fromNow());
10165
10246
  return () => i18n2.off("languageChanged", onChange);
10166
10247
  }, [date, i18n2]);
10167
10248
  if (!date)
@@ -10208,14 +10289,14 @@ var __publicField = (obj, key, value) => {
10208
10289
  sortable: true
10209
10290
  },
10210
10291
  {
10211
- key: "lastUpdateTime",
10292
+ key: "lastTransitionTime",
10212
10293
  display: true,
10213
- dataIndex: "lastUpdateTime",
10294
+ dataIndex: "lastTransitionTime",
10214
10295
  title: t2("dovetail.updated_time"),
10215
10296
  sortable: true,
10216
10297
  width: 120,
10217
- render: (value2, record) => {
10218
- const time = value2 || record.lastTransitionTime;
10298
+ render: (value2) => {
10299
+ const time = value2;
10219
10300
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Time, { date: new Date(time) });
10220
10301
  }
10221
10302
  },
@@ -10477,7 +10558,7 @@ var __publicField = (obj, key, value) => {
10477
10558
  }));
10478
10559
  }
10479
10560
  const useEagleTable = (params) => {
10480
- var _a, _b, _c;
10561
+ var _a, _b;
10481
10562
  const { columns, tableProps, formatter, Dropdown = K8sDropdown } = params;
10482
10563
  const [selectedKeys, setSelectedKeys] = React.useState([]);
10483
10564
  const [currentPage, setCurrentPage] = React.useState((tableProps == null ? void 0 : tableProps.currentPage) || 1);
@@ -10544,10 +10625,6 @@ var __publicField = (obj, key, value) => {
10544
10625
  order: "desc"
10545
10626
  }]);
10546
10627
  }, []);
10547
- React.useEffect(() => {
10548
- setCurrentPage(1);
10549
- table.setCurrent(1);
10550
- }, [(_c = params.useTableParams) == null ? void 0 : _c.filters]);
10551
10628
  return { tableProps: finalProps, selectedKeys, ...table };
10552
10629
  };
10553
10630
  function CreateButton() {
@@ -10671,13 +10748,11 @@ var __publicField = (obj, key, value) => {
10671
10748
  const [selectedKeys] = React.useState([]);
10672
10749
  const component = React.useContext(ComponentContext);
10673
10750
  const Table$1 = component.Table || Table;
10674
- const columns = [NameColumnRenderer(i18n2, "jobs"), StateDisplayColumnRenderer(i18n2), NameSpaceColumnRenderer(i18n2), {
10751
+ const columns = React.useMemo(() => [NameColumnRenderer(i18n2, "jobs"), StateDisplayColumnRenderer(i18n2), NameSpaceColumnRenderer(i18n2), {
10675
10752
  ...WorkloadImageColumnRenderer(i18n2),
10676
10753
  width: 238
10677
- }, CompletionsCountColumnRenderer(i18n2), DurationColumnRenderer(i18n2), AgeColumnRenderer(i18n2)];
10678
- const {
10679
- tableProps
10680
- } = useEagleTable({
10754
+ }, CompletionsCountColumnRenderer(i18n2), DurationColumnRenderer(i18n2), AgeColumnRenderer(i18n2)], [i18n2]);
10755
+ const params = React.useMemo(() => ({
10681
10756
  columns,
10682
10757
  useTableParams: {
10683
10758
  resource: "jobs",
@@ -10695,7 +10770,10 @@ var __publicField = (obj, key, value) => {
10695
10770
  }]
10696
10771
  }
10697
10772
  }
10698
- });
10773
+ }), [columns, owner]);
10774
+ const {
10775
+ tableProps
10776
+ } = useEagleTable(params);
10699
10777
  if (!((_a = tableProps.data) == null ? void 0 : _a.length) && !tableProps.loading) {
10700
10778
  return /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent, {
10701
10779
  errorText: i18n2.t("dovetail.no_resource", {
@@ -10717,11 +10795,9 @@ var __publicField = (obj, key, value) => {
10717
10795
  })]
10718
10796
  });
10719
10797
  };
10720
- const EventsTable = ({}) => {
10721
- var _a, _b;
10798
+ const EventsTable = ({ uid }) => {
10799
+ var _a;
10722
10800
  const { i18n: i18n2 } = useTranslation();
10723
- const parsed = core.useParsed();
10724
- const [regardingNamespace, regardingName] = (_a = parsed == null ? void 0 : parsed.id) == null ? void 0 : _a.split("/");
10725
10801
  const columns = React.useMemo(
10726
10802
  () => [
10727
10803
  {
@@ -10762,7 +10838,7 @@ var __publicField = (obj, key, value) => {
10762
10838
  ],
10763
10839
  [i18n2]
10764
10840
  );
10765
- const { tableProps } = useEagleTable({
10841
+ const params = React.useMemo(() => ({
10766
10842
  columns,
10767
10843
  tableProps: {
10768
10844
  defaultSize: 50
@@ -10775,23 +10851,19 @@ var __publicField = (obj, key, value) => {
10775
10851
  operator: "and",
10776
10852
  value: [
10777
10853
  {
10778
- field: "regarding.namespace",
10854
+ field: "regarding.uid",
10779
10855
  operator: "eq",
10780
- value: regardingNamespace
10781
- },
10782
- {
10783
- field: "regarding.name",
10784
- operator: "eq",
10785
- value: regardingName
10856
+ value: uid
10786
10857
  }
10787
10858
  ]
10788
10859
  }]
10789
10860
  }
10790
10861
  }
10791
- });
10862
+ }), [columns, uid]);
10863
+ const { tableProps } = useEagleTable(params);
10792
10864
  const component = React.useContext(ComponentContext);
10793
10865
  const Table$1 = component.Table || Table;
10794
- if (!((_b = tableProps.data) == null ? void 0 : _b.length) && !tableProps.loading) {
10866
+ if (!((_a = tableProps.data) == null ? void 0 : _a.length) && !tableProps.loading) {
10795
10867
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
10796
10868
  WidgetErrorContent,
10797
10869
  {
@@ -11066,8 +11138,7 @@ var __publicField = (obj, key, value) => {
11066
11138
  const {
11067
11139
  showConfig,
11068
11140
  formatter,
11069
- Dropdown = K8sDropdown,
11070
- data: data2
11141
+ Dropdown = K8sDropdown
11071
11142
  } = props;
11072
11143
  const kit = eagle.useUIKit();
11073
11144
  const parsed = core.useParsed();
@@ -11075,9 +11146,18 @@ var __publicField = (obj, key, value) => {
11075
11146
  resource
11076
11147
  } = core.useResource();
11077
11148
  const id = (_a = parsed == null ? void 0 : parsed.params) == null ? void 0 : _a.id;
11149
+ const {
11150
+ queryResult
11151
+ } = core.useShow({
11152
+ id,
11153
+ errorNotification: false
11154
+ });
11078
11155
  const {
11079
11156
  t: t2
11080
11157
  } = useTranslation();
11158
+ const {
11159
+ data: data2
11160
+ } = queryResult;
11081
11161
  const navigation = core.useNavigation();
11082
11162
  const go = core.useGo();
11083
11163
  const openForm = useOpenForm({
@@ -11260,6 +11340,7 @@ var __publicField = (obj, key, value) => {
11260
11340
  }
11261
11341
  const WorkloadPodsTable_1giuese = "";
11262
11342
  const WorkloadPodsTable = ({
11343
+ namespace: namespace2,
11263
11344
  selector,
11264
11345
  hideToolbar
11265
11346
  }) => {
@@ -11295,7 +11376,7 @@ var __publicField = (obj, key, value) => {
11295
11376
  field: "",
11296
11377
  value: "",
11297
11378
  fn(item) {
11298
- return selector ? matchSelector(item, selector) : true;
11379
+ return matchSelector(item, selector, item.metadata.namespace);
11299
11380
  }
11300
11381
  }]
11301
11382
  }
@@ -11432,7 +11513,7 @@ var __publicField = (obj, key, value) => {
11432
11513
  onSubmit
11433
11514
  };
11434
11515
  }
11435
- const index_7c3887 = "";
11516
+ const index_1twfoei = "";
11436
11517
  const EditButtonStyle = "esoz3jw";
11437
11518
  function EditFieldModal(props) {
11438
11519
  const {
@@ -11720,6 +11801,7 @@ var __publicField = (obj, key, value) => {
11720
11801
  selector: (_b = (_a = record.metadata.relations) == null ? void 0 : _a.find((r2) => {
11721
11802
  return r2.kind === "Pod" && r2.type === "creates";
11722
11803
  })) == null ? void 0 : _b.selector,
11804
+ namespace: record.metadata.namespace,
11723
11805
  hideToolbar: true
11724
11806
  }
11725
11807
  );
@@ -11784,7 +11866,7 @@ var __publicField = (obj, key, value) => {
11784
11866
  return {
11785
11867
  key: "type",
11786
11868
  title: i18n2.t("dovetail.type"),
11787
- path: ["spec", "type"]
11869
+ path: ["displayType"]
11788
11870
  };
11789
11871
  };
11790
11872
  const ClusterIpField = (i18n2) => {
@@ -11813,6 +11895,7 @@ var __publicField = (obj, key, value) => {
11813
11895
  selector: (_b = (_a = record.metadata.relations) == null ? void 0 : _a.find((r2) => {
11814
11896
  return r2.kind === "Pod" && r2.type === "selects";
11815
11897
  })) == null ? void 0 : _b.selector,
11898
+ namespace: record.metadata.namespace,
11816
11899
  hideToolbar: true
11817
11900
  }
11818
11901
  );
@@ -11832,8 +11915,8 @@ var __publicField = (obj, key, value) => {
11832
11915
  return {
11833
11916
  key: "event",
11834
11917
  path: [],
11835
- renderContent: () => {
11836
- return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { padding: "0 24px", height: "100%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(EventsTable, {}) });
11918
+ renderContent: (_, record) => {
11919
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { padding: "0 24px", height: "100%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(EventsTable, { uid: record.metadata.uid }) });
11837
11920
  }
11838
11921
  };
11839
11922
  };
@@ -17517,7 +17600,7 @@ var __publicField = (obj, key, value) => {
17517
17600
  const [logType, setLogType] = React.useState("realtime");
17518
17601
  const [currentItemCount, setCurrentItemCount] = React.useState(0);
17519
17602
  const [paused, setPaused] = React.useState(false);
17520
- const [wrap2, setWrap] = React.useState(false);
17603
+ const [wrap, setWrap] = React.useState(false);
17521
17604
  const [linesBehind, setLinesBehind] = React.useState(0);
17522
17605
  const logViewerRef = React.useRef(null);
17523
17606
  const abortControllerRef = React.useRef(null);
@@ -17667,7 +17750,7 @@ var __publicField = (obj, key, value) => {
17667
17750
  }), /* @__PURE__ */ jsxRuntimeExports.jsxs("span", {
17668
17751
  className: ToolbarAreaStyle,
17669
17752
  children: [/* @__PURE__ */ jsxRuntimeExports.jsx(kit.checkbox, {
17670
- checked: wrap2,
17753
+ checked: wrap,
17671
17754
  onChange: (e2) => setWrap(e2.target.checked),
17672
17755
  children: t2("dovetail.auto_wrap")
17673
17756
  }), /* @__PURE__ */ jsxRuntimeExports.jsx(kit.button, {
@@ -17692,7 +17775,7 @@ var __publicField = (obj, key, value) => {
17692
17775
  hasLineNumbers: true,
17693
17776
  data: logs,
17694
17777
  theme: "light",
17695
- isTextWrapped: wrap2,
17778
+ isTextWrapped: wrap,
17696
17779
  onScroll
17697
17780
  })
17698
17781
  })]
@@ -18206,11 +18289,11 @@ var __publicField = (obj, key, value) => {
18206
18289
  retry: 1
18207
18290
  },
18208
18291
  errorNotification: () => {
18209
- var _a2, _b;
18292
+ var _a2;
18210
18293
  return {
18211
18294
  message: i18n2.t("dovetail.fail_get_detail", {
18212
- resource: (_a2 = resource == null ? void 0 : resource.meta) == null ? void 0 : _a2.kind,
18213
- name: (_b = parsed == null ? void 0 : parsed.params) == null ? void 0 : _b.id,
18295
+ resource: resource == null ? void 0 : resource.name,
18296
+ name: (_a2 = parsed == null ? void 0 : parsed.params) == null ? void 0 : _a2.id,
18214
18297
  interpolation: { escapeValue: false }
18215
18298
  }),
18216
18299
  description: "Error",
@@ -18218,13 +18301,13 @@ var __publicField = (obj, key, value) => {
18218
18301
  };
18219
18302
  }
18220
18303
  });
18221
- const { isLoading, isError, data: data2 } = queryResult;
18304
+ const { isLoading, isError } = queryResult;
18222
18305
  React.useEffect(() => {
18223
18306
  if (isError && resource) {
18224
18307
  nav.list(resource);
18225
18308
  }
18226
18309
  }, [isError, nav, resource]);
18227
- return isLoading ? /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Loading, {}) : /* @__PURE__ */ jsxRuntimeExports.jsx(ShowContent, { ...props, data: data2 });
18310
+ return isLoading ? /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Loading, {}) : /* @__PURE__ */ jsxRuntimeExports.jsx(ShowContent, { ...props });
18228
18311
  };
18229
18312
  const index_17v8shn = "";
18230
18313
  const WrapperStyle$1 = "w1akirqw";
@@ -18673,9 +18756,9 @@ var __publicField = (obj, key, value) => {
18673
18756
  })
18674
18757
  });
18675
18758
  };
18676
- function useNamespaceFilter() {
18759
+ function useNamespaceRefineFilter() {
18677
18760
  const { value: nsFilters = [] } = useNamespacesFilter();
18678
- return {
18761
+ const filters = React.useMemo(() => ({
18679
18762
  permanent: [
18680
18763
  {
18681
18764
  operator: "or",
@@ -18686,7 +18769,8 @@ var __publicField = (obj, key, value) => {
18686
18769
  }))
18687
18770
  }
18688
18771
  ]
18689
- };
18772
+ }), [nsFilters]);
18773
+ return filters;
18690
18774
  }
18691
18775
  const index_hp158y = "";
18692
18776
  const ListPageStyle = "laykzsq";
@@ -18752,7 +18836,7 @@ var __publicField = (obj, key, value) => {
18752
18836
  const { formatter, columns, Dropdown, noShow } = props.config;
18753
18837
  const { i18n: i18n2 } = useTranslation();
18754
18838
  const nameRenderer = noShow ? PlainTextNameColumnRenderer(i18n2) : NameColumnRenderer(i18n2);
18755
- const filters = useNamespaceFilter();
18839
+ const filters = useNamespaceRefineFilter();
18756
18840
  const { tableProps, selectedKeys } = useEagleTable({
18757
18841
  useTableParams: {
18758
18842
  filters
@@ -18765,6 +18849,9 @@ var __publicField = (obj, key, value) => {
18765
18849
  formatter,
18766
18850
  Dropdown
18767
18851
  });
18852
+ React.useEffect(() => {
18853
+ tableProps.onPageChange(1);
18854
+ }, [filters]);
18768
18855
  return /* @__PURE__ */ jsxRuntimeExports.jsx(ListPage, { selectedKeys, tableProps });
18769
18856
  }
18770
18857
  function ResourceShow(props) {
@@ -22092,6 +22179,7 @@ var __publicField = (obj, key, value) => {
22092
22179
  });
22093
22180
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(eagle.Space, {
22094
22181
  direction: "vertical",
22182
+ size: 16,
22095
22183
  className: "cjxv8cf",
22096
22184
  children: [fields, /* @__PURE__ */ jsxRuntimeExports.jsx(FormErrorAlert, {
22097
22185
  errorMsgs: errorMsg ? [errorMsg] : [],
@@ -23852,7 +23940,7 @@ var __publicField = (obj, key, value) => {
23852
23940
  const parsed = core.useParsed();
23853
23941
  const nav = core.useNavigation();
23854
23942
  const { queryResult } = core.useShow({ id: (_a = parsed == null ? void 0 : parsed.params) == null ? void 0 : _a.id });
23855
- const { isLoading, data: data2 } = queryResult;
23943
+ const { isLoading } = queryResult;
23856
23944
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
23857
23945
  antd.Drawer,
23858
23946
  {
@@ -23861,7 +23949,7 @@ var __publicField = (obj, key, value) => {
23861
23949
  onClose: () => nav.goBack(),
23862
23950
  width: "50%",
23863
23951
  visible: !!((_b = parsed == null ? void 0 : parsed.params) == null ? void 0 : _b.id),
23864
- children: isLoading ? /* @__PURE__ */ jsxRuntimeExports.jsx(kit.loading, {}) : /* @__PURE__ */ jsxRuntimeExports.jsx(ShowContent, { ...props, data: data2 })
23952
+ children: isLoading ? /* @__PURE__ */ jsxRuntimeExports.jsx(kit.loading, {}) : /* @__PURE__ */ jsxRuntimeExports.jsx(ShowContent, { ...props })
23865
23953
  }
23866
23954
  );
23867
23955
  };
@@ -24899,6 +24987,7 @@ var __publicField = (obj, key, value) => {
24899
24987
  exports2.useEagleTable = useEagleTable;
24900
24988
  exports2.useEdit = useEdit;
24901
24989
  exports2.useGlobalStore = useGlobalStore;
24990
+ exports2.useNamespaceRefineFilter = useNamespaceRefineFilter;
24902
24991
  exports2.useNamespacesFilter = useNamespacesFilter;
24903
24992
  exports2.useOpenForm = useOpenForm;
24904
24993
  exports2.useRefineForm = useRefineForm;