@yuku123/z-team-component 0.2.121 → 0.2.122

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 (44) hide show
  1. package/dist/{ChangeLogView-8IViZtG4.js → ChangeLogView-B8Wvo3J1.js} +1 -1
  2. package/dist/{ComponentDoc-Mgk6TOn6.js → ComponentDoc-B3fzELq4.js} +3 -3
  3. package/dist/{InvitationManagementPage-B-a0t1IZ.js → InvitationManagementPage-CBnvTqRA.js} +1 -1
  4. package/dist/{OnboardingPage-DzWxvVGg.js → OnboardingPage-ByPpo1Cy.js} +2 -2
  5. package/dist/{ScheduledTasks--NRaw2yP.js → ScheduledTasks-DhplRiMl.js} +6 -6
  6. package/dist/{SystemShell-zIzEkwxi.js → SystemShell-DzKEdfU1.js} +4 -4
  7. package/dist/{admin-logs-DqnnLQ2i.js → admin-logs-CZfqcvyh.js} +1 -1
  8. package/dist/{api-BhwgnFDD.js → api-CZSleqyn.js} +1 -1
  9. package/dist/{api-DahDAsfc.js → api-D_RlIHV9.js} +1 -1
  10. package/dist/{createWorkspaceWsHandler-DRcUjes9.js → createWorkspaceWsHandler-CNzp3zQY.js} +3 -3
  11. package/dist/{index-aMPdQTQ9.js → index-B5WiwMHb.js} +2 -2
  12. package/dist/{index-CDfn5Tb5.js → index-BEm0Ixo-.js} +3 -3
  13. package/dist/{index-DCEyt8CX.js → index-BLm4jfd2.js} +3 -3
  14. package/dist/{index-BiubS6R1.js → index-BSGwL88s.js} +2 -2
  15. package/dist/{index-kmNfQBRN.js → index-B_2cf5xc.js} +1 -1
  16. package/dist/{index-CZhMuUEf.js → index-BfLbDTrt.js} +3 -3
  17. package/dist/{index-CGefpPcF.js → index-BzM68iG_.js} +3 -3
  18. package/dist/{index-oVpeYh5s.js → index-C9vky6LG.js} +4 -4
  19. package/dist/{index-Cpmnj8JS.js → index-CHd9AXbR.js} +111 -111
  20. package/dist/{index-CdhVx89Q.js → index-CQhRxjax.js} +3 -3
  21. package/dist/{index-BbJFWsmk.js → index-CZJdIx8s.js} +10 -10
  22. package/dist/{index-BgP8-tny.js → index-CrooPSeJ.js} +1 -1
  23. package/dist/{index-BxpAAgTl.js → index-DEZ5GKN_.js} +1 -1
  24. package/dist/{index-rnhtPktY.js → index-DJ_Ht5-C.js} +1 -1
  25. package/dist/{index-Cm_NXrie.js → index-DKdXaoX2.js} +2 -2
  26. package/dist/{index-CIfQeDR1.js → index-DOn-QhiX.js} +1 -1
  27. package/dist/{index-BcmoQQNY.js → index-DXrtxDkU.js} +5 -5
  28. package/dist/{index-D8XTuJj6.js → index-DkIvO_Qs.js} +6 -6
  29. package/dist/{index-DVR9zYBR.js → index-DlIGzqES.js} +2 -2
  30. package/dist/{index-8wGs3Z7T.js → index-Dl_RDIvU.js} +6 -6
  31. package/dist/{index-Dh0QePS2.js → index-DnpO3aVQ.js} +2 -2
  32. package/dist/{index-Dne7Wqbc.js → index-XzF-z2kH.js} +2 -2
  33. package/dist/{index-CYo4Ez6h.js → index-c9Bp8jdJ.js} +2 -2
  34. package/dist/{index-C5NIwgUh.js → index-dxlAxNDq.js} +3 -3
  35. package/dist/{index-HLzFywnS.js → index-eDBmvoOt.js} +2 -2
  36. package/dist/index.js +1 -1
  37. package/dist/{instance-B1GyJEnB.js → instance-15arxw9z.js} +1 -1
  38. package/dist/{menuPermission-DPGwgzZA.js → menuPermission-Cd89xOSj.js} +3 -3
  39. package/dist/pages.js +1 -1
  40. package/dist/{send-default-agent-team-message-Cb00q2KK.js → send-default-agent-team-message-DyNVxwPV.js} +1 -1
  41. package/dist/{sso-user-CKsqQODJ.js → sso-user-F1FcMD94.js} +1 -1
  42. package/dist/{training-5ZpXXciF.js → training-BwKkszpU.js} +1 -1
  43. package/dist/{webide-Q-cM4m7F.js → webide-B5A6IuAs.js} +3 -3
  44. package/package.json +1 -1
@@ -1,64 +1,64 @@
1
1
  import { jsx as e, jsxs as s } from "react/jsx-runtime";
2
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 x, 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 me, Tabs as ue, 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 Y, 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 Ce, BranchesOutlined as ve, RocketOutlined as Pe, AlertOutlined as Se, FileTextOutlined as Re, DatabaseOutlined as Q, CloudOutlined as Oe, DeploymentUnitOutlined as Ie } from "@ant-design/icons";
5
- import { W as $e } from "./index-C5NIwgUh.js";
6
- import { Y as Ae } from "./ComponentDoc-Mgk6TOn6.js";
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 Y, 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 Q, CloudOutlined as Oe, DeploymentUnitOutlined as Ie } from "@ant-design/icons";
5
+ import { W as $e } from "./index-dxlAxNDq.js";
6
+ import { Y as Ee } from "./ComponentDoc-B3fzELq4.js";
7
7
  import { useState as i, useEffect as z, useRef as L } from "react";
8
- import { ListTable as oe } from "@yuku123/z-frontend-common/ui";
9
- import "./index-BbJFWsmk.js";
10
- const Ee = "/z-team/ops/k8s";
11
- async function re(t, r) {
12
- const d = `${Ee}${t}`, m = await fetch(d, {
8
+ import { ListTable as re } from "@yuku123/z-frontend-common/ui";
9
+ import "./index-CZJdIx8s.js";
10
+ const Te = "/z-team/ops/k8s";
11
+ async function oe(t, r) {
12
+ const d = `${Te}${t}`, u = await fetch(d, {
13
13
  headers: { "Content-Type": "application/json" },
14
14
  ...r
15
- }), p = m.headers && m.headers.get("content-type") || "";
15
+ }), p = u.headers && u.headers.get("content-type") || "";
16
16
  if (!/json/i.test(p))
17
- throw new Error(`数据源不可达:GET ${d} 返回 ${m.status} ${p || "(无 content-type)"},不是 JSON —— 该前缀没有进到后端接口(K8s 管理 API 在 z-ops 仓,z-opc 宿主未注册)`);
18
- const u = await m.json();
19
- if (u && u.success === !1)
20
- throw new Error(`后端 ${d} 返回 success=false:${u.message || "(无 message)"}`);
21
- return u;
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;
22
22
  }
23
- async function E(t, r) {
24
- return re(t, r);
23
+ async function T(t, r) {
24
+ return oe(t, r);
25
25
  }
26
- async function Te() {
27
- return E("/cluster/info");
26
+ async function Ae() {
27
+ return T("/cluster/info");
28
28
  }
29
29
  async function De() {
30
- return E("/nodes");
30
+ return T("/nodes");
31
31
  }
32
32
  async function ze(t) {
33
- return E("/nodes/cordon", {
33
+ return T("/nodes/cordon", {
34
34
  method: "POST",
35
35
  body: JSON.stringify({ name: t })
36
36
  });
37
37
  }
38
38
  async function Fe(t) {
39
- return E("/nodes/uncordon", {
39
+ return T("/nodes/uncordon", {
40
40
  method: "POST",
41
41
  body: JSON.stringify({ name: t })
42
42
  });
43
43
  }
44
44
  async function Ne(t = "*") {
45
- return E(`/workloads/pods?namespace=${t}`);
45
+ return T(`/workloads/pods?namespace=${t}`);
46
46
  }
47
47
  async function He(t, r, d = 200) {
48
- return E(`/workloads/pods/${t}/${r}/logs?tailLines=${d}`);
48
+ return T(`/workloads/pods/${t}/${r}/logs?tailLines=${d}`);
49
49
  }
50
50
  async function Le(t, r) {
51
- return E(`/workloads/pods/${t}/${r}/restart`, { method: "POST" });
51
+ return T(`/workloads/pods/${t}/${r}/restart`, { method: "POST" });
52
52
  }
53
53
  async function Me(t, r) {
54
- return E(`/workloads/pods/${t}/${r}`, { method: "DELETE" });
54
+ return T(`/workloads/pods/${t}/${r}`, { method: "DELETE" });
55
55
  }
56
56
  async function Be() {
57
- return E("/namespaces");
57
+ return T("/namespaces");
58
58
  }
59
59
  const Ue = () => {
60
- var u, y;
61
- const [t, r] = i(null), [d, m] = i(!0);
60
+ var m, y;
61
+ const [t, r] = i(null), [d, u] = i(!0);
62
62
  z(() => {
63
63
  p();
64
64
  const h = setInterval(p, 1e4);
@@ -66,12 +66,12 @@ const Ue = () => {
66
66
  }, []);
67
67
  const p = async () => {
68
68
  try {
69
- const h = await Te();
69
+ const h = await Ae();
70
70
  h.success && r(h.data);
71
71
  } catch (h) {
72
72
  console.error("Failed to load cluster info", h);
73
73
  } finally {
74
- m(!1);
74
+ u(!1);
75
75
  }
76
76
  };
77
77
  return d ? /* @__PURE__ */ e(ie, { size: "large" }) : /* @__PURE__ */ s("div", { style: { padding: 16 }, children: [
@@ -84,7 +84,7 @@ const Ue = () => {
84
84
  /* @__PURE__ */ e(
85
85
  W,
86
86
  {
87
- title: /* @__PURE__ */ s(x, { children: [
87
+ title: /* @__PURE__ */ s(v, { children: [
88
88
  /* @__PURE__ */ e(q, {}),
89
89
  " K8s 节点"
90
90
  ] }),
@@ -101,11 +101,11 @@ const Ue = () => {
101
101
  /* @__PURE__ */ e(
102
102
  W,
103
103
  {
104
- title: /* @__PURE__ */ s(x, { children: [
104
+ title: /* @__PURE__ */ s(v, { children: [
105
105
  /* @__PURE__ */ e(H, {}),
106
106
  " CPU"
107
107
  ] }),
108
- value: ((u = t == null ? void 0 : t.usedCpu) == null ? void 0 : u.toFixed(1)) ?? "0",
108
+ value: ((m = t == null ? void 0 : t.usedCpu) == null ? void 0 : m.toFixed(1)) ?? "0",
109
109
  suffix: /* @__PURE__ */ s("span", { style: { color: "#999" }, children: [
110
110
  " / ",
111
111
  (t == null ? void 0 : t.totalCpu) ?? 0,
@@ -123,7 +123,7 @@ const Ue = () => {
123
123
  /* @__PURE__ */ e(
124
124
  W,
125
125
  {
126
- title: /* @__PURE__ */ s(x, { children: [
126
+ title: /* @__PURE__ */ s(v, { children: [
127
127
  /* @__PURE__ */ e(X, {}),
128
128
  " 内存"
129
129
  ] }),
@@ -145,7 +145,7 @@ const Ue = () => {
145
145
  /* @__PURE__ */ e(
146
146
  W,
147
147
  {
148
- title: /* @__PURE__ */ s(x, { children: [
148
+ title: /* @__PURE__ */ s(v, { children: [
149
149
  /* @__PURE__ */ e(ne, {}),
150
150
  " Pods"
151
151
  ] }),
@@ -162,7 +162,7 @@ const Ue = () => {
162
162
  ] })
163
163
  ] }) })
164
164
  ] }),
165
- /* @__PURE__ */ e(M, { title: "集群信息", style: { marginTop: 16 }, children: /* @__PURE__ */ s(x, { orientation: "vertical", children: [
165
+ /* @__PURE__ */ e(M, { title: "集群信息", style: { marginTop: 16 }, children: /* @__PURE__ */ s(v, { orientation: "vertical", children: [
166
166
  /* @__PURE__ */ s("div", { children: [
167
167
  /* @__PURE__ */ e("strong", { children: "K8s 版本:" }),
168
168
  " ",
@@ -196,19 +196,19 @@ const Ue = () => {
196
196
  ] }) })
197
197
  ] });
198
198
  }, We = () => {
199
- const [t, r] = i([]), [d, m] = i(!1), [p, u] = i("");
199
+ const [t, r] = i([]), [d, u] = i(!1), [p, m] = i("");
200
200
  z(() => {
201
201
  y();
202
202
  }, []);
203
203
  const y = async () => {
204
- m(!0), u("");
204
+ u(!0), m("");
205
205
  try {
206
206
  const a = await De();
207
207
  r(Array.isArray(a.data) ? a.data : []);
208
208
  } catch (a) {
209
- r([]), u(String((a == null ? void 0 : a.message) || a));
209
+ r([]), m(String((a == null ? void 0 : a.message) || a));
210
210
  } finally {
211
- m(!1);
211
+ u(!1);
212
212
  }
213
213
  }, h = async (a) => {
214
214
  try {
@@ -216,7 +216,7 @@ const Ue = () => {
216
216
  } catch {
217
217
  b.error("封锁失败");
218
218
  }
219
- }, v = async (a) => {
219
+ }, P = async (a) => {
220
220
  try {
221
221
  await Fe(a), b.success(`${a} 已解封`), y();
222
222
  } catch {
@@ -224,7 +224,7 @@ const Ue = () => {
224
224
  }
225
225
  };
226
226
  return /* @__PURE__ */ s("div", { children: [
227
- /* @__PURE__ */ e(x, { style: { marginBottom: 16 }, children: /* @__PURE__ */ e(w, { icon: /* @__PURE__ */ e(Y, {}), onClick: y, loading: d, children: "刷新" }) }),
227
+ /* @__PURE__ */ e(v, { style: { marginBottom: 16 }, children: /* @__PURE__ */ e(w, { icon: /* @__PURE__ */ e(Y, {}), onClick: y, loading: d, children: "刷新" }) }),
228
228
  p && /* @__PURE__ */ e(
229
229
  G,
230
230
  {
@@ -267,15 +267,15 @@ const Ue = () => {
267
267
  title: "CPU",
268
268
  key: "cpu",
269
269
  render: (a, o) => {
270
- var P, S;
271
- const c = o.cpuCapacity > 0 ? (o.cpuAllocatable - o.cpuCapacity + o.cpuCapacity) / o.cpuCapacity * 100 : 0;
270
+ var S;
271
+ const c = o.cpuUsed, x = c != null && o.cpuCapacity > 0 ? c / o.cpuCapacity * 100 : null;
272
272
  return /* @__PURE__ */ s("span", { children: [
273
- ((P = o.cpuAllocatable) == null ? void 0 : P.toFixed(1)) ?? 0,
273
+ c != null ? c.toFixed(2) : "—",
274
274
  " / ",
275
275
  ((S = o.cpuCapacity) == null ? void 0 : S.toFixed(0)) ?? 0,
276
276
  " cores",
277
- /* @__PURE__ */ s(C, { color: c > 80 ? "error" : "success", style: { marginLeft: 4 }, children: [
278
- c.toFixed(0),
277
+ x != null && /* @__PURE__ */ s(C, { color: x > 80 ? "error" : "success", style: { marginLeft: 4 }, children: [
278
+ x.toFixed(0),
279
279
  "%"
280
280
  ] })
281
281
  ] });
@@ -286,14 +286,14 @@ const Ue = () => {
286
286
  key: "mem",
287
287
  render: (a, o) => {
288
288
  var S;
289
- const c = o.memCapacity - o.memAllocatable, P = o.memCapacity > 0 ? c / o.memCapacity * 100 : 0;
289
+ const c = o.memUsed, x = c != null && o.memCapacity > 0 ? c / o.memCapacity * 100 : null;
290
290
  return /* @__PURE__ */ s("span", { children: [
291
- (c == null ? void 0 : c.toFixed(1)) ?? 0,
291
+ c != null ? c.toFixed(1) : "—",
292
292
  " / ",
293
- ((S = o.memCapacity) == null ? void 0 : S.toFixed(0)) ?? 0,
293
+ ((S = o.memCapacity) == null ? void 0 : S.toFixed(1)) ?? 0,
294
294
  " GB",
295
- /* @__PURE__ */ s(C, { color: P > 80 ? "error" : "success", style: { marginLeft: 4 }, children: [
296
- P.toFixed(0),
295
+ x != null && /* @__PURE__ */ s(C, { color: x > 80 ? "error" : "success", style: { marginLeft: 4 }, children: [
296
+ x.toFixed(0),
297
297
  "%"
298
298
  ] })
299
299
  ] });
@@ -306,9 +306,9 @@ const Ue = () => {
306
306
  title: "操作",
307
307
  key: "action",
308
308
  width: 150,
309
- render: (a, o) => /* @__PURE__ */ s(x, { children: [
309
+ render: (a, o) => /* @__PURE__ */ s(v, { children: [
310
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: () => v(o.name), children: /* @__PURE__ */ e(w, { size: "small", icon: /* @__PURE__ */ e(ge, {}), children: "Uncordon" }) })
311
+ /* @__PURE__ */ e(B, { title: `解封 ${o.name}?`, onConfirm: () => P(o.name), children: /* @__PURE__ */ e(w, { size: "small", icon: /* @__PURE__ */ e(ge, {}), children: "Uncordon" }) })
312
312
  ] })
313
313
  }
314
314
  ],
@@ -326,20 +326,20 @@ const Ue = () => {
326
326
  podName: r,
327
327
  tailLines: d = 200
328
328
  }) => {
329
- const [m, p] = i([]), [u, y] = i(!1), [h, v] = i(!1), k = L(null), a = L(null), o = L(!1);
329
+ const [u, p] = i([]), [m, y] = i(!1), [h, P] = i(!1), k = L(null), a = L(null), o = L(!1);
330
330
  z(() => (c(), () => {
331
331
  var g;
332
332
  (g = k.current) == null || g.close();
333
333
  }), [t, r]), z(() => {
334
334
  var g;
335
335
  h || (g = a.current) == null || g.scrollIntoView({ behavior: "smooth" });
336
- }, [m, h]);
336
+ }, [u, h]);
337
337
  const c = () => {
338
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
339
  k.current = R, R.onopen = () => {
340
340
  y(!0), b.success("日志流已连接");
341
341
  }, R.onmessage = (O) => {
342
- o.current || p((A) => [...A.slice(-1e3), O.data]);
342
+ o.current || p((E) => [...E.slice(-1e3), O.data]);
343
343
  }, R.onclose = () => {
344
344
  y(!1);
345
345
  }, R.onerror = () => {
@@ -347,15 +347,15 @@ const Ue = () => {
347
347
  };
348
348
  };
349
349
  return /* @__PURE__ */ s("div", { style: { display: "flex", flexDirection: "column", height: "100%" }, children: [
350
- /* @__PURE__ */ s(x, { style: { marginBottom: 8 }, children: [
351
- /* @__PURE__ */ e(C, { color: u ? "success" : "error", children: u ? "● 已连接" : "● 已断开" }),
350
+ /* @__PURE__ */ s(v, { style: { marginBottom: 8 }, children: [
351
+ /* @__PURE__ */ e(C, { color: m ? "success" : "error", children: m ? "● 已连接" : "● 已断开" }),
352
352
  /* @__PURE__ */ e(
353
353
  w,
354
354
  {
355
355
  size: "small",
356
356
  icon: h ? /* @__PURE__ */ e(fe, {}) : /* @__PURE__ */ e(be, {}),
357
357
  onClick: () => {
358
- o.current = !o.current, v(o.current);
358
+ o.current = !o.current, P(o.current);
359
359
  },
360
360
  children: h ? "继续" : "暂停"
361
361
  }
@@ -379,7 +379,7 @@ const Ue = () => {
379
379
  lineHeight: 1.5,
380
380
  color: "#d4d4d4"
381
381
  }, children: [
382
- m.map((g, n) => /* @__PURE__ */ e("div", { style: {
382
+ u.map((g, n) => /* @__PURE__ */ e("div", { style: {
383
383
  color: g.includes("ERROR") ? "#f44336" : g.includes("WARN") ? "#ff9800" : g.includes("INFO") ? "#4caf50" : "#d4d4d4",
384
384
  whiteSpace: "pre-wrap",
385
385
  wordBreak: "break-all"
@@ -391,33 +391,33 @@ const Ue = () => {
391
391
  namespace: t,
392
392
  podName: r
393
393
  }) => {
394
- const [d, m] = i(!1), [p, u] = i(""), [y, h] = i("sh"), [v, k] = i([]), a = L(null), o = L(null), c = L(null);
395
- z(() => (t && r && P(), () => {
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(), () => {
396
396
  var n;
397
397
  return (n = a.current) == null ? void 0 : n.close();
398
398
  }), [t, r]);
399
- const P = () => {
399
+ const x = () => {
400
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
401
  a.current = O, O.onopen = () => {
402
- m(!0), k((A) => [...A, `Connected to ${t}/${r} (${y})`]), b.success("终端已连接");
403
- }, O.onmessage = (A) => {
404
- k((J) => [...J.slice(-500), A.data]), setTimeout(() => {
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(() => {
405
405
  o.current && (o.current.scrollTop = o.current.scrollHeight);
406
406
  }, 50);
407
407
  }, O.onclose = () => {
408
- m(!1), k((A) => [...A, `
408
+ u(!1), k((E) => [...E, `
409
409
  --- 连接已关闭 ---`]);
410
410
  }, O.onerror = () => {
411
- m(!1), b.error("WebSocket 连接错误");
411
+ u(!1), b.error("WebSocket 连接错误");
412
412
  };
413
413
  }, S = () => {
414
- !p.trim() || !a.current || (a.current.readyState === WebSocket.OPEN ? (a.current.send(p), k((n) => [...n, `$ ${p}`]), u("")) : b.warning("WebSocket 未连接"));
414
+ !p.trim() || !a.current || (a.current.readyState === WebSocket.OPEN ? (a.current.send(p), k((n) => [...n, `$ ${p}`]), m("")) : b.warning("WebSocket 未连接"));
415
415
  }, F = (n) => {
416
416
  var f;
417
417
  n.key === "Enter" && S(), n.key === "Tab" && (n.preventDefault(), ((f = a.current) == null ? void 0 : f.readyState) === WebSocket.OPEN && a.current.send(" "));
418
418
  }, g = () => k([]);
419
419
  return /* @__PURE__ */ s("div", { style: { display: "flex", flexDirection: "column", height: "100%" }, children: [
420
- /* @__PURE__ */ s(x, { style: { marginBottom: 8 }, children: [
420
+ /* @__PURE__ */ s(v, { style: { marginBottom: 8 }, children: [
421
421
  /* @__PURE__ */ e(C, { color: d ? "success" : "error", children: d ? "● 已连接" : "● 已断开" }),
422
422
  /* @__PURE__ */ e(
423
423
  te,
@@ -432,7 +432,7 @@ const Ue = () => {
432
432
  /* @__PURE__ */ e(w, { size: "small", onClick: g, icon: /* @__PURE__ */ e(se, {}), children: "清空" }),
433
433
  /* @__PURE__ */ e(w, { size: "small", onClick: () => {
434
434
  var n;
435
- (n = a.current) == null || n.close(), setTimeout(P, 200);
435
+ (n = a.current) == null || n.close(), setTimeout(x, 200);
436
436
  }, children: "重连" })
437
437
  ] }),
438
438
  /* @__PURE__ */ s(
@@ -454,7 +454,7 @@ const Ue = () => {
454
454
  border: "1px solid #333"
455
455
  },
456
456
  children: [
457
- v.map((n, f) => /* @__PURE__ */ e("div", { style: {
457
+ P.map((n, f) => /* @__PURE__ */ e("div", { style: {
458
458
  whiteSpace: "pre-wrap",
459
459
  wordBreak: "break-all",
460
460
  color: n.startsWith("$ ") ? "#00bfff" : n.startsWith("---") ? "#666" : n.includes("Error") || n.includes("error") ? "#ff4444" : "#00ff88"
@@ -470,7 +470,7 @@ const Ue = () => {
470
470
  ]
471
471
  }
472
472
  ),
473
- /* @__PURE__ */ s(x.Compact, { style: { width: "100%" }, children: [
473
+ /* @__PURE__ */ s(v.Compact, { style: { width: "100%" }, children: [
474
474
  /* @__PURE__ */ s("span", { style: {
475
475
  background: "#333",
476
476
  color: "#00ff88",
@@ -490,7 +490,7 @@ const Ue = () => {
490
490
  "input",
491
491
  {
492
492
  value: p,
493
- onChange: (n) => u(n.target.value),
493
+ onChange: (n) => m(n.target.value),
494
494
  onKeyDown: F,
495
495
  placeholder: "输入命令后按 Enter...",
496
496
  disabled: !d,
@@ -534,7 +534,7 @@ const Ue = () => {
534
534
  return "default";
535
535
  }
536
536
  }, Ge = () => {
537
- const [t, r] = i([]), [d, m] = i(!1), [p, u] = i(""), [y, h] = i("*"), [v, k] = i([]), [a, o] = i(!1), [c, P] = i(null), [S, F] = i("logs"), [g, n] = i("");
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
538
  z(() => {
539
539
  f();
540
540
  }, []), z(() => {
@@ -548,25 +548,25 @@ const Ue = () => {
548
548
  k(["*"]);
549
549
  }
550
550
  }, R = async () => {
551
- m(!0), u("");
551
+ u(!0), m("");
552
552
  try {
553
553
  const l = await Ne(y);
554
554
  r(Array.isArray(l.data) ? l.data : []);
555
555
  } catch (l) {
556
- r([]), u(String((l == null ? void 0 : l.message) || l));
556
+ r([]), m(String((l == null ? void 0 : l.message) || l));
557
557
  } finally {
558
- m(!1);
558
+ u(!1);
559
559
  }
560
560
  }, O = async (l) => {
561
561
  var I;
562
- P(l), F("logs"), o(!0);
562
+ x(l), F("logs"), o(!0);
563
563
  try {
564
- const T = await He(l.namespace, l.name, 200);
565
- n(((I = T == null ? void 0 : T.data) == null ? void 0 : I.logs) ?? "");
566
- } catch (T) {
567
- n(`加载日志失败:${String((T == null ? void 0 : T.message) || T)}`);
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)}`);
568
568
  }
569
- }, A = async (l) => {
569
+ }, E = async (l) => {
570
570
  try {
571
571
  await Le(l.namespace, l.name), b.success(`${l.name} 已重启`), R();
572
572
  } catch {
@@ -608,15 +608,15 @@ const Ue = () => {
608
608
  title: "操作",
609
609
  key: "action",
610
610
  width: 200,
611
- render: (l, I) => /* @__PURE__ */ s(x, { children: [
611
+ render: (l, I) => /* @__PURE__ */ s(v, { children: [
612
612
  /* @__PURE__ */ e(w, { size: "small", icon: /* @__PURE__ */ e(ke, {}), onClick: () => O(I), children: "日志" }),
613
- /* @__PURE__ */ e(B, { title: "确认重启此 Pod?", onConfirm: () => A(I), children: /* @__PURE__ */ e(w, { size: "small", type: "primary", ghost: !0, children: "重启" }) }),
613
+ /* @__PURE__ */ e(B, { title: "确认重启此 Pod?", onConfirm: () => E(I), children: /* @__PURE__ */ e(w, { size: "small", type: "primary", ghost: !0, children: "重启" }) }),
614
614
  /* @__PURE__ */ e(B, { title: "确认删除此 Pod?", onConfirm: () => J(I), children: /* @__PURE__ */ e(w, { size: "small", danger: !0, icon: /* @__PURE__ */ e(ae, {}), children: "删除" }) })
615
615
  ] })
616
616
  }
617
617
  ];
618
618
  return /* @__PURE__ */ s("div", { children: [
619
- /* @__PURE__ */ s(x, { style: { marginBottom: 16 }, children: [
619
+ /* @__PURE__ */ s(v, { style: { marginBottom: 16 }, children: [
620
620
  /* @__PURE__ */ e("span", { children: "命名空间:" }),
621
621
  /* @__PURE__ */ e(
622
622
  te,
@@ -624,7 +624,7 @@ const Ue = () => {
624
624
  value: y,
625
625
  onChange: h,
626
626
  style: { width: 200 },
627
- options: v.map((l) => ({ label: l, value: l }))
627
+ options: P.map((l) => ({ label: l, value: l }))
628
628
  }
629
629
  ),
630
630
  /* @__PURE__ */ e(w, { icon: /* @__PURE__ */ e(Y, {}), onClick: R, loading: d, children: "刷新" })
@@ -640,7 +640,7 @@ const Ue = () => {
640
640
  }
641
641
  ),
642
642
  /* @__PURE__ */ e(
643
- oe,
643
+ re,
644
644
  {
645
645
  rows: t,
646
646
  columns: le,
@@ -655,7 +655,7 @@ const Ue = () => {
655
655
  }
656
656
  ),
657
657
  /* @__PURE__ */ e(
658
- me,
658
+ ue,
659
659
  {
660
660
  title: c ? `${c.name} (${c.namespace})` : "",
661
661
  placement: "right",
@@ -663,7 +663,7 @@ const Ue = () => {
663
663
  open: a,
664
664
  onClose: () => o(!1),
665
665
  children: /* @__PURE__ */ e(
666
- ue,
666
+ me,
667
667
  {
668
668
  activeKey: S,
669
669
  onChange: F,
@@ -698,26 +698,26 @@ const Ue = () => {
698
698
  ] });
699
699
  };
700
700
  async function K(t, r) {
701
- return re(`/hpa${t}`, r);
701
+ return oe(`/hpa${t}`, r);
702
702
  }
703
703
  const Je = () => {
704
- const [t, r] = i([]), [d, m] = i(!1), [p, u] = i(""), [y, h] = i(!1), [v, k] = i(!1), [a] = D.useForm();
704
+ const [t, r] = i([]), [d, u] = i(!1), [p, m] = i(""), [y, h] = i(!1), [P, k] = i(!1), [a] = D.useForm();
705
705
  z(() => {
706
706
  o();
707
707
  }, []);
708
708
  const o = async () => {
709
- m(!0), u("");
709
+ u(!0), m("");
710
710
  try {
711
711
  const n = await K("/list?namespace=*");
712
712
  r(Array.isArray(n.data) ? n.data : []);
713
713
  } catch (n) {
714
- r([]), u(String((n == null ? void 0 : n.message) || n));
714
+ r([]), m(String((n == null ? void 0 : n.message) || n));
715
715
  } finally {
716
- m(!1);
716
+ u(!1);
717
717
  }
718
718
  }, c = () => {
719
719
  k(!1), a.resetFields(), a.setFieldsValue({ minReplicas: 1, maxReplicas: 10, cpuTarget: 80 }), h(!0);
720
- }, P = (n) => {
720
+ }, x = (n) => {
721
721
  k(!0), a.setFieldsValue({
722
722
  name: n.name,
723
723
  namespace: n.namespace,
@@ -729,7 +729,7 @@ const Je = () => {
729
729
  }, S = async () => {
730
730
  try {
731
731
  const n = await a.validateFields();
732
- v ? (await K("/update", {
732
+ P ? (await K("/update", {
733
733
  method: "POST",
734
734
  body: JSON.stringify({
735
735
  namespace: n.namespace,
@@ -752,7 +752,7 @@ const Je = () => {
752
752
  }
753
753
  };
754
754
  return /* @__PURE__ */ s("div", { children: [
755
- /* @__PURE__ */ s(x, { style: { marginBottom: 16 }, children: [
755
+ /* @__PURE__ */ s(v, { style: { marginBottom: 16 }, children: [
756
756
  /* @__PURE__ */ e(w, { type: "primary", icon: /* @__PURE__ */ e(xe, {}), onClick: c, children: "新建 HPA" }),
757
757
  /* @__PURE__ */ e(w, { icon: /* @__PURE__ */ e(Y, {}), onClick: o, loading: d, children: "刷新" })
758
758
  ] }),
@@ -767,7 +767,7 @@ const Je = () => {
767
767
  }
768
768
  ),
769
769
  /* @__PURE__ */ e(
770
- oe,
770
+ re,
771
771
  {
772
772
  rows: t,
773
773
  columns: [
@@ -806,8 +806,8 @@ const Je = () => {
806
806
  title: "操作",
807
807
  key: "action",
808
808
  width: 150,
809
- render: (n, f) => /* @__PURE__ */ s(x, { children: [
810
- /* @__PURE__ */ e(w, { size: "small", icon: /* @__PURE__ */ e(Ce, {}), onClick: () => P(f), children: "编辑" }),
809
+ render: (n, f) => /* @__PURE__ */ s(v, { children: [
810
+ /* @__PURE__ */ e(w, { size: "small", icon: /* @__PURE__ */ e(ve, {}), onClick: () => x(f), children: "编辑" }),
811
811
  /* @__PURE__ */ e(B, { title: `删除 HPA ${f.name}?`, onConfirm: () => F(f), children: /* @__PURE__ */ e(w, { size: "small", danger: !0, icon: /* @__PURE__ */ e(ae, {}), children: "删除" }) })
812
812
  ] })
813
813
  }
@@ -824,15 +824,15 @@ const Je = () => {
824
824
  /* @__PURE__ */ e(
825
825
  he,
826
826
  {
827
- title: v ? "编辑 HPA" : "新建 HPA",
827
+ title: P ? "编辑 HPA" : "新建 HPA",
828
828
  open: y,
829
829
  onOk: S,
830
830
  onCancel: () => h(!1),
831
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: v }) }),
833
- /* @__PURE__ */ e(D.Item, { name: "name", label: "HPA 名称", rules: [{ required: !0 }], children: /* @__PURE__ */ e(V, { disabled: v }) }),
834
- /* @__PURE__ */ e(D.Item, { name: "deploymentName", label: "目标 Deployment", rules: [{ required: !0 }], children: /* @__PURE__ */ e(V, { disabled: v, placeholder: "namespace/deploymentName" }) }),
835
- /* @__PURE__ */ s(x, { 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
836
  /* @__PURE__ */ e(D.Item, { name: "minReplicas", label: "最小副本", rules: [{ required: !0 }], children: /* @__PURE__ */ e(j, { min: 0, max: 100 }) }),
837
837
  /* @__PURE__ */ e(D.Item, { name: "maxReplicas", label: "最大副本", rules: [{ required: !0 }], children: /* @__PURE__ */ e(j, { min: 1, max: 100 }) })
838
838
  ] }),
@@ -884,7 +884,7 @@ const Je = () => {
884
884
  {
885
885
  key: "devops-pipeline",
886
886
  label: "流水线",
887
- icon: /* @__PURE__ */ e(ve, {}),
887
+ icon: /* @__PURE__ */ e(Ce, {}),
888
888
  path: "/ops/devops/pipeline",
889
889
  desc: "CI/CD 流水线编排"
890
890
  },
@@ -1006,7 +1006,7 @@ function Z() {
1006
1006
  const { pathname: t } = ce();
1007
1007
  return /* @__PURE__ */ e(_, { to: `${t}?mode=middleware`, replace: !0 });
1008
1008
  }
1009
- const Xe = [...Ae, "/script"], Ye = [
1009
+ const Xe = [...Ee, "/script"], Ye = [
1010
1010
  // ─── 运维中心 ───
1011
1011
  // ⚠ 这一族路由的组件从来没有从 z-ops 迁进来(见 UnmigratedPage 注释)。原先直接写
1012
1012
  // <ChannelPage/> 之类会在**模块求值期**抛 ReferenceError 并白屏整个前端,不是只坏这一页。
@@ -1,16 +1,16 @@
1
1
  import { jsx as t, jsxs as l } from "react/jsx-runtime";
2
2
  import { f as ie, r as z } from "./ctc-sso-DtJHC-2M.js";
3
- import { r as ne, h as X, s as oe } from "./sso-user-CKsqQODJ.js";
3
+ import { r as ne, h as X, s as oe } from "./sso-user-F1FcMD94.js";
4
4
  import { CheckCircleFilled as le, QuestionCircleOutlined as ce, CloseOutlined as me } from "@ant-design/icons";
5
5
  import { message as P, Result as de, Button as D, Spin as G, Input as ue, Image as fe } from "antd";
6
6
  import pe from "query-string";
7
7
  import { useState as f, useRef as Y, useMemo as K, useCallback as w, useEffect as V } from "react";
8
8
  import { useLocation as ge } from "react-router-dom";
9
9
  import { h as W } from "./history-BlrA1eaW.js";
10
- import { u as c, o as he, j as be, k as _e } from "./ComponentDoc-Mgk6TOn6.js";
10
+ import { u as c, o as he, j as be, k as _e } from "./ComponentDoc-B3fzELq4.js";
11
11
  /* empty css */
12
12
  import { b as ye } from "./mobile-client-O3yr9h6t.js";
13
- import { a as ve, s as we } from "./send-default-agent-team-message-Cb00q2KK.js";
13
+ import { a as ve, s as we } from "./send-default-agent-team-message-DyNVxwPV.js";
14
14
  const Ne = 5e3, E = 9, Ce = 10 * 1024 * 1024, Se = /^image\//i, Ie = /\.(png|jpe?g|gif|bmp|webp)$/i;
15
15
  function ke(a) {
16
16
  return a.type && Se.test(a.type) ? !0 : Ie.test(a.name || "");