@yuku123/z-team-component 0.2.133 → 0.2.135

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 (52) hide show
  1. package/dist/{index-BkzBYfhO.js → AdminModuleContent-DHCn4OpR.js} +13552 -14053
  2. package/dist/{ChangeLogView-SwacGpsw.js → ChangeLogView-Cc5cYmcz.js} +1 -1
  3. package/dist/{ComponentDoc-Dh5YhLCI.js → ComponentDoc-BAUII4UZ.js} +707 -713
  4. package/dist/{InvitationManagementPage-CjEcLOGB.js → InvitationManagementPage-BgY1jxQB.js} +1 -1
  5. package/dist/{OnboardingPage-DvNt71kX.js → OnboardingPage-CckzpaI0.js} +2 -2
  6. package/dist/{ScheduledTasks-COgb4MZJ.js → ScheduledTasks-DZSEnuIF.js} +6 -6
  7. package/dist/SystemShell-DCRIL4Rh.js +978 -0
  8. package/dist/{admin-logs-CExsxQ5h.js → admin-logs-DEawvNOd.js} +1 -1
  9. package/dist/{api-DXw93E7c.js → api--xHkMnrY.js} +1 -1
  10. package/dist/{api-C9kTgVc2.js → api-B-nnjGsa.js} +1 -1
  11. package/dist/{createWorkspaceWsHandler-BwDUTYXH.js → createWorkspaceWsHandler-y6pRWLoa.js} +3 -3
  12. package/dist/{index-CntZHojY.js → index-4R_QcR8P.js} +2 -2
  13. package/dist/{index-CXEYA7rt.js → index-B2ztJXV3.js} +2 -2
  14. package/dist/{index-CF3xDZ7q.js → index-BDUHHaoY.js} +4 -4
  15. package/dist/{index-BTJ83JLl.js → index-BIffImVM.js} +473 -358
  16. package/dist/{index-DZ0fYNO9.js → index-C09THX8u.js} +11 -11
  17. package/dist/{index-B2Dfbi8J.js → index-C4cx5Qxu.js} +2 -2
  18. package/dist/{index-COobH4Vi.js → index-C7ng_cdZ.js} +1 -1
  19. package/dist/{index-D2DFKRUf.js → index-C9LqX4Lg.js} +1 -1
  20. package/dist/{index-DM6XeWFk.js → index-CMLlvrEW.js} +2384 -2417
  21. package/dist/{index-DLK7DuCr.js → index-COn912sj.js} +3 -3
  22. package/dist/{index-9rfSVSTh.js → index-CcHrWE4P.js} +2 -2
  23. package/dist/index-Cxoup7V8.js +139 -0
  24. package/dist/{index-B3uLo8-F.js → index-CzS_q6Tn.js} +3 -3
  25. package/dist/{index-Ci6_CBwE.js → index-DWrEAa8-.js} +3 -3
  26. package/dist/{index-DmV6xR7C.js → index-DePIQVt9.js} +3 -3
  27. package/dist/index-DlBN-ou4.js +311 -0
  28. package/dist/{index-ftuPuj0s.js → index-Do3pyigD.js} +1 -1
  29. package/dist/{index-D_J1ZCy8.js → index-DtgTLML8.js} +3 -3
  30. package/dist/{index-t2nMJUPu.js → index-DxXcTAH4.js} +1 -1
  31. package/dist/index-H7hP7Fmj.js +228 -0
  32. package/dist/{index-Bs9odXxd.js → index-LnUf9Vil.js} +6 -6
  33. package/dist/{index-DMfYPIkB.js → index-XWWknPNw.js} +2 -2
  34. package/dist/{index-Ceu-yckM.js → index-frmk-zNf.js} +12 -12
  35. package/dist/{index-mEgmHNRO.js → index-ztXjGIJk.js} +1 -1
  36. package/dist/index.js +1 -1
  37. package/dist/{instance-DD3kbAUh.js → instance-DL4u5k9c.js} +1 -1
  38. package/dist/{menuPermission-v0881tid.js → menuPermission-CA_atlfk.js} +3 -3
  39. package/dist/menuTree-Ctcz41N8.js +303 -0
  40. package/dist/pages.js +1 -1
  41. package/dist/{send-default-agent-team-message-Cug0T_7J.js → send-default-agent-team-message-BfBVm9AO.js} +1 -1
  42. package/dist/{sso-user-CnVXqYR7.js → sso-user-Dr8_-Sxd.js} +1 -1
  43. package/dist/{training-BS23m-yy.js → training-CcGUA5KC.js} +1 -1
  44. package/dist/{webide-BPJ1IpZq.js → webide-C2JfQ-Je.js} +3 -3
  45. package/dist/z-team-component.css +1 -1
  46. package/package.json +2 -1
  47. package/dist/SystemShell-CSXcsiNp.js +0 -752
  48. package/dist/index-BNPq7yBg.js +0 -147
  49. package/dist/index-BoY7L8C4.js +0 -111
  50. package/dist/index-CU6jFFl5.js +0 -112
  51. package/dist/index-CZCKpsry.js +0 -607
  52. package/dist/useSidebarResize--Avuabb1.js +0 -46
@@ -1,91 +1,206 @@
1
- import { jsx as e, jsxs as s } from "react/jsx-runtime";
2
- import { Navigate as _, useLocation as ce } from "react-router-dom";
3
- import { Spin as ie, Row as de, Col as U, Card as M, Statistic as W, Space as v, Tag as C, Button as w, Alert as G, Table as pe, Badge as ee, Popconfirm as B, message as b, Select as te, Drawer as ue, Tabs as me, Form as D, Modal as he, Input as V, InputNumber as j } from "antd";
4
- import { DashboardOutlined as X, ClusterOutlined as q, CloudServerOutlined as H, ContainerOutlined as ne, ReloadOutlined as Q, LockOutlined as ye, UnlockOutlined as ge, PlayCircleOutlined as fe, PauseCircleOutlined as be, ClearOutlined as se, SendOutlined as we, EyeOutlined as ke, DeleteOutlined as ae, PlusOutlined as xe, EditOutlined as ve, BranchesOutlined as Ce, RocketOutlined as Pe, AlertOutlined as Se, FileTextOutlined as Re, DatabaseOutlined as Y, CloudOutlined as Oe, DeploymentUnitOutlined as Ie } from "@ant-design/icons";
5
- import { W as $e } from "./index-CU6jFFl5.js";
6
- import { a3 as Ee } from "./ComponentDoc-Dh5YhLCI.js";
7
- import { useState as i, useEffect as z, useRef as L } from "react";
8
- import { ListTable as re } from "@yuku123/z-frontend-common/ui";
9
- import "./index-DM6XeWFk.js";
10
- const Te = "/z-team/ops/k8s";
11
- async function oe(t, r) {
12
- const d = `${Te}${t}`, u = await fetch(d, {
1
+ import { jsxs as s, jsx as e } from "react/jsx-runtime";
2
+ import { useNavigate as me, useLocation as se, Navigate as q } from "react-router-dom";
3
+ import { Spin as pe, Row as he, Col as U, Card as M, Statistic as W, Space as _, Tag as O, Button as I, Alert as V, Table as ye, Badge as re, Popconfirm as B, message as S, Select as ae, Drawer as fe, Tabs as ge, Form as H, Modal as be, Input as j, InputNumber as X } from "antd";
4
+ import { DownOutlined as we, RightOutlined as ke, DashboardOutlined as Q, ClusterOutlined as J, CloudServerOutlined as D, ContainerOutlined as oe, ReloadOutlined as Y, LockOutlined as ve, UnlockOutlined as xe, PlayCircleOutlined as Se, PauseCircleOutlined as Ie, ClearOutlined as le, SendOutlined as Ce, EyeOutlined as Pe, DeleteOutlined as ce, PlusOutlined as _e, EditOutlined as Oe, BranchesOutlined as Re, RocketOutlined as $e, AlertOutlined as Ae, FileTextOutlined as Ne, DatabaseOutlined as ee, CloudOutlined as Ee, DeploymentUnitOutlined as Te } from "@ant-design/icons";
5
+ import { useState as m, useMemo as Z, useEffect as E, useRef as z } from "react";
6
+ import { P as Ge, R as He } from "./index-CcHrWE4P.js";
7
+ import { f as Le, M as De } from "./menuPermission-CA_atlfk.js";
8
+ import { u as te, a3 as ze } from "./ComponentDoc-BAUII4UZ.js";
9
+ import { ListTable as ie } from "@yuku123/z-frontend-common/ui";
10
+ import "./index-CMLlvrEW.js";
11
+ const Fe = "_shell_rfl59_7", Me = "_sidebar_rfl59_20", Be = "_menuList_rfl59_41", Ue = "_menuGroup_rfl59_47", We = "_menuGroupHeader_rfl59_56", Ke = "_menuGroupHeaderOpen_rfl59_75", qe = "_menuGroupHeaderActive_rfl59_86", Je = "_menuGroupIcon_rfl59_90", Ve = "_menuGroupLabel_rfl59_99", je = "_menuGroupArrow_rfl59_104", Xe = "_menuSubList_rfl59_110", Ze = "_menuSubItemWrap_rfl59_116", Qe = "_menuSubItem_rfl59_116", Ye = "_menuItemOnPath_rfl59_154", et = "_menuSubItemPill_rfl59_175", tt = "_menuSubItemActive_rfl59_191", nt = "_menuSubItemIcon_rfl59_201", st = "_main_rfl59_215", rt = "_empty_rfl59_226", at = "_emptyIcon_rfl59_236", ot = "_emptyText_rfl59_241", w = {
12
+ shell: Fe,
13
+ sidebar: Me,
14
+ menuList: Be,
15
+ menuGroup: Ue,
16
+ menuGroupHeader: We,
17
+ menuGroupHeaderOpen: Ke,
18
+ menuGroupHeaderActive: qe,
19
+ menuGroupIcon: Je,
20
+ menuGroupLabel: Ve,
21
+ menuGroupArrow: je,
22
+ menuSubList: Xe,
23
+ menuSubItemWrap: Ze,
24
+ menuSubItem: Qe,
25
+ menuItemOnPath: Ye,
26
+ menuSubItemPill: et,
27
+ menuSubItemActive: tt,
28
+ menuSubItemIcon: nt,
29
+ main: st,
30
+ empty: rt,
31
+ emptyIcon: at,
32
+ emptyText: ot
33
+ };
34
+ function lt(t, a) {
35
+ for (const l of t)
36
+ if (l.path === a) return l.element;
37
+ for (const l of t)
38
+ if (l.path.includes("*") || l.path.includes(":")) {
39
+ const p = "^" + l.path.replace(/[.+?^${}()|[\]\\]/g, "\\$&").replace(/\*/g, ".*").replace(/:([a-zA-Z_][a-zA-Z0-9_]*)/g, "[^/]+") + "$";
40
+ if (new RegExp(p).test(a)) return l.element;
41
+ }
42
+ return null;
43
+ }
44
+ function ct({ text: t }) {
45
+ return /* @__PURE__ */ s("div", { className: w.empty, children: [
46
+ /* @__PURE__ */ e("div", { className: w.emptyIcon, children: "⚙️" }),
47
+ /* @__PURE__ */ e("div", { className: w.emptyText, children: t })
48
+ ] });
49
+ }
50
+ function it({
51
+ groups: t,
52
+ routes: a,
53
+ mode: l,
54
+ emptyText: p,
55
+ activePathOverride: h,
56
+ menuOnly: y = !1
57
+ }) {
58
+ const g = me(), { pathname: u } = se(), C = te((n) => n.currentUser), v = te((n) => n.permissionState), [r, o] = m(/* @__PURE__ */ new Set()), c = Z(
59
+ () => v === "failed" ? t : Le(t, C),
60
+ [t, C, v]
61
+ ), b = Z(() => {
62
+ const n = h ?? u;
63
+ for (const d of c)
64
+ for (const f of d.items)
65
+ if (f.path === n) return f.key;
66
+ return null;
67
+ }, [c, h, u]);
68
+ E(() => {
69
+ b && c.forEach((n) => {
70
+ n.items.some((d) => d.key === b) && o(
71
+ (d) => d.has(n.title) ? d : new Set(d).add(n.title)
72
+ );
73
+ });
74
+ }, [b, c]);
75
+ const P = (n) => {
76
+ o((d) => {
77
+ const f = new Set(d);
78
+ return f.has(n) ? f.delete(n) : f.add(n), f;
79
+ });
80
+ }, N = (n) => {
81
+ g(`${n.path}?mode=${l}`);
82
+ }, k = Z(() => lt(a, u), [a, u]);
83
+ return /* @__PURE__ */ s("div", { className: w.shell, children: [
84
+ /* @__PURE__ */ s("aside", { className: w.sidebar, children: [
85
+ /* @__PURE__ */ e(De, {}),
86
+ /* @__PURE__ */ e("nav", { className: w.menuList, children: c.map((n) => {
87
+ const d = r.has(n.title), f = b ? n.items.findIndex((x) => x.key === b) : -1;
88
+ return /* @__PURE__ */ s("div", { className: w.menuGroup, children: [
89
+ /* @__PURE__ */ s(
90
+ "div",
91
+ {
92
+ className: `${w.menuGroupHeader} ${d ? w.menuGroupHeaderOpen : ""} ${f >= 0 ? w.menuGroupHeaderActive : ""}`,
93
+ onClick: () => P(n.title),
94
+ children: [
95
+ /* @__PURE__ */ e("span", { className: w.menuGroupIcon, children: n.icon }),
96
+ /* @__PURE__ */ e("span", { className: w.menuGroupLabel, children: n.title }),
97
+ /* @__PURE__ */ e("span", { className: w.menuGroupArrow, children: d ? /* @__PURE__ */ e(we, {}) : /* @__PURE__ */ e(ke, {}) })
98
+ ]
99
+ }
100
+ ),
101
+ d && /* @__PURE__ */ e("ul", { className: w.menuSubList, children: n.items.map((x, R) => {
102
+ const F = f >= 0 && R <= f;
103
+ return /* @__PURE__ */ e(
104
+ "li",
105
+ {
106
+ className: `${w.menuSubItemWrap} ${w.menuSubItem} ${F ? w.menuItemOnPath : ""} ${b === x.key ? w.menuSubItemActive : ""}`,
107
+ onClick: () => N(x),
108
+ children: /* @__PURE__ */ s("div", { className: w.menuSubItemPill, children: [
109
+ /* @__PURE__ */ e("span", { className: w.menuSubItemIcon, children: x.icon }),
110
+ /* @__PURE__ */ e("span", { className: w.menuSubItemLabel, children: x.label })
111
+ ] })
112
+ },
113
+ x.key
114
+ );
115
+ }) })
116
+ ] }, n.title);
117
+ }) })
118
+ ] }),
119
+ y ? null : /* @__PURE__ */ s("main", { className: w.main, children: [
120
+ /* @__PURE__ */ e(Ge, {}),
121
+ /* @__PURE__ */ e(He, { resetKey: u, children: k ?? /* @__PURE__ */ e(ct, { text: p }) })
122
+ ] })
123
+ ] });
124
+ }
125
+ const dt = "/z-team/ops/k8s";
126
+ async function de(t, a) {
127
+ const l = `${dt}${t}`, p = await fetch(l, {
13
128
  headers: { "Content-Type": "application/json" },
14
- ...r
15
- }), p = u.headers && u.headers.get("content-type") || "";
16
- if (!/json/i.test(p))
17
- throw new Error(`数据源不可达:GET ${d} 返回 ${u.status} ${p || "(无 content-type)"},不是 JSON —— 该前缀没有进到后端接口(K8s 管理 API 在 z-ops 仓,z-opc 宿主未注册)`);
18
- const m = await u.json();
19
- if (m && m.success === !1)
20
- throw new Error(`后端 ${d} 返回 success=false:${m.message || "(无 message)"}`);
21
- return m;
129
+ ...a
130
+ }), h = p.headers && p.headers.get("content-type") || "";
131
+ if (!/json/i.test(h))
132
+ throw new Error(`数据源不可达:GET ${l} 返回 ${p.status} ${h || "(无 content-type)"},不是 JSON —— 该前缀没有进到后端接口(K8s 管理 API 在 z-ops 仓,z-opc 宿主未注册)`);
133
+ const y = await p.json();
134
+ if (y && y.success === !1)
135
+ throw new Error(`后端 ${l} 返回 success=false:${y.message || "(无 message)"}`);
136
+ return y;
22
137
  }
23
- async function T(t, r) {
24
- return oe(t, r);
138
+ async function T(t, a) {
139
+ return de(t, a);
25
140
  }
26
- async function Ae() {
141
+ async function ut() {
27
142
  return T("/cluster/info");
28
143
  }
29
- async function De() {
144
+ async function mt() {
30
145
  return T("/nodes");
31
146
  }
32
- async function ze(t) {
147
+ async function pt(t) {
33
148
  return T("/nodes/cordon", {
34
149
  method: "POST",
35
150
  body: JSON.stringify({ name: t })
36
151
  });
37
152
  }
38
- async function Fe(t) {
153
+ async function ht(t) {
39
154
  return T("/nodes/uncordon", {
40
155
  method: "POST",
41
156
  body: JSON.stringify({ name: t })
42
157
  });
43
158
  }
44
- async function Ne(t = "*") {
159
+ async function yt(t = "*") {
45
160
  return T(`/workloads/pods?namespace=${t}`);
46
161
  }
47
- async function He(t, r, d = 200) {
48
- return T(`/workloads/pods/${t}/${r}/logs?tailLines=${d}`);
162
+ async function ft(t, a, l = 200) {
163
+ return T(`/workloads/pods/${t}/${a}/logs?tailLines=${l}`);
49
164
  }
50
- async function Le(t, r) {
51
- return T(`/workloads/pods/${t}/${r}/restart`, { method: "POST" });
165
+ async function gt(t, a) {
166
+ return T(`/workloads/pods/${t}/${a}/restart`, { method: "POST" });
52
167
  }
53
- async function Me(t, r) {
54
- return T(`/workloads/pods/${t}/${r}`, { method: "DELETE" });
168
+ async function bt(t, a) {
169
+ return T(`/workloads/pods/${t}/${a}`, { method: "DELETE" });
55
170
  }
56
- async function Be() {
171
+ async function wt() {
57
172
  return T("/namespaces");
58
173
  }
59
- const Ue = () => {
60
- var m, y;
61
- const [t, r] = i(null), [d, u] = i(!0);
62
- z(() => {
63
- p();
64
- const h = setInterval(p, 1e4);
65
- return () => clearInterval(h);
174
+ const kt = () => {
175
+ var y, g;
176
+ const [t, a] = m(null), [l, p] = m(!0);
177
+ E(() => {
178
+ h();
179
+ const u = setInterval(h, 1e4);
180
+ return () => clearInterval(u);
66
181
  }, []);
67
- const p = async () => {
182
+ const h = async () => {
68
183
  try {
69
- const h = await Ae();
70
- h.success && r(h.data);
71
- } catch (h) {
72
- console.error("Failed to load cluster info", h);
184
+ const u = await ut();
185
+ u.success && a(u.data);
186
+ } catch (u) {
187
+ console.error("Failed to load cluster info", u);
73
188
  } finally {
74
- u(!1);
189
+ p(!1);
75
190
  }
76
191
  };
77
- return d ? /* @__PURE__ */ e(ie, { size: "large" }) : /* @__PURE__ */ s("div", { style: { padding: 16 }, children: [
192
+ return l ? /* @__PURE__ */ e(pe, { size: "large" }) : /* @__PURE__ */ s("div", { style: { padding: 16 }, children: [
78
193
  /* @__PURE__ */ s("h2", { style: { marginBottom: 24 }, children: [
79
- /* @__PURE__ */ e(X, {}),
194
+ /* @__PURE__ */ e(Q, {}),
80
195
  " 运维总览"
81
196
  ] }),
82
- /* @__PURE__ */ s(de, { gutter: [16, 16], children: [
197
+ /* @__PURE__ */ s(he, { gutter: [16, 16], children: [
83
198
  /* @__PURE__ */ e(U, { xs: 24, sm: 12, lg: 6, children: /* @__PURE__ */ s(M, { children: [
84
199
  /* @__PURE__ */ e(
85
200
  W,
86
201
  {
87
- title: /* @__PURE__ */ s(v, { children: [
88
- /* @__PURE__ */ e(q, {}),
202
+ title: /* @__PURE__ */ s(_, { children: [
203
+ /* @__PURE__ */ e(J, {}),
89
204
  " K8s 节点"
90
205
  ] }),
91
206
  value: (t == null ? void 0 : t.readyNodes) ?? 0,
@@ -95,17 +210,17 @@ const Ue = () => {
95
210
  ] })
96
211
  }
97
212
  ),
98
- /* @__PURE__ */ e(C, { color: (t == null ? void 0 : t.status) === "Healthy" ? "success" : "warning", children: (t == null ? void 0 : t.status) ?? "Unknown" })
213
+ /* @__PURE__ */ e(O, { color: (t == null ? void 0 : t.status) === "Healthy" ? "success" : "warning", children: (t == null ? void 0 : t.status) ?? "Unknown" })
99
214
  ] }) }),
100
215
  /* @__PURE__ */ e(U, { xs: 24, sm: 12, lg: 6, children: /* @__PURE__ */ s(M, { children: [
101
216
  /* @__PURE__ */ e(
102
217
  W,
103
218
  {
104
- title: /* @__PURE__ */ s(v, { children: [
105
- /* @__PURE__ */ e(H, {}),
219
+ title: /* @__PURE__ */ s(_, { children: [
220
+ /* @__PURE__ */ e(D, {}),
106
221
  " CPU"
107
222
  ] }),
108
- value: ((m = t == null ? void 0 : t.usedCpu) == null ? void 0 : m.toFixed(1)) ?? "0",
223
+ value: ((y = t == null ? void 0 : t.usedCpu) == null ? void 0 : y.toFixed(1)) ?? "0",
109
224
  suffix: /* @__PURE__ */ s("span", { style: { color: "#999" }, children: [
110
225
  " / ",
111
226
  (t == null ? void 0 : t.totalCpu) ?? 0,
@@ -114,7 +229,7 @@ const Ue = () => {
114
229
  precision: 1
115
230
  }
116
231
  ),
117
- /* @__PURE__ */ s(C, { color: ((t == null ? void 0 : t.usedCpu) ?? 0) / ((t == null ? void 0 : t.totalCpu) ?? 1) > 0.8 ? "error" : "success", children: [
232
+ /* @__PURE__ */ s(O, { color: ((t == null ? void 0 : t.usedCpu) ?? 0) / ((t == null ? void 0 : t.totalCpu) ?? 1) > 0.8 ? "error" : "success", children: [
118
233
  (((t == null ? void 0 : t.usedCpu) ?? 0) / ((t == null ? void 0 : t.totalCpu) ?? 1) * 100).toFixed(0),
119
234
  "%"
120
235
  ] })
@@ -123,11 +238,11 @@ const Ue = () => {
123
238
  /* @__PURE__ */ e(
124
239
  W,
125
240
  {
126
- title: /* @__PURE__ */ s(v, { children: [
127
- /* @__PURE__ */ e(X, {}),
241
+ title: /* @__PURE__ */ s(_, { children: [
242
+ /* @__PURE__ */ e(Q, {}),
128
243
  " 内存"
129
244
  ] }),
130
- value: ((y = t == null ? void 0 : t.usedMemory) == null ? void 0 : y.toFixed(1)) ?? "0",
245
+ value: ((g = t == null ? void 0 : t.usedMemory) == null ? void 0 : g.toFixed(1)) ?? "0",
131
246
  suffix: /* @__PURE__ */ s("span", { style: { color: "#999" }, children: [
132
247
  " / ",
133
248
  (t == null ? void 0 : t.totalMemory) ?? 0,
@@ -136,7 +251,7 @@ const Ue = () => {
136
251
  precision: 1
137
252
  }
138
253
  ),
139
- /* @__PURE__ */ s(C, { color: ((t == null ? void 0 : t.usedMemory) ?? 0) / ((t == null ? void 0 : t.totalMemory) ?? 1) > 0.8 ? "error" : "success", children: [
254
+ /* @__PURE__ */ s(O, { color: ((t == null ? void 0 : t.usedMemory) ?? 0) / ((t == null ? void 0 : t.totalMemory) ?? 1) > 0.8 ? "error" : "success", children: [
140
255
  (((t == null ? void 0 : t.usedMemory) ?? 0) / ((t == null ? void 0 : t.totalMemory) ?? 1) * 100).toFixed(0),
141
256
  "%"
142
257
  ] })
@@ -145,8 +260,8 @@ const Ue = () => {
145
260
  /* @__PURE__ */ e(
146
261
  W,
147
262
  {
148
- title: /* @__PURE__ */ s(v, { children: [
149
- /* @__PURE__ */ e(ne, {}),
263
+ title: /* @__PURE__ */ s(_, { children: [
264
+ /* @__PURE__ */ e(oe, {}),
150
265
  " Pods"
151
266
  ] }),
152
267
  value: (t == null ? void 0 : t.runningPods) ?? 0,
@@ -156,13 +271,13 @@ const Ue = () => {
156
271
  ] })
157
272
  }
158
273
  ),
159
- /* @__PURE__ */ s(C, { color: "success", children: [
274
+ /* @__PURE__ */ s(O, { color: "success", children: [
160
275
  (t == null ? void 0 : t.namespaceCount) ?? 0,
161
276
  " namespaces"
162
277
  ] })
163
278
  ] }) })
164
279
  ] }),
165
- /* @__PURE__ */ e(M, { title: "集群信息", style: { marginTop: 16 }, children: /* @__PURE__ */ s(v, { orientation: "vertical", children: [
280
+ /* @__PURE__ */ e(M, { title: "集群信息", style: { marginTop: 16 }, children: /* @__PURE__ */ s(_, { orientation: "vertical", children: [
166
281
  /* @__PURE__ */ s("div", { children: [
167
282
  /* @__PURE__ */ e("strong", { children: "K8s 版本:" }),
168
283
  " ",
@@ -171,7 +286,7 @@ const Ue = () => {
171
286
  /* @__PURE__ */ s("div", { children: [
172
287
  /* @__PURE__ */ e("strong", { children: "集群状态:" }),
173
288
  " ",
174
- /* @__PURE__ */ e(C, { color: "success", children: t == null ? void 0 : t.status })
289
+ /* @__PURE__ */ e(O, { color: "success", children: t == null ? void 0 : t.status })
175
290
  ] }),
176
291
  /* @__PURE__ */ s("div", { children: [
177
292
  /* @__PURE__ */ e("strong", { children: "节点数:" }),
@@ -195,87 +310,87 @@ const Ue = () => {
195
310
  ] })
196
311
  ] }) })
197
312
  ] });
198
- }, We = () => {
199
- const [t, r] = i([]), [d, u] = i(!1), [p, m] = i("");
200
- z(() => {
201
- y();
313
+ }, vt = () => {
314
+ const [t, a] = m([]), [l, p] = m(!1), [h, y] = m("");
315
+ E(() => {
316
+ g();
202
317
  }, []);
203
- const y = async () => {
204
- u(!0), m("");
318
+ const g = async () => {
319
+ p(!0), y("");
205
320
  try {
206
- const a = await De();
207
- r(Array.isArray(a.data) ? a.data : []);
208
- } catch (a) {
209
- r([]), m(String((a == null ? void 0 : a.message) || a));
321
+ const r = await mt();
322
+ a(Array.isArray(r.data) ? r.data : []);
323
+ } catch (r) {
324
+ a([]), y(String((r == null ? void 0 : r.message) || r));
210
325
  } finally {
211
- u(!1);
326
+ p(!1);
212
327
  }
213
- }, h = async (a) => {
328
+ }, u = async (r) => {
214
329
  try {
215
- await ze(a), b.success(`${a} 已封锁(停止调度)`), y();
330
+ await pt(r), S.success(`${r} 已封锁(停止调度)`), g();
216
331
  } catch {
217
- b.error("封锁失败");
332
+ S.error("封锁失败");
218
333
  }
219
- }, P = async (a) => {
334
+ }, C = async (r) => {
220
335
  try {
221
- await Fe(a), b.success(`${a} 已解封`), y();
336
+ await ht(r), S.success(`${r} 已解封`), g();
222
337
  } catch {
223
- b.error("解封失败");
338
+ S.error("解封失败");
224
339
  }
225
340
  };
226
341
  return /* @__PURE__ */ s("div", { children: [
227
- /* @__PURE__ */ e(v, { style: { marginBottom: 16 }, children: /* @__PURE__ */ e(w, { icon: /* @__PURE__ */ e(Q, {}), onClick: y, loading: d, children: "刷新" }) }),
228
- p && /* @__PURE__ */ e(
229
- G,
342
+ /* @__PURE__ */ e(_, { style: { marginBottom: 16 }, children: /* @__PURE__ */ e(I, { icon: /* @__PURE__ */ e(Y, {}), onClick: g, loading: l, children: "刷新" }) }),
343
+ h && /* @__PURE__ */ e(
344
+ V,
230
345
  {
231
346
  type: "error",
232
347
  showIcon: !0,
233
348
  style: { marginBottom: 12 },
234
349
  message: "节点列表读取失败",
235
- description: p
350
+ description: h
236
351
  }
237
352
  ),
238
353
  /* @__PURE__ */ e(
239
- pe,
354
+ ye,
240
355
  {
241
356
  columns: [
242
357
  {
243
358
  title: "名称",
244
359
  dataIndex: "name",
245
360
  key: "name",
246
- render: (a) => /* @__PURE__ */ e("strong", { children: a })
361
+ render: (r) => /* @__PURE__ */ e("strong", { children: r })
247
362
  },
248
363
  {
249
364
  title: "IP",
250
365
  dataIndex: "ip",
251
366
  key: "ip",
252
- render: (a) => /* @__PURE__ */ e("code", { children: a })
367
+ render: (r) => /* @__PURE__ */ e("code", { children: r })
253
368
  },
254
369
  {
255
370
  title: "状态",
256
371
  dataIndex: "status",
257
372
  key: "status",
258
- render: (a) => /* @__PURE__ */ e(ee, { status: a === "Ready" ? "success" : "error", text: a })
373
+ render: (r) => /* @__PURE__ */ e(re, { status: r === "Ready" ? "success" : "error", text: r })
259
374
  },
260
375
  {
261
376
  title: "角色",
262
377
  dataIndex: "roles",
263
378
  key: "roles",
264
- render: (a) => a ? /* @__PURE__ */ e(C, { color: "blue", children: a }) : /* @__PURE__ */ e(C, { children: "worker" })
379
+ render: (r) => r ? /* @__PURE__ */ e(O, { color: "blue", children: r }) : /* @__PURE__ */ e(O, { children: "worker" })
265
380
  },
266
381
  {
267
382
  title: "CPU",
268
383
  key: "cpu",
269
- render: (a, o) => {
270
- var S;
271
- const c = o.cpuUsed, x = c != null && o.cpuCapacity > 0 ? c / o.cpuCapacity * 100 : null;
384
+ render: (r, o) => {
385
+ var P;
386
+ const c = o.cpuUsed, b = c != null && o.cpuCapacity > 0 ? c / o.cpuCapacity * 100 : null;
272
387
  return /* @__PURE__ */ s("span", { children: [
273
388
  c != null ? c.toFixed(2) : "—",
274
389
  " / ",
275
- ((S = o.cpuCapacity) == null ? void 0 : S.toFixed(0)) ?? 0,
390
+ ((P = o.cpuCapacity) == null ? void 0 : P.toFixed(0)) ?? 0,
276
391
  " cores",
277
- x != null && /* @__PURE__ */ s(C, { color: x > 80 ? "error" : "success", style: { marginLeft: 4 }, children: [
278
- x.toFixed(0),
392
+ b != null && /* @__PURE__ */ s(O, { color: b > 80 ? "error" : "success", style: { marginLeft: 4 }, children: [
393
+ b.toFixed(0),
279
394
  "%"
280
395
  ] })
281
396
  ] });
@@ -284,16 +399,16 @@ const Ue = () => {
284
399
  {
285
400
  title: "内存",
286
401
  key: "mem",
287
- render: (a, o) => {
288
- var S;
289
- const c = o.memUsed, x = c != null && o.memCapacity > 0 ? c / o.memCapacity * 100 : null;
402
+ render: (r, o) => {
403
+ var P;
404
+ const c = o.memUsed, b = c != null && o.memCapacity > 0 ? c / o.memCapacity * 100 : null;
290
405
  return /* @__PURE__ */ s("span", { children: [
291
406
  c != null ? c.toFixed(1) : "—",
292
407
  " / ",
293
- ((S = o.memCapacity) == null ? void 0 : S.toFixed(1)) ?? 0,
408
+ ((P = o.memCapacity) == null ? void 0 : P.toFixed(1)) ?? 0,
294
409
  " GB",
295
- x != null && /* @__PURE__ */ s(C, { color: x > 80 ? "error" : "success", style: { marginLeft: 4 }, children: [
296
- x.toFixed(0),
410
+ b != null && /* @__PURE__ */ s(O, { color: b > 80 ? "error" : "success", style: { marginLeft: 4 }, children: [
411
+ b.toFixed(0),
297
412
  "%"
298
413
  ] })
299
414
  ] });
@@ -306,66 +421,66 @@ const Ue = () => {
306
421
  title: "操作",
307
422
  key: "action",
308
423
  width: 150,
309
- render: (a, o) => /* @__PURE__ */ s(v, { children: [
310
- /* @__PURE__ */ e(B, { title: `封锁 ${o.name}?`, onConfirm: () => h(o.name), children: /* @__PURE__ */ e(w, { size: "small", icon: /* @__PURE__ */ e(ye, {}), children: "Cordon" }) }),
311
- /* @__PURE__ */ e(B, { title: `解封 ${o.name}?`, onConfirm: () => P(o.name), children: /* @__PURE__ */ e(w, { size: "small", icon: /* @__PURE__ */ e(ge, {}), children: "Uncordon" }) })
424
+ render: (r, o) => /* @__PURE__ */ s(_, { children: [
425
+ /* @__PURE__ */ e(B, { title: `封锁 ${o.name}?`, onConfirm: () => u(o.name), children: /* @__PURE__ */ e(I, { size: "small", icon: /* @__PURE__ */ e(ve, {}), children: "Cordon" }) }),
426
+ /* @__PURE__ */ e(B, { title: `解封 ${o.name}?`, onConfirm: () => C(o.name), children: /* @__PURE__ */ e(I, { size: "small", icon: /* @__PURE__ */ e(xe, {}), children: "Uncordon" }) })
312
427
  ] })
313
428
  }
314
429
  ],
315
430
  dataSource: t,
316
431
  rowKey: "name",
317
- loading: d,
432
+ loading: l,
318
433
  pagination: !1,
319
434
  scroll: { x: 1400 },
320
435
  size: "middle"
321
436
  }
322
437
  )
323
438
  ] });
324
- }, Ke = ({
439
+ }, xt = ({
325
440
  namespace: t,
326
- podName: r,
327
- tailLines: d = 200
441
+ podName: a,
442
+ tailLines: l = 200
328
443
  }) => {
329
- const [u, p] = i([]), [m, y] = i(!1), [h, P] = i(!1), k = L(null), a = L(null), o = L(!1);
330
- z(() => (c(), () => {
331
- var g;
332
- (g = k.current) == null || g.close();
333
- }), [t, r]), z(() => {
334
- var g;
335
- h || (g = a.current) == null || g.scrollIntoView({ behavior: "smooth" });
336
- }, [u, h]);
444
+ const [p, h] = m([]), [y, g] = m(!1), [u, C] = m(!1), v = z(null), r = z(null), o = z(!1);
445
+ E(() => (c(), () => {
446
+ var k;
447
+ (k = v.current) == null || k.close();
448
+ }), [t, a]), E(() => {
449
+ var k;
450
+ u || (k = r.current) == null || k.scrollIntoView({ behavior: "smooth" });
451
+ }, [p, u]);
337
452
  const c = () => {
338
- const g = window.location.protocol === "https:" ? "wss:" : "ws:", n = window.location.host, f = `${g}//${n}/z-team/ops/k8s/ws/logs?namespace=${t}&name=${r}&tailLines=${d}`, R = new WebSocket(f);
339
- k.current = R, R.onopen = () => {
340
- y(!0), b.success("日志流已连接");
341
- }, R.onmessage = (O) => {
342
- o.current || p((E) => [...E.slice(-1e3), O.data]);
343
- }, R.onclose = () => {
344
- y(!1);
345
- }, R.onerror = () => {
346
- y(!1), b.error("WebSocket 连接错误");
453
+ const k = window.location.protocol === "https:" ? "wss:" : "ws:", n = window.location.host, d = `${k}//${n}/z-team/ops/k8s/ws/logs?namespace=${t}&name=${a}&tailLines=${l}`, f = new WebSocket(d);
454
+ v.current = f, f.onopen = () => {
455
+ g(!0), S.success("日志流已连接");
456
+ }, f.onmessage = (x) => {
457
+ o.current || h((R) => [...R.slice(-1e3), x.data]);
458
+ }, f.onclose = () => {
459
+ g(!1);
460
+ }, f.onerror = () => {
461
+ g(!1), S.error("WebSocket 连接错误");
347
462
  };
348
463
  };
349
464
  return /* @__PURE__ */ s("div", { style: { display: "flex", flexDirection: "column", height: "100%" }, children: [
350
- /* @__PURE__ */ s(v, { style: { marginBottom: 8 }, children: [
351
- /* @__PURE__ */ e(C, { color: m ? "success" : "error", children: m ? "● 已连接" : "● 已断开" }),
465
+ /* @__PURE__ */ s(_, { style: { marginBottom: 8 }, children: [
466
+ /* @__PURE__ */ e(O, { color: y ? "success" : "error", children: y ? "● 已连接" : "● 已断开" }),
352
467
  /* @__PURE__ */ e(
353
- w,
468
+ I,
354
469
  {
355
470
  size: "small",
356
- icon: h ? /* @__PURE__ */ e(fe, {}) : /* @__PURE__ */ e(be, {}),
471
+ icon: u ? /* @__PURE__ */ e(Se, {}) : /* @__PURE__ */ e(Ie, {}),
357
472
  onClick: () => {
358
- o.current = !o.current, P(o.current);
473
+ o.current = !o.current, C(o.current);
359
474
  },
360
- children: h ? "继续" : "暂停"
475
+ children: u ? "继续" : "暂停"
361
476
  }
362
477
  ),
363
- /* @__PURE__ */ e(w, { size: "small", icon: /* @__PURE__ */ e(se, {}), onClick: () => {
364
- p([]);
478
+ /* @__PURE__ */ e(I, { size: "small", icon: /* @__PURE__ */ e(le, {}), onClick: () => {
479
+ h([]);
365
480
  }, children: "清空" }),
366
- /* @__PURE__ */ e(w, { size: "small", onClick: () => {
367
- var g;
368
- (g = k.current) == null || g.close(), p([]), c();
481
+ /* @__PURE__ */ e(I, { size: "small", onClick: () => {
482
+ var k;
483
+ (k = v.current) == null || k.close(), h([]), c();
369
484
  }, children: "重连" })
370
485
  ] }),
371
486
  /* @__PURE__ */ s("div", { style: {
@@ -379,60 +494,60 @@ const Ue = () => {
379
494
  lineHeight: 1.5,
380
495
  color: "#d4d4d4"
381
496
  }, children: [
382
- u.map((g, n) => /* @__PURE__ */ e("div", { style: {
383
- color: g.includes("ERROR") ? "#f44336" : g.includes("WARN") ? "#ff9800" : g.includes("INFO") ? "#4caf50" : "#d4d4d4",
497
+ p.map((k, n) => /* @__PURE__ */ e("div", { style: {
498
+ color: k.includes("ERROR") ? "#f44336" : k.includes("WARN") ? "#ff9800" : k.includes("INFO") ? "#4caf50" : "#d4d4d4",
384
499
  whiteSpace: "pre-wrap",
385
500
  wordBreak: "break-all"
386
- }, children: g }, n)),
387
- /* @__PURE__ */ e("div", { ref: a })
501
+ }, children: k }, n)),
502
+ /* @__PURE__ */ e("div", { ref: r })
388
503
  ] })
389
504
  ] });
390
- }, _e = ({
505
+ }, St = ({
391
506
  namespace: t,
392
- podName: r
507
+ podName: a
393
508
  }) => {
394
- const [d, u] = i(!1), [p, m] = i(""), [y, h] = i("sh"), [P, k] = i([]), a = L(null), o = L(null), c = L(null);
395
- z(() => (t && r && x(), () => {
509
+ const [l, p] = m(!1), [h, y] = m(""), [g, u] = m("sh"), [C, v] = m([]), r = z(null), o = z(null), c = z(null);
510
+ E(() => (t && a && b(), () => {
396
511
  var n;
397
- return (n = a.current) == null ? void 0 : n.close();
398
- }), [t, r]);
399
- const x = () => {
400
- const n = window.location.protocol === "https:" ? "wss:" : "ws:", f = window.location.host, R = `${n}//${f}/z-team/ops/k8s/ws/exec?namespace=${t}&name=${r}&command=${y}`, O = new WebSocket(R);
401
- a.current = O, O.onopen = () => {
402
- u(!0), k((E) => [...E, `Connected to ${t}/${r} (${y})`]), b.success("终端已连接");
403
- }, O.onmessage = (E) => {
404
- k((J) => [...J.slice(-500), E.data]), setTimeout(() => {
512
+ return (n = r.current) == null ? void 0 : n.close();
513
+ }), [t, a]);
514
+ const b = () => {
515
+ const n = window.location.protocol === "https:" ? "wss:" : "ws:", d = window.location.host, f = `${n}//${d}/z-team/ops/k8s/ws/exec?namespace=${t}&name=${a}&command=${g}`, x = new WebSocket(f);
516
+ r.current = x, x.onopen = () => {
517
+ p(!0), v((R) => [...R, `Connected to ${t}/${a} (${g})`]), S.success("终端已连接");
518
+ }, x.onmessage = (R) => {
519
+ v((F) => [...F.slice(-500), R.data]), setTimeout(() => {
405
520
  o.current && (o.current.scrollTop = o.current.scrollHeight);
406
521
  }, 50);
407
- }, O.onclose = () => {
408
- u(!1), k((E) => [...E, `
522
+ }, x.onclose = () => {
523
+ p(!1), v((R) => [...R, `
409
524
  --- 连接已关闭 ---`]);
410
- }, O.onerror = () => {
411
- u(!1), b.error("WebSocket 连接错误");
525
+ }, x.onerror = () => {
526
+ p(!1), S.error("WebSocket 连接错误");
412
527
  };
413
- }, S = () => {
414
- !p.trim() || !a.current || (a.current.readyState === WebSocket.OPEN ? (a.current.send(p), k((n) => [...n, `$ ${p}`]), m("")) : b.warning("WebSocket 未连接"));
415
- }, F = (n) => {
416
- var f;
417
- n.key === "Enter" && S(), n.key === "Tab" && (n.preventDefault(), ((f = a.current) == null ? void 0 : f.readyState) === WebSocket.OPEN && a.current.send(" "));
418
- }, g = () => k([]);
528
+ }, P = () => {
529
+ !h.trim() || !r.current || (r.current.readyState === WebSocket.OPEN ? (r.current.send(h), v((n) => [...n, `$ ${h}`]), y("")) : S.warning("WebSocket 未连接"));
530
+ }, N = (n) => {
531
+ var d;
532
+ n.key === "Enter" && P(), n.key === "Tab" && (n.preventDefault(), ((d = r.current) == null ? void 0 : d.readyState) === WebSocket.OPEN && r.current.send(" "));
533
+ }, k = () => v([]);
419
534
  return /* @__PURE__ */ s("div", { style: { display: "flex", flexDirection: "column", height: "100%" }, children: [
420
- /* @__PURE__ */ s(v, { style: { marginBottom: 8 }, children: [
421
- /* @__PURE__ */ e(C, { color: d ? "success" : "error", children: d ? "● 已连接" : "● 已断开" }),
535
+ /* @__PURE__ */ s(_, { style: { marginBottom: 8 }, children: [
536
+ /* @__PURE__ */ e(O, { color: l ? "success" : "error", children: l ? "● 已连接" : "● 已断开" }),
422
537
  /* @__PURE__ */ e(
423
- te,
538
+ ae,
424
539
  {
425
- value: y,
426
- onChange: h,
540
+ value: g,
541
+ onChange: u,
427
542
  size: "small",
428
543
  style: { width: 100 },
429
544
  options: ["sh", "bash", "/bin/sh", "/bin/bash"].map((n) => ({ label: n, value: n }))
430
545
  }
431
546
  ),
432
- /* @__PURE__ */ e(w, { size: "small", onClick: g, icon: /* @__PURE__ */ e(se, {}), children: "清空" }),
433
- /* @__PURE__ */ e(w, { size: "small", onClick: () => {
547
+ /* @__PURE__ */ e(I, { size: "small", onClick: k, icon: /* @__PURE__ */ e(le, {}), children: "清空" }),
548
+ /* @__PURE__ */ e(I, { size: "small", onClick: () => {
434
549
  var n;
435
- (n = a.current) == null || n.close(), setTimeout(x, 200);
550
+ (n = r.current) == null || n.close(), setTimeout(b, 200);
436
551
  }, children: "重连" })
437
552
  ] }),
438
553
  /* @__PURE__ */ s(
@@ -454,11 +569,11 @@ const Ue = () => {
454
569
  border: "1px solid #333"
455
570
  },
456
571
  children: [
457
- P.map((n, f) => /* @__PURE__ */ e("div", { style: {
572
+ C.map((n, d) => /* @__PURE__ */ e("div", { style: {
458
573
  whiteSpace: "pre-wrap",
459
574
  wordBreak: "break-all",
460
575
  color: n.startsWith("$ ") ? "#00bfff" : n.startsWith("---") ? "#666" : n.includes("Error") || n.includes("error") ? "#ff4444" : "#00ff88"
461
- }, children: n }, f)),
576
+ }, children: n }, d)),
462
577
  /* @__PURE__ */ e("span", { ref: c, style: {
463
578
  display: "inline-block",
464
579
  width: 8,
@@ -470,7 +585,7 @@ const Ue = () => {
470
585
  ]
471
586
  }
472
587
  ),
473
- /* @__PURE__ */ s(v.Compact, { style: { width: "100%" }, children: [
588
+ /* @__PURE__ */ s(_.Compact, { style: { width: "100%" }, children: [
474
589
  /* @__PURE__ */ s("span", { style: {
475
590
  background: "#333",
476
591
  color: "#00ff88",
@@ -484,16 +599,16 @@ const Ue = () => {
484
599
  "$ ",
485
600
  t,
486
601
  "/",
487
- r
602
+ a
488
603
  ] }),
489
604
  /* @__PURE__ */ e(
490
605
  "input",
491
606
  {
492
- value: p,
493
- onChange: (n) => m(n.target.value),
494
- onKeyDown: F,
607
+ value: h,
608
+ onChange: (n) => y(n.target.value),
609
+ onKeyDown: N,
495
610
  placeholder: "输入命令后按 Enter...",
496
- disabled: !d,
611
+ disabled: !l,
497
612
  style: {
498
613
  flex: 1,
499
614
  background: "#1a1a2e",
@@ -509,18 +624,18 @@ const Ue = () => {
509
624
  }
510
625
  ),
511
626
  /* @__PURE__ */ e(
512
- w,
627
+ I,
513
628
  {
514
629
  type: "primary",
515
- icon: /* @__PURE__ */ e(we, {}),
516
- onClick: S,
517
- disabled: !d,
630
+ icon: /* @__PURE__ */ e(Ce, {}),
631
+ onClick: P,
632
+ disabled: !l,
518
633
  children: "发送"
519
634
  }
520
635
  )
521
636
  ] })
522
637
  ] });
523
- }, qe = (t) => {
638
+ }, It = (t) => {
524
639
  switch (t) {
525
640
  case "Running":
526
641
  return "success";
@@ -533,57 +648,57 @@ const Ue = () => {
533
648
  default:
534
649
  return "default";
535
650
  }
536
- }, Ge = () => {
537
- const [t, r] = i([]), [d, u] = i(!1), [p, m] = i(""), [y, h] = i("*"), [P, k] = i([]), [a, o] = i(!1), [c, x] = i(null), [S, F] = i("logs"), [g, n] = i("");
538
- z(() => {
651
+ }, Ct = () => {
652
+ const [t, a] = m([]), [l, p] = m(!1), [h, y] = m(""), [g, u] = m("*"), [C, v] = m([]), [r, o] = m(!1), [c, b] = m(null), [P, N] = m("logs"), [k, n] = m("");
653
+ E(() => {
654
+ d();
655
+ }, []), E(() => {
539
656
  f();
540
- }, []), z(() => {
541
- R();
542
- }, [y]);
543
- const f = async () => {
657
+ }, [g]);
658
+ const d = async () => {
544
659
  try {
545
- const l = await Be();
546
- k(Array.isArray(l.data) ? ["*", ...l.data] : ["*"]);
660
+ const i = await wt();
661
+ v(Array.isArray(i.data) ? ["*", ...i.data] : ["*"]);
547
662
  } catch {
548
- k(["*"]);
663
+ v(["*"]);
549
664
  }
550
- }, R = async () => {
551
- u(!0), m("");
665
+ }, f = async () => {
666
+ p(!0), y("");
552
667
  try {
553
- const l = await Ne(y);
554
- r(Array.isArray(l.data) ? l.data : []);
555
- } catch (l) {
556
- r([]), m(String((l == null ? void 0 : l.message) || l));
668
+ const i = await yt(g);
669
+ a(Array.isArray(i.data) ? i.data : []);
670
+ } catch (i) {
671
+ a([]), y(String((i == null ? void 0 : i.message) || i));
557
672
  } finally {
558
- u(!1);
673
+ p(!1);
559
674
  }
560
- }, O = async (l) => {
561
- var I;
562
- x(l), F("logs"), o(!0);
675
+ }, x = async (i) => {
676
+ var $;
677
+ b(i), N("logs"), o(!0);
563
678
  try {
564
- const A = await He(l.namespace, l.name, 200);
565
- n(((I = A == null ? void 0 : A.data) == null ? void 0 : I.logs) ?? "");
566
- } catch (A) {
567
- n(`加载日志失败:${String((A == null ? void 0 : A.message) || A)}`);
679
+ const G = await ft(i.namespace, i.name, 200);
680
+ n((($ = G == null ? void 0 : G.data) == null ? void 0 : $.logs) ?? "");
681
+ } catch (G) {
682
+ n(`加载日志失败:${String((G == null ? void 0 : G.message) || G)}`);
568
683
  }
569
- }, E = async (l) => {
684
+ }, R = async (i) => {
570
685
  try {
571
- await Le(l.namespace, l.name), b.success(`${l.name} 已重启`), R();
686
+ await gt(i.namespace, i.name), S.success(`${i.name} 已重启`), f();
572
687
  } catch {
573
- b.error("重启失败");
688
+ S.error("重启失败");
574
689
  }
575
- }, J = async (l) => {
690
+ }, F = async (i) => {
576
691
  try {
577
- await Me(l.namespace, l.name), b.success(`${l.name} 已删除`), R();
692
+ await bt(i.namespace, i.name), S.success(`${i.name} 已删除`), f();
578
693
  } catch {
579
- b.error("删除失败");
694
+ S.error("删除失败");
580
695
  }
581
- }, le = [
696
+ }, ue = [
582
697
  {
583
698
  title: "名称",
584
699
  dataIndex: "name",
585
700
  key: "name",
586
- render: (l, I) => /* @__PURE__ */ e("a", { onClick: () => O(I), children: l })
701
+ render: (i, $) => /* @__PURE__ */ e("a", { onClick: () => x($), children: i })
587
702
  },
588
703
  { title: "命名空间", dataIndex: "namespace", key: "namespace", width: 120 },
589
704
  { title: "节点", dataIndex: "nodeName", key: "nodeName", width: 130 },
@@ -593,14 +708,14 @@ const Ue = () => {
593
708
  dataIndex: "status",
594
709
  key: "status",
595
710
  width: 100,
596
- render: (l) => /* @__PURE__ */ e(ee, { status: qe(l), text: l })
711
+ render: (i) => /* @__PURE__ */ e(re, { status: It(i), text: i })
597
712
  },
598
713
  {
599
714
  title: "就绪",
600
715
  dataIndex: "ready",
601
716
  key: "ready",
602
717
  width: 70,
603
- render: (l) => l ? /* @__PURE__ */ e(C, { color: "success", children: "✓" }) : /* @__PURE__ */ e(C, { color: "error", children: "✗" })
718
+ render: (i) => i ? /* @__PURE__ */ e(O, { color: "success", children: "✓" }) : /* @__PURE__ */ e(O, { color: "error", children: "✗" })
604
719
  },
605
720
  { title: "重启", dataIndex: "restartCount", key: "restartCount", width: 70 },
606
721
  { title: "存活", dataIndex: "age", key: "age", width: 80 },
@@ -608,44 +723,44 @@ const Ue = () => {
608
723
  title: "操作",
609
724
  key: "action",
610
725
  width: 200,
611
- render: (l, I) => /* @__PURE__ */ s(v, { children: [
612
- /* @__PURE__ */ e(w, { size: "small", icon: /* @__PURE__ */ e(ke, {}), onClick: () => O(I), children: "日志" }),
613
- /* @__PURE__ */ e(B, { title: "确认重启此 Pod?", onConfirm: () => E(I), children: /* @__PURE__ */ e(w, { size: "small", type: "primary", ghost: !0, children: "重启" }) }),
614
- /* @__PURE__ */ e(B, { title: "确认删除此 Pod?", onConfirm: () => J(I), children: /* @__PURE__ */ e(w, { size: "small", danger: !0, icon: /* @__PURE__ */ e(ae, {}), children: "删除" }) })
726
+ render: (i, $) => /* @__PURE__ */ s(_, { children: [
727
+ /* @__PURE__ */ e(I, { size: "small", icon: /* @__PURE__ */ e(Pe, {}), onClick: () => x($), children: "日志" }),
728
+ /* @__PURE__ */ e(B, { title: "确认重启此 Pod?", onConfirm: () => R($), children: /* @__PURE__ */ e(I, { size: "small", type: "primary", ghost: !0, children: "重启" }) }),
729
+ /* @__PURE__ */ e(B, { title: "确认删除此 Pod?", onConfirm: () => F($), children: /* @__PURE__ */ e(I, { size: "small", danger: !0, icon: /* @__PURE__ */ e(ce, {}), children: "删除" }) })
615
730
  ] })
616
731
  }
617
732
  ];
618
733
  return /* @__PURE__ */ s("div", { children: [
619
- /* @__PURE__ */ s(v, { style: { marginBottom: 16 }, children: [
734
+ /* @__PURE__ */ s(_, { style: { marginBottom: 16 }, children: [
620
735
  /* @__PURE__ */ e("span", { children: "命名空间:" }),
621
736
  /* @__PURE__ */ e(
622
- te,
737
+ ae,
623
738
  {
624
- value: y,
625
- onChange: h,
739
+ value: g,
740
+ onChange: u,
626
741
  style: { width: 200 },
627
- options: P.map((l) => ({ label: l, value: l }))
742
+ options: C.map((i) => ({ label: i, value: i }))
628
743
  }
629
744
  ),
630
- /* @__PURE__ */ e(w, { icon: /* @__PURE__ */ e(Q, {}), onClick: R, loading: d, children: "刷新" })
745
+ /* @__PURE__ */ e(I, { icon: /* @__PURE__ */ e(Y, {}), onClick: f, loading: l, children: "刷新" })
631
746
  ] }),
632
- p && /* @__PURE__ */ e(
633
- G,
747
+ h && /* @__PURE__ */ e(
748
+ V,
634
749
  {
635
750
  type: "error",
636
751
  showIcon: !0,
637
752
  style: { marginBottom: 12 },
638
753
  message: "Pod 列表读取失败",
639
- description: p
754
+ description: h
640
755
  }
641
756
  ),
642
757
  /* @__PURE__ */ e(
643
- re,
758
+ ie,
644
759
  {
645
760
  rows: t,
646
- columns: le,
761
+ columns: ue,
647
762
  rowKey: "name",
648
- loading: d,
763
+ loading: l,
649
764
  scroll: { x: 1e3 },
650
765
  searchKeys: ["name", "namespace", "nodeName"],
651
766
  searchPlaceholder: "按 Pod 名 / 命名空间 / 节点过滤",
@@ -655,24 +770,24 @@ const Ue = () => {
655
770
  }
656
771
  ),
657
772
  /* @__PURE__ */ e(
658
- ue,
773
+ fe,
659
774
  {
660
775
  title: c ? `${c.name} (${c.namespace})` : "",
661
776
  placement: "right",
662
777
  size: "large",
663
- open: a,
778
+ open: r,
664
779
  onClose: () => o(!1),
665
780
  children: /* @__PURE__ */ e(
666
- me,
781
+ ge,
667
782
  {
668
- activeKey: S,
669
- onChange: F,
783
+ activeKey: P,
784
+ onChange: N,
670
785
  items: [
671
786
  {
672
787
  key: "logs",
673
788
  label: "实时日志",
674
789
  children: c ? /* @__PURE__ */ e(
675
- Ke,
790
+ xt,
676
791
  {
677
792
  namespace: c.namespace,
678
793
  podName: c.name
@@ -683,7 +798,7 @@ const Ue = () => {
683
798
  key: "exec",
684
799
  label: "终端",
685
800
  children: /* @__PURE__ */ e("div", { style: { padding: 20 }, children: /* @__PURE__ */ e(
686
- _e,
801
+ St,
687
802
  {
688
803
  namespace: (c == null ? void 0 : c.namespace) ?? "",
689
804
  podName: (c == null ? void 0 : c.name) ?? ""
@@ -697,39 +812,39 @@ const Ue = () => {
697
812
  )
698
813
  ] });
699
814
  };
700
- async function K(t, r) {
701
- return oe(`/hpa${t}`, r);
815
+ async function K(t, a) {
816
+ return de(`/hpa${t}`, a);
702
817
  }
703
- const Je = () => {
704
- const [t, r] = i([]), [d, u] = i(!1), [p, m] = i(""), [y, h] = i(!1), [P, k] = i(!1), [a] = D.useForm();
705
- z(() => {
818
+ const Pt = () => {
819
+ const [t, a] = m([]), [l, p] = m(!1), [h, y] = m(""), [g, u] = m(!1), [C, v] = m(!1), [r] = H.useForm();
820
+ E(() => {
706
821
  o();
707
822
  }, []);
708
823
  const o = async () => {
709
- u(!0), m("");
824
+ p(!0), y("");
710
825
  try {
711
826
  const n = await K("/list?namespace=*");
712
- r(Array.isArray(n.data) ? n.data : []);
827
+ a(Array.isArray(n.data) ? n.data : []);
713
828
  } catch (n) {
714
- r([]), m(String((n == null ? void 0 : n.message) || n));
829
+ a([]), y(String((n == null ? void 0 : n.message) || n));
715
830
  } finally {
716
- u(!1);
831
+ p(!1);
717
832
  }
718
833
  }, c = () => {
719
- k(!1), a.resetFields(), a.setFieldsValue({ minReplicas: 1, maxReplicas: 10, cpuTarget: 80 }), h(!0);
720
- }, x = (n) => {
721
- k(!0), a.setFieldsValue({
834
+ v(!1), r.resetFields(), r.setFieldsValue({ minReplicas: 1, maxReplicas: 10, cpuTarget: 80 }), u(!0);
835
+ }, b = (n) => {
836
+ v(!0), r.setFieldsValue({
722
837
  name: n.name,
723
838
  namespace: n.namespace,
724
839
  deploymentName: n.scaleTargetRef,
725
840
  minReplicas: n.minReplicas,
726
841
  maxReplicas: n.maxReplicas,
727
842
  cpuTarget: n.cpuTarget
728
- }), h(!0);
729
- }, S = async () => {
843
+ }), u(!0);
844
+ }, P = async () => {
730
845
  try {
731
- const n = await a.validateFields();
732
- P ? (await K("/update", {
846
+ const n = await r.validateFields();
847
+ C ? (await K("/update", {
733
848
  method: "POST",
734
849
  body: JSON.stringify({
735
850
  namespace: n.namespace,
@@ -737,37 +852,37 @@ const Je = () => {
737
852
  minReplicas: n.minReplicas,
738
853
  maxReplicas: n.maxReplicas
739
854
  })
740
- }), b.success("HPA 更新成功")) : (await K("/create", {
855
+ }), S.success("HPA 更新成功")) : (await K("/create", {
741
856
  method: "POST",
742
857
  body: JSON.stringify(n)
743
- }), b.success("HPA 创建成功")), h(!1), o();
858
+ }), S.success("HPA 创建成功")), u(!1), o();
744
859
  } catch {
745
- b.error("操作失败");
860
+ S.error("操作失败");
746
861
  }
747
- }, F = async (n) => {
862
+ }, N = async (n) => {
748
863
  try {
749
- await K(`/delete/${n.namespace}/${n.name}`, { method: "DELETE" }), b.success("HPA 已删除"), o();
864
+ await K(`/delete/${n.namespace}/${n.name}`, { method: "DELETE" }), S.success("HPA 已删除"), o();
750
865
  } catch {
751
- b.error("删除失败");
866
+ S.error("删除失败");
752
867
  }
753
868
  };
754
869
  return /* @__PURE__ */ s("div", { children: [
755
- /* @__PURE__ */ s(v, { style: { marginBottom: 16 }, children: [
756
- /* @__PURE__ */ e(w, { type: "primary", icon: /* @__PURE__ */ e(xe, {}), onClick: c, children: "新建 HPA" }),
757
- /* @__PURE__ */ e(w, { icon: /* @__PURE__ */ e(Q, {}), onClick: o, loading: d, children: "刷新" })
870
+ /* @__PURE__ */ s(_, { style: { marginBottom: 16 }, children: [
871
+ /* @__PURE__ */ e(I, { type: "primary", icon: /* @__PURE__ */ e(_e, {}), onClick: c, children: "新建 HPA" }),
872
+ /* @__PURE__ */ e(I, { icon: /* @__PURE__ */ e(Y, {}), onClick: o, loading: l, children: "刷新" })
758
873
  ] }),
759
- p && /* @__PURE__ */ e(
760
- G,
874
+ h && /* @__PURE__ */ e(
875
+ V,
761
876
  {
762
877
  type: "error",
763
878
  showIcon: !0,
764
879
  style: { marginBottom: 12 },
765
880
  message: "HPA 列表读取失败",
766
- description: p
881
+ description: h
767
882
  }
768
883
  ),
769
884
  /* @__PURE__ */ e(
770
- re,
885
+ ie,
771
886
  {
772
887
  rows: t,
773
888
  columns: [
@@ -777,12 +892,12 @@ const Je = () => {
777
892
  {
778
893
  title: "副本范围",
779
894
  key: "replicas",
780
- render: (n, f) => /* @__PURE__ */ s("span", { children: [
781
- f.minReplicas,
895
+ render: (n, d) => /* @__PURE__ */ s("span", { children: [
896
+ d.minReplicas,
782
897
  " ~ ",
783
- f.maxReplicas,
898
+ d.maxReplicas,
784
899
  " (当前: ",
785
- f.currentReplicas ?? "-",
900
+ d.currentReplicas ?? "-",
786
901
  ")"
787
902
  ] })
788
903
  },
@@ -790,7 +905,7 @@ const Je = () => {
790
905
  title: "CPU 目标",
791
906
  dataIndex: "cpuTarget",
792
907
  key: "cpuTarget",
793
- render: (n) => n ? /* @__PURE__ */ s(C, { color: "blue", children: [
908
+ render: (n) => n ? /* @__PURE__ */ s(O, { color: "blue", children: [
794
909
  n,
795
910
  "%"
796
911
  ] }) : "-"
@@ -799,21 +914,21 @@ const Je = () => {
799
914
  title: "期望副本",
800
915
  dataIndex: "desiredReplicas",
801
916
  key: "desired",
802
- render: (n) => n ? /* @__PURE__ */ e(C, { color: "green", children: n }) : "-"
917
+ render: (n) => n ? /* @__PURE__ */ e(O, { color: "green", children: n }) : "-"
803
918
  },
804
919
  { title: "存活", dataIndex: "age", key: "age" },
805
920
  {
806
921
  title: "操作",
807
922
  key: "action",
808
923
  width: 150,
809
- render: (n, f) => /* @__PURE__ */ s(v, { children: [
810
- /* @__PURE__ */ e(w, { size: "small", icon: /* @__PURE__ */ e(ve, {}), onClick: () => x(f), children: "编辑" }),
811
- /* @__PURE__ */ e(B, { title: `删除 HPA ${f.name}?`, onConfirm: () => F(f), children: /* @__PURE__ */ e(w, { size: "small", danger: !0, icon: /* @__PURE__ */ e(ae, {}), children: "删除" }) })
924
+ render: (n, d) => /* @__PURE__ */ s(_, { children: [
925
+ /* @__PURE__ */ e(I, { size: "small", icon: /* @__PURE__ */ e(Oe, {}), onClick: () => b(d), children: "编辑" }),
926
+ /* @__PURE__ */ e(B, { title: `删除 HPA ${d.name}?`, onConfirm: () => N(d), children: /* @__PURE__ */ e(I, { size: "small", danger: !0, icon: /* @__PURE__ */ e(ce, {}), children: "删除" }) })
812
927
  ] })
813
928
  }
814
929
  ],
815
930
  rowKey: "name",
816
- loading: d,
931
+ loading: l,
817
932
  searchKeys: ["name", "namespace", "scaleTargetRef"],
818
933
  searchPlaceholder: "按 HPA 名 / 命名空间 / 目标 Deployment 过滤",
819
934
  emptyTitle: "暂无 HPA",
@@ -822,97 +937,97 @@ const Je = () => {
822
937
  }
823
938
  ),
824
939
  /* @__PURE__ */ e(
825
- he,
940
+ be,
826
941
  {
827
- title: P ? "编辑 HPA" : "新建 HPA",
828
- open: y,
829
- onOk: S,
830
- onCancel: () => h(!1),
831
- children: /* @__PURE__ */ s(D, { form: a, layout: "vertical", children: [
832
- /* @__PURE__ */ e(D.Item, { name: "namespace", label: "命名空间", rules: [{ required: !0 }], children: /* @__PURE__ */ e(V, { disabled: P }) }),
833
- /* @__PURE__ */ e(D.Item, { name: "name", label: "HPA 名称", rules: [{ required: !0 }], children: /* @__PURE__ */ e(V, { disabled: P }) }),
834
- /* @__PURE__ */ e(D.Item, { name: "deploymentName", label: "目标 Deployment", rules: [{ required: !0 }], children: /* @__PURE__ */ e(V, { disabled: P, placeholder: "namespace/deploymentName" }) }),
835
- /* @__PURE__ */ s(v, { children: [
836
- /* @__PURE__ */ e(D.Item, { name: "minReplicas", label: "最小副本", rules: [{ required: !0 }], children: /* @__PURE__ */ e(j, { min: 0, max: 100 }) }),
837
- /* @__PURE__ */ e(D.Item, { name: "maxReplicas", label: "最大副本", rules: [{ required: !0 }], children: /* @__PURE__ */ e(j, { min: 1, max: 100 }) })
942
+ title: C ? "编辑 HPA" : "新建 HPA",
943
+ open: g,
944
+ onOk: P,
945
+ onCancel: () => u(!1),
946
+ children: /* @__PURE__ */ s(H, { form: r, layout: "vertical", children: [
947
+ /* @__PURE__ */ e(H.Item, { name: "namespace", label: "命名空间", rules: [{ required: !0 }], children: /* @__PURE__ */ e(j, { disabled: C }) }),
948
+ /* @__PURE__ */ e(H.Item, { name: "name", label: "HPA 名称", rules: [{ required: !0 }], children: /* @__PURE__ */ e(j, { disabled: C }) }),
949
+ /* @__PURE__ */ e(H.Item, { name: "deploymentName", label: "目标 Deployment", rules: [{ required: !0 }], children: /* @__PURE__ */ e(j, { disabled: C, placeholder: "namespace/deploymentName" }) }),
950
+ /* @__PURE__ */ s(_, { children: [
951
+ /* @__PURE__ */ e(H.Item, { name: "minReplicas", label: "最小副本", rules: [{ required: !0 }], children: /* @__PURE__ */ e(X, { min: 0, max: 100 }) }),
952
+ /* @__PURE__ */ e(H.Item, { name: "maxReplicas", label: "最大副本", rules: [{ required: !0 }], children: /* @__PURE__ */ e(X, { min: 1, max: 100 }) })
838
953
  ] }),
839
- /* @__PURE__ */ e(D.Item, { name: "cpuTarget", label: "CPU 目标 (%)", children: /* @__PURE__ */ e(j, { min: 1, max: 100 }) })
954
+ /* @__PURE__ */ e(H.Item, { name: "cpuTarget", label: "CPU 目标 (%)", children: /* @__PURE__ */ e(X, { min: 1, max: 100 }) })
840
955
  ] })
841
956
  }
842
957
  )
843
958
  ] });
844
- }, Ve = [
959
+ }, _t = [
845
960
  {
846
961
  title: "DevOps 运维",
847
- icon: /* @__PURE__ */ e(q, {}),
962
+ icon: /* @__PURE__ */ e(J, {}),
848
963
  items: [
849
964
  {
850
965
  key: "devops-dashboard",
851
966
  label: "运维总览",
852
- icon: /* @__PURE__ */ e(X, {}),
967
+ icon: /* @__PURE__ */ e(Q, {}),
853
968
  path: "/ops/devops/dashboard",
854
969
  desc: "集群概览与资源统计"
855
970
  },
856
971
  {
857
972
  key: "devops-nodes",
858
973
  label: "节点管理",
859
- icon: /* @__PURE__ */ e(q, {}),
974
+ icon: /* @__PURE__ */ e(J, {}),
860
975
  path: "/ops/devops/nodes",
861
976
  desc: "K8s 节点列表与状态"
862
977
  },
863
978
  {
864
979
  key: "devops-pods",
865
980
  label: "Pod 管理",
866
- icon: /* @__PURE__ */ e(ne, {}),
981
+ icon: /* @__PURE__ */ e(oe, {}),
867
982
  path: "/ops/devops/pods",
868
983
  desc: "Pod 列表、日志、终端"
869
984
  },
870
985
  {
871
986
  key: "devops-hpa",
872
987
  label: "弹性伸缩",
873
- icon: /* @__PURE__ */ e(H, {}),
988
+ icon: /* @__PURE__ */ e(D, {}),
874
989
  path: "/ops/devops/hpa",
875
990
  desc: "HPA 自动扩缩容策略"
876
991
  },
877
992
  {
878
993
  key: "devops-registry",
879
994
  label: "镜像仓库",
880
- icon: /* @__PURE__ */ e(H, {}),
995
+ icon: /* @__PURE__ */ e(D, {}),
881
996
  path: "/ops/devops/registry",
882
997
  desc: "容器镜像统一管理"
883
998
  },
884
999
  {
885
1000
  key: "devops-pipeline",
886
1001
  label: "流水线",
887
- icon: /* @__PURE__ */ e(Ce, {}),
1002
+ icon: /* @__PURE__ */ e(Re, {}),
888
1003
  path: "/ops/devops/pipeline",
889
1004
  desc: "CI/CD 流水线编排"
890
1005
  },
891
1006
  {
892
1007
  key: "devops-release",
893
1008
  label: "发布管理",
894
- icon: /* @__PURE__ */ e(Pe, {}),
1009
+ icon: /* @__PURE__ */ e($e, {}),
895
1010
  path: "/ops/devops/release",
896
1011
  desc: "应用发布与回滚"
897
1012
  },
898
1013
  {
899
1014
  key: "devops-monitor",
900
1015
  label: "监控告警",
901
- icon: /* @__PURE__ */ e(Se, {}),
1016
+ icon: /* @__PURE__ */ e(Ae, {}),
902
1017
  path: "/ops/devops/monitor",
903
1018
  desc: "Prometheus/Grafana 监控"
904
1019
  },
905
1020
  {
906
1021
  key: "devops-logs",
907
1022
  label: "日志管理",
908
- icon: /* @__PURE__ */ e(Re, {}),
1023
+ icon: /* @__PURE__ */ e(Ne, {}),
909
1024
  path: "/ops/devops/logs",
910
1025
  desc: "Loki 集中日志查询"
911
1026
  },
912
1027
  {
913
1028
  key: "devops-dba",
914
1029
  label: "DBA 工单",
915
- icon: /* @__PURE__ */ e(Y, {}),
1030
+ icon: /* @__PURE__ */ e(ee, {}),
916
1031
  path: "/ops/devops/dba",
917
1032
  desc: "数据库运维工单"
918
1033
  }
@@ -920,33 +1035,33 @@ const Je = () => {
920
1035
  },
921
1036
  {
922
1037
  title: "基础设施",
923
- icon: /* @__PURE__ */ e(q, {}),
1038
+ icon: /* @__PURE__ */ e(J, {}),
924
1039
  items: [
925
1040
  {
926
1041
  key: "ops-channel",
927
1042
  label: "渠道管理",
928
- icon: /* @__PURE__ */ e(Oe, {}),
1043
+ icon: /* @__PURE__ */ e(Ee, {}),
929
1044
  path: "/ops/channel",
930
1045
  desc: "部署渠道配置与管理"
931
1046
  },
932
1047
  {
933
1048
  key: "ops-env",
934
1049
  label: "环境管理",
935
- icon: /* @__PURE__ */ e(H, {}),
1050
+ icon: /* @__PURE__ */ e(D, {}),
936
1051
  path: "/ops/delivery",
937
1052
  desc: "运行环境配置与管理"
938
1053
  },
939
1054
  {
940
1055
  key: "ops-deploy",
941
1056
  label: "部署管理",
942
- icon: /* @__PURE__ */ e(Ie, {}),
1057
+ icon: /* @__PURE__ */ e(Te, {}),
943
1058
  path: "/ops/deployment",
944
1059
  desc: "应用部署与发布管理"
945
1060
  },
946
1061
  {
947
1062
  key: "ops-repo",
948
1063
  label: "仓库管理",
949
- icon: /* @__PURE__ */ e(Y, {}),
1064
+ icon: /* @__PURE__ */ e(ee, {}),
950
1065
  path: "/ops/repo-mgmt",
951
1066
  desc: "代码仓库与镜像管理"
952
1067
  }
@@ -954,19 +1069,19 @@ const Je = () => {
954
1069
  },
955
1070
  {
956
1071
  title: "资源管理",
957
- icon: /* @__PURE__ */ e(H, {}),
1072
+ icon: /* @__PURE__ */ e(D, {}),
958
1073
  items: [
959
1074
  {
960
1075
  key: "resource",
961
1076
  label: "资源管理",
962
- icon: /* @__PURE__ */ e(H, {}),
1077
+ icon: /* @__PURE__ */ e(D, {}),
963
1078
  path: "/resource/domain",
964
1079
  desc: "域名、ECS、RDS、OSS 管理"
965
1080
  }
966
1081
  ]
967
1082
  }
968
1083
  ];
969
- function N({ label: t }) {
1084
+ function L({ label: t }) {
970
1085
  return /* @__PURE__ */ s("div", { style: { padding: 40, textAlign: "center", color: "#999" }, children: [
971
1086
  /* @__PURE__ */ s("h2", { children: [
972
1087
  "🚧 ",
@@ -975,26 +1090,26 @@ function N({ label: t }) {
975
1090
  /* @__PURE__ */ e("p", { children: "功能开发中..." })
976
1091
  ] });
977
1092
  }
978
- function je({ label: t, reason: r, message: d = "该页面未孵化,因为后端接口尚不可用" }) {
1093
+ function Ot({ label: t, reason: a, message: l = "该页面未孵化,因为后端接口尚不可用" }) {
979
1094
  return /* @__PURE__ */ s("div", { style: { padding: 40, maxWidth: 720, margin: "0 auto" }, children: [
980
1095
  /* @__PURE__ */ s("h2", { style: { textAlign: "center" }, children: [
981
1096
  "🧪 ",
982
1097
  t
983
1098
  ] }),
984
1099
  /* @__PURE__ */ e(
985
- G,
1100
+ V,
986
1101
  {
987
1102
  type: "warning",
988
1103
  showIcon: !0,
989
- message: d,
990
- description: r
1104
+ message: l,
1105
+ description: a
991
1106
  }
992
1107
  )
993
1108
  ] });
994
1109
  }
995
- function $({ label: t }) {
1110
+ function A({ label: t }) {
996
1111
  return /* @__PURE__ */ e(
997
- je,
1112
+ Ot,
998
1113
  {
999
1114
  label: t,
1000
1115
  message: "该页面未孵化,因为组件从来不在本仓",
@@ -1002,21 +1117,21 @@ function $({ label: t }) {
1002
1117
  }
1003
1118
  );
1004
1119
  }
1005
- function Z() {
1006
- const { pathname: t } = ce();
1007
- return /* @__PURE__ */ e(_, { to: `${t}?mode=middleware`, replace: !0 });
1120
+ function ne() {
1121
+ const { pathname: t } = se();
1122
+ return /* @__PURE__ */ e(q, { to: t, replace: !0 });
1008
1123
  }
1009
- const Xe = [...Ee, "/script"], Qe = [
1124
+ const Rt = [...ze, "/script"], $t = [
1010
1125
  // ─── 运维中心 ───
1011
1126
  // ⚠ 这一族路由的组件从来没有从 z-ops 迁进来(见 UnmigratedPage 注释)。原先直接写
1012
1127
  // <ChannelPage/> 之类会在**模块求值期**抛 ReferenceError 并白屏整个前端,不是只坏这一页。
1013
- { path: "/ops", element: /* @__PURE__ */ e(_, { to: "/ops/devops", replace: !0 }) },
1014
- { path: "/ops/channel", element: /* @__PURE__ */ e($, { label: "渠道管理" }) },
1015
- { path: "/ops/delivery", element: /* @__PURE__ */ e($, { label: "环境管理" }) },
1016
- { path: "/ops/deployment", element: /* @__PURE__ */ e($, { label: "部署管理" }) },
1017
- { path: "/ops/deployment/:id", element: /* @__PURE__ */ e($, { label: "部署管理" }) },
1018
- { path: "/ops/repo-mgmt", element: /* @__PURE__ */ e($, { label: "仓库管理" }) },
1019
- { path: "/ops/git-platform", element: /* @__PURE__ */ e($, { label: "仓库管理" }) },
1128
+ { path: "/ops", element: /* @__PURE__ */ e(q, { to: "/ops/devops", replace: !0 }) },
1129
+ { path: "/ops/channel", element: /* @__PURE__ */ e(A, { label: "渠道管理" }) },
1130
+ { path: "/ops/delivery", element: /* @__PURE__ */ e(A, { label: "环境管理" }) },
1131
+ { path: "/ops/deployment", element: /* @__PURE__ */ e(A, { label: "部署管理" }) },
1132
+ { path: "/ops/deployment/:id", element: /* @__PURE__ */ e(A, { label: "部署管理" }) },
1133
+ { path: "/ops/repo-mgmt", element: /* @__PURE__ */ e(A, { label: "仓库管理" }) },
1134
+ { path: "/ops/git-platform", element: /* @__PURE__ */ e(A, { label: "仓库管理" }) },
1020
1135
  // ─── DevOps 子路由(K8s 管理面:2026-11-09 复活,数据源改由主壳 OpsK8sController 提供)───
1021
1136
  // ⚠ 历史:这 4 条曾挂真组件,但 API_BASE '/z-team/ops/k8s' 的 handler 只在 z-ops 仓的
1022
1137
  // z-ops-web 里,主壳 boot jar 的 BOOT-INF/lib 里 0 个 z-ops-* ⇒ 实测 GET /z-team/ops/k8s/nodes
@@ -1027,47 +1142,47 @@ const Xe = [...Ee, "/script"], Qe = [
1027
1142
  // ⇒ 占位卡换成真组件。为什么不反向代理 z-ops:它的接口走 SSO(实测 302 → /login),
1028
1143
  // 而两侧 JWT secret 不同(主壳 zgw-jwt/jwt-secret vs z-ops sso-jwt/sso-jwt-secret)⇒ 必被挡;
1029
1144
  // 给 z-ops 加 @NoLogin 又等于把「删 Pod / 改 HPA」公开到 NodePort 30886。
1030
- { path: "/ops/devops", element: /* @__PURE__ */ e(_, { to: "/ops/devops/dashboard", replace: !0 }) },
1031
- { path: "/ops/devops/dashboard", element: /* @__PURE__ */ e(Ue, {}) },
1032
- { path: "/ops/devops/nodes", element: /* @__PURE__ */ e(We, {}) },
1033
- { path: "/ops/devops/pods", element: /* @__PURE__ */ e(Ge, {}) },
1034
- { path: "/ops/devops/hpa", element: /* @__PURE__ */ e(Je, {}) },
1035
- { path: "/ops/devops/registry", element: /* @__PURE__ */ e(N, { label: "镜像仓库" }) },
1036
- { path: "/ops/devops/pipeline", element: /* @__PURE__ */ e(N, { label: "流水线" }) },
1037
- { path: "/ops/devops/release", element: /* @__PURE__ */ e(N, { label: "发布管理" }) },
1038
- { path: "/ops/devops/monitor", element: /* @__PURE__ */ e(N, { label: "监控告警" }) },
1039
- { path: "/ops/devops/logs", element: /* @__PURE__ */ e(N, { label: "日志管理" }) },
1040
- { path: "/ops/devops/dba", element: /* @__PURE__ */ e(N, { label: "DBA 工单" }) },
1145
+ { path: "/ops/devops", element: /* @__PURE__ */ e(q, { to: "/ops/devops/dashboard", replace: !0 }) },
1146
+ { path: "/ops/devops/dashboard", element: /* @__PURE__ */ e(kt, {}) },
1147
+ { path: "/ops/devops/nodes", element: /* @__PURE__ */ e(vt, {}) },
1148
+ { path: "/ops/devops/pods", element: /* @__PURE__ */ e(Ct, {}) },
1149
+ { path: "/ops/devops/hpa", element: /* @__PURE__ */ e(Pt, {}) },
1150
+ { path: "/ops/devops/registry", element: /* @__PURE__ */ e(L, { label: "镜像仓库" }) },
1151
+ { path: "/ops/devops/pipeline", element: /* @__PURE__ */ e(L, { label: "流水线" }) },
1152
+ { path: "/ops/devops/release", element: /* @__PURE__ */ e(L, { label: "发布管理" }) },
1153
+ { path: "/ops/devops/monitor", element: /* @__PURE__ */ e(L, { label: "监控告警" }) },
1154
+ { path: "/ops/devops/logs", element: /* @__PURE__ */ e(L, { label: "日志管理" }) },
1155
+ { path: "/ops/devops/dba", element: /* @__PURE__ */ e(L, { label: "DBA 工单" }) },
1041
1156
  // ─── 资源管理 ───
1042
- { path: "/resource", element: /* @__PURE__ */ e(_, { to: "/resource/domain", replace: !0 }) },
1043
- { path: "/resource/domain", element: /* @__PURE__ */ e($, { label: "域名管理" }) },
1044
- { path: "/resource/ecs", element: /* @__PURE__ */ e($, { label: "ECS 管理" }) },
1045
- { path: "/resource/rds", element: /* @__PURE__ */ e($, { label: "RDS 管理" }) },
1046
- { path: "/resource/oss", element: /* @__PURE__ */ e($, { label: "OSS 管理" }) },
1157
+ { path: "/resource", element: /* @__PURE__ */ e(q, { to: "/resource/domain", replace: !0 }) },
1158
+ { path: "/resource/domain", element: /* @__PURE__ */ e(A, { label: "域名管理" }) },
1159
+ { path: "/resource/ecs", element: /* @__PURE__ */ e(A, { label: "ECS 管理" }) },
1160
+ { path: "/resource/rds", element: /* @__PURE__ */ e(A, { label: "RDS 管理" }) },
1161
+ { path: "/resource/oss", element: /* @__PURE__ */ e(A, { label: "OSS 管理" }) },
1047
1162
  // ─── 已迁到中间件面的前缀 → 旧深链交还中间件面 ───
1048
1163
  // ⚠ 必须排在最后:matchWorkbenchPath 先全表精确、再全表通配,
1049
1164
  // 但本面自己的 /ops/* 与 /resource/* 都在前面,不会被这几条吃掉。
1050
- ...Xe.flatMap((t) => [
1051
- { path: t, element: /* @__PURE__ */ e(Z, {}) },
1052
- { path: `${t}/*`, element: /* @__PURE__ */ e(Z, {}) }
1165
+ ...Rt.flatMap((t) => [
1166
+ { path: t, element: /* @__PURE__ */ e(ne, {}) },
1167
+ { path: `${t}/*`, element: /* @__PURE__ */ e(ne, {}) }
1053
1168
  ])
1054
1169
  ];
1055
- function lt({
1170
+ function Mt({
1056
1171
  activePathOverride: t,
1057
- menuOnly: r = !1
1172
+ menuOnly: a = !1
1058
1173
  } = {}) {
1059
1174
  return /* @__PURE__ */ e(
1060
- $e,
1175
+ it,
1061
1176
  {
1062
- groups: Ve,
1063
- routes: Qe,
1177
+ groups: _t,
1178
+ routes: $t,
1064
1179
  mode: "ops",
1065
1180
  emptyText: "请从左侧菜单选择运维模块",
1066
1181
  activePathOverride: t,
1067
- menuOnly: r
1182
+ menuOnly: a
1068
1183
  }
1069
1184
  );
1070
1185
  }
1071
1186
  export {
1072
- lt as default
1187
+ Mt as default
1073
1188
  };