@yuku123/z-team-component 0.2.164 → 0.2.166
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.
- package/dist/{AdminModuleContent-CFDWfWeO.js → AdminModuleContent-Dp5xVb4D.js} +6 -6
- package/dist/{ChangeLogView-Dnan7Tuj.js → ChangeLogView-Bntx8EkZ.js} +1 -1
- package/dist/{ComponentDoc-CaOnNqRk.js → ComponentDoc-BzXJnRlk.js} +3 -3
- package/dist/{InvitationManagementPage-BiWWvZLC.js → InvitationManagementPage-CNNV_UOk.js} +1 -1
- package/dist/{OnboardingPage-Dcg-tCBh.js → OnboardingPage-B7cM7VXN.js} +2 -2
- package/dist/{ScheduledTasks-Bo18U8Ku.js → ScheduledTasks-BqquZGfx.js} +9 -9
- package/dist/{SettingsModal-Q2KjdwWm.js → SettingsModal-Csa6hCSC.js} +4 -4
- package/dist/{SystemShell-Cdr_pOfD.js → SystemShell-DWmfv-iR.js} +14 -12
- package/dist/{admin-logs-CtjP4sf4.js → admin-logs-BFOs5guM.js} +1 -1
- package/dist/{api-YVlKiVFe.js → api-9jrj5w23.js} +1 -1
- package/dist/{api-KI6N-oxs.js → api-DC6c9s0B.js} +1 -1
- package/dist/{browser-BrPlIPCW.js → browser-DQEqYjTN.js} +1 -1
- package/dist/{createWorkspaceWsHandler-Cvnml7rt.js → createWorkspaceWsHandler-DZYveu7c.js} +3 -3
- package/dist/index-0RxFtVbt.js +15 -0
- package/dist/{index-x3VPq3la.js → index-B-Rhq8qx.js} +2 -2
- package/dist/{index-C5Esyh89.js → index-B3s-_V7C.js} +2 -2
- package/dist/{index-KrfkysSl.js → index-B6O0xxY1.js} +4 -4
- package/dist/{index-By-2i3vp.js → index-BGQsPmI1.js} +2 -2
- package/dist/{index-C4hVyfpR.js → index-BLAk90tB.js} +3 -3
- package/dist/{index-CrwEs2Mq.js → index-BN2k0J1f.js} +1 -1
- package/dist/{index-BSSuXYty.js → index-BQ_9Yut4.js} +3 -3
- package/dist/{index-lAubmFN8.js → index-BsB1mzDs.js} +268 -290
- package/dist/{index-BeWbryp9.js → index-C8ZNRRed.js} +2 -2
- package/dist/{index-DgfSZtRU.js → index-CEU6r8b2.js} +1 -1
- package/dist/{index-BrMCGA3S.js → index-CFtOHUL-.js} +1 -1
- package/dist/{index-wia1pF77.js → index-COyCBJUi.js} +1 -1
- package/dist/{index-B57GrWli.js → index-CaHPBXuO.js} +3 -3
- package/dist/{index-Cbo94UmL.js → index-D1ZruAlf.js} +1 -1
- package/dist/{index-DnZMVrhC.js → index-D2qNkVA1.js} +4 -4
- package/dist/{index-CKp3Xvy1.js → index-DCtJkQ97.js} +2 -2
- package/dist/{index-RiOdNCjx.js → index-DDpFqwL-.js} +1 -1
- package/dist/{index-X-xUYDZy.js → index-DJLyykSy.js} +2 -2
- package/dist/{index-LQwbFtCv.js → index-DJdSTWPP.js} +6 -6
- package/dist/{index-C62hJkcs.js → index-Dr0mzdIZ.js} +1 -1
- package/dist/{index-C1QeYScn.js → index-Dw4y_WQ2.js} +5 -4
- package/dist/{index-CoXHJJiu.js → index-FvoSUly5.js} +1 -1
- package/dist/{index-DHldm92t.js → index-WvjiZ70i.js} +2 -2
- package/dist/{index-Cfl4-jSC.js → index-h_eVrB4c.js} +2 -2
- package/dist/{index-5MhHOxFF.js → index-pVkfQGV_.js} +2 -2
- package/dist/{index-Bxrc9hFN.js → index-vXDNxgXj.js} +8 -8
- package/dist/index.js +1 -1
- package/dist/{instance-C8NvzG7U.js → instance-CHm3AY8L.js} +1 -1
- package/dist/{menuPermission-Ck3IYTKO.js → menuPermission-Dn3f0KEO.js} +3 -3
- package/dist/pages.js +1 -1
- package/dist/{send-default-agent-team-message-7p7mLoXd.js → send-default-agent-team-message-BxYhlloF.js} +1 -1
- package/dist/{spark-md5-BevOR3TA.js → spark-md5-DeC9hkSA.js} +1 -1
- package/dist/{training-DRxAFnQJ.js → training-Cmn457Rb.js} +1 -1
- package/dist/{webide-J6q8T8yb.js → webide-DHbEzaxK.js} +3 -3
- package/dist/z-team-component.css +1 -1
- package/package.json +3 -2
- package/dist/index-CTZxAP07.js +0 -15
|
@@ -1,56 +1,57 @@
|
|
|
1
1
|
import { jsxs as s, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { useNavigate as
|
|
3
|
-
import { useMemo as
|
|
4
|
-
import { Spin as
|
|
5
|
-
import { DashboardOutlined as
|
|
6
|
-
import { P as
|
|
7
|
-
import { f as Ae, M as
|
|
8
|
-
import { u as
|
|
9
|
-
import { SidebarShell as
|
|
10
|
-
import "
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
2
|
+
import { useNavigate as me, useLocation as se, Navigate as G } from "react-router-dom";
|
|
3
|
+
import { useMemo as B, useState as h, useEffect as D, useRef as z, lazy as ae } from "react";
|
|
4
|
+
import { Spin as ue, Row as he, Col as U, Card as F, Statistic as W, Space as S, Tag as R, Button as x, Alert as Z, Table as ye, Badge as re, Popconfirm as L, message as w, Select as oe, Drawer as ge, Tabs as fe, Form as N, Modal as ke, Input as V, InputNumber as j } from "antd";
|
|
5
|
+
import { DashboardOutlined as X, ClusterOutlined as q, CloudServerOutlined as _, ContainerOutlined as le, ReloadOutlined as Q, PlayCircleOutlined as be, PauseCircleOutlined as we, ClearOutlined as ce, SendOutlined as ve, PlusOutlined as xe, BranchesOutlined as Ce, RocketOutlined as Pe, AlertOutlined as Se, FileTextOutlined as Re, DatabaseOutlined as Y, CloudOutlined as Ie, DeploymentUnitOutlined as $e } from "@ant-design/icons";
|
|
6
|
+
import { P as Oe, R as Te } from "./index-C8ZNRRed.js";
|
|
7
|
+
import { f as Ae, M as Ee } from "./menuPermission-Dn3f0KEO.js";
|
|
8
|
+
import { u as ee, a7 as Ne } from "./ComponentDoc-BzXJnRlk.js";
|
|
9
|
+
import { SidebarShell as De, MenuTree as _e, ListTable as ie } from "@yuku123/z-frontend-common/ui";
|
|
10
|
+
import { ChannelPage as ze, DeliveryPage as Fe, DeploymentPage as Me, DeploymentDetailPage as He, DomainPage as Le, EcsPage as Be, RdsPage as Ue, ResourceOssPage as We, configureApiBaseURL as Ke } from "@yuku123/z-ops-frontend-component";
|
|
11
|
+
import "./index-vXDNxgXj.js";
|
|
12
|
+
const Ge = "_shell_rfl59_7", qe = "_main_rfl59_215", Je = "_empty_rfl59_226", Ve = "_emptyIcon_rfl59_236", je = "_emptyText_rfl59_241", H = {
|
|
13
|
+
shell: Ge,
|
|
14
|
+
main: qe,
|
|
15
|
+
empty: Je,
|
|
16
|
+
emptyIcon: Ve,
|
|
17
|
+
emptyText: je
|
|
17
18
|
};
|
|
18
|
-
function
|
|
19
|
-
for (const
|
|
20
|
-
if (
|
|
21
|
-
for (const
|
|
22
|
-
if (
|
|
23
|
-
const m = "^" +
|
|
24
|
-
if (new RegExp(m).test(r)) return
|
|
19
|
+
function Xe(t, r) {
|
|
20
|
+
for (const c of t)
|
|
21
|
+
if (c.path === r) return c.element;
|
|
22
|
+
for (const c of t)
|
|
23
|
+
if (c.path.includes("*") || c.path.includes(":")) {
|
|
24
|
+
const m = "^" + c.path.replace(/[.+?^${}()|[\]\\]/g, "\\$&").replace(/\*/g, ".*").replace(/:([a-zA-Z_][a-zA-Z0-9_]*)/g, "[^/]+") + "$";
|
|
25
|
+
if (new RegExp(m).test(r)) return c.element;
|
|
25
26
|
}
|
|
26
27
|
return null;
|
|
27
28
|
}
|
|
28
|
-
function
|
|
29
|
-
return /* @__PURE__ */ s("div", { className:
|
|
30
|
-
/* @__PURE__ */ e("div", { className:
|
|
31
|
-
/* @__PURE__ */ e("div", { className:
|
|
29
|
+
function Ze({ text: t }) {
|
|
30
|
+
return /* @__PURE__ */ s("div", { className: H.empty, children: [
|
|
31
|
+
/* @__PURE__ */ e("div", { className: H.emptyIcon, children: "⚙️" }),
|
|
32
|
+
/* @__PURE__ */ e("div", { className: H.emptyText, children: t })
|
|
32
33
|
] });
|
|
33
34
|
}
|
|
34
|
-
function
|
|
35
|
+
function Qe({
|
|
35
36
|
groups: t,
|
|
36
37
|
routes: r,
|
|
37
|
-
mode:
|
|
38
|
+
mode: c,
|
|
38
39
|
emptyText: m,
|
|
39
40
|
activePathOverride: u,
|
|
40
41
|
menuOnly: y = !1
|
|
41
42
|
}) {
|
|
42
|
-
const g =
|
|
43
|
+
const g = me(), { pathname: d } = se(), C = ee((k) => k.currentUser), f = ee((k) => k.permissionState), a = B(
|
|
43
44
|
() => f === "failed" ? t : Ae(t, C),
|
|
44
45
|
[t, C, f]
|
|
45
|
-
), o =
|
|
46
|
+
), o = B(() => {
|
|
46
47
|
const k = u ?? d;
|
|
47
48
|
for (const p of a)
|
|
48
49
|
for (const n of p.items)
|
|
49
50
|
if (n.path === k) return n.key;
|
|
50
51
|
return null;
|
|
51
52
|
}, [a, u, d]), i = (k) => {
|
|
52
|
-
g(`${k.path}?mode=${
|
|
53
|
-
},
|
|
53
|
+
g(`${k.path}?mode=${c}`);
|
|
54
|
+
}, v = B(
|
|
54
55
|
() => a.map((k) => ({
|
|
55
56
|
key: k.title,
|
|
56
57
|
title: k.title,
|
|
@@ -63,78 +64,78 @@ function Ke({
|
|
|
63
64
|
}))
|
|
64
65
|
})),
|
|
65
66
|
[a, o]
|
|
66
|
-
), P =
|
|
67
|
-
return /* @__PURE__ */ s("div", { className:
|
|
68
|
-
/* @__PURE__ */ s(
|
|
69
|
-
/* @__PURE__ */ e(
|
|
70
|
-
/* @__PURE__ */ e(
|
|
67
|
+
), P = B(() => Xe(r, d), [r, d]);
|
|
68
|
+
return /* @__PURE__ */ s("div", { className: H.shell, children: [
|
|
69
|
+
/* @__PURE__ */ s(De, { width: 220, storageKey: "ft_ops_sidebar_collapsed", children: [
|
|
70
|
+
/* @__PURE__ */ e(Ee, {}),
|
|
71
|
+
/* @__PURE__ */ e(_e, { groups: v, defaultCollapsed: !0 })
|
|
71
72
|
] }),
|
|
72
|
-
y ? null : /* @__PURE__ */ s("main", { className:
|
|
73
|
-
/* @__PURE__ */ e(
|
|
74
|
-
/* @__PURE__ */ e(
|
|
73
|
+
y ? null : /* @__PURE__ */ s("main", { className: H.main, children: [
|
|
74
|
+
/* @__PURE__ */ e(Oe, {}),
|
|
75
|
+
/* @__PURE__ */ e(Te, { resetKey: d, children: P ?? /* @__PURE__ */ e(Ze, { text: m }) })
|
|
75
76
|
] })
|
|
76
77
|
] });
|
|
77
78
|
}
|
|
78
|
-
const
|
|
79
|
-
async function
|
|
80
|
-
const
|
|
79
|
+
const Ye = "/z-team/ops/k8s";
|
|
80
|
+
async function de(t, r) {
|
|
81
|
+
const c = `${Ye}${t}`, m = await fetch(c, {
|
|
81
82
|
headers: { "Content-Type": "application/json" },
|
|
82
83
|
...r
|
|
83
84
|
}), u = m.headers && m.headers.get("content-type") || "";
|
|
84
85
|
if (!/json/i.test(u))
|
|
85
|
-
throw new Error(`数据源不可达:GET ${
|
|
86
|
+
throw new Error(`数据源不可达:GET ${c} 返回 ${m.status} ${u || "(无 content-type)"},不是 JSON —— 该前缀没有进到后端接口(K8s 管理 API 在 z-ops 仓,z-opc 宿主未注册)`);
|
|
86
87
|
const y = await m.json();
|
|
87
88
|
if (y && y.success === !1)
|
|
88
|
-
throw new Error(`后端 ${
|
|
89
|
+
throw new Error(`后端 ${c} 返回 success=false:${y.message || "(无 message)"}`);
|
|
89
90
|
return y;
|
|
90
91
|
}
|
|
91
|
-
async function
|
|
92
|
-
return
|
|
92
|
+
async function A(t, r) {
|
|
93
|
+
return de(t, r);
|
|
93
94
|
}
|
|
94
|
-
async function
|
|
95
|
-
return
|
|
95
|
+
async function et() {
|
|
96
|
+
return A("/cluster/info");
|
|
96
97
|
}
|
|
97
|
-
async function
|
|
98
|
-
return
|
|
98
|
+
async function tt() {
|
|
99
|
+
return A("/nodes");
|
|
99
100
|
}
|
|
100
|
-
async function
|
|
101
|
-
return
|
|
101
|
+
async function nt(t) {
|
|
102
|
+
return A("/nodes/cordon", {
|
|
102
103
|
method: "POST",
|
|
103
104
|
body: JSON.stringify({ name: t })
|
|
104
105
|
});
|
|
105
106
|
}
|
|
106
|
-
async function
|
|
107
|
-
return
|
|
107
|
+
async function st(t) {
|
|
108
|
+
return A("/nodes/uncordon", {
|
|
108
109
|
method: "POST",
|
|
109
110
|
body: JSON.stringify({ name: t })
|
|
110
111
|
});
|
|
111
112
|
}
|
|
112
|
-
async function
|
|
113
|
-
return
|
|
113
|
+
async function at(t = "*") {
|
|
114
|
+
return A(`/workloads/pods?namespace=${t}`);
|
|
114
115
|
}
|
|
115
|
-
async function
|
|
116
|
-
return
|
|
116
|
+
async function rt(t, r, c = 200) {
|
|
117
|
+
return A(`/workloads/pods/${t}/${r}/logs?tailLines=${c}`);
|
|
117
118
|
}
|
|
118
|
-
async function
|
|
119
|
-
return
|
|
119
|
+
async function ot(t, r) {
|
|
120
|
+
return A(`/workloads/pods/${t}/${r}/restart`, { method: "POST" });
|
|
120
121
|
}
|
|
121
|
-
async function
|
|
122
|
-
return
|
|
122
|
+
async function lt(t, r) {
|
|
123
|
+
return A(`/workloads/pods/${t}/${r}`, { method: "DELETE" });
|
|
123
124
|
}
|
|
124
|
-
async function
|
|
125
|
-
return
|
|
125
|
+
async function ct() {
|
|
126
|
+
return A("/namespaces");
|
|
126
127
|
}
|
|
127
|
-
const
|
|
128
|
+
const it = () => {
|
|
128
129
|
var y, g;
|
|
129
|
-
const [t, r] = h(null), [
|
|
130
|
-
|
|
130
|
+
const [t, r] = h(null), [c, m] = h(!0);
|
|
131
|
+
D(() => {
|
|
131
132
|
u();
|
|
132
133
|
const d = setInterval(u, 1e4);
|
|
133
134
|
return () => clearInterval(d);
|
|
134
135
|
}, []);
|
|
135
136
|
const u = async () => {
|
|
136
137
|
try {
|
|
137
|
-
const d = await
|
|
138
|
+
const d = await et();
|
|
138
139
|
d.success && r(d.data);
|
|
139
140
|
} catch (d) {
|
|
140
141
|
console.error("Failed to load cluster info", d);
|
|
@@ -142,18 +143,18 @@ const tt = () => {
|
|
|
142
143
|
m(!1);
|
|
143
144
|
}
|
|
144
145
|
};
|
|
145
|
-
return
|
|
146
|
+
return c ? /* @__PURE__ */ e(ue, { size: "large" }) : /* @__PURE__ */ s("div", { style: { padding: 16 }, children: [
|
|
146
147
|
/* @__PURE__ */ s("h2", { style: { marginBottom: 24 }, children: [
|
|
147
|
-
/* @__PURE__ */ e(
|
|
148
|
+
/* @__PURE__ */ e(X, {}),
|
|
148
149
|
" 运维总览"
|
|
149
150
|
] }),
|
|
150
|
-
/* @__PURE__ */ s(
|
|
151
|
-
/* @__PURE__ */ e(
|
|
151
|
+
/* @__PURE__ */ s(he, { gutter: [16, 16], children: [
|
|
152
|
+
/* @__PURE__ */ e(U, { xs: 24, sm: 12, lg: 6, children: /* @__PURE__ */ s(F, { children: [
|
|
152
153
|
/* @__PURE__ */ e(
|
|
153
|
-
|
|
154
|
+
W,
|
|
154
155
|
{
|
|
155
156
|
title: /* @__PURE__ */ s(S, { children: [
|
|
156
|
-
/* @__PURE__ */ e(
|
|
157
|
+
/* @__PURE__ */ e(q, {}),
|
|
157
158
|
" K8s 节点"
|
|
158
159
|
] }),
|
|
159
160
|
value: (t == null ? void 0 : t.readyNodes) ?? 0,
|
|
@@ -163,14 +164,14 @@ const tt = () => {
|
|
|
163
164
|
] })
|
|
164
165
|
}
|
|
165
166
|
),
|
|
166
|
-
/* @__PURE__ */ e(
|
|
167
|
+
/* @__PURE__ */ e(R, { color: (t == null ? void 0 : t.status) === "Healthy" ? "success" : "warning", children: (t == null ? void 0 : t.status) ?? "Unknown" })
|
|
167
168
|
] }) }),
|
|
168
|
-
/* @__PURE__ */ e(
|
|
169
|
+
/* @__PURE__ */ e(U, { xs: 24, sm: 12, lg: 6, children: /* @__PURE__ */ s(F, { children: [
|
|
169
170
|
/* @__PURE__ */ e(
|
|
170
|
-
|
|
171
|
+
W,
|
|
171
172
|
{
|
|
172
173
|
title: /* @__PURE__ */ s(S, { children: [
|
|
173
|
-
/* @__PURE__ */ e(
|
|
174
|
+
/* @__PURE__ */ e(_, {}),
|
|
174
175
|
" CPU"
|
|
175
176
|
] }),
|
|
176
177
|
value: ((y = t == null ? void 0 : t.usedCpu) == null ? void 0 : y.toFixed(1)) ?? "0",
|
|
@@ -182,17 +183,17 @@ const tt = () => {
|
|
|
182
183
|
precision: 1
|
|
183
184
|
}
|
|
184
185
|
),
|
|
185
|
-
/* @__PURE__ */ s(
|
|
186
|
+
/* @__PURE__ */ s(R, { color: ((t == null ? void 0 : t.usedCpu) ?? 0) / ((t == null ? void 0 : t.totalCpu) ?? 1) > 0.8 ? "error" : "success", children: [
|
|
186
187
|
(((t == null ? void 0 : t.usedCpu) ?? 0) / ((t == null ? void 0 : t.totalCpu) ?? 1) * 100).toFixed(0),
|
|
187
188
|
"%"
|
|
188
189
|
] })
|
|
189
190
|
] }) }),
|
|
190
|
-
/* @__PURE__ */ e(
|
|
191
|
+
/* @__PURE__ */ e(U, { xs: 24, sm: 12, lg: 6, children: /* @__PURE__ */ s(F, { children: [
|
|
191
192
|
/* @__PURE__ */ e(
|
|
192
|
-
|
|
193
|
+
W,
|
|
193
194
|
{
|
|
194
195
|
title: /* @__PURE__ */ s(S, { children: [
|
|
195
|
-
/* @__PURE__ */ e(
|
|
196
|
+
/* @__PURE__ */ e(X, {}),
|
|
196
197
|
" 内存"
|
|
197
198
|
] }),
|
|
198
199
|
value: ((g = t == null ? void 0 : t.usedMemory) == null ? void 0 : g.toFixed(1)) ?? "0",
|
|
@@ -204,17 +205,17 @@ const tt = () => {
|
|
|
204
205
|
precision: 1
|
|
205
206
|
}
|
|
206
207
|
),
|
|
207
|
-
/* @__PURE__ */ s(
|
|
208
|
+
/* @__PURE__ */ s(R, { color: ((t == null ? void 0 : t.usedMemory) ?? 0) / ((t == null ? void 0 : t.totalMemory) ?? 1) > 0.8 ? "error" : "success", children: [
|
|
208
209
|
(((t == null ? void 0 : t.usedMemory) ?? 0) / ((t == null ? void 0 : t.totalMemory) ?? 1) * 100).toFixed(0),
|
|
209
210
|
"%"
|
|
210
211
|
] })
|
|
211
212
|
] }) }),
|
|
212
|
-
/* @__PURE__ */ e(
|
|
213
|
+
/* @__PURE__ */ e(U, { xs: 24, sm: 12, lg: 6, children: /* @__PURE__ */ s(F, { children: [
|
|
213
214
|
/* @__PURE__ */ e(
|
|
214
|
-
|
|
215
|
+
W,
|
|
215
216
|
{
|
|
216
217
|
title: /* @__PURE__ */ s(S, { children: [
|
|
217
|
-
/* @__PURE__ */ e(
|
|
218
|
+
/* @__PURE__ */ e(le, {}),
|
|
218
219
|
" Pods"
|
|
219
220
|
] }),
|
|
220
221
|
value: (t == null ? void 0 : t.runningPods) ?? 0,
|
|
@@ -224,13 +225,13 @@ const tt = () => {
|
|
|
224
225
|
] })
|
|
225
226
|
}
|
|
226
227
|
),
|
|
227
|
-
/* @__PURE__ */ s(
|
|
228
|
+
/* @__PURE__ */ s(R, { color: "success", children: [
|
|
228
229
|
(t == null ? void 0 : t.namespaceCount) ?? 0,
|
|
229
230
|
" namespaces"
|
|
230
231
|
] })
|
|
231
232
|
] }) })
|
|
232
233
|
] }),
|
|
233
|
-
/* @__PURE__ */ e(
|
|
234
|
+
/* @__PURE__ */ e(F, { title: "集群信息", style: { marginTop: 16 }, children: /* @__PURE__ */ s(S, { orientation: "vertical", children: [
|
|
234
235
|
/* @__PURE__ */ s("div", { children: [
|
|
235
236
|
/* @__PURE__ */ e("strong", { children: "K8s 版本:" }),
|
|
236
237
|
" ",
|
|
@@ -239,7 +240,7 @@ const tt = () => {
|
|
|
239
240
|
/* @__PURE__ */ s("div", { children: [
|
|
240
241
|
/* @__PURE__ */ e("strong", { children: "集群状态:" }),
|
|
241
242
|
" ",
|
|
242
|
-
/* @__PURE__ */ e(
|
|
243
|
+
/* @__PURE__ */ e(R, { color: "success", children: t == null ? void 0 : t.status })
|
|
243
244
|
] }),
|
|
244
245
|
/* @__PURE__ */ s("div", { children: [
|
|
245
246
|
/* @__PURE__ */ e("strong", { children: "节点数:" }),
|
|
@@ -263,15 +264,15 @@ const tt = () => {
|
|
|
263
264
|
] })
|
|
264
265
|
] }) })
|
|
265
266
|
] });
|
|
266
|
-
},
|
|
267
|
-
const [t, r] = h([]), [
|
|
268
|
-
|
|
267
|
+
}, dt = () => {
|
|
268
|
+
const [t, r] = h([]), [c, m] = h(!1), [u, y] = h("");
|
|
269
|
+
D(() => {
|
|
269
270
|
g();
|
|
270
271
|
}, []);
|
|
271
272
|
const g = async () => {
|
|
272
273
|
m(!0), y("");
|
|
273
274
|
try {
|
|
274
|
-
const a = await
|
|
275
|
+
const a = await tt();
|
|
275
276
|
r(Array.isArray(a.data) ? a.data : []);
|
|
276
277
|
} catch (a) {
|
|
277
278
|
r([]), y(String((a == null ? void 0 : a.message) || a));
|
|
@@ -280,21 +281,21 @@ const tt = () => {
|
|
|
280
281
|
}
|
|
281
282
|
}, d = async (a) => {
|
|
282
283
|
try {
|
|
283
|
-
await
|
|
284
|
+
await nt(a), w.success(`${a} 已封锁(停止调度)`), g();
|
|
284
285
|
} catch {
|
|
285
286
|
w.error("封锁失败");
|
|
286
287
|
}
|
|
287
288
|
}, C = async (a) => {
|
|
288
289
|
try {
|
|
289
|
-
await
|
|
290
|
+
await st(a), w.success(`${a} 已解封`), g();
|
|
290
291
|
} catch {
|
|
291
292
|
w.error("解封失败");
|
|
292
293
|
}
|
|
293
294
|
};
|
|
294
295
|
return /* @__PURE__ */ s("div", { children: [
|
|
295
|
-
/* @__PURE__ */ e(S, { style: { marginBottom: 16 }, children: /* @__PURE__ */ e(
|
|
296
|
+
/* @__PURE__ */ e(S, { style: { marginBottom: 16 }, children: /* @__PURE__ */ e(x, { icon: /* @__PURE__ */ e(Q, {}), onClick: g, loading: c, children: "刷新" }) }),
|
|
296
297
|
u && /* @__PURE__ */ e(
|
|
297
|
-
|
|
298
|
+
Z,
|
|
298
299
|
{
|
|
299
300
|
type: "error",
|
|
300
301
|
showIcon: !0,
|
|
@@ -304,7 +305,7 @@ const tt = () => {
|
|
|
304
305
|
}
|
|
305
306
|
),
|
|
306
307
|
/* @__PURE__ */ e(
|
|
307
|
-
|
|
308
|
+
ye,
|
|
308
309
|
{
|
|
309
310
|
columns: [
|
|
310
311
|
{
|
|
@@ -323,27 +324,27 @@ const tt = () => {
|
|
|
323
324
|
title: "状态",
|
|
324
325
|
dataIndex: "status",
|
|
325
326
|
key: "status",
|
|
326
|
-
render: (a) => /* @__PURE__ */ e(
|
|
327
|
+
render: (a) => /* @__PURE__ */ e(re, { status: a === "Ready" ? "success" : "error", text: a })
|
|
327
328
|
},
|
|
328
329
|
{
|
|
329
330
|
title: "角色",
|
|
330
331
|
dataIndex: "roles",
|
|
331
332
|
key: "roles",
|
|
332
|
-
render: (a) => a ? /* @__PURE__ */ e(
|
|
333
|
+
render: (a) => a ? /* @__PURE__ */ e(R, { color: "blue", children: a }) : /* @__PURE__ */ e(R, { children: "worker" })
|
|
333
334
|
},
|
|
334
335
|
{
|
|
335
336
|
title: "CPU",
|
|
336
337
|
key: "cpu",
|
|
337
338
|
render: (a, o) => {
|
|
338
339
|
var P;
|
|
339
|
-
const i = o.cpuUsed,
|
|
340
|
+
const i = o.cpuUsed, v = i != null && o.cpuCapacity > 0 ? i / o.cpuCapacity * 100 : null;
|
|
340
341
|
return /* @__PURE__ */ s("span", { children: [
|
|
341
342
|
i != null ? i.toFixed(2) : "—",
|
|
342
343
|
" / ",
|
|
343
344
|
((P = o.cpuCapacity) == null ? void 0 : P.toFixed(0)) ?? 0,
|
|
344
345
|
" cores",
|
|
345
|
-
|
|
346
|
-
|
|
346
|
+
v != null && /* @__PURE__ */ s(R, { color: v > 80 ? "error" : "success", style: { marginLeft: 4 }, children: [
|
|
347
|
+
v.toFixed(0),
|
|
347
348
|
"%"
|
|
348
349
|
] })
|
|
349
350
|
] });
|
|
@@ -354,14 +355,14 @@ const tt = () => {
|
|
|
354
355
|
key: "mem",
|
|
355
356
|
render: (a, o) => {
|
|
356
357
|
var P;
|
|
357
|
-
const i = o.memUsed,
|
|
358
|
+
const i = o.memUsed, v = i != null && o.memCapacity > 0 ? i / o.memCapacity * 100 : null;
|
|
358
359
|
return /* @__PURE__ */ s("span", { children: [
|
|
359
360
|
i != null ? i.toFixed(1) : "—",
|
|
360
361
|
" / ",
|
|
361
362
|
((P = o.memCapacity) == null ? void 0 : P.toFixed(1)) ?? 0,
|
|
362
363
|
" GB",
|
|
363
|
-
|
|
364
|
-
|
|
364
|
+
v != null && /* @__PURE__ */ s(R, { color: v > 80 ? "error" : "success", style: { marginLeft: 4 }, children: [
|
|
365
|
+
v.toFixed(0),
|
|
365
366
|
"%"
|
|
366
367
|
] })
|
|
367
368
|
] });
|
|
@@ -375,63 +376,63 @@ const tt = () => {
|
|
|
375
376
|
key: "action",
|
|
376
377
|
width: 150,
|
|
377
378
|
render: (a, o) => /* @__PURE__ */ s(S, { children: [
|
|
378
|
-
/* @__PURE__ */ e(
|
|
379
|
-
/* @__PURE__ */ e(
|
|
379
|
+
/* @__PURE__ */ e(L, { title: `封锁 ${o.name}?`, onConfirm: () => d(o.name), children: /* @__PURE__ */ e(x, { type: "link", size: "small", children: "Cordon" }) }),
|
|
380
|
+
/* @__PURE__ */ e(L, { title: `解封 ${o.name}?`, onConfirm: () => C(o.name), children: /* @__PURE__ */ e(x, { type: "link", size: "small", children: "Uncordon" }) })
|
|
380
381
|
] })
|
|
381
382
|
}
|
|
382
383
|
],
|
|
383
384
|
dataSource: t,
|
|
384
385
|
rowKey: "name",
|
|
385
|
-
loading:
|
|
386
|
+
loading: c,
|
|
386
387
|
pagination: !1,
|
|
387
388
|
scroll: { x: 1400 },
|
|
388
389
|
size: "middle"
|
|
389
390
|
}
|
|
390
391
|
)
|
|
391
392
|
] });
|
|
392
|
-
},
|
|
393
|
+
}, pt = ({
|
|
393
394
|
namespace: t,
|
|
394
395
|
podName: r,
|
|
395
|
-
tailLines:
|
|
396
|
+
tailLines: c = 200
|
|
396
397
|
}) => {
|
|
397
|
-
const [m, u] = h([]), [y, g] = h(!1), [d, C] = h(!1), f =
|
|
398
|
-
|
|
398
|
+
const [m, u] = h([]), [y, g] = h(!1), [d, C] = h(!1), f = z(null), a = z(null), o = z(!1);
|
|
399
|
+
D(() => (i(), () => {
|
|
399
400
|
var p;
|
|
400
401
|
(p = f.current) == null || p.close();
|
|
401
|
-
}), [t, r]),
|
|
402
|
+
}), [t, r]), D(() => {
|
|
402
403
|
var p;
|
|
403
404
|
d || (p = a.current) == null || p.scrollIntoView({ behavior: "smooth" });
|
|
404
405
|
}, [m, d]);
|
|
405
406
|
const i = () => {
|
|
406
|
-
const p = window.location.protocol === "https:" ? "wss:" : "ws:", n = window.location.host, b = `${p}//${n}/z-team/ops/k8s/ws/logs?namespace=${t}&name=${r}&tailLines=${
|
|
407
|
-
f.current =
|
|
407
|
+
const p = window.location.protocol === "https:" ? "wss:" : "ws:", n = window.location.host, b = `${p}//${n}/z-team/ops/k8s/ws/logs?namespace=${t}&name=${r}&tailLines=${c}`, I = new WebSocket(b);
|
|
408
|
+
f.current = I, I.onopen = () => {
|
|
408
409
|
g(!0), w.success("日志流已连接");
|
|
409
|
-
},
|
|
410
|
+
}, I.onmessage = ($) => {
|
|
410
411
|
o.current || u((T) => [...T.slice(-1e3), $.data]);
|
|
411
|
-
},
|
|
412
|
+
}, I.onclose = () => {
|
|
412
413
|
g(!1);
|
|
413
|
-
},
|
|
414
|
+
}, I.onerror = () => {
|
|
414
415
|
g(!1), w.error("WebSocket 连接错误");
|
|
415
416
|
};
|
|
416
417
|
};
|
|
417
418
|
return /* @__PURE__ */ s("div", { style: { display: "flex", flexDirection: "column", height: "100%" }, children: [
|
|
418
419
|
/* @__PURE__ */ s(S, { style: { marginBottom: 8 }, children: [
|
|
419
|
-
/* @__PURE__ */ e(
|
|
420
|
+
/* @__PURE__ */ e(R, { color: y ? "success" : "error", children: y ? "● 已连接" : "● 已断开" }),
|
|
420
421
|
/* @__PURE__ */ e(
|
|
421
|
-
|
|
422
|
+
x,
|
|
422
423
|
{
|
|
423
424
|
size: "small",
|
|
424
|
-
icon: d ? /* @__PURE__ */ e(
|
|
425
|
+
icon: d ? /* @__PURE__ */ e(be, {}) : /* @__PURE__ */ e(we, {}),
|
|
425
426
|
onClick: () => {
|
|
426
427
|
o.current = !o.current, C(o.current);
|
|
427
428
|
},
|
|
428
429
|
children: d ? "继续" : "暂停"
|
|
429
430
|
}
|
|
430
431
|
),
|
|
431
|
-
/* @__PURE__ */ e(
|
|
432
|
+
/* @__PURE__ */ e(x, { size: "small", icon: /* @__PURE__ */ e(ce, {}), onClick: () => {
|
|
432
433
|
u([]);
|
|
433
434
|
}, children: "清空" }),
|
|
434
|
-
/* @__PURE__ */ e(
|
|
435
|
+
/* @__PURE__ */ e(x, { size: "small", onClick: () => {
|
|
435
436
|
var p;
|
|
436
437
|
(p = f.current) == null || p.close(), u([]), i();
|
|
437
438
|
}, children: "重连" })
|
|
@@ -455,21 +456,21 @@ const tt = () => {
|
|
|
455
456
|
/* @__PURE__ */ e("div", { ref: a })
|
|
456
457
|
] })
|
|
457
458
|
] });
|
|
458
|
-
},
|
|
459
|
+
}, mt = ({
|
|
459
460
|
namespace: t,
|
|
460
461
|
podName: r
|
|
461
462
|
}) => {
|
|
462
|
-
const [
|
|
463
|
-
|
|
463
|
+
const [c, m] = h(!1), [u, y] = h(""), [g, d] = h("sh"), [C, f] = h([]), a = z(null), o = z(null), i = z(null);
|
|
464
|
+
D(() => (t && r && v(), () => {
|
|
464
465
|
var n;
|
|
465
466
|
return (n = a.current) == null ? void 0 : n.close();
|
|
466
467
|
}), [t, r]);
|
|
467
|
-
const
|
|
468
|
-
const n = window.location.protocol === "https:" ? "wss:" : "ws:", b = window.location.host,
|
|
468
|
+
const v = () => {
|
|
469
|
+
const n = window.location.protocol === "https:" ? "wss:" : "ws:", b = window.location.host, I = `${n}//${b}/z-team/ops/k8s/ws/exec?namespace=${t}&name=${r}&command=${g}`, $ = new WebSocket(I);
|
|
469
470
|
a.current = $, $.onopen = () => {
|
|
470
471
|
m(!0), f((T) => [...T, `Connected to ${t}/${r} (${g})`]), w.success("终端已连接");
|
|
471
472
|
}, $.onmessage = (T) => {
|
|
472
|
-
f((
|
|
473
|
+
f((J) => [...J.slice(-500), T.data]), setTimeout(() => {
|
|
473
474
|
o.current && (o.current.scrollTop = o.current.scrollHeight);
|
|
474
475
|
}, 50);
|
|
475
476
|
}, $.onclose = () => {
|
|
@@ -486,9 +487,9 @@ const tt = () => {
|
|
|
486
487
|
}, p = () => f([]);
|
|
487
488
|
return /* @__PURE__ */ s("div", { style: { display: "flex", flexDirection: "column", height: "100%" }, children: [
|
|
488
489
|
/* @__PURE__ */ s(S, { style: { marginBottom: 8 }, children: [
|
|
489
|
-
/* @__PURE__ */ e(
|
|
490
|
+
/* @__PURE__ */ e(R, { color: c ? "success" : "error", children: c ? "● 已连接" : "● 已断开" }),
|
|
490
491
|
/* @__PURE__ */ e(
|
|
491
|
-
|
|
492
|
+
oe,
|
|
492
493
|
{
|
|
493
494
|
value: g,
|
|
494
495
|
onChange: d,
|
|
@@ -497,10 +498,10 @@ const tt = () => {
|
|
|
497
498
|
options: ["sh", "bash", "/bin/sh", "/bin/bash"].map((n) => ({ label: n, value: n }))
|
|
498
499
|
}
|
|
499
500
|
),
|
|
500
|
-
/* @__PURE__ */ e(
|
|
501
|
-
/* @__PURE__ */ e(
|
|
501
|
+
/* @__PURE__ */ e(x, { size: "small", onClick: p, icon: /* @__PURE__ */ e(ce, {}), children: "清空" }),
|
|
502
|
+
/* @__PURE__ */ e(x, { size: "small", onClick: () => {
|
|
502
503
|
var n;
|
|
503
|
-
(n = a.current) == null || n.close(), setTimeout(
|
|
504
|
+
(n = a.current) == null || n.close(), setTimeout(v, 200);
|
|
504
505
|
}, children: "重连" })
|
|
505
506
|
] }),
|
|
506
507
|
/* @__PURE__ */ s(
|
|
@@ -561,7 +562,7 @@ const tt = () => {
|
|
|
561
562
|
onChange: (n) => y(n.target.value),
|
|
562
563
|
onKeyDown: k,
|
|
563
564
|
placeholder: "输入命令后按 Enter...",
|
|
564
|
-
disabled: !
|
|
565
|
+
disabled: !c,
|
|
565
566
|
style: {
|
|
566
567
|
flex: 1,
|
|
567
568
|
background: "#1a1a2e",
|
|
@@ -577,18 +578,18 @@ const tt = () => {
|
|
|
577
578
|
}
|
|
578
579
|
),
|
|
579
580
|
/* @__PURE__ */ e(
|
|
580
|
-
|
|
581
|
+
x,
|
|
581
582
|
{
|
|
582
583
|
type: "primary",
|
|
583
584
|
icon: /* @__PURE__ */ e(ve, {}),
|
|
584
585
|
onClick: P,
|
|
585
|
-
disabled: !
|
|
586
|
+
disabled: !c,
|
|
586
587
|
children: "发送"
|
|
587
588
|
}
|
|
588
589
|
)
|
|
589
590
|
] })
|
|
590
591
|
] });
|
|
591
|
-
},
|
|
592
|
+
}, ut = (t) => {
|
|
592
593
|
switch (t) {
|
|
593
594
|
case "Running":
|
|
594
595
|
return "success";
|
|
@@ -601,57 +602,57 @@ const tt = () => {
|
|
|
601
602
|
default:
|
|
602
603
|
return "default";
|
|
603
604
|
}
|
|
604
|
-
},
|
|
605
|
-
const [t, r] = h([]), [
|
|
606
|
-
|
|
605
|
+
}, ht = () => {
|
|
606
|
+
const [t, r] = h([]), [c, m] = h(!1), [u, y] = h(""), [g, d] = h("*"), [C, f] = h([]), [a, o] = h(!1), [i, v] = h(null), [P, k] = h("logs"), [p, n] = h("");
|
|
607
|
+
D(() => {
|
|
607
608
|
b();
|
|
608
|
-
}, []),
|
|
609
|
-
|
|
609
|
+
}, []), D(() => {
|
|
610
|
+
I();
|
|
610
611
|
}, [g]);
|
|
611
612
|
const b = async () => {
|
|
612
613
|
try {
|
|
613
|
-
const
|
|
614
|
-
f(Array.isArray(
|
|
614
|
+
const l = await ct();
|
|
615
|
+
f(Array.isArray(l.data) ? ["*", ...l.data] : ["*"]);
|
|
615
616
|
} catch {
|
|
616
617
|
f(["*"]);
|
|
617
618
|
}
|
|
618
|
-
},
|
|
619
|
+
}, I = async () => {
|
|
619
620
|
m(!0), y("");
|
|
620
621
|
try {
|
|
621
|
-
const
|
|
622
|
-
r(Array.isArray(
|
|
623
|
-
} catch (
|
|
624
|
-
r([]), y(String((
|
|
622
|
+
const l = await at(g);
|
|
623
|
+
r(Array.isArray(l.data) ? l.data : []);
|
|
624
|
+
} catch (l) {
|
|
625
|
+
r([]), y(String((l == null ? void 0 : l.message) || l));
|
|
625
626
|
} finally {
|
|
626
627
|
m(!1);
|
|
627
628
|
}
|
|
628
|
-
}, $ = async (
|
|
629
|
+
}, $ = async (l) => {
|
|
629
630
|
var O;
|
|
630
|
-
|
|
631
|
+
v(l), k("logs"), o(!0);
|
|
631
632
|
try {
|
|
632
|
-
const
|
|
633
|
-
n(((O =
|
|
634
|
-
} catch (
|
|
635
|
-
n(`加载日志失败:${String((
|
|
633
|
+
const E = await rt(l.namespace, l.name, 200);
|
|
634
|
+
n(((O = E == null ? void 0 : E.data) == null ? void 0 : O.logs) ?? "");
|
|
635
|
+
} catch (E) {
|
|
636
|
+
n(`加载日志失败:${String((E == null ? void 0 : E.message) || E)}`);
|
|
636
637
|
}
|
|
637
|
-
}, T = async (
|
|
638
|
+
}, T = async (l) => {
|
|
638
639
|
try {
|
|
639
|
-
await
|
|
640
|
+
await ot(l.namespace, l.name), w.success(`${l.name} 已重启`), I();
|
|
640
641
|
} catch {
|
|
641
642
|
w.error("重启失败");
|
|
642
643
|
}
|
|
643
|
-
},
|
|
644
|
+
}, J = async (l) => {
|
|
644
645
|
try {
|
|
645
|
-
await
|
|
646
|
+
await lt(l.namespace, l.name), w.success(`${l.name} 已删除`), I();
|
|
646
647
|
} catch {
|
|
647
648
|
w.error("删除失败");
|
|
648
649
|
}
|
|
649
|
-
},
|
|
650
|
+
}, pe = [
|
|
650
651
|
{
|
|
651
652
|
title: "名称",
|
|
652
653
|
dataIndex: "name",
|
|
653
654
|
key: "name",
|
|
654
|
-
render: (
|
|
655
|
+
render: (l, O) => /* @__PURE__ */ e("a", { onClick: () => $(O), children: l })
|
|
655
656
|
},
|
|
656
657
|
{ title: "命名空间", dataIndex: "namespace", key: "namespace", width: 120 },
|
|
657
658
|
{ title: "节点", dataIndex: "nodeName", key: "nodeName", width: 130 },
|
|
@@ -661,14 +662,14 @@ const tt = () => {
|
|
|
661
662
|
dataIndex: "status",
|
|
662
663
|
key: "status",
|
|
663
664
|
width: 100,
|
|
664
|
-
render: (
|
|
665
|
+
render: (l) => /* @__PURE__ */ e(re, { status: ut(l), text: l })
|
|
665
666
|
},
|
|
666
667
|
{
|
|
667
668
|
title: "就绪",
|
|
668
669
|
dataIndex: "ready",
|
|
669
670
|
key: "ready",
|
|
670
671
|
width: 70,
|
|
671
|
-
render: (
|
|
672
|
+
render: (l) => l ? /* @__PURE__ */ e(R, { color: "success", children: "✓" }) : /* @__PURE__ */ e(R, { color: "error", children: "✗" })
|
|
672
673
|
},
|
|
673
674
|
{ title: "重启", dataIndex: "restartCount", key: "restartCount", width: 70 },
|
|
674
675
|
{ title: "存活", dataIndex: "age", key: "age", width: 80 },
|
|
@@ -676,10 +677,10 @@ const tt = () => {
|
|
|
676
677
|
title: "操作",
|
|
677
678
|
key: "action",
|
|
678
679
|
width: 200,
|
|
679
|
-
render: (
|
|
680
|
-
/* @__PURE__ */ e(
|
|
681
|
-
/* @__PURE__ */ e(
|
|
682
|
-
/* @__PURE__ */ e(
|
|
680
|
+
render: (l, O) => /* @__PURE__ */ s(S, { children: [
|
|
681
|
+
/* @__PURE__ */ e(x, { type: "link", size: "small", onClick: () => $(O), children: "日志" }),
|
|
682
|
+
/* @__PURE__ */ e(L, { title: "确认重启此 Pod?", onConfirm: () => T(O), children: /* @__PURE__ */ e(x, { size: "small", type: "primary", ghost: !0, children: "重启" }) }),
|
|
683
|
+
/* @__PURE__ */ e(L, { title: "确认删除此 Pod?", onConfirm: () => J(O), children: /* @__PURE__ */ e(x, { type: "link", size: "small", danger: !0, children: "删除" }) })
|
|
683
684
|
] })
|
|
684
685
|
}
|
|
685
686
|
];
|
|
@@ -687,18 +688,18 @@ const tt = () => {
|
|
|
687
688
|
/* @__PURE__ */ s(S, { style: { marginBottom: 16 }, children: [
|
|
688
689
|
/* @__PURE__ */ e("span", { children: "命名空间:" }),
|
|
689
690
|
/* @__PURE__ */ e(
|
|
690
|
-
|
|
691
|
+
oe,
|
|
691
692
|
{
|
|
692
693
|
value: g,
|
|
693
694
|
onChange: d,
|
|
694
695
|
style: { width: 200 },
|
|
695
|
-
options: C.map((
|
|
696
|
+
options: C.map((l) => ({ label: l, value: l }))
|
|
696
697
|
}
|
|
697
698
|
),
|
|
698
|
-
/* @__PURE__ */ e(
|
|
699
|
+
/* @__PURE__ */ e(x, { icon: /* @__PURE__ */ e(Q, {}), onClick: I, loading: c, children: "刷新" })
|
|
699
700
|
] }),
|
|
700
701
|
u && /* @__PURE__ */ e(
|
|
701
|
-
|
|
702
|
+
Z,
|
|
702
703
|
{
|
|
703
704
|
type: "error",
|
|
704
705
|
showIcon: !0,
|
|
@@ -708,12 +709,12 @@ const tt = () => {
|
|
|
708
709
|
}
|
|
709
710
|
),
|
|
710
711
|
/* @__PURE__ */ e(
|
|
711
|
-
|
|
712
|
+
ie,
|
|
712
713
|
{
|
|
713
714
|
rows: t,
|
|
714
|
-
columns:
|
|
715
|
+
columns: pe,
|
|
715
716
|
rowKey: "name",
|
|
716
|
-
loading:
|
|
717
|
+
loading: c,
|
|
717
718
|
scroll: { x: 1e3 },
|
|
718
719
|
searchKeys: ["name", "namespace", "nodeName"],
|
|
719
720
|
searchPlaceholder: "按 Pod 名 / 命名空间 / 节点过滤",
|
|
@@ -723,7 +724,7 @@ const tt = () => {
|
|
|
723
724
|
}
|
|
724
725
|
),
|
|
725
726
|
/* @__PURE__ */ e(
|
|
726
|
-
|
|
727
|
+
ge,
|
|
727
728
|
{
|
|
728
729
|
title: i ? `${i.name} (${i.namespace})` : "",
|
|
729
730
|
placement: "right",
|
|
@@ -731,7 +732,7 @@ const tt = () => {
|
|
|
731
732
|
open: a,
|
|
732
733
|
onClose: () => o(!1),
|
|
733
734
|
children: /* @__PURE__ */ e(
|
|
734
|
-
|
|
735
|
+
fe,
|
|
735
736
|
{
|
|
736
737
|
activeKey: P,
|
|
737
738
|
onChange: k,
|
|
@@ -740,7 +741,7 @@ const tt = () => {
|
|
|
740
741
|
key: "logs",
|
|
741
742
|
label: "实时日志",
|
|
742
743
|
children: i ? /* @__PURE__ */ e(
|
|
743
|
-
|
|
744
|
+
pt,
|
|
744
745
|
{
|
|
745
746
|
namespace: i.namespace,
|
|
746
747
|
podName: i.name
|
|
@@ -751,7 +752,7 @@ const tt = () => {
|
|
|
751
752
|
key: "exec",
|
|
752
753
|
label: "终端",
|
|
753
754
|
children: /* @__PURE__ */ e("div", { style: { padding: 20 }, children: /* @__PURE__ */ e(
|
|
754
|
-
|
|
755
|
+
mt,
|
|
755
756
|
{
|
|
756
757
|
namespace: (i == null ? void 0 : i.namespace) ?? "",
|
|
757
758
|
podName: (i == null ? void 0 : i.name) ?? ""
|
|
@@ -765,18 +766,18 @@ const tt = () => {
|
|
|
765
766
|
)
|
|
766
767
|
] });
|
|
767
768
|
};
|
|
768
|
-
async function
|
|
769
|
-
return
|
|
769
|
+
async function K(t, r) {
|
|
770
|
+
return de(`/hpa${t}`, r);
|
|
770
771
|
}
|
|
771
|
-
const
|
|
772
|
-
const [t, r] = h([]), [
|
|
773
|
-
|
|
772
|
+
const yt = () => {
|
|
773
|
+
const [t, r] = h([]), [c, m] = h(!1), [u, y] = h(""), [g, d] = h(!1), [C, f] = h(!1), [a] = N.useForm();
|
|
774
|
+
D(() => {
|
|
774
775
|
o();
|
|
775
776
|
}, []);
|
|
776
777
|
const o = async () => {
|
|
777
778
|
m(!0), y("");
|
|
778
779
|
try {
|
|
779
|
-
const n = await
|
|
780
|
+
const n = await K("/list?namespace=*");
|
|
780
781
|
r(Array.isArray(n.data) ? n.data : []);
|
|
781
782
|
} catch (n) {
|
|
782
783
|
r([]), y(String((n == null ? void 0 : n.message) || n));
|
|
@@ -785,7 +786,7 @@ const lt = () => {
|
|
|
785
786
|
}
|
|
786
787
|
}, i = () => {
|
|
787
788
|
f(!1), a.resetFields(), a.setFieldsValue({ minReplicas: 1, maxReplicas: 10, cpuTarget: 80 }), d(!0);
|
|
788
|
-
},
|
|
789
|
+
}, v = (n) => {
|
|
789
790
|
f(!0), a.setFieldsValue({
|
|
790
791
|
name: n.name,
|
|
791
792
|
namespace: n.namespace,
|
|
@@ -797,7 +798,7 @@ const lt = () => {
|
|
|
797
798
|
}, P = async () => {
|
|
798
799
|
try {
|
|
799
800
|
const n = await a.validateFields();
|
|
800
|
-
C ? (await
|
|
801
|
+
C ? (await K("/update", {
|
|
801
802
|
method: "POST",
|
|
802
803
|
body: JSON.stringify({
|
|
803
804
|
namespace: n.namespace,
|
|
@@ -805,7 +806,7 @@ const lt = () => {
|
|
|
805
806
|
minReplicas: n.minReplicas,
|
|
806
807
|
maxReplicas: n.maxReplicas
|
|
807
808
|
})
|
|
808
|
-
}), w.success("HPA 更新成功")) : (await
|
|
809
|
+
}), w.success("HPA 更新成功")) : (await K("/create", {
|
|
809
810
|
method: "POST",
|
|
810
811
|
body: JSON.stringify(n)
|
|
811
812
|
}), w.success("HPA 创建成功")), d(!1), o();
|
|
@@ -814,18 +815,18 @@ const lt = () => {
|
|
|
814
815
|
}
|
|
815
816
|
}, k = async (n) => {
|
|
816
817
|
try {
|
|
817
|
-
await
|
|
818
|
+
await K(`/delete/${n.namespace}/${n.name}`, { method: "DELETE" }), w.success("HPA 已删除"), o();
|
|
818
819
|
} catch {
|
|
819
820
|
w.error("删除失败");
|
|
820
821
|
}
|
|
821
822
|
};
|
|
822
823
|
return /* @__PURE__ */ s("div", { children: [
|
|
823
824
|
/* @__PURE__ */ s(S, { style: { marginBottom: 16 }, children: [
|
|
824
|
-
/* @__PURE__ */ e(
|
|
825
|
-
/* @__PURE__ */ e(
|
|
825
|
+
/* @__PURE__ */ e(x, { type: "primary", icon: /* @__PURE__ */ e(xe, {}), onClick: i, children: "新建 HPA" }),
|
|
826
|
+
/* @__PURE__ */ e(x, { icon: /* @__PURE__ */ e(Q, {}), onClick: o, loading: c, children: "刷新" })
|
|
826
827
|
] }),
|
|
827
828
|
u && /* @__PURE__ */ e(
|
|
828
|
-
|
|
829
|
+
Z,
|
|
829
830
|
{
|
|
830
831
|
type: "error",
|
|
831
832
|
showIcon: !0,
|
|
@@ -835,7 +836,7 @@ const lt = () => {
|
|
|
835
836
|
}
|
|
836
837
|
),
|
|
837
838
|
/* @__PURE__ */ e(
|
|
838
|
-
|
|
839
|
+
ie,
|
|
839
840
|
{
|
|
840
841
|
rows: t,
|
|
841
842
|
columns: [
|
|
@@ -858,7 +859,7 @@ const lt = () => {
|
|
|
858
859
|
title: "CPU 目标",
|
|
859
860
|
dataIndex: "cpuTarget",
|
|
860
861
|
key: "cpuTarget",
|
|
861
|
-
render: (n) => n ? /* @__PURE__ */ s(
|
|
862
|
+
render: (n) => n ? /* @__PURE__ */ s(R, { color: "blue", children: [
|
|
862
863
|
n,
|
|
863
864
|
"%"
|
|
864
865
|
] }) : "-"
|
|
@@ -867,7 +868,7 @@ const lt = () => {
|
|
|
867
868
|
title: "期望副本",
|
|
868
869
|
dataIndex: "desiredReplicas",
|
|
869
870
|
key: "desired",
|
|
870
|
-
render: (n) => n ? /* @__PURE__ */ e(
|
|
871
|
+
render: (n) => n ? /* @__PURE__ */ e(R, { color: "green", children: n }) : "-"
|
|
871
872
|
},
|
|
872
873
|
{ title: "存活", dataIndex: "age", key: "age" },
|
|
873
874
|
{
|
|
@@ -875,13 +876,13 @@ const lt = () => {
|
|
|
875
876
|
key: "action",
|
|
876
877
|
width: 150,
|
|
877
878
|
render: (n, b) => /* @__PURE__ */ s(S, { children: [
|
|
878
|
-
/* @__PURE__ */ e(
|
|
879
|
-
/* @__PURE__ */ e(
|
|
879
|
+
/* @__PURE__ */ e(x, { type: "link", size: "small", onClick: () => v(b), children: "编辑" }),
|
|
880
|
+
/* @__PURE__ */ e(L, { title: `删除 HPA ${b.name}?`, onConfirm: () => k(b), children: /* @__PURE__ */ e(x, { type: "link", size: "small", danger: !0, children: "删除" }) })
|
|
880
881
|
] })
|
|
881
882
|
}
|
|
882
883
|
],
|
|
883
884
|
rowKey: "name",
|
|
884
|
-
loading:
|
|
885
|
+
loading: c,
|
|
885
886
|
searchKeys: ["name", "namespace", "scaleTargetRef"],
|
|
886
887
|
searchPlaceholder: "按 HPA 名 / 命名空间 / 目标 Deployment 过滤",
|
|
887
888
|
emptyTitle: "暂无 HPA",
|
|
@@ -890,83 +891,85 @@ const lt = () => {
|
|
|
890
891
|
}
|
|
891
892
|
),
|
|
892
893
|
/* @__PURE__ */ e(
|
|
893
|
-
|
|
894
|
+
ke,
|
|
894
895
|
{
|
|
895
896
|
title: C ? "编辑 HPA" : "新建 HPA",
|
|
896
897
|
open: g,
|
|
897
898
|
onOk: P,
|
|
898
899
|
onCancel: () => d(!1),
|
|
899
900
|
children: /* @__PURE__ */ s(N, { form: a, layout: "vertical", children: [
|
|
900
|
-
/* @__PURE__ */ e(N.Item, { name: "namespace", label: "命名空间", rules: [{ required: !0 }], children: /* @__PURE__ */ e(
|
|
901
|
-
/* @__PURE__ */ e(N.Item, { name: "name", label: "HPA 名称", rules: [{ required: !0 }], children: /* @__PURE__ */ e(
|
|
902
|
-
/* @__PURE__ */ e(N.Item, { name: "deploymentName", label: "目标 Deployment", rules: [{ required: !0 }], children: /* @__PURE__ */ e(
|
|
901
|
+
/* @__PURE__ */ e(N.Item, { name: "namespace", label: "命名空间", rules: [{ required: !0 }], children: /* @__PURE__ */ e(V, { disabled: C }) }),
|
|
902
|
+
/* @__PURE__ */ e(N.Item, { name: "name", label: "HPA 名称", rules: [{ required: !0 }], children: /* @__PURE__ */ e(V, { disabled: C }) }),
|
|
903
|
+
/* @__PURE__ */ e(N.Item, { name: "deploymentName", label: "目标 Deployment", rules: [{ required: !0 }], children: /* @__PURE__ */ e(V, { disabled: C, placeholder: "namespace/deploymentName" }) }),
|
|
903
904
|
/* @__PURE__ */ s(S, { children: [
|
|
904
|
-
/* @__PURE__ */ e(N.Item, { name: "minReplicas", label: "最小副本", rules: [{ required: !0 }], children: /* @__PURE__ */ e(
|
|
905
|
-
/* @__PURE__ */ e(N.Item, { name: "maxReplicas", label: "最大副本", rules: [{ required: !0 }], children: /* @__PURE__ */ e(
|
|
905
|
+
/* @__PURE__ */ e(N.Item, { name: "minReplicas", label: "最小副本", rules: [{ required: !0 }], children: /* @__PURE__ */ e(j, { min: 0, max: 100 }) }),
|
|
906
|
+
/* @__PURE__ */ e(N.Item, { name: "maxReplicas", label: "最大副本", rules: [{ required: !0 }], children: /* @__PURE__ */ e(j, { min: 1, max: 100 }) })
|
|
906
907
|
] }),
|
|
907
|
-
/* @__PURE__ */ e(N.Item, { name: "cpuTarget", label: "CPU 目标 (%)", children: /* @__PURE__ */ e(
|
|
908
|
+
/* @__PURE__ */ e(N.Item, { name: "cpuTarget", label: "CPU 目标 (%)", children: /* @__PURE__ */ e(j, { min: 1, max: 100 }) })
|
|
908
909
|
] })
|
|
909
910
|
}
|
|
910
911
|
)
|
|
911
912
|
] });
|
|
912
|
-
}
|
|
913
|
+
};
|
|
914
|
+
Ke("/z-ops/api");
|
|
915
|
+
const te = ae(() => import("@yuku123/z-ops-component/pages").then((t) => ({ default: t.Workspaces }))), gt = ae(() => import("@yuku123/z-ops-component/pages").then((t) => ({ default: t.ImageTags }))), ft = [
|
|
913
916
|
{
|
|
914
917
|
title: "DevOps 运维",
|
|
915
|
-
icon: /* @__PURE__ */ e(
|
|
918
|
+
icon: /* @__PURE__ */ e(q, {}),
|
|
916
919
|
items: [
|
|
917
920
|
{
|
|
918
921
|
key: "devops-dashboard",
|
|
919
922
|
label: "运维总览",
|
|
920
|
-
icon: /* @__PURE__ */ e(
|
|
923
|
+
icon: /* @__PURE__ */ e(X, {}),
|
|
921
924
|
path: "/ops/devops/dashboard",
|
|
922
925
|
desc: "集群概览与资源统计"
|
|
923
926
|
},
|
|
924
927
|
{
|
|
925
928
|
key: "devops-nodes",
|
|
926
929
|
label: "节点管理",
|
|
927
|
-
icon: /* @__PURE__ */ e(
|
|
930
|
+
icon: /* @__PURE__ */ e(q, {}),
|
|
928
931
|
path: "/ops/devops/nodes",
|
|
929
932
|
desc: "K8s 节点列表与状态"
|
|
930
933
|
},
|
|
931
934
|
{
|
|
932
935
|
key: "devops-pods",
|
|
933
936
|
label: "Pod 管理",
|
|
934
|
-
icon: /* @__PURE__ */ e(
|
|
937
|
+
icon: /* @__PURE__ */ e(le, {}),
|
|
935
938
|
path: "/ops/devops/pods",
|
|
936
939
|
desc: "Pod 列表、日志、终端"
|
|
937
940
|
},
|
|
938
941
|
{
|
|
939
942
|
key: "devops-hpa",
|
|
940
943
|
label: "弹性伸缩",
|
|
941
|
-
icon: /* @__PURE__ */ e(
|
|
944
|
+
icon: /* @__PURE__ */ e(_, {}),
|
|
942
945
|
path: "/ops/devops/hpa",
|
|
943
946
|
desc: "HPA 自动扩缩容策略"
|
|
944
947
|
},
|
|
945
948
|
{
|
|
946
949
|
key: "devops-registry",
|
|
947
950
|
label: "镜像 Tag 台账",
|
|
948
|
-
icon: /* @__PURE__ */ e(
|
|
951
|
+
icon: /* @__PURE__ */ e(_, {}),
|
|
949
952
|
path: "/ops/devops/registry",
|
|
950
953
|
desc: "镜像 Tag 台账(/api/ops/image-tag)"
|
|
951
954
|
},
|
|
952
955
|
{
|
|
953
956
|
key: "devops-pipeline",
|
|
954
957
|
label: "流水线",
|
|
955
|
-
icon: /* @__PURE__ */ e(
|
|
958
|
+
icon: /* @__PURE__ */ e(Ce, {}),
|
|
956
959
|
path: "/ops/devops/pipeline",
|
|
957
960
|
desc: "CI/CD 流水线编排"
|
|
958
961
|
},
|
|
959
962
|
{
|
|
960
963
|
key: "devops-release",
|
|
961
964
|
label: "发布管理",
|
|
962
|
-
icon: /* @__PURE__ */ e(
|
|
965
|
+
icon: /* @__PURE__ */ e(Pe, {}),
|
|
963
966
|
path: "/ops/devops/release",
|
|
964
967
|
desc: "应用发布与回滚"
|
|
965
968
|
},
|
|
966
969
|
{
|
|
967
970
|
key: "devops-monitor",
|
|
968
971
|
label: "监控告警",
|
|
969
|
-
icon: /* @__PURE__ */ e(
|
|
972
|
+
icon: /* @__PURE__ */ e(Se, {}),
|
|
970
973
|
path: "/ops/devops/monitor",
|
|
971
974
|
desc: "Prometheus/Grafana 监控"
|
|
972
975
|
},
|
|
@@ -980,7 +983,7 @@ const lt = () => {
|
|
|
980
983
|
{
|
|
981
984
|
key: "devops-dba",
|
|
982
985
|
label: "DBA 工单",
|
|
983
|
-
icon: /* @__PURE__ */ e(
|
|
986
|
+
icon: /* @__PURE__ */ e(Y, {}),
|
|
984
987
|
path: "/ops/devops/dba",
|
|
985
988
|
desc: "数据库运维工单"
|
|
986
989
|
}
|
|
@@ -988,33 +991,33 @@ const lt = () => {
|
|
|
988
991
|
},
|
|
989
992
|
{
|
|
990
993
|
title: "基础设施",
|
|
991
|
-
icon: /* @__PURE__ */ e(
|
|
994
|
+
icon: /* @__PURE__ */ e(q, {}),
|
|
992
995
|
items: [
|
|
993
996
|
{
|
|
994
997
|
key: "ops-channel",
|
|
995
998
|
label: "渠道管理",
|
|
996
|
-
icon: /* @__PURE__ */ e(
|
|
999
|
+
icon: /* @__PURE__ */ e(Ie, {}),
|
|
997
1000
|
path: "/ops/channel",
|
|
998
1001
|
desc: "部署渠道配置与管理"
|
|
999
1002
|
},
|
|
1000
1003
|
{
|
|
1001
1004
|
key: "ops-env",
|
|
1002
1005
|
label: "环境管理",
|
|
1003
|
-
icon: /* @__PURE__ */ e(
|
|
1006
|
+
icon: /* @__PURE__ */ e(_, {}),
|
|
1004
1007
|
path: "/ops/delivery",
|
|
1005
1008
|
desc: "运行环境配置与管理"
|
|
1006
1009
|
},
|
|
1007
1010
|
{
|
|
1008
1011
|
key: "ops-deploy",
|
|
1009
1012
|
label: "部署管理",
|
|
1010
|
-
icon: /* @__PURE__ */ e(
|
|
1013
|
+
icon: /* @__PURE__ */ e($e, {}),
|
|
1011
1014
|
path: "/ops/deployment",
|
|
1012
1015
|
desc: "应用部署与发布管理"
|
|
1013
1016
|
},
|
|
1014
1017
|
{
|
|
1015
1018
|
key: "ops-repo",
|
|
1016
1019
|
label: "工作区与仓库",
|
|
1017
|
-
icon: /* @__PURE__ */ e(
|
|
1020
|
+
icon: /* @__PURE__ */ e(Y, {}),
|
|
1018
1021
|
path: "/ops/repo-mgmt",
|
|
1019
1022
|
desc: "运维工作区 + Git 仓库台账"
|
|
1020
1023
|
}
|
|
@@ -1022,19 +1025,19 @@ const lt = () => {
|
|
|
1022
1025
|
},
|
|
1023
1026
|
{
|
|
1024
1027
|
title: "资源管理",
|
|
1025
|
-
icon: /* @__PURE__ */ e(
|
|
1028
|
+
icon: /* @__PURE__ */ e(_, {}),
|
|
1026
1029
|
items: [
|
|
1027
1030
|
{
|
|
1028
1031
|
key: "resource",
|
|
1029
1032
|
label: "资源管理",
|
|
1030
|
-
icon: /* @__PURE__ */ e(
|
|
1033
|
+
icon: /* @__PURE__ */ e(_, {}),
|
|
1031
1034
|
path: "/resource/domain",
|
|
1032
1035
|
desc: "域名、ECS、RDS、OSS 管理"
|
|
1033
1036
|
}
|
|
1034
1037
|
]
|
|
1035
1038
|
}
|
|
1036
1039
|
];
|
|
1037
|
-
function
|
|
1040
|
+
function M({ label: t }) {
|
|
1038
1041
|
return /* @__PURE__ */ s("div", { style: { padding: 40, textAlign: "center", color: "#999" }, children: [
|
|
1039
1042
|
/* @__PURE__ */ s("h2", { children: [
|
|
1040
1043
|
"🚧 ",
|
|
@@ -1043,48 +1046,23 @@ function H({ label: t }) {
|
|
|
1043
1046
|
/* @__PURE__ */ e("p", { children: "功能开发中..." })
|
|
1044
1047
|
] });
|
|
1045
1048
|
}
|
|
1046
|
-
function
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
"🧪 ",
|
|
1050
|
-
t
|
|
1051
|
-
] }),
|
|
1052
|
-
/* @__PURE__ */ e(
|
|
1053
|
-
V,
|
|
1054
|
-
{
|
|
1055
|
-
type: "warning",
|
|
1056
|
-
showIcon: !0,
|
|
1057
|
-
message: l,
|
|
1058
|
-
description: r
|
|
1059
|
-
}
|
|
1060
|
-
)
|
|
1061
|
-
] });
|
|
1062
|
-
}
|
|
1063
|
-
function _({ label: t }) {
|
|
1064
|
-
return /* @__PURE__ */ e(
|
|
1065
|
-
dt,
|
|
1066
|
-
{
|
|
1067
|
-
label: t,
|
|
1068
|
-
message: "该页面未孵化,因为组件从来不在本仓",
|
|
1069
|
-
reason: "组件从未迁进本仓:z-opc 的 src 目录下没有这个组件,历史上也没有任何提交 import 过它(OPS_ROUTES 里留着一个解析不到的标识符)。要恢复这一页,得先把组件从 z-ops 迁进来并接上它自己的后端;在那之前这里刻意不放假表格。"
|
|
1070
|
-
}
|
|
1071
|
-
);
|
|
1072
|
-
}
|
|
1073
|
-
function se() {
|
|
1074
|
-
const { pathname: t } = ae();
|
|
1075
|
-
return /* @__PURE__ */ e(q, { to: t, replace: !0 });
|
|
1049
|
+
function ne() {
|
|
1050
|
+
const { pathname: t } = se();
|
|
1051
|
+
return /* @__PURE__ */ e(G, { to: t, replace: !0 });
|
|
1076
1052
|
}
|
|
1077
|
-
const
|
|
1053
|
+
const kt = [...Ne, "/script"], bt = [
|
|
1078
1054
|
// ─── 运维中心 ───
|
|
1079
|
-
//
|
|
1080
|
-
//
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
{ path: "/ops
|
|
1084
|
-
{ path: "/ops/
|
|
1085
|
-
{ path: "/ops/
|
|
1086
|
-
{ path: "/ops/
|
|
1087
|
-
{ path: "/ops/
|
|
1055
|
+
// 2026-11-27:渠道/环境/部署/部署详情从 UnmigratedPage 占位换成真组件
|
|
1056
|
+
// (z-ops_frontend/src/ops 构建发布的 @yuku123/z-ops-frontend-component,
|
|
1057
|
+
// 数据源 z-ops 后端,统一前缀 /z-ops/api —— 见文件头注释)。
|
|
1058
|
+
// /ops/repo-mgmt 与 /ops/git-platform 维持 OpsWorkspaces(工作区与仓库已另有实现)。
|
|
1059
|
+
{ path: "/ops", element: /* @__PURE__ */ e(G, { to: "/ops/devops", replace: !0 }) },
|
|
1060
|
+
{ path: "/ops/channel", element: /* @__PURE__ */ e(ze, {}) },
|
|
1061
|
+
{ path: "/ops/delivery", element: /* @__PURE__ */ e(Fe, {}) },
|
|
1062
|
+
{ path: "/ops/deployment", element: /* @__PURE__ */ e(Me, {}) },
|
|
1063
|
+
{ path: "/ops/deployment/:id", element: /* @__PURE__ */ e(He, {}) },
|
|
1064
|
+
{ path: "/ops/repo-mgmt", element: /* @__PURE__ */ e(te, {}) },
|
|
1065
|
+
{ path: "/ops/git-platform", element: /* @__PURE__ */ e(te, {}) },
|
|
1088
1066
|
// ─── DevOps 子路由(K8s 管理面:2026-11-09 复活,数据源改由主壳 OpsK8sController 提供)───
|
|
1089
1067
|
// ⚠ 历史:这 4 条曾挂真组件,但 API_BASE '/z-team/ops/k8s' 的 handler 只在 z-ops 仓的
|
|
1090
1068
|
// z-ops-web 里,主壳 boot jar 的 BOOT-INF/lib 里 0 个 z-ops-* ⇒ 实测 GET /z-team/ops/k8s/nodes
|
|
@@ -1095,40 +1073,40 @@ const pt = [..._e, "/script"], mt = [
|
|
|
1095
1073
|
// ⇒ 占位卡换成真组件。为什么不反向代理 z-ops:它的接口走 SSO(实测 302 → /login),
|
|
1096
1074
|
// 而两侧 JWT secret 不同(主壳 zgw-jwt/jwt-secret vs z-ops sso-jwt/sso-jwt-secret)⇒ 必被挡;
|
|
1097
1075
|
// 给 z-ops 加 @NoLogin 又等于把「删 Pod / 改 HPA」公开到 NodePort 30886。
|
|
1098
|
-
{ path: "/ops/devops", element: /* @__PURE__ */ e(
|
|
1099
|
-
{ path: "/ops/devops/dashboard", element: /* @__PURE__ */ e(
|
|
1100
|
-
{ path: "/ops/devops/nodes", element: /* @__PURE__ */ e(
|
|
1101
|
-
{ path: "/ops/devops/pods", element: /* @__PURE__ */ e(
|
|
1102
|
-
{ path: "/ops/devops/hpa", element: /* @__PURE__ */ e(
|
|
1103
|
-
{ path: "/ops/devops/registry", element: /* @__PURE__ */ e(
|
|
1104
|
-
{ path: "/ops/devops/pipeline", element: /* @__PURE__ */ e(
|
|
1105
|
-
{ path: "/ops/devops/release", element: /* @__PURE__ */ e(
|
|
1106
|
-
{ path: "/ops/devops/monitor", element: /* @__PURE__ */ e(
|
|
1107
|
-
{ path: "/ops/devops/logs", element: /* @__PURE__ */ e(
|
|
1108
|
-
{ path: "/ops/devops/dba", element: /* @__PURE__ */ e(
|
|
1076
|
+
{ path: "/ops/devops", element: /* @__PURE__ */ e(G, { to: "/ops/devops/dashboard", replace: !0 }) },
|
|
1077
|
+
{ path: "/ops/devops/dashboard", element: /* @__PURE__ */ e(it, {}) },
|
|
1078
|
+
{ path: "/ops/devops/nodes", element: /* @__PURE__ */ e(dt, {}) },
|
|
1079
|
+
{ path: "/ops/devops/pods", element: /* @__PURE__ */ e(ht, {}) },
|
|
1080
|
+
{ path: "/ops/devops/hpa", element: /* @__PURE__ */ e(yt, {}) },
|
|
1081
|
+
{ path: "/ops/devops/registry", element: /* @__PURE__ */ e(gt, {}) },
|
|
1082
|
+
{ path: "/ops/devops/pipeline", element: /* @__PURE__ */ e(M, { label: "流水线" }) },
|
|
1083
|
+
{ path: "/ops/devops/release", element: /* @__PURE__ */ e(M, { label: "发布管理" }) },
|
|
1084
|
+
{ path: "/ops/devops/monitor", element: /* @__PURE__ */ e(M, { label: "监控告警" }) },
|
|
1085
|
+
{ path: "/ops/devops/logs", element: /* @__PURE__ */ e(M, { label: "日志管理" }) },
|
|
1086
|
+
{ path: "/ops/devops/dba", element: /* @__PURE__ */ e(M, { label: "DBA 工单" }) },
|
|
1109
1087
|
// ─── 资源管理 ───
|
|
1110
|
-
{ path: "/resource", element: /* @__PURE__ */ e(
|
|
1111
|
-
{ path: "/resource/domain", element: /* @__PURE__ */ e(
|
|
1112
|
-
{ path: "/resource/ecs", element: /* @__PURE__ */ e(
|
|
1113
|
-
{ path: "/resource/rds", element: /* @__PURE__ */ e(
|
|
1114
|
-
{ path: "/resource/oss", element: /* @__PURE__ */ e(
|
|
1088
|
+
{ path: "/resource", element: /* @__PURE__ */ e(G, { to: "/resource/domain", replace: !0 }) },
|
|
1089
|
+
{ path: "/resource/domain", element: /* @__PURE__ */ e(Le, {}) },
|
|
1090
|
+
{ path: "/resource/ecs", element: /* @__PURE__ */ e(Be, {}) },
|
|
1091
|
+
{ path: "/resource/rds", element: /* @__PURE__ */ e(Ue, {}) },
|
|
1092
|
+
{ path: "/resource/oss", element: /* @__PURE__ */ e(We, {}) },
|
|
1115
1093
|
// ─── 已迁到中间件面的前缀 → 旧深链交还中间件面 ───
|
|
1116
1094
|
// ⚠ 必须排在最后:matchWorkbenchPath 先全表精确、再全表通配,
|
|
1117
1095
|
// 但本面自己的 /ops/* 与 /resource/* 都在前面,不会被这几条吃掉。
|
|
1118
|
-
...
|
|
1119
|
-
{ path: t, element: /* @__PURE__ */ e(
|
|
1120
|
-
{ path: `${t}/*`, element: /* @__PURE__ */ e(
|
|
1096
|
+
...kt.flatMap((t) => [
|
|
1097
|
+
{ path: t, element: /* @__PURE__ */ e(ne, {}) },
|
|
1098
|
+
{ path: `${t}/*`, element: /* @__PURE__ */ e(ne, {}) }
|
|
1121
1099
|
])
|
|
1122
1100
|
];
|
|
1123
|
-
function
|
|
1101
|
+
function At({
|
|
1124
1102
|
activePathOverride: t,
|
|
1125
1103
|
menuOnly: r = !1
|
|
1126
1104
|
} = {}) {
|
|
1127
1105
|
return /* @__PURE__ */ e(
|
|
1128
|
-
|
|
1106
|
+
Qe,
|
|
1129
1107
|
{
|
|
1130
|
-
groups:
|
|
1131
|
-
routes:
|
|
1108
|
+
groups: ft,
|
|
1109
|
+
routes: bt,
|
|
1132
1110
|
mode: "ops",
|
|
1133
1111
|
emptyText: "请从左侧菜单选择运维模块",
|
|
1134
1112
|
activePathOverride: t,
|
|
@@ -1137,5 +1115,5 @@ function Ct({
|
|
|
1137
1115
|
);
|
|
1138
1116
|
}
|
|
1139
1117
|
export {
|
|
1140
|
-
|
|
1118
|
+
At as default
|
|
1141
1119
|
};
|