@yuku123/z-team-component 0.2.134 → 0.2.136

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