@yuku123/z-team-component 0.2.135 → 0.2.136
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AdminModuleContent-DHCn4OpR.js → AdminModuleContent-T7ZXoVAV.js} +6310 -6319
- package/dist/{ChangeLogView-Cc5cYmcz.js → ChangeLogView-ChmYvz8Z.js} +1 -1
- package/dist/{ComponentDoc-BAUII4UZ.js → ComponentDoc-D5Gbd6B_.js} +994 -1006
- package/dist/{InvitationManagementPage-BgY1jxQB.js → InvitationManagementPage-kaqwNuPz.js} +63 -73
- package/dist/{OnboardingPage-CckzpaI0.js → OnboardingPage-Cy_sPHS1.js} +2 -2
- package/dist/{ScheduledTasks-DZSEnuIF.js → ScheduledTasks-GAP-U6s9.js} +6 -6
- package/dist/{SystemShell-DCRIL4Rh.js → SystemShell-69TBLWk8.js} +5 -5
- package/dist/{admin-logs-DEawvNOd.js → admin-logs-BdwcT77i.js} +1 -1
- package/dist/{api--xHkMnrY.js → api-6nYxtAbN.js} +1 -1
- package/dist/{api-B-nnjGsa.js → api-B0S5AhOe.js} +1 -1
- package/dist/{createWorkspaceWsHandler-y6pRWLoa.js → createWorkspaceWsHandler-B9UE_uoO.js} +3 -3
- package/dist/{index-C09THX8u.js → index-B0f8tIBU.js} +2 -2
- package/dist/{index-B2ztJXV3.js → index-B6n7ueTc.js} +2 -2
- package/dist/{index-C9LqX4Lg.js → index-BC6eLVMc.js} +1 -1
- package/dist/{index-CcHrWE4P.js → index-BQYKmytF.js} +2 -2
- package/dist/{index-4R_QcR8P.js → index-BWaPbYG2.js} +2 -2
- package/dist/{index-CMLlvrEW.js → index-C7DP8H_Q.js} +3372 -3350
- package/dist/{index-C4cx5Qxu.js → index-CCsvaPw9.js} +2 -2
- package/dist/{index-ztXjGIJk.js → index-CE1Vtf-B.js} +1 -1
- package/dist/{index-DWrEAa8-.js → index-CX19wylA.js} +507 -509
- package/dist/{index-H7hP7Fmj.js → index-CazCOFR2.js} +2 -2
- package/dist/{index-DxXcTAH4.js → index-CnKYpM41.js} +1 -1
- package/dist/{index-XWWknPNw.js → index-DJ2TNQP6.js} +2 -2
- package/dist/{index-DePIQVt9.js → index-DJu6AFf9.js} +3 -3
- package/dist/{index-BDUHHaoY.js → index-DNAeZe0a.js} +130 -128
- package/dist/{index-C7ng_cdZ.js → index-DOYSz9Bg.js} +1 -1
- package/dist/{index-Do3pyigD.js → index-DbThmpZg.js} +1 -1
- package/dist/{index-BIffImVM.js → index-DgYhtv8V.js} +146 -146
- package/dist/index-DrDFy5jN.js +139 -0
- package/dist/{index-DtgTLML8.js → index-T4Rvjyn0.js} +3 -3
- package/dist/{index-COn912sj.js → index-Y9EcfhJG.js} +3 -3
- package/dist/{index-CzS_q6Tn.js → index-cY1tZiV2.js} +3 -3
- package/dist/{index-frmk-zNf.js → index-eqbuW74W.js} +5 -5
- package/dist/{index-DlBN-ou4.js → index-g36zRqmZ.js} +5 -5
- package/dist/{index-LnUf9Vil.js → index-tln7BkiQ.js} +6 -6
- package/dist/index.js +1 -1
- package/dist/{instance-DL4u5k9c.js → instance-ChzeFK3e.js} +1 -1
- package/dist/{menuPermission-CA_atlfk.js → menuPermission-DDzb20pQ.js} +3 -3
- package/dist/pages.js +1 -1
- package/dist/{send-default-agent-team-message-BfBVm9AO.js → send-default-agent-team-message-DOgtkW6m.js} +1 -1
- package/dist/{sso-user-Dr8_-Sxd.js → sso-user-DaRbfrdM.js} +1 -1
- package/dist/{training-CcGUA5KC.js → training-N-5-qsDf.js} +1 -1
- package/dist/{webide-C2JfQ-Je.js → webide-BEV0VT3u.js} +3 -3
- package/dist/z-team-component.css +1 -1
- package/package.json +1 -1
- package/dist/index-Cxoup7V8.js +0 -139
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
import { jsxs as s, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { useNavigate as
|
|
3
|
-
import { Spin as
|
|
4
|
-
import { DownOutlined as
|
|
2
|
+
import { useNavigate as ue, useLocation as se, Navigate as q } from "react-router-dom";
|
|
3
|
+
import { Spin as me, Row as pe, Col as W, Card as M, Statistic as U, Space as _, Tag as R, Button as I, Alert as V, Table as he, Badge as re, Popconfirm as B, message as S, Select as ae, Drawer as ye, Tabs as fe, Form as H, Modal as ge, Input as j, InputNumber as X } from "antd";
|
|
4
|
+
import { DownOutlined as be, RightOutlined as we, DashboardOutlined as Q, ClusterOutlined as J, CloudServerOutlined as D, ContainerOutlined as oe, ReloadOutlined as Y, PlayCircleOutlined as ke, PauseCircleOutlined as ve, ClearOutlined as le, SendOutlined as xe, PlusOutlined as Se, BranchesOutlined as Ie, RocketOutlined as Ce, AlertOutlined as Pe, FileTextOutlined as _e, DatabaseOutlined as ee, CloudOutlined as Re, DeploymentUnitOutlined as $e } from "@ant-design/icons";
|
|
5
5
|
import { useState as m, useMemo as Z, useEffect as E, useRef as z } from "react";
|
|
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:
|
|
6
|
+
import { P as Oe, R as Ae } from "./index-BQYKmytF.js";
|
|
7
|
+
import { f as Ne, M as Ee } from "./menuPermission-DDzb20pQ.js";
|
|
8
|
+
import { u as te, a3 as Te } from "./ComponentDoc-D5Gbd6B_.js";
|
|
9
|
+
import { ListTable as ce } from "@yuku123/z-frontend-common/ui";
|
|
10
|
+
import "./index-C7DP8H_Q.js";
|
|
11
|
+
const Ge = "_shell_rfl59_7", He = "_sidebar_rfl59_20", Le = "_menuList_rfl59_41", De = "_menuGroup_rfl59_47", ze = "_menuGroupHeader_rfl59_56", Fe = "_menuGroupHeaderOpen_rfl59_75", Me = "_menuGroupHeaderActive_rfl59_86", Be = "_menuGroupIcon_rfl59_90", We = "_menuGroupLabel_rfl59_99", Ue = "_menuGroupArrow_rfl59_104", Ke = "_menuSubList_rfl59_110", qe = "_menuSubItemWrap_rfl59_116", Je = "_menuSubItem_rfl59_116", Ve = "_menuItemOnPath_rfl59_154", je = "_menuSubItemPill_rfl59_175", Xe = "_menuSubItemActive_rfl59_191", Ze = "_menuSubItemIcon_rfl59_201", Qe = "_main_rfl59_215", Ye = "_empty_rfl59_226", et = "_emptyIcon_rfl59_236", tt = "_emptyText_rfl59_241", w = {
|
|
12
|
+
shell: Ge,
|
|
13
|
+
sidebar: He,
|
|
14
|
+
menuList: Le,
|
|
15
|
+
menuGroup: De,
|
|
16
|
+
menuGroupHeader: ze,
|
|
17
|
+
menuGroupHeaderOpen: Fe,
|
|
18
|
+
menuGroupHeaderActive: Me,
|
|
19
|
+
menuGroupIcon: Be,
|
|
20
|
+
menuGroupLabel: We,
|
|
21
|
+
menuGroupArrow: Ue,
|
|
22
|
+
menuSubList: Ke,
|
|
23
|
+
menuSubItemWrap: qe,
|
|
24
|
+
menuSubItem: Je,
|
|
25
|
+
menuItemOnPath: Ve,
|
|
26
|
+
menuSubItemPill: je,
|
|
27
|
+
menuSubItemActive: Xe,
|
|
28
|
+
menuSubItemIcon: Ze,
|
|
29
|
+
main: Qe,
|
|
30
|
+
empty: Ye,
|
|
31
|
+
emptyIcon: et,
|
|
32
|
+
emptyText: tt
|
|
33
33
|
};
|
|
34
|
-
function
|
|
34
|
+
function nt(t, a) {
|
|
35
35
|
for (const l of t)
|
|
36
36
|
if (l.path === a) return l.element;
|
|
37
37
|
for (const l of t)
|
|
@@ -41,13 +41,13 @@ function lt(t, a) {
|
|
|
41
41
|
}
|
|
42
42
|
return null;
|
|
43
43
|
}
|
|
44
|
-
function
|
|
44
|
+
function st({ text: t }) {
|
|
45
45
|
return /* @__PURE__ */ s("div", { className: w.empty, children: [
|
|
46
46
|
/* @__PURE__ */ e("div", { className: w.emptyIcon, children: "⚙️" }),
|
|
47
47
|
/* @__PURE__ */ e("div", { className: w.emptyText, children: t })
|
|
48
48
|
] });
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function rt({
|
|
51
51
|
groups: t,
|
|
52
52
|
routes: a,
|
|
53
53
|
mode: l,
|
|
@@ -55,8 +55,8 @@ function it({
|
|
|
55
55
|
activePathOverride: h,
|
|
56
56
|
menuOnly: y = !1
|
|
57
57
|
}) {
|
|
58
|
-
const g =
|
|
59
|
-
() => v === "failed" ? t :
|
|
58
|
+
const g = ue(), { pathname: u } = se(), C = te((n) => n.currentUser), v = te((n) => n.permissionState), [r, o] = m(/* @__PURE__ */ new Set()), c = Z(
|
|
59
|
+
() => v === "failed" ? t : Ne(t, C),
|
|
60
60
|
[t, C, v]
|
|
61
61
|
), b = Z(() => {
|
|
62
62
|
const n = h ?? u;
|
|
@@ -79,10 +79,10 @@ function it({
|
|
|
79
79
|
});
|
|
80
80
|
}, N = (n) => {
|
|
81
81
|
g(`${n.path}?mode=${l}`);
|
|
82
|
-
}, k = Z(() =>
|
|
82
|
+
}, k = Z(() => nt(a, u), [a, u]);
|
|
83
83
|
return /* @__PURE__ */ s("div", { className: w.shell, children: [
|
|
84
84
|
/* @__PURE__ */ s("aside", { className: w.sidebar, children: [
|
|
85
|
-
/* @__PURE__ */ e(
|
|
85
|
+
/* @__PURE__ */ e(Ee, {}),
|
|
86
86
|
/* @__PURE__ */ e("nav", { className: w.menuList, children: c.map((n) => {
|
|
87
87
|
const d = r.has(n.title), f = b ? n.items.findIndex((x) => x.key === b) : -1;
|
|
88
88
|
return /* @__PURE__ */ s("div", { className: w.menuGroup, children: [
|
|
@@ -94,12 +94,12 @@ function it({
|
|
|
94
94
|
children: [
|
|
95
95
|
/* @__PURE__ */ e("span", { className: w.menuGroupIcon, children: n.icon }),
|
|
96
96
|
/* @__PURE__ */ e("span", { className: w.menuGroupLabel, children: n.title }),
|
|
97
|
-
/* @__PURE__ */ e("span", { className: w.menuGroupArrow, children: d ? /* @__PURE__ */ e(
|
|
97
|
+
/* @__PURE__ */ e("span", { className: w.menuGroupArrow, children: d ? /* @__PURE__ */ e(be, {}) : /* @__PURE__ */ e(we, {}) })
|
|
98
98
|
]
|
|
99
99
|
}
|
|
100
100
|
),
|
|
101
|
-
d && /* @__PURE__ */ e("ul", { className: w.menuSubList, children: n.items.map((x,
|
|
102
|
-
const F = f >= 0 &&
|
|
101
|
+
d && /* @__PURE__ */ e("ul", { className: w.menuSubList, children: n.items.map((x, $) => {
|
|
102
|
+
const F = f >= 0 && $ <= f;
|
|
103
103
|
return /* @__PURE__ */ e(
|
|
104
104
|
"li",
|
|
105
105
|
{
|
|
@@ -117,14 +117,14 @@ function it({
|
|
|
117
117
|
}) })
|
|
118
118
|
] }),
|
|
119
119
|
y ? null : /* @__PURE__ */ s("main", { className: w.main, children: [
|
|
120
|
-
/* @__PURE__ */ e(
|
|
121
|
-
/* @__PURE__ */ e(
|
|
120
|
+
/* @__PURE__ */ e(Oe, {}),
|
|
121
|
+
/* @__PURE__ */ e(Ae, { resetKey: u, children: k ?? /* @__PURE__ */ e(st, { text: p }) })
|
|
122
122
|
] })
|
|
123
123
|
] });
|
|
124
124
|
}
|
|
125
|
-
const
|
|
126
|
-
async function
|
|
127
|
-
const l = `${
|
|
125
|
+
const at = "/z-team/ops/k8s";
|
|
126
|
+
async function ie(t, a) {
|
|
127
|
+
const l = `${at}${t}`, p = await fetch(l, {
|
|
128
128
|
headers: { "Content-Type": "application/json" },
|
|
129
129
|
...a
|
|
130
130
|
}), h = p.headers && p.headers.get("content-type") || "";
|
|
@@ -136,42 +136,42 @@ async function de(t, a) {
|
|
|
136
136
|
return y;
|
|
137
137
|
}
|
|
138
138
|
async function T(t, a) {
|
|
139
|
-
return
|
|
139
|
+
return ie(t, a);
|
|
140
140
|
}
|
|
141
|
-
async function
|
|
141
|
+
async function ot() {
|
|
142
142
|
return T("/cluster/info");
|
|
143
143
|
}
|
|
144
|
-
async function
|
|
144
|
+
async function lt() {
|
|
145
145
|
return T("/nodes");
|
|
146
146
|
}
|
|
147
|
-
async function
|
|
147
|
+
async function ct(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 it(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 dt(t = "*") {
|
|
160
160
|
return T(`/workloads/pods?namespace=${t}`);
|
|
161
161
|
}
|
|
162
|
-
async function
|
|
162
|
+
async function ut(t, a, l = 200) {
|
|
163
163
|
return T(`/workloads/pods/${t}/${a}/logs?tailLines=${l}`);
|
|
164
164
|
}
|
|
165
|
-
async function
|
|
165
|
+
async function mt(t, a) {
|
|
166
166
|
return T(`/workloads/pods/${t}/${a}/restart`, { method: "POST" });
|
|
167
167
|
}
|
|
168
|
-
async function
|
|
168
|
+
async function pt(t, a) {
|
|
169
169
|
return T(`/workloads/pods/${t}/${a}`, { method: "DELETE" });
|
|
170
170
|
}
|
|
171
|
-
async function
|
|
171
|
+
async function ht() {
|
|
172
172
|
return T("/namespaces");
|
|
173
173
|
}
|
|
174
|
-
const
|
|
174
|
+
const yt = () => {
|
|
175
175
|
var y, g;
|
|
176
176
|
const [t, a] = m(null), [l, p] = m(!0);
|
|
177
177
|
E(() => {
|
|
@@ -181,7 +181,7 @@ const kt = () => {
|
|
|
181
181
|
}, []);
|
|
182
182
|
const h = async () => {
|
|
183
183
|
try {
|
|
184
|
-
const u = await
|
|
184
|
+
const u = await ot();
|
|
185
185
|
u.success && a(u.data);
|
|
186
186
|
} catch (u) {
|
|
187
187
|
console.error("Failed to load cluster info", u);
|
|
@@ -189,15 +189,15 @@ const kt = () => {
|
|
|
189
189
|
p(!1);
|
|
190
190
|
}
|
|
191
191
|
};
|
|
192
|
-
return l ? /* @__PURE__ */ e(
|
|
192
|
+
return l ? /* @__PURE__ */ e(me, { 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(pe, { gutter: [16, 16], children: [
|
|
198
|
+
/* @__PURE__ */ e(W, { xs: 24, sm: 12, lg: 6, children: /* @__PURE__ */ s(M, { children: [
|
|
199
199
|
/* @__PURE__ */ e(
|
|
200
|
-
|
|
200
|
+
U,
|
|
201
201
|
{
|
|
202
202
|
title: /* @__PURE__ */ s(_, { children: [
|
|
203
203
|
/* @__PURE__ */ e(J, {}),
|
|
@@ -210,11 +210,11 @@ const kt = () => {
|
|
|
210
210
|
] })
|
|
211
211
|
}
|
|
212
212
|
),
|
|
213
|
-
/* @__PURE__ */ e(
|
|
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(W, { xs: 24, sm: 12, lg: 6, children: /* @__PURE__ */ s(M, { children: [
|
|
216
216
|
/* @__PURE__ */ e(
|
|
217
|
-
|
|
217
|
+
U,
|
|
218
218
|
{
|
|
219
219
|
title: /* @__PURE__ */ s(_, { children: [
|
|
220
220
|
/* @__PURE__ */ e(D, {}),
|
|
@@ -229,14 +229,14 @@ const kt = () => {
|
|
|
229
229
|
precision: 1
|
|
230
230
|
}
|
|
231
231
|
),
|
|
232
|
-
/* @__PURE__ */ s(
|
|
232
|
+
/* @__PURE__ */ s(R, { color: ((t == null ? void 0 : t.usedCpu) ?? 0) / ((t == null ? void 0 : t.totalCpu) ?? 1) > 0.8 ? "error" : "success", children: [
|
|
233
233
|
(((t == null ? void 0 : t.usedCpu) ?? 0) / ((t == null ? void 0 : t.totalCpu) ?? 1) * 100).toFixed(0),
|
|
234
234
|
"%"
|
|
235
235
|
] })
|
|
236
236
|
] }) }),
|
|
237
|
-
/* @__PURE__ */ e(
|
|
237
|
+
/* @__PURE__ */ e(W, { xs: 24, sm: 12, lg: 6, children: /* @__PURE__ */ s(M, { children: [
|
|
238
238
|
/* @__PURE__ */ e(
|
|
239
|
-
|
|
239
|
+
U,
|
|
240
240
|
{
|
|
241
241
|
title: /* @__PURE__ */ s(_, { children: [
|
|
242
242
|
/* @__PURE__ */ e(Q, {}),
|
|
@@ -251,14 +251,14 @@ const kt = () => {
|
|
|
251
251
|
precision: 1
|
|
252
252
|
}
|
|
253
253
|
),
|
|
254
|
-
/* @__PURE__ */ s(
|
|
254
|
+
/* @__PURE__ */ s(R, { color: ((t == null ? void 0 : t.usedMemory) ?? 0) / ((t == null ? void 0 : t.totalMemory) ?? 1) > 0.8 ? "error" : "success", children: [
|
|
255
255
|
(((t == null ? void 0 : t.usedMemory) ?? 0) / ((t == null ? void 0 : t.totalMemory) ?? 1) * 100).toFixed(0),
|
|
256
256
|
"%"
|
|
257
257
|
] })
|
|
258
258
|
] }) }),
|
|
259
|
-
/* @__PURE__ */ e(
|
|
259
|
+
/* @__PURE__ */ e(W, { xs: 24, sm: 12, lg: 6, children: /* @__PURE__ */ s(M, { children: [
|
|
260
260
|
/* @__PURE__ */ e(
|
|
261
|
-
|
|
261
|
+
U,
|
|
262
262
|
{
|
|
263
263
|
title: /* @__PURE__ */ s(_, { children: [
|
|
264
264
|
/* @__PURE__ */ e(oe, {}),
|
|
@@ -271,7 +271,7 @@ const kt = () => {
|
|
|
271
271
|
] })
|
|
272
272
|
}
|
|
273
273
|
),
|
|
274
|
-
/* @__PURE__ */ s(
|
|
274
|
+
/* @__PURE__ */ s(R, { color: "success", children: [
|
|
275
275
|
(t == null ? void 0 : t.namespaceCount) ?? 0,
|
|
276
276
|
" namespaces"
|
|
277
277
|
] })
|
|
@@ -286,7 +286,7 @@ const kt = () => {
|
|
|
286
286
|
/* @__PURE__ */ s("div", { children: [
|
|
287
287
|
/* @__PURE__ */ e("strong", { children: "集群状态:" }),
|
|
288
288
|
" ",
|
|
289
|
-
/* @__PURE__ */ e(
|
|
289
|
+
/* @__PURE__ */ e(R, { color: "success", children: t == null ? void 0 : t.status })
|
|
290
290
|
] }),
|
|
291
291
|
/* @__PURE__ */ s("div", { children: [
|
|
292
292
|
/* @__PURE__ */ e("strong", { children: "节点数:" }),
|
|
@@ -310,7 +310,7 @@ const kt = () => {
|
|
|
310
310
|
] })
|
|
311
311
|
] }) })
|
|
312
312
|
] });
|
|
313
|
-
},
|
|
313
|
+
}, ft = () => {
|
|
314
314
|
const [t, a] = m([]), [l, p] = m(!1), [h, y] = m("");
|
|
315
315
|
E(() => {
|
|
316
316
|
g();
|
|
@@ -318,7 +318,7 @@ const kt = () => {
|
|
|
318
318
|
const g = async () => {
|
|
319
319
|
p(!0), y("");
|
|
320
320
|
try {
|
|
321
|
-
const r = await
|
|
321
|
+
const r = await lt();
|
|
322
322
|
a(Array.isArray(r.data) ? r.data : []);
|
|
323
323
|
} catch (r) {
|
|
324
324
|
a([]), y(String((r == null ? void 0 : r.message) || r));
|
|
@@ -327,13 +327,13 @@ const kt = () => {
|
|
|
327
327
|
}
|
|
328
328
|
}, u = async (r) => {
|
|
329
329
|
try {
|
|
330
|
-
await
|
|
330
|
+
await ct(r), S.success(`${r} 已封锁(停止调度)`), g();
|
|
331
331
|
} catch {
|
|
332
332
|
S.error("封锁失败");
|
|
333
333
|
}
|
|
334
334
|
}, C = async (r) => {
|
|
335
335
|
try {
|
|
336
|
-
await
|
|
336
|
+
await it(r), S.success(`${r} 已解封`), g();
|
|
337
337
|
} catch {
|
|
338
338
|
S.error("解封失败");
|
|
339
339
|
}
|
|
@@ -351,7 +351,7 @@ const kt = () => {
|
|
|
351
351
|
}
|
|
352
352
|
),
|
|
353
353
|
/* @__PURE__ */ e(
|
|
354
|
-
|
|
354
|
+
he,
|
|
355
355
|
{
|
|
356
356
|
columns: [
|
|
357
357
|
{
|
|
@@ -376,7 +376,7 @@ const kt = () => {
|
|
|
376
376
|
title: "角色",
|
|
377
377
|
dataIndex: "roles",
|
|
378
378
|
key: "roles",
|
|
379
|
-
render: (r) => r ? /* @__PURE__ */ e(
|
|
379
|
+
render: (r) => r ? /* @__PURE__ */ e(R, { color: "blue", children: r }) : /* @__PURE__ */ e(R, { children: "worker" })
|
|
380
380
|
},
|
|
381
381
|
{
|
|
382
382
|
title: "CPU",
|
|
@@ -389,7 +389,7 @@ const kt = () => {
|
|
|
389
389
|
" / ",
|
|
390
390
|
((P = o.cpuCapacity) == null ? void 0 : P.toFixed(0)) ?? 0,
|
|
391
391
|
" cores",
|
|
392
|
-
b != null && /* @__PURE__ */ s(
|
|
392
|
+
b != null && /* @__PURE__ */ s(R, { color: b > 80 ? "error" : "success", style: { marginLeft: 4 }, children: [
|
|
393
393
|
b.toFixed(0),
|
|
394
394
|
"%"
|
|
395
395
|
] })
|
|
@@ -407,7 +407,7 @@ const kt = () => {
|
|
|
407
407
|
" / ",
|
|
408
408
|
((P = o.memCapacity) == null ? void 0 : P.toFixed(1)) ?? 0,
|
|
409
409
|
" GB",
|
|
410
|
-
b != null && /* @__PURE__ */ s(
|
|
410
|
+
b != null && /* @__PURE__ */ s(R, { color: b > 80 ? "error" : "success", style: { marginLeft: 4 }, children: [
|
|
411
411
|
b.toFixed(0),
|
|
412
412
|
"%"
|
|
413
413
|
] })
|
|
@@ -422,8 +422,8 @@ const kt = () => {
|
|
|
422
422
|
key: "action",
|
|
423
423
|
width: 150,
|
|
424
424
|
render: (r, o) => /* @__PURE__ */ s(_, { children: [
|
|
425
|
-
/* @__PURE__ */ e(B, { title: `封锁 ${o.name}?`, onConfirm: () => u(o.name), children: /* @__PURE__ */ e(I, {
|
|
426
|
-
/* @__PURE__ */ e(B, { title: `解封 ${o.name}?`, onConfirm: () => C(o.name), children: /* @__PURE__ */ e(I, {
|
|
425
|
+
/* @__PURE__ */ e(B, { title: `封锁 ${o.name}?`, onConfirm: () => u(o.name), children: /* @__PURE__ */ e(I, { type: "link", size: "small", children: "Cordon" }) }),
|
|
426
|
+
/* @__PURE__ */ e(B, { title: `解封 ${o.name}?`, onConfirm: () => C(o.name), children: /* @__PURE__ */ e(I, { type: "link", size: "small", children: "Uncordon" }) })
|
|
427
427
|
] })
|
|
428
428
|
}
|
|
429
429
|
],
|
|
@@ -436,7 +436,7 @@ const kt = () => {
|
|
|
436
436
|
}
|
|
437
437
|
)
|
|
438
438
|
] });
|
|
439
|
-
},
|
|
439
|
+
}, gt = ({
|
|
440
440
|
namespace: t,
|
|
441
441
|
podName: a,
|
|
442
442
|
tailLines: l = 200
|
|
@@ -454,7 +454,7 @@ const kt = () => {
|
|
|
454
454
|
v.current = f, f.onopen = () => {
|
|
455
455
|
g(!0), S.success("日志流已连接");
|
|
456
456
|
}, f.onmessage = (x) => {
|
|
457
|
-
o.current || h((
|
|
457
|
+
o.current || h(($) => [...$.slice(-1e3), x.data]);
|
|
458
458
|
}, f.onclose = () => {
|
|
459
459
|
g(!1);
|
|
460
460
|
}, f.onerror = () => {
|
|
@@ -463,12 +463,12 @@ const kt = () => {
|
|
|
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
|
-
/* @__PURE__ */ e(
|
|
466
|
+
/* @__PURE__ */ e(R, { color: y ? "success" : "error", children: y ? "● 已连接" : "● 已断开" }),
|
|
467
467
|
/* @__PURE__ */ e(
|
|
468
468
|
I,
|
|
469
469
|
{
|
|
470
470
|
size: "small",
|
|
471
|
-
icon: u ? /* @__PURE__ */ e(
|
|
471
|
+
icon: u ? /* @__PURE__ */ e(ke, {}) : /* @__PURE__ */ e(ve, {}),
|
|
472
472
|
onClick: () => {
|
|
473
473
|
o.current = !o.current, C(o.current);
|
|
474
474
|
},
|
|
@@ -502,7 +502,7 @@ const kt = () => {
|
|
|
502
502
|
/* @__PURE__ */ e("div", { ref: r })
|
|
503
503
|
] })
|
|
504
504
|
] });
|
|
505
|
-
},
|
|
505
|
+
}, bt = ({
|
|
506
506
|
namespace: t,
|
|
507
507
|
podName: a
|
|
508
508
|
}) => {
|
|
@@ -514,13 +514,13 @@ const kt = () => {
|
|
|
514
514
|
const b = () => {
|
|
515
515
|
const n = window.location.protocol === "https:" ? "wss:" : "ws:", d = window.location.host, f = `${n}//${d}/z-team/ops/k8s/ws/exec?namespace=${t}&name=${a}&command=${g}`, x = new WebSocket(f);
|
|
516
516
|
r.current = x, x.onopen = () => {
|
|
517
|
-
p(!0), v((
|
|
518
|
-
}, x.onmessage = (
|
|
519
|
-
v((F) => [...F.slice(-500),
|
|
517
|
+
p(!0), v(($) => [...$, `Connected to ${t}/${a} (${g})`]), S.success("终端已连接");
|
|
518
|
+
}, x.onmessage = ($) => {
|
|
519
|
+
v((F) => [...F.slice(-500), $.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(($) => [...$, `
|
|
524
524
|
--- 连接已关闭 ---`]);
|
|
525
525
|
}, x.onerror = () => {
|
|
526
526
|
p(!1), S.error("WebSocket 连接错误");
|
|
@@ -533,7 +533,7 @@ const kt = () => {
|
|
|
533
533
|
}, k = () => v([]);
|
|
534
534
|
return /* @__PURE__ */ s("div", { style: { display: "flex", flexDirection: "column", height: "100%" }, children: [
|
|
535
535
|
/* @__PURE__ */ s(_, { style: { marginBottom: 8 }, children: [
|
|
536
|
-
/* @__PURE__ */ e(
|
|
536
|
+
/* @__PURE__ */ e(R, { color: l ? "success" : "error", children: l ? "● 已连接" : "● 已断开" }),
|
|
537
537
|
/* @__PURE__ */ e(
|
|
538
538
|
ae,
|
|
539
539
|
{
|
|
@@ -627,7 +627,7 @@ const kt = () => {
|
|
|
627
627
|
I,
|
|
628
628
|
{
|
|
629
629
|
type: "primary",
|
|
630
|
-
icon: /* @__PURE__ */ e(
|
|
630
|
+
icon: /* @__PURE__ */ e(xe, {}),
|
|
631
631
|
onClick: P,
|
|
632
632
|
disabled: !l,
|
|
633
633
|
children: "发送"
|
|
@@ -635,7 +635,7 @@ const kt = () => {
|
|
|
635
635
|
)
|
|
636
636
|
] })
|
|
637
637
|
] });
|
|
638
|
-
},
|
|
638
|
+
}, wt = (t) => {
|
|
639
639
|
switch (t) {
|
|
640
640
|
case "Running":
|
|
641
641
|
return "success";
|
|
@@ -648,7 +648,7 @@ const kt = () => {
|
|
|
648
648
|
default:
|
|
649
649
|
return "default";
|
|
650
650
|
}
|
|
651
|
-
},
|
|
651
|
+
}, kt = () => {
|
|
652
652
|
const [t, a] = m([]), [l, p] = m(!1), [h, y] = m(""), [g, u] = m("*"), [C, v] = m([]), [r, o] = m(!1), [c, b] = m(null), [P, N] = m("logs"), [k, n] = m("");
|
|
653
653
|
E(() => {
|
|
654
654
|
d();
|
|
@@ -657,7 +657,7 @@ const kt = () => {
|
|
|
657
657
|
}, [g]);
|
|
658
658
|
const d = async () => {
|
|
659
659
|
try {
|
|
660
|
-
const i = await
|
|
660
|
+
const i = await ht();
|
|
661
661
|
v(Array.isArray(i.data) ? ["*", ...i.data] : ["*"]);
|
|
662
662
|
} catch {
|
|
663
663
|
v(["*"]);
|
|
@@ -665,7 +665,7 @@ const kt = () => {
|
|
|
665
665
|
}, f = async () => {
|
|
666
666
|
p(!0), y("");
|
|
667
667
|
try {
|
|
668
|
-
const i = await
|
|
668
|
+
const i = await dt(g);
|
|
669
669
|
a(Array.isArray(i.data) ? i.data : []);
|
|
670
670
|
} catch (i) {
|
|
671
671
|
a([]), y(String((i == null ? void 0 : i.message) || i));
|
|
@@ -673,32 +673,32 @@ const kt = () => {
|
|
|
673
673
|
p(!1);
|
|
674
674
|
}
|
|
675
675
|
}, x = async (i) => {
|
|
676
|
-
var
|
|
676
|
+
var O;
|
|
677
677
|
b(i), N("logs"), o(!0);
|
|
678
678
|
try {
|
|
679
|
-
const G = await
|
|
680
|
-
n(((
|
|
679
|
+
const G = await ut(i.namespace, i.name, 200);
|
|
680
|
+
n(((O = G == null ? void 0 : G.data) == null ? void 0 : O.logs) ?? "");
|
|
681
681
|
} catch (G) {
|
|
682
682
|
n(`加载日志失败:${String((G == null ? void 0 : G.message) || G)}`);
|
|
683
683
|
}
|
|
684
|
-
},
|
|
684
|
+
}, $ = async (i) => {
|
|
685
685
|
try {
|
|
686
|
-
await
|
|
686
|
+
await mt(i.namespace, i.name), S.success(`${i.name} 已重启`), f();
|
|
687
687
|
} catch {
|
|
688
688
|
S.error("重启失败");
|
|
689
689
|
}
|
|
690
690
|
}, F = async (i) => {
|
|
691
691
|
try {
|
|
692
|
-
await
|
|
692
|
+
await pt(i.namespace, i.name), S.success(`${i.name} 已删除`), f();
|
|
693
693
|
} catch {
|
|
694
694
|
S.error("删除失败");
|
|
695
695
|
}
|
|
696
|
-
},
|
|
696
|
+
}, de = [
|
|
697
697
|
{
|
|
698
698
|
title: "名称",
|
|
699
699
|
dataIndex: "name",
|
|
700
700
|
key: "name",
|
|
701
|
-
render: (i,
|
|
701
|
+
render: (i, O) => /* @__PURE__ */ e("a", { onClick: () => x(O), children: i })
|
|
702
702
|
},
|
|
703
703
|
{ title: "命名空间", dataIndex: "namespace", key: "namespace", width: 120 },
|
|
704
704
|
{ title: "节点", dataIndex: "nodeName", key: "nodeName", width: 130 },
|
|
@@ -708,14 +708,14 @@ const kt = () => {
|
|
|
708
708
|
dataIndex: "status",
|
|
709
709
|
key: "status",
|
|
710
710
|
width: 100,
|
|
711
|
-
render: (i) => /* @__PURE__ */ e(re, { status:
|
|
711
|
+
render: (i) => /* @__PURE__ */ e(re, { status: wt(i), text: i })
|
|
712
712
|
},
|
|
713
713
|
{
|
|
714
714
|
title: "就绪",
|
|
715
715
|
dataIndex: "ready",
|
|
716
716
|
key: "ready",
|
|
717
717
|
width: 70,
|
|
718
|
-
render: (i) => i ? /* @__PURE__ */ e(
|
|
718
|
+
render: (i) => i ? /* @__PURE__ */ e(R, { color: "success", children: "✓" }) : /* @__PURE__ */ e(R, { color: "error", children: "✗" })
|
|
719
719
|
},
|
|
720
720
|
{ title: "重启", dataIndex: "restartCount", key: "restartCount", width: 70 },
|
|
721
721
|
{ title: "存活", dataIndex: "age", key: "age", width: 80 },
|
|
@@ -723,10 +723,10 @@ const kt = () => {
|
|
|
723
723
|
title: "操作",
|
|
724
724
|
key: "action",
|
|
725
725
|
width: 200,
|
|
726
|
-
render: (i,
|
|
727
|
-
/* @__PURE__ */ e(I, {
|
|
728
|
-
/* @__PURE__ */ e(B, { title: "确认重启此 Pod?", onConfirm: () =>
|
|
729
|
-
/* @__PURE__ */ e(B, { title: "确认删除此 Pod?", onConfirm: () => F(
|
|
726
|
+
render: (i, O) => /* @__PURE__ */ s(_, { children: [
|
|
727
|
+
/* @__PURE__ */ e(I, { type: "link", size: "small", onClick: () => x(O), children: "日志" }),
|
|
728
|
+
/* @__PURE__ */ e(B, { title: "确认重启此 Pod?", onConfirm: () => $(O), children: /* @__PURE__ */ e(I, { size: "small", type: "primary", ghost: !0, children: "重启" }) }),
|
|
729
|
+
/* @__PURE__ */ e(B, { title: "确认删除此 Pod?", onConfirm: () => F(O), children: /* @__PURE__ */ e(I, { type: "link", size: "small", danger: !0, children: "删除" }) })
|
|
730
730
|
] })
|
|
731
731
|
}
|
|
732
732
|
];
|
|
@@ -755,10 +755,10 @@ const kt = () => {
|
|
|
755
755
|
}
|
|
756
756
|
),
|
|
757
757
|
/* @__PURE__ */ e(
|
|
758
|
-
|
|
758
|
+
ce,
|
|
759
759
|
{
|
|
760
760
|
rows: t,
|
|
761
|
-
columns:
|
|
761
|
+
columns: de,
|
|
762
762
|
rowKey: "name",
|
|
763
763
|
loading: l,
|
|
764
764
|
scroll: { x: 1e3 },
|
|
@@ -770,7 +770,7 @@ const kt = () => {
|
|
|
770
770
|
}
|
|
771
771
|
),
|
|
772
772
|
/* @__PURE__ */ e(
|
|
773
|
-
|
|
773
|
+
ye,
|
|
774
774
|
{
|
|
775
775
|
title: c ? `${c.name} (${c.namespace})` : "",
|
|
776
776
|
placement: "right",
|
|
@@ -778,7 +778,7 @@ const kt = () => {
|
|
|
778
778
|
open: r,
|
|
779
779
|
onClose: () => o(!1),
|
|
780
780
|
children: /* @__PURE__ */ e(
|
|
781
|
-
|
|
781
|
+
fe,
|
|
782
782
|
{
|
|
783
783
|
activeKey: P,
|
|
784
784
|
onChange: N,
|
|
@@ -787,7 +787,7 @@ const kt = () => {
|
|
|
787
787
|
key: "logs",
|
|
788
788
|
label: "实时日志",
|
|
789
789
|
children: c ? /* @__PURE__ */ e(
|
|
790
|
-
|
|
790
|
+
gt,
|
|
791
791
|
{
|
|
792
792
|
namespace: c.namespace,
|
|
793
793
|
podName: c.name
|
|
@@ -798,7 +798,7 @@ const kt = () => {
|
|
|
798
798
|
key: "exec",
|
|
799
799
|
label: "终端",
|
|
800
800
|
children: /* @__PURE__ */ e("div", { style: { padding: 20 }, children: /* @__PURE__ */ e(
|
|
801
|
-
|
|
801
|
+
bt,
|
|
802
802
|
{
|
|
803
803
|
namespace: (c == null ? void 0 : c.namespace) ?? "",
|
|
804
804
|
podName: (c == null ? void 0 : c.name) ?? ""
|
|
@@ -813,9 +813,9 @@ const kt = () => {
|
|
|
813
813
|
] });
|
|
814
814
|
};
|
|
815
815
|
async function K(t, a) {
|
|
816
|
-
return
|
|
816
|
+
return ie(`/hpa${t}`, a);
|
|
817
817
|
}
|
|
818
|
-
const
|
|
818
|
+
const vt = () => {
|
|
819
819
|
const [t, a] = m([]), [l, p] = m(!1), [h, y] = m(""), [g, u] = m(!1), [C, v] = m(!1), [r] = H.useForm();
|
|
820
820
|
E(() => {
|
|
821
821
|
o();
|
|
@@ -868,7 +868,7 @@ const Pt = () => {
|
|
|
868
868
|
};
|
|
869
869
|
return /* @__PURE__ */ s("div", { children: [
|
|
870
870
|
/* @__PURE__ */ s(_, { style: { marginBottom: 16 }, children: [
|
|
871
|
-
/* @__PURE__ */ e(I, { type: "primary", icon: /* @__PURE__ */ e(
|
|
871
|
+
/* @__PURE__ */ e(I, { type: "primary", icon: /* @__PURE__ */ e(Se, {}), onClick: c, children: "新建 HPA" }),
|
|
872
872
|
/* @__PURE__ */ e(I, { icon: /* @__PURE__ */ e(Y, {}), onClick: o, loading: l, children: "刷新" })
|
|
873
873
|
] }),
|
|
874
874
|
h && /* @__PURE__ */ e(
|
|
@@ -882,7 +882,7 @@ const Pt = () => {
|
|
|
882
882
|
}
|
|
883
883
|
),
|
|
884
884
|
/* @__PURE__ */ e(
|
|
885
|
-
|
|
885
|
+
ce,
|
|
886
886
|
{
|
|
887
887
|
rows: t,
|
|
888
888
|
columns: [
|
|
@@ -905,7 +905,7 @@ const Pt = () => {
|
|
|
905
905
|
title: "CPU 目标",
|
|
906
906
|
dataIndex: "cpuTarget",
|
|
907
907
|
key: "cpuTarget",
|
|
908
|
-
render: (n) => n ? /* @__PURE__ */ s(
|
|
908
|
+
render: (n) => n ? /* @__PURE__ */ s(R, { color: "blue", children: [
|
|
909
909
|
n,
|
|
910
910
|
"%"
|
|
911
911
|
] }) : "-"
|
|
@@ -914,7 +914,7 @@ const Pt = () => {
|
|
|
914
914
|
title: "期望副本",
|
|
915
915
|
dataIndex: "desiredReplicas",
|
|
916
916
|
key: "desired",
|
|
917
|
-
render: (n) => n ? /* @__PURE__ */ e(
|
|
917
|
+
render: (n) => n ? /* @__PURE__ */ e(R, { color: "green", children: n }) : "-"
|
|
918
918
|
},
|
|
919
919
|
{ title: "存活", dataIndex: "age", key: "age" },
|
|
920
920
|
{
|
|
@@ -922,8 +922,8 @@ const Pt = () => {
|
|
|
922
922
|
key: "action",
|
|
923
923
|
width: 150,
|
|
924
924
|
render: (n, d) => /* @__PURE__ */ s(_, { children: [
|
|
925
|
-
/* @__PURE__ */ e(I, {
|
|
926
|
-
/* @__PURE__ */ e(B, { title: `删除 HPA ${d.name}?`, onConfirm: () => N(d), children: /* @__PURE__ */ e(I, { size: "small", danger: !0,
|
|
925
|
+
/* @__PURE__ */ e(I, { type: "link", size: "small", onClick: () => b(d), children: "编辑" }),
|
|
926
|
+
/* @__PURE__ */ e(B, { title: `删除 HPA ${d.name}?`, onConfirm: () => N(d), children: /* @__PURE__ */ e(I, { type: "link", size: "small", danger: !0, children: "删除" }) })
|
|
927
927
|
] })
|
|
928
928
|
}
|
|
929
929
|
],
|
|
@@ -937,7 +937,7 @@ const Pt = () => {
|
|
|
937
937
|
}
|
|
938
938
|
),
|
|
939
939
|
/* @__PURE__ */ e(
|
|
940
|
-
|
|
940
|
+
ge,
|
|
941
941
|
{
|
|
942
942
|
title: C ? "编辑 HPA" : "新建 HPA",
|
|
943
943
|
open: g,
|
|
@@ -956,7 +956,7 @@ const Pt = () => {
|
|
|
956
956
|
}
|
|
957
957
|
)
|
|
958
958
|
] });
|
|
959
|
-
},
|
|
959
|
+
}, xt = [
|
|
960
960
|
{
|
|
961
961
|
title: "DevOps 运维",
|
|
962
962
|
icon: /* @__PURE__ */ e(J, {}),
|
|
@@ -999,28 +999,28 @@ const Pt = () => {
|
|
|
999
999
|
{
|
|
1000
1000
|
key: "devops-pipeline",
|
|
1001
1001
|
label: "流水线",
|
|
1002
|
-
icon: /* @__PURE__ */ e(
|
|
1002
|
+
icon: /* @__PURE__ */ e(Ie, {}),
|
|
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(Ce, {}),
|
|
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(Pe, {}),
|
|
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(_e, {}),
|
|
1024
1024
|
path: "/ops/devops/logs",
|
|
1025
1025
|
desc: "Loki 集中日志查询"
|
|
1026
1026
|
},
|
|
@@ -1040,7 +1040,7 @@ const Pt = () => {
|
|
|
1040
1040
|
{
|
|
1041
1041
|
key: "ops-channel",
|
|
1042
1042
|
label: "渠道管理",
|
|
1043
|
-
icon: /* @__PURE__ */ e(
|
|
1043
|
+
icon: /* @__PURE__ */ e(Re, {}),
|
|
1044
1044
|
path: "/ops/channel",
|
|
1045
1045
|
desc: "部署渠道配置与管理"
|
|
1046
1046
|
},
|
|
@@ -1054,7 +1054,7 @@ const Pt = () => {
|
|
|
1054
1054
|
{
|
|
1055
1055
|
key: "ops-deploy",
|
|
1056
1056
|
label: "部署管理",
|
|
1057
|
-
icon: /* @__PURE__ */ e(
|
|
1057
|
+
icon: /* @__PURE__ */ e($e, {}),
|
|
1058
1058
|
path: "/ops/deployment",
|
|
1059
1059
|
desc: "应用部署与发布管理"
|
|
1060
1060
|
},
|
|
@@ -1090,7 +1090,7 @@ function L({ label: t }) {
|
|
|
1090
1090
|
/* @__PURE__ */ e("p", { children: "功能开发中..." })
|
|
1091
1091
|
] });
|
|
1092
1092
|
}
|
|
1093
|
-
function
|
|
1093
|
+
function St({ label: t, reason: a, 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
|
"🧪 ",
|
|
@@ -1109,7 +1109,7 @@ function Ot({ label: t, reason: a, message: l = "该页面未孵化,因为后
|
|
|
1109
1109
|
}
|
|
1110
1110
|
function A({ label: t }) {
|
|
1111
1111
|
return /* @__PURE__ */ e(
|
|
1112
|
-
|
|
1112
|
+
St,
|
|
1113
1113
|
{
|
|
1114
1114
|
label: t,
|
|
1115
1115
|
message: "该页面未孵化,因为组件从来不在本仓",
|
|
@@ -1121,7 +1121,7 @@ function ne() {
|
|
|
1121
1121
|
const { pathname: t } = se();
|
|
1122
1122
|
return /* @__PURE__ */ e(q, { to: t, replace: !0 });
|
|
1123
1123
|
}
|
|
1124
|
-
const
|
|
1124
|
+
const It = [...Te, "/script"], Ct = [
|
|
1125
1125
|
// ─── 运维中心 ───
|
|
1126
1126
|
// ⚠ 这一族路由的组件从来没有从 z-ops 迁进来(见 UnmigratedPage 注释)。原先直接写
|
|
1127
1127
|
// <ChannelPage/> 之类会在**模块求值期**抛 ReferenceError 并白屏整个前端,不是只坏这一页。
|
|
@@ -1143,10 +1143,10 @@ const Rt = [...ze, "/script"], $t = [
|
|
|
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(
|
|
1146
|
+
{ path: "/ops/devops/dashboard", element: /* @__PURE__ */ e(yt, {}) },
|
|
1147
|
+
{ path: "/ops/devops/nodes", element: /* @__PURE__ */ e(ft, {}) },
|
|
1148
|
+
{ path: "/ops/devops/pods", element: /* @__PURE__ */ e(kt, {}) },
|
|
1149
|
+
{ path: "/ops/devops/hpa", element: /* @__PURE__ */ e(vt, {}) },
|
|
1150
1150
|
{ path: "/ops/devops/registry", element: /* @__PURE__ */ e(L, { label: "镜像仓库" }) },
|
|
1151
1151
|
{ path: "/ops/devops/pipeline", element: /* @__PURE__ */ e(L, { label: "流水线" }) },
|
|
1152
1152
|
{ path: "/ops/devops/release", element: /* @__PURE__ */ e(L, { label: "发布管理" }) },
|
|
@@ -1162,20 +1162,20 @@ const Rt = [...ze, "/script"], $t = [
|
|
|
1162
1162
|
// ─── 已迁到中间件面的前缀 → 旧深链交还中间件面 ───
|
|
1163
1163
|
// ⚠ 必须排在最后:matchWorkbenchPath 先全表精确、再全表通配,
|
|
1164
1164
|
// 但本面自己的 /ops/* 与 /resource/* 都在前面,不会被这几条吃掉。
|
|
1165
|
-
...
|
|
1165
|
+
...It.flatMap((t) => [
|
|
1166
1166
|
{ path: t, element: /* @__PURE__ */ e(ne, {}) },
|
|
1167
1167
|
{ path: `${t}/*`, element: /* @__PURE__ */ e(ne, {}) }
|
|
1168
1168
|
])
|
|
1169
1169
|
];
|
|
1170
|
-
function
|
|
1170
|
+
function Ht({
|
|
1171
1171
|
activePathOverride: t,
|
|
1172
1172
|
menuOnly: a = !1
|
|
1173
1173
|
} = {}) {
|
|
1174
1174
|
return /* @__PURE__ */ e(
|
|
1175
|
-
|
|
1175
|
+
rt,
|
|
1176
1176
|
{
|
|
1177
|
-
groups:
|
|
1178
|
-
routes:
|
|
1177
|
+
groups: xt,
|
|
1178
|
+
routes: Ct,
|
|
1179
1179
|
mode: "ops",
|
|
1180
1180
|
emptyText: "请从左侧菜单选择运维模块",
|
|
1181
1181
|
activePathOverride: t,
|
|
@@ -1184,5 +1184,5 @@ function Mt({
|
|
|
1184
1184
|
);
|
|
1185
1185
|
}
|
|
1186
1186
|
export {
|
|
1187
|
-
|
|
1187
|
+
Ht as default
|
|
1188
1188
|
};
|