@yuku123/z-team-component 0.2.138 → 0.2.139
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-9gH_G78B.js → AdminModuleContent-B1IJbLVN.js} +11463 -12034
- package/dist/{ChangeLogView-DzFmZVBw.js → ChangeLogView-BVKf3AZn.js} +1 -1
- package/dist/{index-BHfNKXIA.js → CollabPersonalHost-BY6RqeQJ.js} +3 -3
- package/dist/{ComponentDoc-KyD5wtuW.js → ComponentDoc-BIX-e69A.js} +204 -212
- package/dist/{index-DXA0r7Co.js → DevWorkbench-BtiPE_V4.js} +2 -2
- package/dist/{InvitationManagementPage-6-0uZNuO.js → InvitationManagementPage-DRC_8AiO.js} +1 -1
- package/dist/{index-C9NwYJh-.js → KnowledgeGraphTab-BfhDEyvW.js} +1 -1
- package/dist/{index-DC1fQH0J.js → Market-C2vkBzDr.js} +2 -2
- package/dist/{OnboardingPage-tLarxnp5.js → OnboardingPage-B4GQTFCS.js} +2 -2
- package/dist/{index-DZcMGMHV.js → OpsWorkbench-D8RF2p4X.js} +292 -292
- package/dist/{index-Cwptuq_d.js → ProductWorkspace-PSO7Q9m-.js} +7 -7
- package/dist/{ScheduledTasks-QGmD7Uhz.js → ScheduledTasks-CoaHVU6e.js} +3104 -3141
- package/dist/{index-CNmSLd0s.js → SmartWorkbench-BkdfSgqx.js} +611 -638
- package/dist/{SystemShell-CWawiWOn.js → SystemShell-CANwRSyW.js} +149 -148
- package/dist/SystemWorkbench.module-DpLM0zgA.js +36 -0
- package/dist/{index-BgdqkNkT.js → TrainingAdminShell-CgnQM4Nb.js} +3 -3
- package/dist/{index-BdEokzAv.js → WorkBuddyShell-DCrPpMd5.js} +6 -6
- package/dist/{admin-logs-DXjxD-y2.js → admin-logs-DK00NEUv.js} +1 -1
- package/dist/{index-4icVyiM3.js → admin-ryysUJ9z.js} +6 -6
- package/dist/{api-DOjASQ0k.js → api-C_9xZbZr.js} +1 -1
- package/dist/{api-Dzr8HLsU.js → api-DBemNteG.js} +1 -1
- package/dist/{index-0AjMJyFL.js → build-by-form-CXxXrXvw.js} +5 -5
- package/dist/{index-DarTFF-M.js → change-log-CcmXtywx.js} +1 -1
- package/dist/{index-4NOi2xz4.js → chat-DKwMolQV.js} +2 -2
- package/dist/{index-8VddM67M.js → common-Bcnlb4nY.js} +2 -2
- package/dist/{createWorkspaceWsHandler-DCokPv4M.js → createWorkspaceWsHandler-6xyLJ14H.js} +3417 -3479
- package/dist/{index-CjYmL2yJ.js → docs-A-g6sqaE.js} +2 -2
- package/dist/{index-CUOByyqy.js → from-scenario-D8CIJLDn.js} +5 -5
- package/dist/{index-Crzx3zh2.js → from-ticket-D0oQPEf1.js} +2 -2
- package/dist/{index-DGdtqBi4.js → index-BGAG77Nt.js} +4 -4
- package/dist/index-BM6KEb8k.js +576 -0
- package/dist/{index-B75TTql4.js → index-BgCxUeRF.js} +2 -2
- package/dist/{index-ZqDoLUxb.js → index-BlfOXOZM.js} +1 -1
- package/dist/index-Bs_WMKyt.js +9527 -0
- package/dist/{index-nj-cjKsf.js → index-Dlf6mERD.js} +1950 -1910
- package/dist/index.js +1 -1
- package/dist/{instance-CDA6R8yG.js → instance-B9ZKD5cL.js} +1 -1
- package/dist/{menuPermission-LCjN8Osm.js → menuPermission-C4EVCwjs.js} +3 -3
- package/dist/{menuTree-Ctcz41N8.js → menuTree-BjchjhUw.js} +25 -23
- package/dist/pages.js +1 -1
- package/dist/{index-CLP0LnEz.js → phone-BU4g7eHI.js} +5 -5
- package/dist/portal-QNpTaU--.js +237 -0
- package/dist/{index-VqKcDrn3.js → scenario-DOpFkfNV.js} +2 -2
- package/dist/{send-default-agent-team-message-3Uyy88s_.js → send-default-agent-team-message-1L9Jv1eJ.js} +1 -1
- package/dist/{sso-user-DX2FYQCh.js → sso-user-Co71Xi9I.js} +1 -1
- package/dist/{training-BgYM7EV-.js → training-BqYfINRR.js} +1 -1
- package/dist/{webide-BsF30aLX.js → webide-AknolY0B.js} +213 -213
- package/dist/{index-PJZV-bFc.js → welcome-BBLRGBWu.js} +1 -1
- package/dist/z-team-component.css +1 -1
- package/package.json +12 -4
- package/dist/SystemWorkbench.module-CZv_ruUa.js +0 -36
- package/dist/index-DhDdFRHC.js +0 -279
- package/dist/index-DxZEpsT6.js +0 -10339
- /package/dist/{index-DrDFy5jN.js → CognitionWorkbench-DrDFy5jN.js} +0 -0
- /package/dist/{index-C815hPWS.js → chatdemo-C815hPWS.js} +0 -0
- /package/dist/{index-B_LJRFsK.js → download-B_LJRFsK.js} +0 -0
|
@@ -1,71 +1,71 @@
|
|
|
1
1
|
import { jsxs as s, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { useNavigate as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { P as
|
|
7
|
-
import { f as
|
|
8
|
-
import { u as te, a3 as
|
|
9
|
-
import { ListTable as
|
|
10
|
-
import "./index-
|
|
11
|
-
const
|
|
12
|
-
shell:
|
|
13
|
-
sidebar:
|
|
14
|
-
menuList:
|
|
15
|
-
menuGroup:
|
|
16
|
-
menuGroupHeader:
|
|
17
|
-
menuGroupHeaderOpen:
|
|
18
|
-
menuGroupHeaderActive:
|
|
19
|
-
menuGroupIcon:
|
|
20
|
-
menuGroupLabel:
|
|
21
|
-
menuGroupArrow:
|
|
22
|
-
menuSubList:
|
|
23
|
-
menuSubItemWrap:
|
|
24
|
-
menuSubItem:
|
|
25
|
-
menuItemOnPath:
|
|
26
|
-
menuSubItemPill:
|
|
27
|
-
menuSubItemActive:
|
|
28
|
-
menuSubItemIcon:
|
|
29
|
-
main:
|
|
30
|
-
empty:
|
|
31
|
-
emptyIcon:
|
|
32
|
-
emptyText:
|
|
2
|
+
import { useNavigate as pe, useLocation as ae, Navigate as q } from "react-router-dom";
|
|
3
|
+
import { useState as m, useMemo as j, useEffect as N, useRef as D, lazy as re } from "react";
|
|
4
|
+
import { Spin as he, Row as ye, Col as B, Card as F, Statistic as U, Space as _, Tag as R, Button as S, Alert as V, Table as fe, Badge as oe, Popconfirm as W, message as I, Select as le, Drawer as ge, Tabs as be, Form as G, Modal as ke, Input as X, InputNumber as Z } from "antd";
|
|
5
|
+
import { DownOutlined as we, RightOutlined as ve, DashboardOutlined as Q, ClusterOutlined as J, CloudServerOutlined as L, ContainerOutlined as ce, ReloadOutlined as Y, PlayCircleOutlined as xe, PauseCircleOutlined as Ie, ClearOutlined as ie, SendOutlined as Se, PlusOutlined as Ce, BranchesOutlined as Pe, RocketOutlined as _e, AlertOutlined as Re, FileTextOutlined as Oe, DatabaseOutlined as ee, CloudOutlined as $e, DeploymentUnitOutlined as Ae } from "@ant-design/icons";
|
|
6
|
+
import { P as Ne, R as Te } from "./index-BgCxUeRF.js";
|
|
7
|
+
import { f as Ee, M as Ge } from "./menuPermission-C4EVCwjs.js";
|
|
8
|
+
import { u as te, a3 as He } from "./ComponentDoc-BIX-e69A.js";
|
|
9
|
+
import { ListTable as de } from "@yuku123/z-frontend-common/ui";
|
|
10
|
+
import "./index-Bs_WMKyt.js";
|
|
11
|
+
const Le = "_shell_rfl59_7", De = "_sidebar_rfl59_20", ze = "_menuList_rfl59_41", Fe = "_menuGroup_rfl59_47", Me = "_menuGroupHeader_rfl59_56", We = "_menuGroupHeaderOpen_rfl59_75", Be = "_menuGroupHeaderActive_rfl59_86", Ue = "_menuGroupIcon_rfl59_90", Ke = "_menuGroupLabel_rfl59_99", qe = "_menuGroupArrow_rfl59_104", Je = "_menuSubList_rfl59_110", Ve = "_menuSubItemWrap_rfl59_116", je = "_menuSubItem_rfl59_116", Xe = "_menuItemOnPath_rfl59_154", Ze = "_menuSubItemPill_rfl59_175", Qe = "_menuSubItemActive_rfl59_191", Ye = "_menuSubItemIcon_rfl59_201", et = "_main_rfl59_215", tt = "_empty_rfl59_226", nt = "_emptyIcon_rfl59_236", st = "_emptyText_rfl59_241", k = {
|
|
12
|
+
shell: Le,
|
|
13
|
+
sidebar: De,
|
|
14
|
+
menuList: ze,
|
|
15
|
+
menuGroup: Fe,
|
|
16
|
+
menuGroupHeader: Me,
|
|
17
|
+
menuGroupHeaderOpen: We,
|
|
18
|
+
menuGroupHeaderActive: Be,
|
|
19
|
+
menuGroupIcon: Ue,
|
|
20
|
+
menuGroupLabel: Ke,
|
|
21
|
+
menuGroupArrow: qe,
|
|
22
|
+
menuSubList: Je,
|
|
23
|
+
menuSubItemWrap: Ve,
|
|
24
|
+
menuSubItem: je,
|
|
25
|
+
menuItemOnPath: Xe,
|
|
26
|
+
menuSubItemPill: Ze,
|
|
27
|
+
menuSubItemActive: Qe,
|
|
28
|
+
menuSubItemIcon: Ye,
|
|
29
|
+
main: et,
|
|
30
|
+
empty: tt,
|
|
31
|
+
emptyIcon: nt,
|
|
32
|
+
emptyText: st
|
|
33
33
|
};
|
|
34
|
-
function
|
|
34
|
+
function at(t, r) {
|
|
35
35
|
for (const l of t)
|
|
36
|
-
if (l.path ===
|
|
36
|
+
if (l.path === r) return l.element;
|
|
37
37
|
for (const l of t)
|
|
38
38
|
if (l.path.includes("*") || l.path.includes(":")) {
|
|
39
39
|
const p = "^" + l.path.replace(/[.+?^${}()|[\]\\]/g, "\\$&").replace(/\*/g, ".*").replace(/:([a-zA-Z_][a-zA-Z0-9_]*)/g, "[^/]+") + "$";
|
|
40
|
-
if (new RegExp(p).test(
|
|
40
|
+
if (new RegExp(p).test(r)) return l.element;
|
|
41
41
|
}
|
|
42
42
|
return null;
|
|
43
43
|
}
|
|
44
|
-
function
|
|
45
|
-
return /* @__PURE__ */ s("div", { className:
|
|
46
|
-
/* @__PURE__ */ e("div", { className:
|
|
47
|
-
/* @__PURE__ */ e("div", { className:
|
|
44
|
+
function rt({ text: t }) {
|
|
45
|
+
return /* @__PURE__ */ s("div", { className: k.empty, children: [
|
|
46
|
+
/* @__PURE__ */ e("div", { className: k.emptyIcon, children: "⚙️" }),
|
|
47
|
+
/* @__PURE__ */ e("div", { className: k.emptyText, children: t })
|
|
48
48
|
] });
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function ot({
|
|
51
51
|
groups: t,
|
|
52
|
-
routes:
|
|
52
|
+
routes: r,
|
|
53
53
|
mode: l,
|
|
54
54
|
emptyText: p,
|
|
55
55
|
activePathOverride: h,
|
|
56
56
|
menuOnly: y = !1
|
|
57
57
|
}) {
|
|
58
|
-
const g =
|
|
59
|
-
() => v === "failed" ? t :
|
|
58
|
+
const g = pe(), { pathname: u } = ae(), C = te((n) => n.currentUser), v = te((n) => n.permissionState), [a, o] = m(/* @__PURE__ */ new Set()), c = j(
|
|
59
|
+
() => v === "failed" ? t : Ee(t, C),
|
|
60
60
|
[t, C, v]
|
|
61
|
-
), b =
|
|
61
|
+
), b = j(() => {
|
|
62
62
|
const n = h ?? u;
|
|
63
63
|
for (const d of c)
|
|
64
64
|
for (const f of d.items)
|
|
65
65
|
if (f.path === n) return f.key;
|
|
66
66
|
return null;
|
|
67
67
|
}, [c, h, u]);
|
|
68
|
-
|
|
68
|
+
N(() => {
|
|
69
69
|
b && c.forEach((n) => {
|
|
70
70
|
n.items.some((d) => d.key === b) && o(
|
|
71
71
|
(d) => d.has(n.title) ? d : new Set(d).add(n.title)
|
|
@@ -77,37 +77,37 @@ function rt({
|
|
|
77
77
|
const f = new Set(d);
|
|
78
78
|
return f.has(n) ? f.delete(n) : f.add(n), f;
|
|
79
79
|
});
|
|
80
|
-
},
|
|
80
|
+
}, A = (n) => {
|
|
81
81
|
g(`${n.path}?mode=${l}`);
|
|
82
|
-
},
|
|
83
|
-
return /* @__PURE__ */ s("div", { className:
|
|
84
|
-
/* @__PURE__ */ s("aside", { className:
|
|
85
|
-
/* @__PURE__ */ e(
|
|
86
|
-
/* @__PURE__ */ e("nav", { className:
|
|
87
|
-
const d =
|
|
88
|
-
return /* @__PURE__ */ s("div", { className:
|
|
82
|
+
}, w = j(() => at(r, u), [r, u]);
|
|
83
|
+
return /* @__PURE__ */ s("div", { className: k.shell, children: [
|
|
84
|
+
/* @__PURE__ */ s("aside", { className: k.sidebar, children: [
|
|
85
|
+
/* @__PURE__ */ e(Ge, {}),
|
|
86
|
+
/* @__PURE__ */ e("nav", { className: k.menuList, children: c.map((n) => {
|
|
87
|
+
const d = a.has(n.title), f = b ? n.items.findIndex((x) => x.key === b) : -1;
|
|
88
|
+
return /* @__PURE__ */ s("div", { className: k.menuGroup, children: [
|
|
89
89
|
/* @__PURE__ */ s(
|
|
90
90
|
"div",
|
|
91
91
|
{
|
|
92
|
-
className: `${
|
|
92
|
+
className: `${k.menuGroupHeader} ${d ? k.menuGroupHeaderOpen : ""} ${f >= 0 ? k.menuGroupHeaderActive : ""}`,
|
|
93
93
|
onClick: () => P(n.title),
|
|
94
94
|
children: [
|
|
95
|
-
/* @__PURE__ */ e("span", { className:
|
|
96
|
-
/* @__PURE__ */ e("span", { className:
|
|
97
|
-
/* @__PURE__ */ e("span", { className:
|
|
95
|
+
/* @__PURE__ */ e("span", { className: k.menuGroupIcon, children: n.icon }),
|
|
96
|
+
/* @__PURE__ */ e("span", { className: k.menuGroupLabel, children: n.title }),
|
|
97
|
+
/* @__PURE__ */ e("span", { className: k.menuGroupArrow, children: d ? /* @__PURE__ */ e(we, {}) : /* @__PURE__ */ e(ve, {}) })
|
|
98
98
|
]
|
|
99
99
|
}
|
|
100
100
|
),
|
|
101
|
-
d && /* @__PURE__ */ e("ul", { className:
|
|
102
|
-
const
|
|
101
|
+
d && /* @__PURE__ */ e("ul", { className: k.menuSubList, children: n.items.map((x, O) => {
|
|
102
|
+
const z = f >= 0 && O <= f;
|
|
103
103
|
return /* @__PURE__ */ e(
|
|
104
104
|
"li",
|
|
105
105
|
{
|
|
106
|
-
className: `${
|
|
107
|
-
onClick: () =>
|
|
108
|
-
children: /* @__PURE__ */ s("div", { className:
|
|
109
|
-
/* @__PURE__ */ e("span", { className:
|
|
110
|
-
/* @__PURE__ */ e("span", { className:
|
|
106
|
+
className: `${k.menuSubItemWrap} ${k.menuSubItem} ${z ? k.menuItemOnPath : ""} ${b === x.key ? k.menuSubItemActive : ""}`,
|
|
107
|
+
onClick: () => A(x),
|
|
108
|
+
children: /* @__PURE__ */ s("div", { className: k.menuSubItemPill, children: [
|
|
109
|
+
/* @__PURE__ */ e("span", { className: k.menuSubItemIcon, children: x.icon }),
|
|
110
|
+
/* @__PURE__ */ e("span", { className: k.menuSubItemLabel, children: x.label })
|
|
111
111
|
] })
|
|
112
112
|
},
|
|
113
113
|
x.key
|
|
@@ -116,17 +116,17 @@ function rt({
|
|
|
116
116
|
] }, n.title);
|
|
117
117
|
}) })
|
|
118
118
|
] }),
|
|
119
|
-
y ? null : /* @__PURE__ */ s("main", { className:
|
|
120
|
-
/* @__PURE__ */ e(
|
|
121
|
-
/* @__PURE__ */ e(
|
|
119
|
+
y ? null : /* @__PURE__ */ s("main", { className: k.main, children: [
|
|
120
|
+
/* @__PURE__ */ e(Ne, {}),
|
|
121
|
+
/* @__PURE__ */ e(Te, { resetKey: u, children: w ?? /* @__PURE__ */ e(rt, { text: p }) })
|
|
122
122
|
] })
|
|
123
123
|
] });
|
|
124
124
|
}
|
|
125
|
-
const
|
|
126
|
-
async function
|
|
127
|
-
const l = `${
|
|
125
|
+
const lt = "/z-team/ops/k8s";
|
|
126
|
+
async function ue(t, r) {
|
|
127
|
+
const l = `${lt}${t}`, p = await fetch(l, {
|
|
128
128
|
headers: { "Content-Type": "application/json" },
|
|
129
|
-
...
|
|
129
|
+
...r
|
|
130
130
|
}), h = p.headers && p.headers.get("content-type") || "";
|
|
131
131
|
if (!/json/i.test(h))
|
|
132
132
|
throw new Error(`数据源不可达:GET ${l} 返回 ${p.status} ${h || "(无 content-type)"},不是 JSON —— 该前缀没有进到后端接口(K8s 管理 API 在 z-ops 仓,z-opc 宿主未注册)`);
|
|
@@ -135,67 +135,67 @@ async function ie(t, a) {
|
|
|
135
135
|
throw new Error(`后端 ${l} 返回 success=false:${y.message || "(无 message)"}`);
|
|
136
136
|
return y;
|
|
137
137
|
}
|
|
138
|
-
async function T(t,
|
|
139
|
-
return
|
|
138
|
+
async function T(t, r) {
|
|
139
|
+
return ue(t, r);
|
|
140
140
|
}
|
|
141
|
-
async function
|
|
141
|
+
async function ct() {
|
|
142
142
|
return T("/cluster/info");
|
|
143
143
|
}
|
|
144
|
-
async function
|
|
144
|
+
async function it() {
|
|
145
145
|
return T("/nodes");
|
|
146
146
|
}
|
|
147
|
-
async function
|
|
147
|
+
async function dt(t) {
|
|
148
148
|
return T("/nodes/cordon", {
|
|
149
149
|
method: "POST",
|
|
150
150
|
body: JSON.stringify({ name: t })
|
|
151
151
|
});
|
|
152
152
|
}
|
|
153
|
-
async function
|
|
153
|
+
async function ut(t) {
|
|
154
154
|
return T("/nodes/uncordon", {
|
|
155
155
|
method: "POST",
|
|
156
156
|
body: JSON.stringify({ name: t })
|
|
157
157
|
});
|
|
158
158
|
}
|
|
159
|
-
async function
|
|
159
|
+
async function mt(t = "*") {
|
|
160
160
|
return T(`/workloads/pods?namespace=${t}`);
|
|
161
161
|
}
|
|
162
|
-
async function
|
|
163
|
-
return T(`/workloads/pods/${t}/${
|
|
162
|
+
async function pt(t, r, l = 200) {
|
|
163
|
+
return T(`/workloads/pods/${t}/${r}/logs?tailLines=${l}`);
|
|
164
164
|
}
|
|
165
|
-
async function
|
|
166
|
-
return T(`/workloads/pods/${t}/${
|
|
165
|
+
async function ht(t, r) {
|
|
166
|
+
return T(`/workloads/pods/${t}/${r}/restart`, { method: "POST" });
|
|
167
167
|
}
|
|
168
|
-
async function
|
|
169
|
-
return T(`/workloads/pods/${t}/${
|
|
168
|
+
async function yt(t, r) {
|
|
169
|
+
return T(`/workloads/pods/${t}/${r}`, { method: "DELETE" });
|
|
170
170
|
}
|
|
171
|
-
async function
|
|
171
|
+
async function ft() {
|
|
172
172
|
return T("/namespaces");
|
|
173
173
|
}
|
|
174
|
-
const
|
|
174
|
+
const gt = () => {
|
|
175
175
|
var y, g;
|
|
176
|
-
const [t,
|
|
177
|
-
|
|
176
|
+
const [t, r] = m(null), [l, p] = m(!0);
|
|
177
|
+
N(() => {
|
|
178
178
|
h();
|
|
179
179
|
const u = setInterval(h, 1e4);
|
|
180
180
|
return () => clearInterval(u);
|
|
181
181
|
}, []);
|
|
182
182
|
const h = async () => {
|
|
183
183
|
try {
|
|
184
|
-
const u = await
|
|
185
|
-
u.success &&
|
|
184
|
+
const u = await ct();
|
|
185
|
+
u.success && r(u.data);
|
|
186
186
|
} catch (u) {
|
|
187
187
|
console.error("Failed to load cluster info", u);
|
|
188
188
|
} finally {
|
|
189
189
|
p(!1);
|
|
190
190
|
}
|
|
191
191
|
};
|
|
192
|
-
return l ? /* @__PURE__ */ e(
|
|
192
|
+
return l ? /* @__PURE__ */ e(he, { size: "large" }) : /* @__PURE__ */ s("div", { style: { padding: 16 }, children: [
|
|
193
193
|
/* @__PURE__ */ s("h2", { style: { marginBottom: 24 }, children: [
|
|
194
194
|
/* @__PURE__ */ e(Q, {}),
|
|
195
195
|
" 运维总览"
|
|
196
196
|
] }),
|
|
197
|
-
/* @__PURE__ */ s(
|
|
198
|
-
/* @__PURE__ */ e(
|
|
197
|
+
/* @__PURE__ */ s(ye, { gutter: [16, 16], children: [
|
|
198
|
+
/* @__PURE__ */ e(B, { xs: 24, sm: 12, lg: 6, children: /* @__PURE__ */ s(F, { children: [
|
|
199
199
|
/* @__PURE__ */ e(
|
|
200
200
|
U,
|
|
201
201
|
{
|
|
@@ -212,12 +212,12 @@ const yt = () => {
|
|
|
212
212
|
),
|
|
213
213
|
/* @__PURE__ */ e(R, { color: (t == null ? void 0 : t.status) === "Healthy" ? "success" : "warning", children: (t == null ? void 0 : t.status) ?? "Unknown" })
|
|
214
214
|
] }) }),
|
|
215
|
-
/* @__PURE__ */ e(
|
|
215
|
+
/* @__PURE__ */ e(B, { xs: 24, sm: 12, lg: 6, children: /* @__PURE__ */ s(F, { children: [
|
|
216
216
|
/* @__PURE__ */ e(
|
|
217
217
|
U,
|
|
218
218
|
{
|
|
219
219
|
title: /* @__PURE__ */ s(_, { children: [
|
|
220
|
-
/* @__PURE__ */ e(
|
|
220
|
+
/* @__PURE__ */ e(L, {}),
|
|
221
221
|
" CPU"
|
|
222
222
|
] }),
|
|
223
223
|
value: ((y = t == null ? void 0 : t.usedCpu) == null ? void 0 : y.toFixed(1)) ?? "0",
|
|
@@ -234,7 +234,7 @@ const yt = () => {
|
|
|
234
234
|
"%"
|
|
235
235
|
] })
|
|
236
236
|
] }) }),
|
|
237
|
-
/* @__PURE__ */ e(
|
|
237
|
+
/* @__PURE__ */ e(B, { xs: 24, sm: 12, lg: 6, children: /* @__PURE__ */ s(F, { children: [
|
|
238
238
|
/* @__PURE__ */ e(
|
|
239
239
|
U,
|
|
240
240
|
{
|
|
@@ -256,12 +256,12 @@ const yt = () => {
|
|
|
256
256
|
"%"
|
|
257
257
|
] })
|
|
258
258
|
] }) }),
|
|
259
|
-
/* @__PURE__ */ e(
|
|
259
|
+
/* @__PURE__ */ e(B, { xs: 24, sm: 12, lg: 6, children: /* @__PURE__ */ s(F, { children: [
|
|
260
260
|
/* @__PURE__ */ e(
|
|
261
261
|
U,
|
|
262
262
|
{
|
|
263
263
|
title: /* @__PURE__ */ s(_, { children: [
|
|
264
|
-
/* @__PURE__ */ e(
|
|
264
|
+
/* @__PURE__ */ e(ce, {}),
|
|
265
265
|
" Pods"
|
|
266
266
|
] }),
|
|
267
267
|
value: (t == null ? void 0 : t.runningPods) ?? 0,
|
|
@@ -277,7 +277,7 @@ const yt = () => {
|
|
|
277
277
|
] })
|
|
278
278
|
] }) })
|
|
279
279
|
] }),
|
|
280
|
-
/* @__PURE__ */ e(
|
|
280
|
+
/* @__PURE__ */ e(F, { title: "集群信息", style: { marginTop: 16 }, children: /* @__PURE__ */ s(_, { orientation: "vertical", children: [
|
|
281
281
|
/* @__PURE__ */ s("div", { children: [
|
|
282
282
|
/* @__PURE__ */ e("strong", { children: "K8s 版本:" }),
|
|
283
283
|
" ",
|
|
@@ -310,36 +310,36 @@ const yt = () => {
|
|
|
310
310
|
] })
|
|
311
311
|
] }) })
|
|
312
312
|
] });
|
|
313
|
-
},
|
|
314
|
-
const [t,
|
|
315
|
-
|
|
313
|
+
}, bt = () => {
|
|
314
|
+
const [t, r] = m([]), [l, p] = m(!1), [h, y] = m("");
|
|
315
|
+
N(() => {
|
|
316
316
|
g();
|
|
317
317
|
}, []);
|
|
318
318
|
const g = async () => {
|
|
319
319
|
p(!0), y("");
|
|
320
320
|
try {
|
|
321
|
-
const
|
|
322
|
-
|
|
323
|
-
} catch (
|
|
324
|
-
|
|
321
|
+
const a = await it();
|
|
322
|
+
r(Array.isArray(a.data) ? a.data : []);
|
|
323
|
+
} catch (a) {
|
|
324
|
+
r([]), y(String((a == null ? void 0 : a.message) || a));
|
|
325
325
|
} finally {
|
|
326
326
|
p(!1);
|
|
327
327
|
}
|
|
328
|
-
}, u = async (
|
|
328
|
+
}, u = async (a) => {
|
|
329
329
|
try {
|
|
330
|
-
await
|
|
330
|
+
await dt(a), I.success(`${a} 已封锁(停止调度)`), g();
|
|
331
331
|
} catch {
|
|
332
|
-
|
|
332
|
+
I.error("封锁失败");
|
|
333
333
|
}
|
|
334
|
-
}, C = async (
|
|
334
|
+
}, C = async (a) => {
|
|
335
335
|
try {
|
|
336
|
-
await
|
|
336
|
+
await ut(a), I.success(`${a} 已解封`), g();
|
|
337
337
|
} catch {
|
|
338
|
-
|
|
338
|
+
I.error("解封失败");
|
|
339
339
|
}
|
|
340
340
|
};
|
|
341
341
|
return /* @__PURE__ */ s("div", { children: [
|
|
342
|
-
/* @__PURE__ */ e(_, { style: { marginBottom: 16 }, children: /* @__PURE__ */ e(
|
|
342
|
+
/* @__PURE__ */ e(_, { style: { marginBottom: 16 }, children: /* @__PURE__ */ e(S, { icon: /* @__PURE__ */ e(Y, {}), onClick: g, loading: l, children: "刷新" }) }),
|
|
343
343
|
h && /* @__PURE__ */ e(
|
|
344
344
|
V,
|
|
345
345
|
{
|
|
@@ -351,37 +351,37 @@ const yt = () => {
|
|
|
351
351
|
}
|
|
352
352
|
),
|
|
353
353
|
/* @__PURE__ */ e(
|
|
354
|
-
|
|
354
|
+
fe,
|
|
355
355
|
{
|
|
356
356
|
columns: [
|
|
357
357
|
{
|
|
358
358
|
title: "名称",
|
|
359
359
|
dataIndex: "name",
|
|
360
360
|
key: "name",
|
|
361
|
-
render: (
|
|
361
|
+
render: (a) => /* @__PURE__ */ e("strong", { children: a })
|
|
362
362
|
},
|
|
363
363
|
{
|
|
364
364
|
title: "IP",
|
|
365
365
|
dataIndex: "ip",
|
|
366
366
|
key: "ip",
|
|
367
|
-
render: (
|
|
367
|
+
render: (a) => /* @__PURE__ */ e("code", { children: a })
|
|
368
368
|
},
|
|
369
369
|
{
|
|
370
370
|
title: "状态",
|
|
371
371
|
dataIndex: "status",
|
|
372
372
|
key: "status",
|
|
373
|
-
render: (
|
|
373
|
+
render: (a) => /* @__PURE__ */ e(oe, { status: a === "Ready" ? "success" : "error", text: a })
|
|
374
374
|
},
|
|
375
375
|
{
|
|
376
376
|
title: "角色",
|
|
377
377
|
dataIndex: "roles",
|
|
378
378
|
key: "roles",
|
|
379
|
-
render: (
|
|
379
|
+
render: (a) => a ? /* @__PURE__ */ e(R, { color: "blue", children: a }) : /* @__PURE__ */ e(R, { children: "worker" })
|
|
380
380
|
},
|
|
381
381
|
{
|
|
382
382
|
title: "CPU",
|
|
383
383
|
key: "cpu",
|
|
384
|
-
render: (
|
|
384
|
+
render: (a, o) => {
|
|
385
385
|
var P;
|
|
386
386
|
const c = o.cpuUsed, b = c != null && o.cpuCapacity > 0 ? c / o.cpuCapacity * 100 : null;
|
|
387
387
|
return /* @__PURE__ */ s("span", { children: [
|
|
@@ -399,7 +399,7 @@ const yt = () => {
|
|
|
399
399
|
{
|
|
400
400
|
title: "内存",
|
|
401
401
|
key: "mem",
|
|
402
|
-
render: (
|
|
402
|
+
render: (a, o) => {
|
|
403
403
|
var P;
|
|
404
404
|
const c = o.memUsed, b = c != null && o.memCapacity > 0 ? c / o.memCapacity * 100 : null;
|
|
405
405
|
return /* @__PURE__ */ s("span", { children: [
|
|
@@ -421,9 +421,9 @@ const yt = () => {
|
|
|
421
421
|
title: "操作",
|
|
422
422
|
key: "action",
|
|
423
423
|
width: 150,
|
|
424
|
-
render: (
|
|
425
|
-
/* @__PURE__ */ e(
|
|
426
|
-
/* @__PURE__ */ e(
|
|
424
|
+
render: (a, o) => /* @__PURE__ */ s(_, { children: [
|
|
425
|
+
/* @__PURE__ */ e(W, { title: `封锁 ${o.name}?`, onConfirm: () => u(o.name), children: /* @__PURE__ */ e(S, { type: "link", size: "small", children: "Cordon" }) }),
|
|
426
|
+
/* @__PURE__ */ e(W, { title: `解封 ${o.name}?`, onConfirm: () => C(o.name), children: /* @__PURE__ */ e(S, { type: "link", size: "small", children: "Uncordon" }) })
|
|
427
427
|
] })
|
|
428
428
|
}
|
|
429
429
|
],
|
|
@@ -436,51 +436,51 @@ const yt = () => {
|
|
|
436
436
|
}
|
|
437
437
|
)
|
|
438
438
|
] });
|
|
439
|
-
},
|
|
439
|
+
}, kt = ({
|
|
440
440
|
namespace: t,
|
|
441
|
-
podName:
|
|
441
|
+
podName: r,
|
|
442
442
|
tailLines: l = 200
|
|
443
443
|
}) => {
|
|
444
|
-
const [p, h] = m([]), [y, g] = m(!1), [u, C] = m(!1), v =
|
|
445
|
-
|
|
446
|
-
var
|
|
447
|
-
(
|
|
448
|
-
}), [t,
|
|
449
|
-
var
|
|
450
|
-
u || (
|
|
444
|
+
const [p, h] = m([]), [y, g] = m(!1), [u, C] = m(!1), v = D(null), a = D(null), o = D(!1);
|
|
445
|
+
N(() => (c(), () => {
|
|
446
|
+
var w;
|
|
447
|
+
(w = v.current) == null || w.close();
|
|
448
|
+
}), [t, r]), N(() => {
|
|
449
|
+
var w;
|
|
450
|
+
u || (w = a.current) == null || w.scrollIntoView({ behavior: "smooth" });
|
|
451
451
|
}, [p, u]);
|
|
452
452
|
const c = () => {
|
|
453
|
-
const
|
|
453
|
+
const w = window.location.protocol === "https:" ? "wss:" : "ws:", n = window.location.host, d = `${w}//${n}/z-team/ops/k8s/ws/logs?namespace=${t}&name=${r}&tailLines=${l}`, f = new WebSocket(d);
|
|
454
454
|
v.current = f, f.onopen = () => {
|
|
455
|
-
g(!0),
|
|
455
|
+
g(!0), I.success("日志流已连接");
|
|
456
456
|
}, f.onmessage = (x) => {
|
|
457
|
-
o.current || h((
|
|
457
|
+
o.current || h((O) => [...O.slice(-1e3), x.data]);
|
|
458
458
|
}, f.onclose = () => {
|
|
459
459
|
g(!1);
|
|
460
460
|
}, f.onerror = () => {
|
|
461
|
-
g(!1),
|
|
461
|
+
g(!1), I.error("WebSocket 连接错误");
|
|
462
462
|
};
|
|
463
463
|
};
|
|
464
464
|
return /* @__PURE__ */ s("div", { style: { display: "flex", flexDirection: "column", height: "100%" }, children: [
|
|
465
465
|
/* @__PURE__ */ s(_, { style: { marginBottom: 8 }, children: [
|
|
466
466
|
/* @__PURE__ */ e(R, { color: y ? "success" : "error", children: y ? "● 已连接" : "● 已断开" }),
|
|
467
467
|
/* @__PURE__ */ e(
|
|
468
|
-
|
|
468
|
+
S,
|
|
469
469
|
{
|
|
470
470
|
size: "small",
|
|
471
|
-
icon: u ? /* @__PURE__ */ e(
|
|
471
|
+
icon: u ? /* @__PURE__ */ e(xe, {}) : /* @__PURE__ */ e(Ie, {}),
|
|
472
472
|
onClick: () => {
|
|
473
473
|
o.current = !o.current, C(o.current);
|
|
474
474
|
},
|
|
475
475
|
children: u ? "继续" : "暂停"
|
|
476
476
|
}
|
|
477
477
|
),
|
|
478
|
-
/* @__PURE__ */ e(
|
|
478
|
+
/* @__PURE__ */ e(S, { size: "small", icon: /* @__PURE__ */ e(ie, {}), onClick: () => {
|
|
479
479
|
h([]);
|
|
480
480
|
}, children: "清空" }),
|
|
481
|
-
/* @__PURE__ */ e(
|
|
482
|
-
var
|
|
483
|
-
(
|
|
481
|
+
/* @__PURE__ */ e(S, { size: "small", onClick: () => {
|
|
482
|
+
var w;
|
|
483
|
+
(w = v.current) == null || w.close(), h([]), c();
|
|
484
484
|
}, children: "重连" })
|
|
485
485
|
] }),
|
|
486
486
|
/* @__PURE__ */ s("div", { style: {
|
|
@@ -494,48 +494,48 @@ const yt = () => {
|
|
|
494
494
|
lineHeight: 1.5,
|
|
495
495
|
color: "#d4d4d4"
|
|
496
496
|
}, children: [
|
|
497
|
-
p.map((
|
|
498
|
-
color:
|
|
497
|
+
p.map((w, n) => /* @__PURE__ */ e("div", { style: {
|
|
498
|
+
color: w.includes("ERROR") ? "#f44336" : w.includes("WARN") ? "#ff9800" : w.includes("INFO") ? "#4caf50" : "#d4d4d4",
|
|
499
499
|
whiteSpace: "pre-wrap",
|
|
500
500
|
wordBreak: "break-all"
|
|
501
|
-
}, children:
|
|
502
|
-
/* @__PURE__ */ e("div", { ref:
|
|
501
|
+
}, children: w }, n)),
|
|
502
|
+
/* @__PURE__ */ e("div", { ref: a })
|
|
503
503
|
] })
|
|
504
504
|
] });
|
|
505
|
-
},
|
|
505
|
+
}, wt = ({
|
|
506
506
|
namespace: t,
|
|
507
|
-
podName:
|
|
507
|
+
podName: r
|
|
508
508
|
}) => {
|
|
509
|
-
const [l, p] = m(!1), [h, y] = m(""), [g, u] = m("sh"), [C, v] = m([]),
|
|
510
|
-
|
|
509
|
+
const [l, p] = m(!1), [h, y] = m(""), [g, u] = m("sh"), [C, v] = m([]), a = D(null), o = D(null), c = D(null);
|
|
510
|
+
N(() => (t && r && b(), () => {
|
|
511
511
|
var n;
|
|
512
|
-
return (n =
|
|
513
|
-
}), [t,
|
|
512
|
+
return (n = a.current) == null ? void 0 : n.close();
|
|
513
|
+
}), [t, r]);
|
|
514
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=${
|
|
516
|
-
|
|
517
|
-
p(!0), v((
|
|
518
|
-
}, x.onmessage = (
|
|
519
|
-
v((
|
|
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=${r}&command=${g}`, x = new WebSocket(f);
|
|
516
|
+
a.current = x, x.onopen = () => {
|
|
517
|
+
p(!0), v((O) => [...O, `Connected to ${t}/${r} (${g})`]), I.success("终端已连接");
|
|
518
|
+
}, x.onmessage = (O) => {
|
|
519
|
+
v((z) => [...z.slice(-500), O.data]), setTimeout(() => {
|
|
520
520
|
o.current && (o.current.scrollTop = o.current.scrollHeight);
|
|
521
521
|
}, 50);
|
|
522
522
|
}, x.onclose = () => {
|
|
523
|
-
p(!1), v((
|
|
523
|
+
p(!1), v((O) => [...O, `
|
|
524
524
|
--- 连接已关闭 ---`]);
|
|
525
525
|
}, x.onerror = () => {
|
|
526
|
-
p(!1),
|
|
526
|
+
p(!1), I.error("WebSocket 连接错误");
|
|
527
527
|
};
|
|
528
528
|
}, P = () => {
|
|
529
|
-
!h.trim() || !
|
|
530
|
-
},
|
|
529
|
+
!h.trim() || !a.current || (a.current.readyState === WebSocket.OPEN ? (a.current.send(h), v((n) => [...n, `$ ${h}`]), y("")) : I.warning("WebSocket 未连接"));
|
|
530
|
+
}, A = (n) => {
|
|
531
531
|
var d;
|
|
532
|
-
n.key === "Enter" && P(), n.key === "Tab" && (n.preventDefault(), ((d =
|
|
533
|
-
},
|
|
532
|
+
n.key === "Enter" && P(), n.key === "Tab" && (n.preventDefault(), ((d = a.current) == null ? void 0 : d.readyState) === WebSocket.OPEN && a.current.send(" "));
|
|
533
|
+
}, w = () => v([]);
|
|
534
534
|
return /* @__PURE__ */ s("div", { style: { display: "flex", flexDirection: "column", height: "100%" }, children: [
|
|
535
535
|
/* @__PURE__ */ s(_, { style: { marginBottom: 8 }, children: [
|
|
536
536
|
/* @__PURE__ */ e(R, { color: l ? "success" : "error", children: l ? "● 已连接" : "● 已断开" }),
|
|
537
537
|
/* @__PURE__ */ e(
|
|
538
|
-
|
|
538
|
+
le,
|
|
539
539
|
{
|
|
540
540
|
value: g,
|
|
541
541
|
onChange: u,
|
|
@@ -544,10 +544,10 @@ const yt = () => {
|
|
|
544
544
|
options: ["sh", "bash", "/bin/sh", "/bin/bash"].map((n) => ({ label: n, value: n }))
|
|
545
545
|
}
|
|
546
546
|
),
|
|
547
|
-
/* @__PURE__ */ e(
|
|
548
|
-
/* @__PURE__ */ e(
|
|
547
|
+
/* @__PURE__ */ e(S, { size: "small", onClick: w, icon: /* @__PURE__ */ e(ie, {}), children: "清空" }),
|
|
548
|
+
/* @__PURE__ */ e(S, { size: "small", onClick: () => {
|
|
549
549
|
var n;
|
|
550
|
-
(n =
|
|
550
|
+
(n = a.current) == null || n.close(), setTimeout(b, 200);
|
|
551
551
|
}, children: "重连" })
|
|
552
552
|
] }),
|
|
553
553
|
/* @__PURE__ */ s(
|
|
@@ -599,14 +599,14 @@ const yt = () => {
|
|
|
599
599
|
"$ ",
|
|
600
600
|
t,
|
|
601
601
|
"/",
|
|
602
|
-
|
|
602
|
+
r
|
|
603
603
|
] }),
|
|
604
604
|
/* @__PURE__ */ e(
|
|
605
605
|
"input",
|
|
606
606
|
{
|
|
607
607
|
value: h,
|
|
608
608
|
onChange: (n) => y(n.target.value),
|
|
609
|
-
onKeyDown:
|
|
609
|
+
onKeyDown: A,
|
|
610
610
|
placeholder: "输入命令后按 Enter...",
|
|
611
611
|
disabled: !l,
|
|
612
612
|
style: {
|
|
@@ -624,10 +624,10 @@ const yt = () => {
|
|
|
624
624
|
}
|
|
625
625
|
),
|
|
626
626
|
/* @__PURE__ */ e(
|
|
627
|
-
|
|
627
|
+
S,
|
|
628
628
|
{
|
|
629
629
|
type: "primary",
|
|
630
|
-
icon: /* @__PURE__ */ e(
|
|
630
|
+
icon: /* @__PURE__ */ e(Se, {}),
|
|
631
631
|
onClick: P,
|
|
632
632
|
disabled: !l,
|
|
633
633
|
children: "发送"
|
|
@@ -635,7 +635,7 @@ const yt = () => {
|
|
|
635
635
|
)
|
|
636
636
|
] })
|
|
637
637
|
] });
|
|
638
|
-
},
|
|
638
|
+
}, vt = (t) => {
|
|
639
639
|
switch (t) {
|
|
640
640
|
case "Running":
|
|
641
641
|
return "success";
|
|
@@ -648,16 +648,16 @@ const yt = () => {
|
|
|
648
648
|
default:
|
|
649
649
|
return "default";
|
|
650
650
|
}
|
|
651
|
-
},
|
|
652
|
-
const [t,
|
|
653
|
-
|
|
651
|
+
}, xt = () => {
|
|
652
|
+
const [t, r] = m([]), [l, p] = m(!1), [h, y] = m(""), [g, u] = m("*"), [C, v] = m([]), [a, o] = m(!1), [c, b] = m(null), [P, A] = m("logs"), [w, n] = m("");
|
|
653
|
+
N(() => {
|
|
654
654
|
d();
|
|
655
|
-
}, []),
|
|
655
|
+
}, []), N(() => {
|
|
656
656
|
f();
|
|
657
657
|
}, [g]);
|
|
658
658
|
const d = async () => {
|
|
659
659
|
try {
|
|
660
|
-
const i = await
|
|
660
|
+
const i = await ft();
|
|
661
661
|
v(Array.isArray(i.data) ? ["*", ...i.data] : ["*"]);
|
|
662
662
|
} catch {
|
|
663
663
|
v(["*"]);
|
|
@@ -665,40 +665,40 @@ const yt = () => {
|
|
|
665
665
|
}, f = async () => {
|
|
666
666
|
p(!0), y("");
|
|
667
667
|
try {
|
|
668
|
-
const i = await
|
|
669
|
-
|
|
668
|
+
const i = await mt(g);
|
|
669
|
+
r(Array.isArray(i.data) ? i.data : []);
|
|
670
670
|
} catch (i) {
|
|
671
|
-
|
|
671
|
+
r([]), y(String((i == null ? void 0 : i.message) || i));
|
|
672
672
|
} finally {
|
|
673
673
|
p(!1);
|
|
674
674
|
}
|
|
675
675
|
}, x = async (i) => {
|
|
676
|
-
var
|
|
677
|
-
b(i),
|
|
676
|
+
var $;
|
|
677
|
+
b(i), A("logs"), o(!0);
|
|
678
678
|
try {
|
|
679
|
-
const
|
|
680
|
-
n(((
|
|
681
|
-
} catch (
|
|
682
|
-
n(`加载日志失败:${String((
|
|
679
|
+
const E = await pt(i.namespace, i.name, 200);
|
|
680
|
+
n((($ = E == null ? void 0 : E.data) == null ? void 0 : $.logs) ?? "");
|
|
681
|
+
} catch (E) {
|
|
682
|
+
n(`加载日志失败:${String((E == null ? void 0 : E.message) || E)}`);
|
|
683
683
|
}
|
|
684
|
-
},
|
|
684
|
+
}, O = async (i) => {
|
|
685
685
|
try {
|
|
686
|
-
await
|
|
686
|
+
await ht(i.namespace, i.name), I.success(`${i.name} 已重启`), f();
|
|
687
687
|
} catch {
|
|
688
|
-
|
|
688
|
+
I.error("重启失败");
|
|
689
689
|
}
|
|
690
|
-
},
|
|
690
|
+
}, z = async (i) => {
|
|
691
691
|
try {
|
|
692
|
-
await
|
|
692
|
+
await yt(i.namespace, i.name), I.success(`${i.name} 已删除`), f();
|
|
693
693
|
} catch {
|
|
694
|
-
|
|
694
|
+
I.error("删除失败");
|
|
695
695
|
}
|
|
696
|
-
},
|
|
696
|
+
}, me = [
|
|
697
697
|
{
|
|
698
698
|
title: "名称",
|
|
699
699
|
dataIndex: "name",
|
|
700
700
|
key: "name",
|
|
701
|
-
render: (i,
|
|
701
|
+
render: (i, $) => /* @__PURE__ */ e("a", { onClick: () => x($), children: i })
|
|
702
702
|
},
|
|
703
703
|
{ title: "命名空间", dataIndex: "namespace", key: "namespace", width: 120 },
|
|
704
704
|
{ title: "节点", dataIndex: "nodeName", key: "nodeName", width: 130 },
|
|
@@ -708,7 +708,7 @@ const yt = () => {
|
|
|
708
708
|
dataIndex: "status",
|
|
709
709
|
key: "status",
|
|
710
710
|
width: 100,
|
|
711
|
-
render: (i) => /* @__PURE__ */ e(
|
|
711
|
+
render: (i) => /* @__PURE__ */ e(oe, { status: vt(i), text: i })
|
|
712
712
|
},
|
|
713
713
|
{
|
|
714
714
|
title: "就绪",
|
|
@@ -723,10 +723,10 @@ const yt = () => {
|
|
|
723
723
|
title: "操作",
|
|
724
724
|
key: "action",
|
|
725
725
|
width: 200,
|
|
726
|
-
render: (i,
|
|
727
|
-
/* @__PURE__ */ e(
|
|
728
|
-
/* @__PURE__ */ e(
|
|
729
|
-
/* @__PURE__ */ e(
|
|
726
|
+
render: (i, $) => /* @__PURE__ */ s(_, { children: [
|
|
727
|
+
/* @__PURE__ */ e(S, { type: "link", size: "small", onClick: () => x($), children: "日志" }),
|
|
728
|
+
/* @__PURE__ */ e(W, { title: "确认重启此 Pod?", onConfirm: () => O($), children: /* @__PURE__ */ e(S, { size: "small", type: "primary", ghost: !0, children: "重启" }) }),
|
|
729
|
+
/* @__PURE__ */ e(W, { title: "确认删除此 Pod?", onConfirm: () => z($), children: /* @__PURE__ */ e(S, { type: "link", size: "small", danger: !0, children: "删除" }) })
|
|
730
730
|
] })
|
|
731
731
|
}
|
|
732
732
|
];
|
|
@@ -734,7 +734,7 @@ const yt = () => {
|
|
|
734
734
|
/* @__PURE__ */ s(_, { style: { marginBottom: 16 }, children: [
|
|
735
735
|
/* @__PURE__ */ e("span", { children: "命名空间:" }),
|
|
736
736
|
/* @__PURE__ */ e(
|
|
737
|
-
|
|
737
|
+
le,
|
|
738
738
|
{
|
|
739
739
|
value: g,
|
|
740
740
|
onChange: u,
|
|
@@ -742,7 +742,7 @@ const yt = () => {
|
|
|
742
742
|
options: C.map((i) => ({ label: i, value: i }))
|
|
743
743
|
}
|
|
744
744
|
),
|
|
745
|
-
/* @__PURE__ */ e(
|
|
745
|
+
/* @__PURE__ */ e(S, { icon: /* @__PURE__ */ e(Y, {}), onClick: f, loading: l, children: "刷新" })
|
|
746
746
|
] }),
|
|
747
747
|
h && /* @__PURE__ */ e(
|
|
748
748
|
V,
|
|
@@ -755,10 +755,10 @@ const yt = () => {
|
|
|
755
755
|
}
|
|
756
756
|
),
|
|
757
757
|
/* @__PURE__ */ e(
|
|
758
|
-
|
|
758
|
+
de,
|
|
759
759
|
{
|
|
760
760
|
rows: t,
|
|
761
|
-
columns:
|
|
761
|
+
columns: me,
|
|
762
762
|
rowKey: "name",
|
|
763
763
|
loading: l,
|
|
764
764
|
scroll: { x: 1e3 },
|
|
@@ -770,24 +770,24 @@ const yt = () => {
|
|
|
770
770
|
}
|
|
771
771
|
),
|
|
772
772
|
/* @__PURE__ */ e(
|
|
773
|
-
|
|
773
|
+
ge,
|
|
774
774
|
{
|
|
775
775
|
title: c ? `${c.name} (${c.namespace})` : "",
|
|
776
776
|
placement: "right",
|
|
777
777
|
size: "large",
|
|
778
|
-
open:
|
|
778
|
+
open: a,
|
|
779
779
|
onClose: () => o(!1),
|
|
780
780
|
children: /* @__PURE__ */ e(
|
|
781
|
-
|
|
781
|
+
be,
|
|
782
782
|
{
|
|
783
783
|
activeKey: P,
|
|
784
|
-
onChange:
|
|
784
|
+
onChange: A,
|
|
785
785
|
items: [
|
|
786
786
|
{
|
|
787
787
|
key: "logs",
|
|
788
788
|
label: "实时日志",
|
|
789
789
|
children: c ? /* @__PURE__ */ e(
|
|
790
|
-
|
|
790
|
+
kt,
|
|
791
791
|
{
|
|
792
792
|
namespace: c.namespace,
|
|
793
793
|
podName: c.name
|
|
@@ -798,7 +798,7 @@ const yt = () => {
|
|
|
798
798
|
key: "exec",
|
|
799
799
|
label: "终端",
|
|
800
800
|
children: /* @__PURE__ */ e("div", { style: { padding: 20 }, children: /* @__PURE__ */ e(
|
|
801
|
-
|
|
801
|
+
wt,
|
|
802
802
|
{
|
|
803
803
|
namespace: (c == null ? void 0 : c.namespace) ?? "",
|
|
804
804
|
podName: (c == null ? void 0 : c.name) ?? ""
|
|
@@ -812,28 +812,28 @@ const yt = () => {
|
|
|
812
812
|
)
|
|
813
813
|
] });
|
|
814
814
|
};
|
|
815
|
-
async function K(t,
|
|
816
|
-
return
|
|
815
|
+
async function K(t, r) {
|
|
816
|
+
return ue(`/hpa${t}`, r);
|
|
817
817
|
}
|
|
818
|
-
const
|
|
819
|
-
const [t,
|
|
820
|
-
|
|
818
|
+
const It = () => {
|
|
819
|
+
const [t, r] = m([]), [l, p] = m(!1), [h, y] = m(""), [g, u] = m(!1), [C, v] = m(!1), [a] = G.useForm();
|
|
820
|
+
N(() => {
|
|
821
821
|
o();
|
|
822
822
|
}, []);
|
|
823
823
|
const o = async () => {
|
|
824
824
|
p(!0), y("");
|
|
825
825
|
try {
|
|
826
826
|
const n = await K("/list?namespace=*");
|
|
827
|
-
|
|
827
|
+
r(Array.isArray(n.data) ? n.data : []);
|
|
828
828
|
} catch (n) {
|
|
829
|
-
|
|
829
|
+
r([]), y(String((n == null ? void 0 : n.message) || n));
|
|
830
830
|
} finally {
|
|
831
831
|
p(!1);
|
|
832
832
|
}
|
|
833
833
|
}, c = () => {
|
|
834
|
-
v(!1),
|
|
834
|
+
v(!1), a.resetFields(), a.setFieldsValue({ minReplicas: 1, maxReplicas: 10, cpuTarget: 80 }), u(!0);
|
|
835
835
|
}, b = (n) => {
|
|
836
|
-
v(!0),
|
|
836
|
+
v(!0), a.setFieldsValue({
|
|
837
837
|
name: n.name,
|
|
838
838
|
namespace: n.namespace,
|
|
839
839
|
deploymentName: n.scaleTargetRef,
|
|
@@ -843,7 +843,7 @@ const vt = () => {
|
|
|
843
843
|
}), u(!0);
|
|
844
844
|
}, P = async () => {
|
|
845
845
|
try {
|
|
846
|
-
const n = await
|
|
846
|
+
const n = await a.validateFields();
|
|
847
847
|
C ? (await K("/update", {
|
|
848
848
|
method: "POST",
|
|
849
849
|
body: JSON.stringify({
|
|
@@ -852,24 +852,24 @@ const vt = () => {
|
|
|
852
852
|
minReplicas: n.minReplicas,
|
|
853
853
|
maxReplicas: n.maxReplicas
|
|
854
854
|
})
|
|
855
|
-
}),
|
|
855
|
+
}), I.success("HPA 更新成功")) : (await K("/create", {
|
|
856
856
|
method: "POST",
|
|
857
857
|
body: JSON.stringify(n)
|
|
858
|
-
}),
|
|
858
|
+
}), I.success("HPA 创建成功")), u(!1), o();
|
|
859
859
|
} catch {
|
|
860
|
-
|
|
860
|
+
I.error("操作失败");
|
|
861
861
|
}
|
|
862
|
-
},
|
|
862
|
+
}, A = async (n) => {
|
|
863
863
|
try {
|
|
864
|
-
await K(`/delete/${n.namespace}/${n.name}`, { method: "DELETE" }),
|
|
864
|
+
await K(`/delete/${n.namespace}/${n.name}`, { method: "DELETE" }), I.success("HPA 已删除"), o();
|
|
865
865
|
} catch {
|
|
866
|
-
|
|
866
|
+
I.error("删除失败");
|
|
867
867
|
}
|
|
868
868
|
};
|
|
869
869
|
return /* @__PURE__ */ s("div", { children: [
|
|
870
870
|
/* @__PURE__ */ s(_, { style: { marginBottom: 16 }, children: [
|
|
871
|
-
/* @__PURE__ */ e(
|
|
872
|
-
/* @__PURE__ */ e(
|
|
871
|
+
/* @__PURE__ */ e(S, { type: "primary", icon: /* @__PURE__ */ e(Ce, {}), onClick: c, children: "新建 HPA" }),
|
|
872
|
+
/* @__PURE__ */ e(S, { icon: /* @__PURE__ */ e(Y, {}), onClick: o, loading: l, children: "刷新" })
|
|
873
873
|
] }),
|
|
874
874
|
h && /* @__PURE__ */ e(
|
|
875
875
|
V,
|
|
@@ -882,7 +882,7 @@ const vt = () => {
|
|
|
882
882
|
}
|
|
883
883
|
),
|
|
884
884
|
/* @__PURE__ */ e(
|
|
885
|
-
|
|
885
|
+
de,
|
|
886
886
|
{
|
|
887
887
|
rows: t,
|
|
888
888
|
columns: [
|
|
@@ -922,8 +922,8 @@ const vt = () => {
|
|
|
922
922
|
key: "action",
|
|
923
923
|
width: 150,
|
|
924
924
|
render: (n, d) => /* @__PURE__ */ s(_, { children: [
|
|
925
|
-
/* @__PURE__ */ e(
|
|
926
|
-
/* @__PURE__ */ e(
|
|
925
|
+
/* @__PURE__ */ e(S, { type: "link", size: "small", onClick: () => b(d), children: "编辑" }),
|
|
926
|
+
/* @__PURE__ */ e(W, { title: `删除 HPA ${d.name}?`, onConfirm: () => A(d), children: /* @__PURE__ */ e(S, { type: "link", size: "small", danger: !0, children: "删除" }) })
|
|
927
927
|
] })
|
|
928
928
|
}
|
|
929
929
|
],
|
|
@@ -937,26 +937,26 @@ const vt = () => {
|
|
|
937
937
|
}
|
|
938
938
|
),
|
|
939
939
|
/* @__PURE__ */ e(
|
|
940
|
-
|
|
940
|
+
ke,
|
|
941
941
|
{
|
|
942
942
|
title: C ? "编辑 HPA" : "新建 HPA",
|
|
943
943
|
open: g,
|
|
944
944
|
onOk: P,
|
|
945
945
|
onCancel: () => u(!1),
|
|
946
|
-
children: /* @__PURE__ */ s(
|
|
947
|
-
/* @__PURE__ */ e(
|
|
948
|
-
/* @__PURE__ */ e(
|
|
949
|
-
/* @__PURE__ */ e(
|
|
946
|
+
children: /* @__PURE__ */ s(G, { form: a, layout: "vertical", children: [
|
|
947
|
+
/* @__PURE__ */ e(G.Item, { name: "namespace", label: "命名空间", rules: [{ required: !0 }], children: /* @__PURE__ */ e(X, { disabled: C }) }),
|
|
948
|
+
/* @__PURE__ */ e(G.Item, { name: "name", label: "HPA 名称", rules: [{ required: !0 }], children: /* @__PURE__ */ e(X, { disabled: C }) }),
|
|
949
|
+
/* @__PURE__ */ e(G.Item, { name: "deploymentName", label: "目标 Deployment", rules: [{ required: !0 }], children: /* @__PURE__ */ e(X, { disabled: C, placeholder: "namespace/deploymentName" }) }),
|
|
950
950
|
/* @__PURE__ */ s(_, { children: [
|
|
951
|
-
/* @__PURE__ */ e(
|
|
952
|
-
/* @__PURE__ */ e(
|
|
951
|
+
/* @__PURE__ */ e(G.Item, { name: "minReplicas", label: "最小副本", rules: [{ required: !0 }], children: /* @__PURE__ */ e(Z, { min: 0, max: 100 }) }),
|
|
952
|
+
/* @__PURE__ */ e(G.Item, { name: "maxReplicas", label: "最大副本", rules: [{ required: !0 }], children: /* @__PURE__ */ e(Z, { min: 1, max: 100 }) })
|
|
953
953
|
] }),
|
|
954
|
-
/* @__PURE__ */ e(
|
|
954
|
+
/* @__PURE__ */ e(G.Item, { name: "cpuTarget", label: "CPU 目标 (%)", children: /* @__PURE__ */ e(Z, { min: 1, max: 100 }) })
|
|
955
955
|
] })
|
|
956
956
|
}
|
|
957
957
|
)
|
|
958
958
|
] });
|
|
959
|
-
},
|
|
959
|
+
}, ne = re(() => import("@yuku123/z-ops-component/pages").then((t) => ({ default: t.Workspaces }))), St = re(() => import("@yuku123/z-ops-component/pages").then((t) => ({ default: t.ImageTags }))), Ct = [
|
|
960
960
|
{
|
|
961
961
|
title: "DevOps 运维",
|
|
962
962
|
icon: /* @__PURE__ */ e(J, {}),
|
|
@@ -978,49 +978,49 @@ const vt = () => {
|
|
|
978
978
|
{
|
|
979
979
|
key: "devops-pods",
|
|
980
980
|
label: "Pod 管理",
|
|
981
|
-
icon: /* @__PURE__ */ e(
|
|
981
|
+
icon: /* @__PURE__ */ e(ce, {}),
|
|
982
982
|
path: "/ops/devops/pods",
|
|
983
983
|
desc: "Pod 列表、日志、终端"
|
|
984
984
|
},
|
|
985
985
|
{
|
|
986
986
|
key: "devops-hpa",
|
|
987
987
|
label: "弹性伸缩",
|
|
988
|
-
icon: /* @__PURE__ */ e(
|
|
988
|
+
icon: /* @__PURE__ */ e(L, {}),
|
|
989
989
|
path: "/ops/devops/hpa",
|
|
990
990
|
desc: "HPA 自动扩缩容策略"
|
|
991
991
|
},
|
|
992
992
|
{
|
|
993
993
|
key: "devops-registry",
|
|
994
|
-
label: "
|
|
995
|
-
icon: /* @__PURE__ */ e(
|
|
994
|
+
label: "镜像 Tag 台账",
|
|
995
|
+
icon: /* @__PURE__ */ e(L, {}),
|
|
996
996
|
path: "/ops/devops/registry",
|
|
997
|
-
desc: "
|
|
997
|
+
desc: "镜像 Tag 台账(/api/ops/image-tag)"
|
|
998
998
|
},
|
|
999
999
|
{
|
|
1000
1000
|
key: "devops-pipeline",
|
|
1001
1001
|
label: "流水线",
|
|
1002
|
-
icon: /* @__PURE__ */ e(
|
|
1002
|
+
icon: /* @__PURE__ */ e(Pe, {}),
|
|
1003
1003
|
path: "/ops/devops/pipeline",
|
|
1004
1004
|
desc: "CI/CD 流水线编排"
|
|
1005
1005
|
},
|
|
1006
1006
|
{
|
|
1007
1007
|
key: "devops-release",
|
|
1008
1008
|
label: "发布管理",
|
|
1009
|
-
icon: /* @__PURE__ */ e(
|
|
1009
|
+
icon: /* @__PURE__ */ e(_e, {}),
|
|
1010
1010
|
path: "/ops/devops/release",
|
|
1011
1011
|
desc: "应用发布与回滚"
|
|
1012
1012
|
},
|
|
1013
1013
|
{
|
|
1014
1014
|
key: "devops-monitor",
|
|
1015
1015
|
label: "监控告警",
|
|
1016
|
-
icon: /* @__PURE__ */ e(
|
|
1016
|
+
icon: /* @__PURE__ */ e(Re, {}),
|
|
1017
1017
|
path: "/ops/devops/monitor",
|
|
1018
1018
|
desc: "Prometheus/Grafana 监控"
|
|
1019
1019
|
},
|
|
1020
1020
|
{
|
|
1021
1021
|
key: "devops-logs",
|
|
1022
1022
|
label: "日志管理",
|
|
1023
|
-
icon: /* @__PURE__ */ e(
|
|
1023
|
+
icon: /* @__PURE__ */ e(Oe, {}),
|
|
1024
1024
|
path: "/ops/devops/logs",
|
|
1025
1025
|
desc: "Loki 集中日志查询"
|
|
1026
1026
|
},
|
|
@@ -1040,48 +1040,48 @@ const vt = () => {
|
|
|
1040
1040
|
{
|
|
1041
1041
|
key: "ops-channel",
|
|
1042
1042
|
label: "渠道管理",
|
|
1043
|
-
icon: /* @__PURE__ */ e(
|
|
1043
|
+
icon: /* @__PURE__ */ e($e, {}),
|
|
1044
1044
|
path: "/ops/channel",
|
|
1045
1045
|
desc: "部署渠道配置与管理"
|
|
1046
1046
|
},
|
|
1047
1047
|
{
|
|
1048
1048
|
key: "ops-env",
|
|
1049
1049
|
label: "环境管理",
|
|
1050
|
-
icon: /* @__PURE__ */ e(
|
|
1050
|
+
icon: /* @__PURE__ */ e(L, {}),
|
|
1051
1051
|
path: "/ops/delivery",
|
|
1052
1052
|
desc: "运行环境配置与管理"
|
|
1053
1053
|
},
|
|
1054
1054
|
{
|
|
1055
1055
|
key: "ops-deploy",
|
|
1056
1056
|
label: "部署管理",
|
|
1057
|
-
icon: /* @__PURE__ */ e(
|
|
1057
|
+
icon: /* @__PURE__ */ e(Ae, {}),
|
|
1058
1058
|
path: "/ops/deployment",
|
|
1059
1059
|
desc: "应用部署与发布管理"
|
|
1060
1060
|
},
|
|
1061
1061
|
{
|
|
1062
1062
|
key: "ops-repo",
|
|
1063
|
-
label: "
|
|
1063
|
+
label: "工作区与仓库",
|
|
1064
1064
|
icon: /* @__PURE__ */ e(ee, {}),
|
|
1065
1065
|
path: "/ops/repo-mgmt",
|
|
1066
|
-
desc: "
|
|
1066
|
+
desc: "运维工作区 + Git 仓库台账"
|
|
1067
1067
|
}
|
|
1068
1068
|
]
|
|
1069
1069
|
},
|
|
1070
1070
|
{
|
|
1071
1071
|
title: "资源管理",
|
|
1072
|
-
icon: /* @__PURE__ */ e(
|
|
1072
|
+
icon: /* @__PURE__ */ e(L, {}),
|
|
1073
1073
|
items: [
|
|
1074
1074
|
{
|
|
1075
1075
|
key: "resource",
|
|
1076
1076
|
label: "资源管理",
|
|
1077
|
-
icon: /* @__PURE__ */ e(
|
|
1077
|
+
icon: /* @__PURE__ */ e(L, {}),
|
|
1078
1078
|
path: "/resource/domain",
|
|
1079
1079
|
desc: "域名、ECS、RDS、OSS 管理"
|
|
1080
1080
|
}
|
|
1081
1081
|
]
|
|
1082
1082
|
}
|
|
1083
1083
|
];
|
|
1084
|
-
function
|
|
1084
|
+
function M({ label: t }) {
|
|
1085
1085
|
return /* @__PURE__ */ s("div", { style: { padding: 40, textAlign: "center", color: "#999" }, children: [
|
|
1086
1086
|
/* @__PURE__ */ s("h2", { children: [
|
|
1087
1087
|
"🚧 ",
|
|
@@ -1090,7 +1090,7 @@ function L({ label: t }) {
|
|
|
1090
1090
|
/* @__PURE__ */ e("p", { children: "功能开发中..." })
|
|
1091
1091
|
] });
|
|
1092
1092
|
}
|
|
1093
|
-
function
|
|
1093
|
+
function Pt({ label: t, reason: r, message: l = "该页面未孵化,因为后端接口尚不可用" }) {
|
|
1094
1094
|
return /* @__PURE__ */ s("div", { style: { padding: 40, maxWidth: 720, margin: "0 auto" }, children: [
|
|
1095
1095
|
/* @__PURE__ */ s("h2", { style: { textAlign: "center" }, children: [
|
|
1096
1096
|
"🧪 ",
|
|
@@ -1102,14 +1102,14 @@ function St({ label: t, reason: a, message: l = "该页面未孵化,因为后
|
|
|
1102
1102
|
type: "warning",
|
|
1103
1103
|
showIcon: !0,
|
|
1104
1104
|
message: l,
|
|
1105
|
-
description:
|
|
1105
|
+
description: r
|
|
1106
1106
|
}
|
|
1107
1107
|
)
|
|
1108
1108
|
] });
|
|
1109
1109
|
}
|
|
1110
|
-
function
|
|
1110
|
+
function H({ label: t }) {
|
|
1111
1111
|
return /* @__PURE__ */ e(
|
|
1112
|
-
|
|
1112
|
+
Pt,
|
|
1113
1113
|
{
|
|
1114
1114
|
label: t,
|
|
1115
1115
|
message: "该页面未孵化,因为组件从来不在本仓",
|
|
@@ -1117,21 +1117,21 @@ function A({ label: t }) {
|
|
|
1117
1117
|
}
|
|
1118
1118
|
);
|
|
1119
1119
|
}
|
|
1120
|
-
function
|
|
1121
|
-
const { pathname: t } =
|
|
1120
|
+
function se() {
|
|
1121
|
+
const { pathname: t } = ae();
|
|
1122
1122
|
return /* @__PURE__ */ e(q, { to: t, replace: !0 });
|
|
1123
1123
|
}
|
|
1124
|
-
const
|
|
1124
|
+
const _t = [...He, "/script"], Rt = [
|
|
1125
1125
|
// ─── 运维中心 ───
|
|
1126
1126
|
// ⚠ 这一族路由的组件从来没有从 z-ops 迁进来(见 UnmigratedPage 注释)。原先直接写
|
|
1127
1127
|
// <ChannelPage/> 之类会在**模块求值期**抛 ReferenceError 并白屏整个前端,不是只坏这一页。
|
|
1128
1128
|
{ path: "/ops", element: /* @__PURE__ */ e(q, { to: "/ops/devops", replace: !0 }) },
|
|
1129
|
-
{ path: "/ops/channel", element: /* @__PURE__ */ e(
|
|
1130
|
-
{ path: "/ops/delivery", element: /* @__PURE__ */ e(
|
|
1131
|
-
{ path: "/ops/deployment", element: /* @__PURE__ */ e(
|
|
1132
|
-
{ path: "/ops/deployment/:id", element: /* @__PURE__ */ e(
|
|
1133
|
-
{ path: "/ops/repo-mgmt", element: /* @__PURE__ */ e(
|
|
1134
|
-
{ path: "/ops/git-platform", element: /* @__PURE__ */ e(
|
|
1129
|
+
{ path: "/ops/channel", element: /* @__PURE__ */ e(H, { label: "渠道管理" }) },
|
|
1130
|
+
{ path: "/ops/delivery", element: /* @__PURE__ */ e(H, { label: "环境管理" }) },
|
|
1131
|
+
{ path: "/ops/deployment", element: /* @__PURE__ */ e(H, { label: "部署管理" }) },
|
|
1132
|
+
{ path: "/ops/deployment/:id", element: /* @__PURE__ */ e(H, { label: "部署管理" }) },
|
|
1133
|
+
{ path: "/ops/repo-mgmt", element: /* @__PURE__ */ e(ne, {}) },
|
|
1134
|
+
{ path: "/ops/git-platform", element: /* @__PURE__ */ e(ne, {}) },
|
|
1135
1135
|
// ─── DevOps 子路由(K8s 管理面:2026-11-09 复活,数据源改由主壳 OpsK8sController 提供)───
|
|
1136
1136
|
// ⚠ 历史:这 4 条曾挂真组件,但 API_BASE '/z-team/ops/k8s' 的 handler 只在 z-ops 仓的
|
|
1137
1137
|
// z-ops-web 里,主壳 boot jar 的 BOOT-INF/lib 里 0 个 z-ops-* ⇒ 实测 GET /z-team/ops/k8s/nodes
|
|
@@ -1143,46 +1143,46 @@ const It = [...Te, "/script"], Ct = [
|
|
|
1143
1143
|
// 而两侧 JWT secret 不同(主壳 zgw-jwt/jwt-secret vs z-ops sso-jwt/sso-jwt-secret)⇒ 必被挡;
|
|
1144
1144
|
// 给 z-ops 加 @NoLogin 又等于把「删 Pod / 改 HPA」公开到 NodePort 30886。
|
|
1145
1145
|
{ path: "/ops/devops", element: /* @__PURE__ */ e(q, { to: "/ops/devops/dashboard", replace: !0 }) },
|
|
1146
|
-
{ path: "/ops/devops/dashboard", element: /* @__PURE__ */ e(
|
|
1147
|
-
{ path: "/ops/devops/nodes", element: /* @__PURE__ */ e(
|
|
1148
|
-
{ path: "/ops/devops/pods", element: /* @__PURE__ */ e(
|
|
1149
|
-
{ path: "/ops/devops/hpa", element: /* @__PURE__ */ e(
|
|
1150
|
-
{ path: "/ops/devops/registry", element: /* @__PURE__ */ e(
|
|
1151
|
-
{ path: "/ops/devops/pipeline", element: /* @__PURE__ */ e(
|
|
1152
|
-
{ path: "/ops/devops/release", element: /* @__PURE__ */ e(
|
|
1153
|
-
{ path: "/ops/devops/monitor", element: /* @__PURE__ */ e(
|
|
1154
|
-
{ path: "/ops/devops/logs", element: /* @__PURE__ */ e(
|
|
1155
|
-
{ path: "/ops/devops/dba", element: /* @__PURE__ */ e(
|
|
1146
|
+
{ path: "/ops/devops/dashboard", element: /* @__PURE__ */ e(gt, {}) },
|
|
1147
|
+
{ path: "/ops/devops/nodes", element: /* @__PURE__ */ e(bt, {}) },
|
|
1148
|
+
{ path: "/ops/devops/pods", element: /* @__PURE__ */ e(xt, {}) },
|
|
1149
|
+
{ path: "/ops/devops/hpa", element: /* @__PURE__ */ e(It, {}) },
|
|
1150
|
+
{ path: "/ops/devops/registry", element: /* @__PURE__ */ e(St, {}) },
|
|
1151
|
+
{ path: "/ops/devops/pipeline", element: /* @__PURE__ */ e(M, { label: "流水线" }) },
|
|
1152
|
+
{ path: "/ops/devops/release", element: /* @__PURE__ */ e(M, { label: "发布管理" }) },
|
|
1153
|
+
{ path: "/ops/devops/monitor", element: /* @__PURE__ */ e(M, { label: "监控告警" }) },
|
|
1154
|
+
{ path: "/ops/devops/logs", element: /* @__PURE__ */ e(M, { label: "日志管理" }) },
|
|
1155
|
+
{ path: "/ops/devops/dba", element: /* @__PURE__ */ e(M, { label: "DBA 工单" }) },
|
|
1156
1156
|
// ─── 资源管理 ───
|
|
1157
1157
|
{ path: "/resource", element: /* @__PURE__ */ e(q, { to: "/resource/domain", replace: !0 }) },
|
|
1158
|
-
{ path: "/resource/domain", element: /* @__PURE__ */ e(
|
|
1159
|
-
{ path: "/resource/ecs", element: /* @__PURE__ */ e(
|
|
1160
|
-
{ path: "/resource/rds", element: /* @__PURE__ */ e(
|
|
1161
|
-
{ path: "/resource/oss", element: /* @__PURE__ */ e(
|
|
1158
|
+
{ path: "/resource/domain", element: /* @__PURE__ */ e(H, { label: "域名管理" }) },
|
|
1159
|
+
{ path: "/resource/ecs", element: /* @__PURE__ */ e(H, { label: "ECS 管理" }) },
|
|
1160
|
+
{ path: "/resource/rds", element: /* @__PURE__ */ e(H, { label: "RDS 管理" }) },
|
|
1161
|
+
{ path: "/resource/oss", element: /* @__PURE__ */ e(H, { label: "OSS 管理" }) },
|
|
1162
1162
|
// ─── 已迁到中间件面的前缀 → 旧深链交还中间件面 ───
|
|
1163
1163
|
// ⚠ 必须排在最后:matchWorkbenchPath 先全表精确、再全表通配,
|
|
1164
1164
|
// 但本面自己的 /ops/* 与 /resource/* 都在前面,不会被这几条吃掉。
|
|
1165
|
-
...
|
|
1166
|
-
{ path: t, element: /* @__PURE__ */ e(
|
|
1167
|
-
{ path: `${t}/*`, element: /* @__PURE__ */ e(
|
|
1165
|
+
..._t.flatMap((t) => [
|
|
1166
|
+
{ path: t, element: /* @__PURE__ */ e(se, {}) },
|
|
1167
|
+
{ path: `${t}/*`, element: /* @__PURE__ */ e(se, {}) }
|
|
1168
1168
|
])
|
|
1169
1169
|
];
|
|
1170
|
-
function
|
|
1170
|
+
function zt({
|
|
1171
1171
|
activePathOverride: t,
|
|
1172
|
-
menuOnly:
|
|
1172
|
+
menuOnly: r = !1
|
|
1173
1173
|
} = {}) {
|
|
1174
1174
|
return /* @__PURE__ */ e(
|
|
1175
|
-
|
|
1175
|
+
ot,
|
|
1176
1176
|
{
|
|
1177
|
-
groups:
|
|
1178
|
-
routes:
|
|
1177
|
+
groups: Ct,
|
|
1178
|
+
routes: Rt,
|
|
1179
1179
|
mode: "ops",
|
|
1180
1180
|
emptyText: "请从左侧菜单选择运维模块",
|
|
1181
1181
|
activePathOverride: t,
|
|
1182
|
-
menuOnly:
|
|
1182
|
+
menuOnly: r
|
|
1183
1183
|
}
|
|
1184
1184
|
);
|
|
1185
1185
|
}
|
|
1186
1186
|
export {
|
|
1187
|
-
|
|
1187
|
+
zt as default
|
|
1188
1188
|
};
|