@topdatasec/probe 1.0.8 → 1.0.9
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/lib/style.css +1 -1
- package/lib/t-probe-ui.es.js +700 -493
- package/lib/t-probe-ui.umd.js +1 -1
- package/package.json +1 -1
package/lib/t-probe-ui.es.js
CHANGED
|
@@ -1,298 +1,325 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { CircleClose as
|
|
3
|
-
import { TdsTable as
|
|
4
|
-
import
|
|
5
|
-
import { ElMessage as
|
|
6
|
-
const
|
|
1
|
+
import { defineComponent as W, useModel as de, resolveComponent as c, openBlock as h, createElementBlock as x, Fragment as z, renderList as G, createVNode as t, withCtx as b, unref as F, createCommentVNode as K, ref as w, reactive as H, createTextVNode as E, createElementVNode as p, toDisplayString as q, normalizeClass as te, withModifiers as le, mergeProps as oe, onUnmounted as pe, createBlock as Q } from "vue";
|
|
2
|
+
import { CircleClose as ce, UploadFilled as me } from "@element-plus/icons-vue";
|
|
3
|
+
import { TdsTable as _e, TdsForm as re } from "topdatasec-ui";
|
|
4
|
+
import ye from "spark-md5";
|
|
5
|
+
import { ElMessage as ee } from "element-plus";
|
|
6
|
+
const fe = {
|
|
7
7
|
key: 0,
|
|
8
8
|
class: "absolute right--13px text-#f56c6c hover:cursor-pointer"
|
|
9
|
-
},
|
|
9
|
+
}, ve = /* @__PURE__ */ W({
|
|
10
10
|
__name: "IpPortList",
|
|
11
11
|
props: {
|
|
12
12
|
modelValue: { default: () => [{ ip: "", port: "" }] },
|
|
13
13
|
modelModifiers: {}
|
|
14
14
|
},
|
|
15
15
|
emits: ["update:modelValue"],
|
|
16
|
-
setup(
|
|
17
|
-
const
|
|
18
|
-
function
|
|
19
|
-
|
|
16
|
+
setup(l) {
|
|
17
|
+
const o = de(l, "modelValue"), { $t: n } = window;
|
|
18
|
+
function a() {
|
|
19
|
+
o.value = [...o.value, { ip: "", port: "" }];
|
|
20
20
|
}
|
|
21
|
-
function
|
|
22
|
-
const
|
|
23
|
-
|
|
21
|
+
function m(_) {
|
|
22
|
+
const r = [...o.value];
|
|
23
|
+
r.splice(_, 1), o.value = r;
|
|
24
24
|
}
|
|
25
|
-
return (
|
|
26
|
-
const
|
|
27
|
-
return
|
|
28
|
-
(
|
|
29
|
-
key:
|
|
25
|
+
return (_, r) => {
|
|
26
|
+
const v = c("el-input"), k = c("el-form-item"), g = c("el-icon"), u = c("el-button");
|
|
27
|
+
return h(), x("div", null, [
|
|
28
|
+
(h(!0), x(z, null, G(o.value, (y, U) => (h(), x("div", {
|
|
29
|
+
key: U,
|
|
30
30
|
class: "flex form-m0 w-100% mb-5px"
|
|
31
31
|
}, [
|
|
32
|
-
|
|
33
|
-
default:
|
|
34
|
-
|
|
35
|
-
modelValue:
|
|
36
|
-
"onUpdate:modelValue": (M) =>
|
|
32
|
+
t(k, { class: "w-70%" }, {
|
|
33
|
+
default: b(() => [
|
|
34
|
+
t(v, {
|
|
35
|
+
modelValue: y.ip,
|
|
36
|
+
"onUpdate:modelValue": (M) => y.ip = M,
|
|
37
37
|
class: "min-w-300px w-100%",
|
|
38
38
|
placeholder: "IP"
|
|
39
39
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
40
40
|
]),
|
|
41
41
|
_: 2
|
|
42
42
|
}, 1024),
|
|
43
|
-
|
|
44
|
-
default:
|
|
45
|
-
|
|
46
|
-
modelValue:
|
|
47
|
-
"onUpdate:modelValue": (M) =>
|
|
43
|
+
t(k, { class: "ml-auto w-30%" }, {
|
|
44
|
+
default: b(() => [
|
|
45
|
+
t(v, {
|
|
46
|
+
modelValue: y.port,
|
|
47
|
+
"onUpdate:modelValue": (M) => y.port = M,
|
|
48
48
|
class: "ml-10",
|
|
49
|
-
placeholder:
|
|
49
|
+
placeholder: F(n)("global.port")
|
|
50
50
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])
|
|
51
51
|
]),
|
|
52
52
|
_: 2
|
|
53
53
|
}, 1024),
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
onClick: (M) =>
|
|
54
|
+
o.value.length > 1 ? (h(), x("div", fe, [
|
|
55
|
+
t(g, {
|
|
56
|
+
onClick: (M) => m(U)
|
|
57
57
|
}, {
|
|
58
|
-
default:
|
|
59
|
-
|
|
58
|
+
default: b(() => [
|
|
59
|
+
t(F(ce))
|
|
60
60
|
]),
|
|
61
61
|
_: 1
|
|
62
62
|
}, 8, ["onClick"])
|
|
63
|
-
])) :
|
|
63
|
+
])) : K("", !0)
|
|
64
64
|
]))), 128)),
|
|
65
|
-
|
|
65
|
+
t(u, {
|
|
66
66
|
class: "w-100% mt-10px border-dashed!",
|
|
67
67
|
icon: "Plus",
|
|
68
|
-
onClick:
|
|
68
|
+
onClick: a
|
|
69
69
|
})
|
|
70
70
|
]);
|
|
71
71
|
};
|
|
72
72
|
}
|
|
73
73
|
});
|
|
74
|
-
const
|
|
75
|
-
const
|
|
76
|
-
for (const [
|
|
77
|
-
a
|
|
78
|
-
return
|
|
79
|
-
},
|
|
80
|
-
function
|
|
81
|
-
return new Promise((
|
|
82
|
-
const
|
|
83
|
-
let
|
|
84
|
-
|
|
85
|
-
var
|
|
86
|
-
if (
|
|
87
|
-
const
|
|
88
|
-
|
|
74
|
+
const ne = (l, o) => {
|
|
75
|
+
const n = l.__vccOpts || l;
|
|
76
|
+
for (const [a, m] of o)
|
|
77
|
+
n[a] = m;
|
|
78
|
+
return n;
|
|
79
|
+
}, P = /* @__PURE__ */ ne(ve, [["__scopeId", "data-v-16fc9c64"]]), V = 5 * 1024 * 1024;
|
|
80
|
+
function ge(l, o) {
|
|
81
|
+
return new Promise((n, a) => {
|
|
82
|
+
const m = new ye.ArrayBuffer(), _ = new FileReader(), r = Math.ceil(l.size / V);
|
|
83
|
+
let v = 0;
|
|
84
|
+
_.onload = (g) => {
|
|
85
|
+
var u;
|
|
86
|
+
if (m.append((u = g.target) == null ? void 0 : u.result), v++, o) {
|
|
87
|
+
const y = Math.floor(v / r * 100);
|
|
88
|
+
o(y);
|
|
89
89
|
}
|
|
90
|
-
if (
|
|
91
|
-
|
|
90
|
+
if (v < r)
|
|
91
|
+
k();
|
|
92
92
|
else {
|
|
93
|
-
const
|
|
94
|
-
|
|
93
|
+
const y = m.end();
|
|
94
|
+
n(y);
|
|
95
95
|
}
|
|
96
|
-
},
|
|
97
|
-
|
|
96
|
+
}, _.onerror = () => {
|
|
97
|
+
a(new Error("MD5计算失败"));
|
|
98
98
|
};
|
|
99
|
-
function
|
|
100
|
-
const
|
|
101
|
-
|
|
99
|
+
function k() {
|
|
100
|
+
const g = v * V, u = Math.min(g + V, l.size);
|
|
101
|
+
_.readAsArrayBuffer(l.slice(g, u));
|
|
102
102
|
}
|
|
103
|
-
|
|
103
|
+
k();
|
|
104
104
|
});
|
|
105
105
|
}
|
|
106
|
-
async function
|
|
107
|
-
const
|
|
108
|
-
|
|
106
|
+
async function he(l, o, n, a, m, _ = "/api/upload/chunk") {
|
|
107
|
+
const r = o * V, v = Math.min(r + V, l.size), k = l.slice(r, v), g = v - r, u = new FormData();
|
|
108
|
+
u.append("file", k, l.name), u.append("chunkIndex", String(o + 1)), u.append("totalChunkNum", String(n)), u.append("fileMd5", a), u.append("tds_token", m), u.append("fileName", l.name), u.append("fileSize", String(l.size)), u.append("fileExt", l.name.substring(l.name.lastIndexOf(".") + 1)), u.append("chunkSize", String(V)), u.append("currentChunkSize", String(g));
|
|
109
109
|
try {
|
|
110
|
-
const
|
|
110
|
+
const y = await fetch(_, {
|
|
111
111
|
method: "POST",
|
|
112
|
-
body:
|
|
112
|
+
body: u
|
|
113
113
|
});
|
|
114
|
-
if (console.log(
|
|
115
|
-
throw new Error(`分片 ${
|
|
116
|
-
const
|
|
117
|
-
if (console.log(
|
|
118
|
-
throw new Error(`上传失败: ${
|
|
114
|
+
if (console.log(y, "upload response"), !y.ok)
|
|
115
|
+
throw new Error(`分片 ${o + 1} 上传失败,HTTP状态码: ${y.status}`);
|
|
116
|
+
const U = await y.json();
|
|
117
|
+
if (console.log(U, "upload result"), U.recode !== 0)
|
|
118
|
+
throw new Error(`上传失败: ${U.remsg || "未知错误"}`);
|
|
119
119
|
return !0;
|
|
120
|
-
} catch (
|
|
121
|
-
throw console.error(`上传分片 ${
|
|
120
|
+
} catch (y) {
|
|
121
|
+
throw console.error(`上传分片 ${o + 1} 时出错:`, y), y;
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
|
-
async function
|
|
124
|
+
async function be(l, o = "/api/upload/merge") {
|
|
125
125
|
try {
|
|
126
|
-
if (!(await fetch(
|
|
126
|
+
if (!(await fetch(o, {
|
|
127
127
|
method: "POST",
|
|
128
128
|
headers: {
|
|
129
129
|
"Content-Type": "application/json"
|
|
130
130
|
},
|
|
131
|
-
body: JSON.stringify(
|
|
131
|
+
body: JSON.stringify(l)
|
|
132
132
|
})).ok)
|
|
133
133
|
throw new Error("文件合并失败");
|
|
134
134
|
return !0;
|
|
135
|
-
} catch (
|
|
136
|
-
return console.error("合并分片时出错:",
|
|
135
|
+
} catch (n) {
|
|
136
|
+
return console.error("合并分片时出错:", n), !1;
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
|
-
async function
|
|
140
|
-
const { token:
|
|
139
|
+
async function we(l) {
|
|
140
|
+
const { token: o, file: n, fileDesc: a = "", uploadUrl: m = "/api/upload/chunk", mergeUrl: _ = "/api/upload/merge", onProgress: r, onSuccess: v, onError: k } = l;
|
|
141
141
|
try {
|
|
142
|
-
|
|
142
|
+
r == null || r({
|
|
143
143
|
progress: 0,
|
|
144
144
|
statusText: "正在计算文件MD5...",
|
|
145
145
|
status: "preparing"
|
|
146
146
|
});
|
|
147
|
-
const
|
|
148
|
-
|
|
147
|
+
const u = await ge(n, (S) => {
|
|
148
|
+
r == null || r({
|
|
149
149
|
progress: Math.floor(S * 0.1),
|
|
150
150
|
// MD5计算占10%进度
|
|
151
151
|
statusText: `正在计算文件MD5... ${S}%`,
|
|
152
152
|
status: "preparing"
|
|
153
153
|
});
|
|
154
154
|
});
|
|
155
|
-
|
|
155
|
+
r == null || r({
|
|
156
156
|
progress: 10,
|
|
157
157
|
statusText: "MD5计算完成",
|
|
158
158
|
status: "preparing",
|
|
159
|
-
fileMd5:
|
|
159
|
+
fileMd5: u
|
|
160
160
|
});
|
|
161
|
-
const
|
|
162
|
-
|
|
161
|
+
const y = Math.ceil(n.size / V);
|
|
162
|
+
r == null || r({
|
|
163
163
|
progress: 10,
|
|
164
|
-
statusText: `开始上传 (共${
|
|
164
|
+
statusText: `开始上传 (共${y}个分片)`,
|
|
165
165
|
status: "uploading",
|
|
166
|
-
fileMd5:
|
|
166
|
+
fileMd5: u
|
|
167
167
|
});
|
|
168
|
-
for (let S = 0; S <
|
|
169
|
-
const
|
|
170
|
-
|
|
171
|
-
progress: 10 +
|
|
172
|
-
statusText: `正在上传分片 ${S + 1}/${
|
|
168
|
+
for (let S = 0; S < y; S++) {
|
|
169
|
+
const I = Math.floor(S / y * 80);
|
|
170
|
+
r == null || r({
|
|
171
|
+
progress: 10 + I,
|
|
172
|
+
statusText: `正在上传分片 ${S + 1}/${y}`,
|
|
173
173
|
status: "uploading",
|
|
174
|
-
fileMd5:
|
|
175
|
-
}), await
|
|
174
|
+
fileMd5: u
|
|
175
|
+
}), await he(n, S, y, u, o, m);
|
|
176
176
|
}
|
|
177
|
-
|
|
177
|
+
r == null || r({
|
|
178
178
|
progress: 90,
|
|
179
179
|
statusText: "正在合并文件...",
|
|
180
180
|
status: "merging",
|
|
181
|
-
fileMd5:
|
|
181
|
+
fileMd5: u
|
|
182
182
|
});
|
|
183
|
-
const
|
|
184
|
-
fileDesc:
|
|
185
|
-
fileExt:
|
|
186
|
-
fileMd5:
|
|
187
|
-
fileName:
|
|
188
|
-
fileSize: String(
|
|
189
|
-
tds_token:
|
|
190
|
-
totalChunkNum: String(
|
|
183
|
+
const U = n.name.substring(n.name.lastIndexOf(".") + 1), M = {
|
|
184
|
+
fileDesc: a,
|
|
185
|
+
fileExt: U,
|
|
186
|
+
fileMd5: u,
|
|
187
|
+
fileName: n.name,
|
|
188
|
+
fileSize: String(n.size),
|
|
189
|
+
tds_token: o,
|
|
190
|
+
totalChunkNum: String(y)
|
|
191
191
|
};
|
|
192
|
-
if (!await
|
|
192
|
+
if (!await be(M, _))
|
|
193
193
|
throw new Error("文件合并失败");
|
|
194
|
-
|
|
194
|
+
r == null || r({
|
|
195
195
|
progress: 100,
|
|
196
196
|
statusText: "上传成功",
|
|
197
197
|
status: "success",
|
|
198
|
-
fileMd5:
|
|
199
|
-
}),
|
|
200
|
-
} catch (
|
|
201
|
-
|
|
198
|
+
fileMd5: u
|
|
199
|
+
}), ee.success(`${n.name} 上传成功`), v == null || v(u);
|
|
200
|
+
} catch (g) {
|
|
201
|
+
r == null || r({
|
|
202
202
|
progress: 0,
|
|
203
|
-
statusText:
|
|
203
|
+
statusText: g.message || "上传失败",
|
|
204
204
|
status: "error"
|
|
205
|
-
}),
|
|
205
|
+
}), ee.error(`${n.name} 上传失败: ${g.message}`), k == null || k(g);
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
|
-
function
|
|
209
|
-
if (
|
|
208
|
+
function xe(l) {
|
|
209
|
+
if (l === 0)
|
|
210
210
|
return "0 B";
|
|
211
|
-
const
|
|
212
|
-
return Math.round(
|
|
211
|
+
const o = 1024, n = ["B", "KB", "MB", "GB", "TB"], a = Math.floor(Math.log(l) / Math.log(o));
|
|
212
|
+
return Math.round(l / Math.pow(o, a) * 100) / 100 + " " + n[a];
|
|
213
213
|
}
|
|
214
|
-
const
|
|
214
|
+
const $ = {
|
|
215
215
|
get deployURL() {
|
|
216
216
|
return window.$probeURL || "";
|
|
217
|
+
},
|
|
218
|
+
get dockerURL() {
|
|
219
|
+
return window.$dockerURL || "";
|
|
217
220
|
}
|
|
218
|
-
},
|
|
219
|
-
url: `${
|
|
221
|
+
}, ae = (l = {}) => window.$http.request({
|
|
222
|
+
url: `${$.deployURL}/service_deploy/deployment/deploy`,
|
|
223
|
+
method: "post",
|
|
224
|
+
data: l
|
|
225
|
+
}), ke = (l = {}) => window.$http.request({
|
|
226
|
+
url: `${$.deployURL}/service_deploy/deployment/servers/add`,
|
|
220
227
|
method: "post",
|
|
221
|
-
data:
|
|
222
|
-
}),
|
|
223
|
-
url: `${
|
|
228
|
+
data: l
|
|
229
|
+
}), Te = (l = {}) => window.$http.request({
|
|
230
|
+
url: `${$.deployURL}/service_deploy/deployment/servers/update`,
|
|
224
231
|
method: "post",
|
|
225
|
-
data:
|
|
226
|
-
}),
|
|
227
|
-
url: `${
|
|
232
|
+
data: l
|
|
233
|
+
}), se = (l = {}) => window.$http.request({
|
|
234
|
+
url: `${$.deployURL}/service_deploy/deployment/packages/get`,
|
|
228
235
|
method: "post",
|
|
229
|
-
data:
|
|
236
|
+
data: l,
|
|
230
237
|
isError: !1
|
|
231
|
-
}),
|
|
232
|
-
url: `${
|
|
238
|
+
}), ie = (l = {}) => window.$http.request({
|
|
239
|
+
url: `${$.deployURL}/service_deploy/deployment/servers/get`,
|
|
233
240
|
method: "post",
|
|
234
|
-
data:
|
|
241
|
+
data: l,
|
|
235
242
|
isError: !1
|
|
236
|
-
}),
|
|
237
|
-
url: `${
|
|
243
|
+
}), $e = (l = {}) => window.$http.request({
|
|
244
|
+
url: `${$.deployURL}/service_deploy/deployment/servers/del`,
|
|
238
245
|
method: "post",
|
|
239
|
-
data:
|
|
240
|
-
}),
|
|
241
|
-
url: `${
|
|
246
|
+
data: l
|
|
247
|
+
}), Le = (l = {}) => window.$http.request({
|
|
248
|
+
url: `${$.deployURL}/service_deploy/deployment/packages/del`,
|
|
242
249
|
method: "post",
|
|
243
|
-
data:
|
|
244
|
-
}),
|
|
245
|
-
url: `${
|
|
250
|
+
data: l
|
|
251
|
+
}), Ee = (l = {}) => window.$http.request({
|
|
252
|
+
url: `${$.deployURL}/service_deploy/deployment/servers/get_arch`,
|
|
246
253
|
method: "post",
|
|
247
|
-
data:
|
|
254
|
+
data: l,
|
|
248
255
|
isError: !1
|
|
249
|
-
}),
|
|
250
|
-
url: `${
|
|
256
|
+
}), Ue = (l = {}) => window.$http.request({
|
|
257
|
+
url: `${$.deployURL}/service_deploy/deployment/deployment_history/get`,
|
|
251
258
|
method: "post",
|
|
252
|
-
data:
|
|
259
|
+
data: l,
|
|
253
260
|
isError: !1
|
|
254
|
-
}),
|
|
255
|
-
url: `${
|
|
261
|
+
}), Se = (l = {}) => window.$http.request({
|
|
262
|
+
url: `${$.deployURL}/service_deploy/deployment/servers/test_ssh`,
|
|
263
|
+
method: "post",
|
|
264
|
+
data: l
|
|
265
|
+
}), Ce = (l = {}) => window.$http.request({
|
|
266
|
+
url: `${$.deployURL}/service_deploy/deployment/servers/check_env`,
|
|
267
|
+
method: "post",
|
|
268
|
+
data: l
|
|
269
|
+
}), qe = (l = {}) => window.$http.request({
|
|
270
|
+
url: `${$.deployURL}/service_deploy/deployment/servers/install_env`,
|
|
256
271
|
method: "post",
|
|
257
|
-
data:
|
|
258
|
-
}),
|
|
259
|
-
url: `${
|
|
272
|
+
data: l
|
|
273
|
+
}), ue = (l = {}) => window.$http.request({
|
|
274
|
+
url: `${$.deployURL}/service_deploy/deployment/deploy/del`,
|
|
260
275
|
method: "post",
|
|
261
|
-
data:
|
|
262
|
-
}),
|
|
263
|
-
url: `${
|
|
276
|
+
data: l
|
|
277
|
+
}), Me = (l = {}) => window.$http.request({
|
|
278
|
+
url: `${$.dockerURL}/api/auth`,
|
|
264
279
|
method: "post",
|
|
265
|
-
data:
|
|
266
|
-
|
|
280
|
+
data: l,
|
|
281
|
+
isError: !1
|
|
282
|
+
}), Ae = (l = {}) => window.$http.request({
|
|
283
|
+
url: `${$.dockerURL}/api/endpoints`,
|
|
284
|
+
method: "post",
|
|
285
|
+
data: l.data,
|
|
286
|
+
headers: l.headers
|
|
287
|
+
}), De = {
|
|
267
288
|
class: "h-100%"
|
|
268
|
-
},
|
|
289
|
+
}, Re = {
|
|
269
290
|
key: 0,
|
|
270
291
|
class: "upload-progress-list"
|
|
271
|
-
},
|
|
292
|
+
}, Fe = {
|
|
272
293
|
class: "file-info"
|
|
273
|
-
},
|
|
294
|
+
}, ze = {
|
|
274
295
|
class: "file-name"
|
|
275
|
-
},
|
|
296
|
+
}, Ne = {
|
|
276
297
|
class: "file-size"
|
|
277
|
-
},
|
|
298
|
+
}, Be = {
|
|
278
299
|
class: "progress-text"
|
|
279
|
-
},
|
|
300
|
+
}, Ie = {
|
|
280
301
|
class: "table-box h-[calc(100%-220px)]",
|
|
281
302
|
style: {
|
|
282
303
|
height: "calc(100% - 220px)"
|
|
283
304
|
}
|
|
284
|
-
},
|
|
305
|
+
}, Pe = {
|
|
285
306
|
key: 0
|
|
286
|
-
},
|
|
307
|
+
}, Ve = {
|
|
287
308
|
class: "flex flex-wrap gap-12px p-12px"
|
|
288
|
-
},
|
|
289
|
-
class: "font-bold text-14px mb-8px text-[var(--el-text-color-primary)]"
|
|
290
|
-
},
|
|
309
|
+
}, Oe = {
|
|
310
|
+
class: "font-bold text-14px mb-8px text-[var(--el-text-color-primary)] pr-12"
|
|
311
|
+
}, je = {
|
|
291
312
|
class: "text-12px text-[var(--el-text-color-regular)] space-y-4px"
|
|
292
|
-
},
|
|
313
|
+
}, Ke = {
|
|
314
|
+
class: "flex items-center"
|
|
315
|
+
}, He = {
|
|
316
|
+
class: "flex items-center"
|
|
317
|
+
}, We = {
|
|
318
|
+
class: "absolute inset-0 bg-black/60 backdrop-blur-[2px] flex flex-col items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity duration-300 z-10"
|
|
319
|
+
}, Ge = {
|
|
293
320
|
key: 1,
|
|
294
321
|
class: "font-bold text-center text-gray-500 py-20"
|
|
295
|
-
},
|
|
322
|
+
}, Je = /* @__PURE__ */ W({
|
|
296
323
|
__name: "index",
|
|
297
324
|
props: {
|
|
298
325
|
token: {
|
|
@@ -300,75 +327,83 @@ const L = {
|
|
|
300
327
|
default: ""
|
|
301
328
|
}
|
|
302
329
|
},
|
|
303
|
-
setup(
|
|
304
|
-
const
|
|
305
|
-
$t:
|
|
306
|
-
$messageBox:
|
|
307
|
-
} = window,
|
|
308
|
-
function
|
|
309
|
-
|
|
310
|
-
id:
|
|
311
|
-
},
|
|
330
|
+
setup(l) {
|
|
331
|
+
const o = w(), n = w(), a = w("快速部署"), m = w({}), {
|
|
332
|
+
$t: _,
|
|
333
|
+
$messageBox: r
|
|
334
|
+
} = window, v = l;
|
|
335
|
+
function k(s) {
|
|
336
|
+
m.value = {
|
|
337
|
+
id: s.id
|
|
338
|
+
}, n.value.open();
|
|
312
339
|
}
|
|
313
|
-
const
|
|
340
|
+
const g = w([{
|
|
314
341
|
ip: "",
|
|
315
342
|
port: ""
|
|
316
|
-
}]),
|
|
343
|
+
}]), u = w([{
|
|
317
344
|
ip: "",
|
|
318
345
|
port: ""
|
|
319
|
-
}]),
|
|
346
|
+
}]), y = w([{
|
|
320
347
|
ip: "",
|
|
321
348
|
port: ""
|
|
322
|
-
}]),
|
|
349
|
+
}]), U = w([{
|
|
323
350
|
ip: "",
|
|
324
351
|
port: ""
|
|
325
352
|
}]);
|
|
326
|
-
async function M(
|
|
327
|
-
const
|
|
328
|
-
const
|
|
353
|
+
async function M(s) {
|
|
354
|
+
const f = (A, e) => {
|
|
355
|
+
const i = Math.max(A.length, e.length);
|
|
329
356
|
return Array.from({
|
|
330
|
-
length:
|
|
331
|
-
}, (
|
|
332
|
-
var
|
|
357
|
+
length: i
|
|
358
|
+
}, (B, L) => {
|
|
359
|
+
var d, T, j, D;
|
|
333
360
|
return {
|
|
334
|
-
src_ip: ((
|
|
335
|
-
src_port: Number((
|
|
336
|
-
dst_ip: ((
|
|
337
|
-
dst_port: Number((
|
|
361
|
+
src_ip: ((d = A[L]) == null ? void 0 : d.ip) || "",
|
|
362
|
+
src_port: Number((T = A[L]) == null ? void 0 : T.port) || 0,
|
|
363
|
+
dst_ip: ((j = e[L]) == null ? void 0 : j.ip) || "",
|
|
364
|
+
dst_port: Number((D = e[L]) == null ? void 0 : D.port) || 0
|
|
338
365
|
};
|
|
339
366
|
});
|
|
340
|
-
},
|
|
341
|
-
packages_id: [
|
|
342
|
-
server_id:
|
|
367
|
+
}, N = {
|
|
368
|
+
packages_id: [m.value.id],
|
|
369
|
+
server_id: s.server_id,
|
|
343
370
|
service_type: window.$prodType,
|
|
344
371
|
deploy_params: {
|
|
345
|
-
probe_name:
|
|
346
|
-
collection_mode:
|
|
347
|
-
interface:
|
|
348
|
-
engine_ip:
|
|
349
|
-
engine_port:
|
|
350
|
-
filterWhitelist: g
|
|
351
|
-
filterBlacklist:
|
|
372
|
+
probe_name: s.probe_name || "",
|
|
373
|
+
collection_mode: s.collection_mode,
|
|
374
|
+
interface: s.interface || "",
|
|
375
|
+
engine_ip: s.engine_ip || "",
|
|
376
|
+
engine_port: s.engine_port || "",
|
|
377
|
+
filterWhitelist: f(g.value, u.value),
|
|
378
|
+
filterBlacklist: f(y.value, U.value)
|
|
352
379
|
}
|
|
353
380
|
};
|
|
354
|
-
await
|
|
355
|
-
data:
|
|
356
|
-
}),
|
|
381
|
+
await ae({
|
|
382
|
+
data: N
|
|
383
|
+
}), o.value.getTableList(), n.value.close();
|
|
384
|
+
}
|
|
385
|
+
async function O(s) {
|
|
386
|
+
r(s, "file_name", _("button.delete"), "error").then(async () => {
|
|
387
|
+
const f = s.map((N) => N.id);
|
|
388
|
+
await Le({
|
|
389
|
+
data: f
|
|
390
|
+
}), o.value.getTableList();
|
|
391
|
+
});
|
|
357
392
|
}
|
|
358
|
-
async function
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
}),
|
|
393
|
+
async function S(s) {
|
|
394
|
+
r([s], "server_name", _("button.delete"), "error").then(async () => {
|
|
395
|
+
await ue({
|
|
396
|
+
deploy_id: [s.id],
|
|
397
|
+
service_type: window.$prodType
|
|
398
|
+
}), o.value.getTableList();
|
|
364
399
|
});
|
|
365
400
|
}
|
|
366
|
-
const
|
|
401
|
+
const I = H([
|
|
367
402
|
// { type: 'selection', align: 'center', field: 'id', hide: true },
|
|
368
403
|
{
|
|
369
404
|
field: "server_id",
|
|
370
405
|
name: "选择服务器",
|
|
371
|
-
enum: () =>
|
|
406
|
+
enum: () => ie({
|
|
372
407
|
service_type: window.$prodType
|
|
373
408
|
}),
|
|
374
409
|
fieldNames: {
|
|
@@ -406,9 +441,9 @@ const L = {
|
|
|
406
441
|
{
|
|
407
442
|
field: "deployment_server",
|
|
408
443
|
name: "已部署服务器数",
|
|
409
|
-
render: (
|
|
410
|
-
var
|
|
411
|
-
return ((
|
|
444
|
+
render: (s) => {
|
|
445
|
+
var f;
|
|
446
|
+
return ((f = s.row.deployment_server) == null ? void 0 : f.length) || 0;
|
|
412
447
|
}
|
|
413
448
|
},
|
|
414
449
|
{
|
|
@@ -470,14 +505,19 @@ const L = {
|
|
|
470
505
|
show: {
|
|
471
506
|
type: "input"
|
|
472
507
|
},
|
|
473
|
-
hide: !0
|
|
508
|
+
hide: !0,
|
|
509
|
+
rules: [{
|
|
510
|
+
required: !0,
|
|
511
|
+
type: "any"
|
|
512
|
+
}]
|
|
474
513
|
},
|
|
475
514
|
{
|
|
476
515
|
field: "engine_port",
|
|
477
516
|
name: "流量接收引擎端口",
|
|
478
517
|
show: {
|
|
479
518
|
type: "input",
|
|
480
|
-
dataType: "number"
|
|
519
|
+
dataType: "number",
|
|
520
|
+
value: 6379
|
|
481
521
|
},
|
|
482
522
|
hide: !0,
|
|
483
523
|
rules: [{
|
|
@@ -491,20 +531,20 @@ const L = {
|
|
|
491
531
|
show: {
|
|
492
532
|
type: "input",
|
|
493
533
|
tooltip: "白名单配置后,仅采集白名单内相关流量,如不填写,则采集所有流量",
|
|
494
|
-
render: () =>
|
|
534
|
+
render: () => t(z, null, [t("div", {
|
|
495
535
|
style: "width: 100%"
|
|
496
|
-
}, [
|
|
536
|
+
}, [t("p", {
|
|
497
537
|
class: "color-[var(--el-text-color-regular)]"
|
|
498
|
-
}, [
|
|
499
|
-
modelValue:
|
|
500
|
-
"onUpdate:modelValue": (
|
|
501
|
-
}, null)]),
|
|
538
|
+
}, [E("源ip端口:")]), t(P, {
|
|
539
|
+
modelValue: g.value,
|
|
540
|
+
"onUpdate:modelValue": (s) => g.value = s
|
|
541
|
+
}, null)]), t("div", {
|
|
502
542
|
style: "width: 100%"
|
|
503
|
-
}, [
|
|
543
|
+
}, [t("p", {
|
|
504
544
|
class: "color-[var(--el-text-color-regular)]"
|
|
505
|
-
}, [
|
|
506
|
-
modelValue:
|
|
507
|
-
"onUpdate:modelValue": (
|
|
545
|
+
}, [E("目的ip端口:")]), t(P, {
|
|
546
|
+
modelValue: u.value,
|
|
547
|
+
"onUpdate:modelValue": (s) => u.value = s
|
|
508
548
|
}, null)])])
|
|
509
549
|
},
|
|
510
550
|
hide: !0
|
|
@@ -515,16 +555,16 @@ const L = {
|
|
|
515
555
|
show: {
|
|
516
556
|
type: "input",
|
|
517
557
|
tooltip: "黑名单配置后,将不再采集黑名单内相关流量",
|
|
518
|
-
render: () =>
|
|
558
|
+
render: () => t(z, null, [t("p", {
|
|
519
559
|
class: "color-[var(--el-text-color-regular)]"
|
|
520
|
-
}, [
|
|
521
|
-
modelValue:
|
|
522
|
-
"onUpdate:modelValue": (
|
|
523
|
-
}, null),
|
|
560
|
+
}, [E("源ip端口:")]), t(P, {
|
|
561
|
+
modelValue: y.value,
|
|
562
|
+
"onUpdate:modelValue": (s) => y.value = s
|
|
563
|
+
}, null), t("p", {
|
|
524
564
|
class: "color-[var(--el-text-color-regular)]"
|
|
525
|
-
}, [
|
|
526
|
-
modelValue:
|
|
527
|
-
"onUpdate:modelValue": (
|
|
565
|
+
}, [E("目的ip端口:")]), t(P, {
|
|
566
|
+
modelValue: U.value,
|
|
567
|
+
"onUpdate:modelValue": (s) => U.value = s
|
|
528
568
|
}, null)])
|
|
529
569
|
},
|
|
530
570
|
hide: !0
|
|
@@ -534,230 +574,292 @@ const L = {
|
|
|
534
574
|
name: window.$t("global.operate"),
|
|
535
575
|
width: 140,
|
|
536
576
|
fixed: "right",
|
|
537
|
-
render: (
|
|
577
|
+
render: (s) => t("div", null, [t(c("el-button"), {
|
|
538
578
|
link: !0,
|
|
539
579
|
type: "primary",
|
|
540
580
|
class: "custom-btn",
|
|
541
|
-
onClick: () =>
|
|
581
|
+
onClick: () => k(s.row)
|
|
542
582
|
}, {
|
|
543
|
-
icon: () =>
|
|
583
|
+
icon: () => t(c("tds-svg-icon"), {
|
|
544
584
|
name: "deployed",
|
|
545
585
|
tip: "部署"
|
|
546
586
|
}, null)
|
|
547
|
-
}),
|
|
587
|
+
}), t(c("el-button"), {
|
|
548
588
|
link: !0,
|
|
549
589
|
type: "danger",
|
|
550
590
|
icon: "Delete",
|
|
551
|
-
title:
|
|
552
|
-
onClick: () =>
|
|
591
|
+
title: _("button.delete"),
|
|
592
|
+
onClick: () => O([s.row])
|
|
553
593
|
}, null)])
|
|
554
594
|
}
|
|
555
|
-
]),
|
|
556
|
-
function
|
|
557
|
-
const
|
|
558
|
-
if (!
|
|
595
|
+
]), R = w([]);
|
|
596
|
+
function J(s) {
|
|
597
|
+
const f = s.raw;
|
|
598
|
+
if (!f)
|
|
559
599
|
return;
|
|
560
|
-
const
|
|
561
|
-
fileName:
|
|
562
|
-
fileSize:
|
|
600
|
+
const N = {
|
|
601
|
+
fileName: f.name,
|
|
602
|
+
fileSize: f.size,
|
|
563
603
|
progress: 0,
|
|
564
604
|
progressStatus: "",
|
|
565
605
|
statusText: "准备上传..."
|
|
566
606
|
};
|
|
567
|
-
|
|
568
|
-
const
|
|
569
|
-
|
|
570
|
-
file:
|
|
607
|
+
R.value.push(N);
|
|
608
|
+
const A = R.value.length - 1;
|
|
609
|
+
we({
|
|
610
|
+
file: f,
|
|
571
611
|
fileDesc: "探针安装包",
|
|
572
612
|
// 替换为你实际的接口地址
|
|
573
|
-
uploadUrl:
|
|
574
|
-
mergeUrl:
|
|
575
|
-
token:
|
|
613
|
+
uploadUrl: $.deployURL + "/service_deploy/deployment/packages/upload",
|
|
614
|
+
mergeUrl: $.deployURL + "/service_deploy/deployment/packages/upload_merge",
|
|
615
|
+
token: v.token,
|
|
576
616
|
// 进度回调
|
|
577
|
-
onProgress: (
|
|
578
|
-
const
|
|
579
|
-
|
|
617
|
+
onProgress: (e) => {
|
|
618
|
+
const i = R.value[A];
|
|
619
|
+
i && (i.progress = e.progress, i.statusText = e.statusText, e.fileMd5 && (i.fileMd5 = e.fileMd5), e.status === "error" ? i.progressStatus = "exception" : e.status === "success" ? i.progressStatus = "success" : i.progressStatus = "");
|
|
580
620
|
},
|
|
581
621
|
// 成功回调
|
|
582
622
|
onSuccess: () => {
|
|
583
|
-
var
|
|
584
|
-
const
|
|
585
|
-
|
|
586
|
-
const
|
|
587
|
-
|
|
623
|
+
var i;
|
|
624
|
+
const e = R.value[A];
|
|
625
|
+
e && (e.progress = 100, e.progressStatus = "success", e.statusText = "上传成功"), (i = o.value) == null || i.getTableList(), setTimeout(() => {
|
|
626
|
+
const B = R.value.findIndex((L) => L.fileName === f.name);
|
|
627
|
+
B !== -1 && R.value.splice(B, 1);
|
|
588
628
|
}, 3e3);
|
|
589
629
|
},
|
|
590
630
|
// 失败回调
|
|
591
|
-
onError: (
|
|
592
|
-
console.error("文件上传失败:",
|
|
593
|
-
const
|
|
594
|
-
|
|
631
|
+
onError: (e) => {
|
|
632
|
+
console.error("文件上传失败:", e);
|
|
633
|
+
const i = R.value[A];
|
|
634
|
+
i && (i.progressStatus = "exception", i.statusText = e.message || "上传失败");
|
|
595
635
|
}
|
|
596
636
|
});
|
|
597
637
|
}
|
|
598
|
-
return (
|
|
599
|
-
const
|
|
600
|
-
return
|
|
638
|
+
return (s, f) => {
|
|
639
|
+
const N = c("el-icon"), A = c("el-upload"), e = c("el-progress"), i = c("Delete"), B = c("el-button"), L = c("el-table-column");
|
|
640
|
+
return h(), x("div", De, [t(A, {
|
|
601
641
|
class: "upload-demo mt-10px",
|
|
602
642
|
drag: "",
|
|
603
643
|
action: "",
|
|
604
644
|
"auto-upload": !1,
|
|
605
645
|
accept: ".tar.gz,.zip",
|
|
606
|
-
"on-change":
|
|
646
|
+
"on-change": J,
|
|
607
647
|
"show-file-list": !1,
|
|
608
648
|
multiple: ""
|
|
609
649
|
}, {
|
|
610
|
-
default:
|
|
650
|
+
default: b(() => [t(N, {
|
|
611
651
|
class: "el-icon--upload"
|
|
612
652
|
}, {
|
|
613
|
-
default:
|
|
653
|
+
default: b(() => [t(F(me))]),
|
|
614
654
|
_: 1
|
|
615
|
-
}),
|
|
655
|
+
}), f[0] || (f[0] = p("div", {
|
|
616
656
|
class: "el-upload__text"
|
|
617
|
-
}, [
|
|
657
|
+
}, [E(" 点击或拖拽文件到此处上传 "), p("br"), p("em", null, "支持的格式: tar.gz, zip")], -1))]),
|
|
618
658
|
_: 1
|
|
619
|
-
}),
|
|
620
|
-
key:
|
|
659
|
+
}), R.value.length > 0 ? (h(), x("div", Re, [(h(!0), x(z, null, G(R.value, (d) => (h(), x("div", {
|
|
660
|
+
key: d.fileName,
|
|
621
661
|
class: "upload-progress-item"
|
|
622
|
-
}, [
|
|
623
|
-
percentage:
|
|
624
|
-
status:
|
|
625
|
-
}, null, 8, ["percentage", "status"]),
|
|
662
|
+
}, [p("div", Fe, [p("span", ze, q(d.fileName), 1), p("span", Ne, q(F(xe)(d.fileSize)), 1)]), t(e, {
|
|
663
|
+
percentage: d.progress,
|
|
664
|
+
status: d.progressStatus
|
|
665
|
+
}, null, 8, ["percentage", "status"]), p("div", Be, q(d.statusText), 1)]))), 128))])) : K("", !0), p("div", Ie, [t(F(_e), {
|
|
626
666
|
ref_key: "refTdsTable",
|
|
627
|
-
ref:
|
|
628
|
-
columns:
|
|
629
|
-
"request-api":
|
|
630
|
-
options:
|
|
667
|
+
ref: o,
|
|
668
|
+
columns: I,
|
|
669
|
+
"request-api": F(se),
|
|
670
|
+
options: s.$tableOptions()
|
|
631
671
|
}, {
|
|
632
|
-
default:
|
|
672
|
+
default: b(() => [t(L, {
|
|
633
673
|
type: "expand"
|
|
634
674
|
}, {
|
|
635
|
-
default:
|
|
675
|
+
default: b((d) => [d.row.deployment_server && d.row.deployment_server.length > 0 ? (h(), x("div", Pe, [f[4] || (f[4] = p("div", {
|
|
636
676
|
class: "font-bold text-14px mt-12px"
|
|
637
|
-
}, "已部署的服务器", -1)),
|
|
638
|
-
key:
|
|
639
|
-
class: "w-
|
|
640
|
-
}, [
|
|
677
|
+
}, "已部署的服务器", -1)), p("div", Ve, [(h(!0), x(z, null, G(d.row.deployment_server, (T) => (h(), x("div", {
|
|
678
|
+
key: T.id,
|
|
679
|
+
class: "group w-25% px-20px py-10px rounded-8px bg-[var(--el-fill-color-light)] border border-solid border-[var(--el-border-color-lighter)] hover:shadow-lg transition-all duration-300 relative overflow-hidden"
|
|
680
|
+
}, [p("div", {
|
|
681
|
+
class: te(["absolute top-0 right-0 px-2 py-1 text-12px font-medium border-b border-l rounded-bl-8px", {
|
|
682
|
+
"text-green-600 bg-green-50 border-green-200": T.deploy_type === 0,
|
|
683
|
+
"text-amber-600 bg-amber-50 border-amber-200": T.deploy_type === 1,
|
|
684
|
+
"text-red-600 bg-red-50 border-red-200": T.deploy_type === 2
|
|
685
|
+
}])
|
|
686
|
+
}, q(T.deploy_type === 0 ? "安装" : T.deploy_type === 1 ? "升级" : "卸载"), 3), p("div", Oe, q(T.server_name), 1), p("div", je, [p("p", Ke, [f[1] || (f[1] = p("span", {
|
|
687
|
+
class: "opacity-70 mr-2"
|
|
688
|
+
}, "IP:", -1)), E(" " + q(T.ip_address), 1)]), p("p", He, [f[2] || (f[2] = p("span", {
|
|
689
|
+
class: "opacity-70 mr-2"
|
|
690
|
+
}, "时间:", -1)), E(" " + q(T.deployment_time), 1)])]), p("div", We, [t(B, {
|
|
691
|
+
type: "danger",
|
|
692
|
+
circle: "",
|
|
693
|
+
class: "mb-2 transform scale-90 group-hover:scale-100 transition-transform duration-300",
|
|
694
|
+
onClick: le((j) => S(T), ["stop"])
|
|
695
|
+
}, {
|
|
696
|
+
default: b(() => [t(N, {
|
|
697
|
+
size: "20"
|
|
698
|
+
}, {
|
|
699
|
+
default: b(() => [t(i)]),
|
|
700
|
+
_: 1
|
|
701
|
+
})]),
|
|
702
|
+
_: 1
|
|
703
|
+
}, 8, ["onClick"]), f[3] || (f[3] = p("span", {
|
|
704
|
+
class: "text-white text-12px font-medium tracking-wide"
|
|
705
|
+
}, "卸载", -1))])]))), 128))])])) : (h(), x("div", Ge, "暂无部署服务器记录"))]),
|
|
641
706
|
_: 1
|
|
642
707
|
})]),
|
|
643
708
|
_: 1
|
|
644
|
-
}, 8, ["columns", "request-api", "options"])]),
|
|
709
|
+
}, 8, ["columns", "request-api", "options"])]), t(F(re), oe({
|
|
645
710
|
ref_key: "refTdsForm",
|
|
646
|
-
ref:
|
|
647
|
-
},
|
|
648
|
-
title:
|
|
649
|
-
form:
|
|
650
|
-
columns:
|
|
711
|
+
ref: n
|
|
712
|
+
}, s.$formBindProps({
|
|
713
|
+
title: a.value,
|
|
714
|
+
form: m.value,
|
|
715
|
+
columns: I
|
|
651
716
|
}), {
|
|
652
717
|
onSubmit: M
|
|
653
718
|
}), null, 16)]);
|
|
654
719
|
};
|
|
655
720
|
}
|
|
656
|
-
}),
|
|
721
|
+
}), Ze = {
|
|
657
722
|
class: "table-box"
|
|
658
|
-
},
|
|
723
|
+
}, Qe = {
|
|
659
724
|
class: "flex items-center"
|
|
660
|
-
},
|
|
725
|
+
}, Xe = {
|
|
661
726
|
key: 0
|
|
662
|
-
},
|
|
727
|
+
}, Ye = {
|
|
663
728
|
class: "flex flex-wrap gap-12px p-12px"
|
|
664
|
-
},
|
|
665
|
-
class: "font-bold text-14px mb-8px text-[var(--el-text-color-primary)]"
|
|
666
|
-
},
|
|
729
|
+
}, et = {
|
|
730
|
+
class: "font-bold text-14px mb-8px text-[var(--el-text-color-primary)] pr-12"
|
|
731
|
+
}, tt = {
|
|
667
732
|
class: "text-12px text-[var(--el-text-color-regular)] space-y-4px"
|
|
668
|
-
},
|
|
733
|
+
}, lt = {
|
|
734
|
+
class: "flex items-center"
|
|
735
|
+
}, ot = {
|
|
736
|
+
class: "flex items-center"
|
|
737
|
+
}, rt = {
|
|
738
|
+
class: "absolute inset-0 bg-black/60 backdrop-blur-[2px] flex flex-col items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity duration-300 z-10"
|
|
739
|
+
}, nt = {
|
|
669
740
|
key: 1,
|
|
670
741
|
class: "font-bold text-center text-gray-500 py-20"
|
|
671
|
-
},
|
|
742
|
+
}, at = /* @__PURE__ */ W({
|
|
672
743
|
__name: "index",
|
|
673
|
-
setup(
|
|
744
|
+
setup(l) {
|
|
674
745
|
const {
|
|
675
|
-
$t:
|
|
676
|
-
$messageBox:
|
|
677
|
-
} = window,
|
|
746
|
+
$t: o,
|
|
747
|
+
$messageBox: n
|
|
748
|
+
} = window, a = w(), m = w(), _ = w(""), r = w({}), v = w("show"), k = H({
|
|
678
749
|
service_type: window.$prodType
|
|
679
750
|
});
|
|
680
|
-
function
|
|
681
|
-
|
|
751
|
+
function g(e) {
|
|
752
|
+
r.value = e ? Object.assign({}, e) : {}, v.value = "show", _.value = e ? "修改服务器" : "添加服务器", m.value.open();
|
|
682
753
|
}
|
|
683
|
-
const
|
|
684
|
-
|
|
685
|
-
await
|
|
686
|
-
data:
|
|
754
|
+
const u = (e) => {
|
|
755
|
+
n(e, "server_name", o("button.delete"), "error").then(async () => {
|
|
756
|
+
await $e({
|
|
757
|
+
data: e.map((i) => i.id),
|
|
687
758
|
service_type: window.$prodType
|
|
688
|
-
}),
|
|
759
|
+
}), a.value.getTableList();
|
|
689
760
|
});
|
|
690
761
|
};
|
|
691
|
-
function
|
|
692
|
-
|
|
693
|
-
id:
|
|
694
|
-
},
|
|
762
|
+
function y(e) {
|
|
763
|
+
r.value = {
|
|
764
|
+
id: e.id
|
|
765
|
+
}, v.value = "deploy", _.value = "快速部署", m.value.open();
|
|
695
766
|
}
|
|
696
|
-
|
|
767
|
+
async function U(e) {
|
|
768
|
+
n([e], "server_name", o("button.delete"), "error").then(async () => {
|
|
769
|
+
await ue({
|
|
770
|
+
deploy_id: [e.id],
|
|
771
|
+
service_type: window.$prodType
|
|
772
|
+
}), a.value.getTableList();
|
|
773
|
+
});
|
|
774
|
+
}
|
|
775
|
+
const M = w([{
|
|
697
776
|
ip: "",
|
|
698
777
|
port: ""
|
|
699
|
-
}]),
|
|
778
|
+
}]), O = w([{
|
|
700
779
|
ip: "",
|
|
701
780
|
port: ""
|
|
702
|
-
}]),
|
|
781
|
+
}]), S = w([{
|
|
703
782
|
ip: "",
|
|
704
783
|
port: ""
|
|
705
|
-
}]),
|
|
784
|
+
}]), I = w([{
|
|
706
785
|
ip: "",
|
|
707
786
|
port: ""
|
|
708
787
|
}]);
|
|
709
|
-
async function
|
|
710
|
-
if (
|
|
711
|
-
await
|
|
712
|
-
data:
|
|
713
|
-
|
|
788
|
+
async function R(e) {
|
|
789
|
+
if (v.value === "show") {
|
|
790
|
+
r.value.id ? (await Te({
|
|
791
|
+
data: {
|
|
792
|
+
...e,
|
|
793
|
+
id: r.value.id
|
|
794
|
+
}
|
|
795
|
+
}), a.value.getTableList(), m.value.close()) : (await ke({
|
|
796
|
+
data: e
|
|
797
|
+
}), a.value.getTableList(), m.value.close());
|
|
714
798
|
return;
|
|
715
799
|
}
|
|
716
|
-
|
|
717
|
-
const
|
|
800
|
+
if (v.value === "docker") {
|
|
801
|
+
const L = await Me({
|
|
802
|
+
password: "Tds@12345",
|
|
803
|
+
username: "admin"
|
|
804
|
+
}), d = new FormData();
|
|
805
|
+
d.append("Name", e.Name), d.append("EndpointType", "1"), d.append("URL", "tcp://" + e.URL), d.append("PublicURL", e.URL), d.append("GroupID", "1"), d.append("TagIds", "[]"), d.append("TLS", "false"), d.append("TLSSkipVerify", "false"), d.append("TLSSkipClientVerify", "false"), d.append("TLSCACertFile", ""), d.append("TLSCertFile", ""), d.append("TLSKeyFile", ""), await Ae({
|
|
806
|
+
data: d,
|
|
807
|
+
headers: {
|
|
808
|
+
Authorization: `${L.jwt}`
|
|
809
|
+
}
|
|
810
|
+
}), m.value.close();
|
|
811
|
+
return;
|
|
812
|
+
}
|
|
813
|
+
const i = (L, d) => {
|
|
814
|
+
const T = Math.max(L.length, d.length);
|
|
718
815
|
return Array.from({
|
|
719
|
-
length:
|
|
720
|
-
}, (
|
|
721
|
-
var
|
|
816
|
+
length: T
|
|
817
|
+
}, (j, D) => {
|
|
818
|
+
var C, Z, X, Y;
|
|
722
819
|
return {
|
|
723
|
-
src_ip: ((
|
|
724
|
-
src_port: Number((
|
|
725
|
-
dst_ip: ((
|
|
726
|
-
dst_port: Number((
|
|
820
|
+
src_ip: ((C = L[D]) == null ? void 0 : C.ip) || "",
|
|
821
|
+
src_port: Number((Z = L[D]) == null ? void 0 : Z.port) || 0,
|
|
822
|
+
dst_ip: ((X = d[D]) == null ? void 0 : X.ip) || "",
|
|
823
|
+
dst_port: Number((Y = d[D]) == null ? void 0 : Y.port) || 0
|
|
727
824
|
};
|
|
728
825
|
});
|
|
729
|
-
},
|
|
730
|
-
packages_id: [
|
|
731
|
-
server_id: [
|
|
826
|
+
}, B = {
|
|
827
|
+
packages_id: [e.packages_id],
|
|
828
|
+
server_id: [r.value.id],
|
|
732
829
|
service_type: window.$prodType,
|
|
733
830
|
deploy_params: {
|
|
734
|
-
probe_name:
|
|
735
|
-
collection_mode:
|
|
736
|
-
interface:
|
|
737
|
-
engine_ip:
|
|
738
|
-
engine_port:
|
|
739
|
-
filterWhitelist: i(
|
|
740
|
-
filterBlacklist: i(
|
|
831
|
+
probe_name: e.probe_name || "",
|
|
832
|
+
collection_mode: e.collection_mode,
|
|
833
|
+
interface: e.interface || "",
|
|
834
|
+
engine_ip: e.engine_ip || "",
|
|
835
|
+
engine_port: e.engine_port || "",
|
|
836
|
+
filterWhitelist: i(M.value, O.value),
|
|
837
|
+
filterBlacklist: i(S.value, I.value)
|
|
741
838
|
}
|
|
742
839
|
};
|
|
743
|
-
await
|
|
744
|
-
data:
|
|
745
|
-
}),
|
|
840
|
+
await ae({
|
|
841
|
+
data: B
|
|
842
|
+
}), a.value.getTableList(), m.value.close();
|
|
843
|
+
}
|
|
844
|
+
function J(e) {
|
|
845
|
+
Se({
|
|
846
|
+
data: [e.id]
|
|
847
|
+
}), a.value.getTableList();
|
|
746
848
|
}
|
|
747
|
-
function
|
|
748
|
-
|
|
749
|
-
data: [
|
|
750
|
-
}),
|
|
849
|
+
function s(e) {
|
|
850
|
+
Ce({
|
|
851
|
+
data: [e.id]
|
|
852
|
+
}), a.value.getTableList();
|
|
751
853
|
}
|
|
752
|
-
function
|
|
753
|
-
|
|
754
|
-
data: [
|
|
755
|
-
}),
|
|
854
|
+
function f(e) {
|
|
855
|
+
qe({
|
|
856
|
+
data: [e.id]
|
|
857
|
+
}), a.value.getTableList();
|
|
756
858
|
}
|
|
757
|
-
function
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
}
|
|
859
|
+
function N(e) {
|
|
860
|
+
v.value = "docker", _.value = "添加容器监控", r.value = {
|
|
861
|
+
URL: `${e.ip_address}:${e.ssh_port}`
|
|
862
|
+
}, m.value.open();
|
|
761
863
|
}
|
|
762
864
|
const A = H([{
|
|
763
865
|
field: "server_name",
|
|
@@ -791,6 +893,7 @@ const L = {
|
|
|
791
893
|
}, {
|
|
792
894
|
field: "ssh_username",
|
|
793
895
|
name: "SSH用户",
|
|
896
|
+
hide: !0,
|
|
794
897
|
show: {
|
|
795
898
|
type: "input"
|
|
796
899
|
},
|
|
@@ -814,7 +917,8 @@ const L = {
|
|
|
814
917
|
}, {
|
|
815
918
|
field: "arch",
|
|
816
919
|
name: "架构",
|
|
817
|
-
enum:
|
|
920
|
+
enum: Ee,
|
|
921
|
+
hide: !0,
|
|
818
922
|
show: {
|
|
819
923
|
type: "select"
|
|
820
924
|
},
|
|
@@ -824,7 +928,7 @@ const L = {
|
|
|
824
928
|
}, {
|
|
825
929
|
field: "deployed_count",
|
|
826
930
|
name: "已部署探针数量",
|
|
827
|
-
render: (
|
|
931
|
+
render: (e) => t("span", null, [e.row.deployment_packages.length])
|
|
828
932
|
}, {
|
|
829
933
|
field: "status",
|
|
830
934
|
name: "状态",
|
|
@@ -843,31 +947,55 @@ const L = {
|
|
|
843
947
|
name: "连通性检查",
|
|
844
948
|
tag: !0,
|
|
845
949
|
enum: [{
|
|
950
|
+
label: "失败",
|
|
951
|
+
value: 3,
|
|
952
|
+
tagType: "danger"
|
|
953
|
+
}, {
|
|
846
954
|
label: "成功",
|
|
847
|
-
value:
|
|
955
|
+
value: 2,
|
|
848
956
|
tagType: "success"
|
|
849
957
|
}, {
|
|
850
|
-
label: "
|
|
958
|
+
label: "检测中",
|
|
959
|
+
value: 1,
|
|
960
|
+
tagType: "warning"
|
|
961
|
+
}, {
|
|
962
|
+
label: "未检测",
|
|
851
963
|
value: 0,
|
|
852
|
-
tagType: "
|
|
964
|
+
tagType: "default"
|
|
853
965
|
}]
|
|
966
|
+
}, {
|
|
967
|
+
field: "check_ssh_msg",
|
|
968
|
+
name: "连通性检查失败原因",
|
|
969
|
+
width: 150
|
|
854
970
|
}, {
|
|
855
971
|
field: "check_env_ok",
|
|
856
972
|
name: "安装环境",
|
|
857
973
|
tag: !0,
|
|
858
974
|
enum: [{
|
|
859
|
-
label: "
|
|
860
|
-
value:
|
|
975
|
+
label: "失败",
|
|
976
|
+
value: 3,
|
|
977
|
+
tagType: "danger"
|
|
978
|
+
}, {
|
|
979
|
+
label: "成功",
|
|
980
|
+
value: 2,
|
|
861
981
|
tagType: "success"
|
|
862
982
|
}, {
|
|
863
|
-
label: "
|
|
983
|
+
label: "检测中",
|
|
984
|
+
value: 1,
|
|
985
|
+
tagType: "warning"
|
|
986
|
+
}, {
|
|
987
|
+
label: "未检测",
|
|
864
988
|
value: 0,
|
|
865
|
-
tagType: "
|
|
989
|
+
tagType: "default"
|
|
866
990
|
}]
|
|
991
|
+
}, {
|
|
992
|
+
field: "check_env_msg",
|
|
993
|
+
name: "环境检查失败原因",
|
|
994
|
+
width: 150
|
|
867
995
|
}, {
|
|
868
996
|
field: "packages_id",
|
|
869
997
|
name: "安装包",
|
|
870
|
-
enum:
|
|
998
|
+
enum: se,
|
|
871
999
|
fieldNames: {
|
|
872
1000
|
value: "id",
|
|
873
1001
|
label: "file_name"
|
|
@@ -927,7 +1055,8 @@ const L = {
|
|
|
927
1055
|
name: "流量接收引擎端口",
|
|
928
1056
|
deploy: {
|
|
929
1057
|
type: "input",
|
|
930
|
-
dataType: "number"
|
|
1058
|
+
dataType: "number",
|
|
1059
|
+
value: 6379
|
|
931
1060
|
},
|
|
932
1061
|
hide: !0,
|
|
933
1062
|
rules: [{
|
|
@@ -940,16 +1069,16 @@ const L = {
|
|
|
940
1069
|
deploy: {
|
|
941
1070
|
type: "input",
|
|
942
1071
|
tooltip: "白名单配置后,仅采集白名单内相关流量,如不填写,则采集所有流量",
|
|
943
|
-
render: () =>
|
|
1072
|
+
render: () => t(z, null, [t("p", {
|
|
944
1073
|
class: "color-[var(--el-text-color-regular)]"
|
|
945
|
-
}, [
|
|
946
|
-
modelValue: $.value,
|
|
947
|
-
"onUpdate:modelValue": (o) => $.value = o
|
|
948
|
-
}, null), e("p", {
|
|
949
|
-
class: "color-[var(--el-text-color-regular)]"
|
|
950
|
-
}, [F("目的ip端口:")]), e(V, {
|
|
1074
|
+
}, [E("源ip端口:")]), t(P, {
|
|
951
1075
|
modelValue: M.value,
|
|
952
|
-
"onUpdate:modelValue": (
|
|
1076
|
+
"onUpdate:modelValue": (e) => M.value = e
|
|
1077
|
+
}, null), t("p", {
|
|
1078
|
+
class: "color-[var(--el-text-color-regular)]"
|
|
1079
|
+
}, [E("目的ip端口:")]), t(P, {
|
|
1080
|
+
modelValue: O.value,
|
|
1081
|
+
"onUpdate:modelValue": (e) => O.value = e
|
|
953
1082
|
}, null)])
|
|
954
1083
|
},
|
|
955
1084
|
hide: !0
|
|
@@ -959,143 +1088,208 @@ const L = {
|
|
|
959
1088
|
deploy: {
|
|
960
1089
|
type: "input",
|
|
961
1090
|
tooltip: "黑名单配置后,将不再采集黑名单内相关流量",
|
|
962
|
-
render: () =>
|
|
1091
|
+
render: () => t(z, null, [t("p", {
|
|
963
1092
|
class: "color-[var(--el-text-color-regular)]"
|
|
964
|
-
}, [
|
|
965
|
-
modelValue: I.value,
|
|
966
|
-
"onUpdate:modelValue": (o) => I.value = o
|
|
967
|
-
}, null), e("p", {
|
|
968
|
-
class: "color-[var(--el-text-color-regular)]"
|
|
969
|
-
}, [F("目的ip端口:")]), e(V, {
|
|
1093
|
+
}, [E("源ip端口:")]), t(P, {
|
|
970
1094
|
modelValue: S.value,
|
|
971
|
-
"onUpdate:modelValue": (
|
|
1095
|
+
"onUpdate:modelValue": (e) => S.value = e
|
|
1096
|
+
}, null), t("p", {
|
|
1097
|
+
class: "color-[var(--el-text-color-regular)]"
|
|
1098
|
+
}, [E("目的ip端口:")]), t(P, {
|
|
1099
|
+
modelValue: I.value,
|
|
1100
|
+
"onUpdate:modelValue": (e) => I.value = e
|
|
972
1101
|
}, null)])
|
|
973
1102
|
},
|
|
974
1103
|
hide: !0
|
|
1104
|
+
}, {
|
|
1105
|
+
field: "Name",
|
|
1106
|
+
name: "名称",
|
|
1107
|
+
hide: !0,
|
|
1108
|
+
docker: {
|
|
1109
|
+
type: "input"
|
|
1110
|
+
},
|
|
1111
|
+
rules: [{
|
|
1112
|
+
required: !0
|
|
1113
|
+
}]
|
|
1114
|
+
}, {
|
|
1115
|
+
field: "URL",
|
|
1116
|
+
name: "端点 URL ",
|
|
1117
|
+
hide: !0,
|
|
1118
|
+
docker: {
|
|
1119
|
+
type: "input",
|
|
1120
|
+
disabled: !0
|
|
1121
|
+
}
|
|
1122
|
+
}, {
|
|
1123
|
+
field: "status_monitorning",
|
|
1124
|
+
name: "状态监控",
|
|
1125
|
+
render: (e) => t(z, null, [t(c("el-button"), {
|
|
1126
|
+
class: "custom-btn",
|
|
1127
|
+
type: "primary",
|
|
1128
|
+
icon: "Plus",
|
|
1129
|
+
link: !0,
|
|
1130
|
+
onClick: () => N(e.row)
|
|
1131
|
+
}, {
|
|
1132
|
+
default: () => [E("添加")]
|
|
1133
|
+
})])
|
|
975
1134
|
}, {
|
|
976
1135
|
field: "operation",
|
|
977
1136
|
name: window.$t("global.operate"),
|
|
978
1137
|
width: 180,
|
|
979
1138
|
fixed: "right",
|
|
980
|
-
render: (
|
|
1139
|
+
render: (e) => t("div", null, [t(c("el-button"), {
|
|
1140
|
+
link: !0,
|
|
1141
|
+
type: "primary",
|
|
1142
|
+
icon: "Edit",
|
|
1143
|
+
title: "修改",
|
|
1144
|
+
class: "custom-btn",
|
|
1145
|
+
onClick: () => g(e.row)
|
|
1146
|
+
}, null), t(c("el-button"), {
|
|
981
1147
|
link: !0,
|
|
982
1148
|
type: "primary",
|
|
983
1149
|
icon: "Connection",
|
|
984
1150
|
title: "连通性检查",
|
|
985
1151
|
class: "custom-btn",
|
|
986
|
-
onClick: () =>
|
|
987
|
-
}, null),
|
|
1152
|
+
onClick: () => J(e.row)
|
|
1153
|
+
}, null), t(c("el-button"), {
|
|
988
1154
|
link: !0,
|
|
989
1155
|
type: "primary",
|
|
990
1156
|
class: "custom-btn",
|
|
991
|
-
onClick: () =>
|
|
1157
|
+
onClick: () => s(e.row)
|
|
992
1158
|
}, {
|
|
993
|
-
icon: () =>
|
|
1159
|
+
icon: () => t(c("tds-svg-icon"), {
|
|
994
1160
|
name: "install_env",
|
|
995
1161
|
tip: "测试安装环境"
|
|
996
1162
|
}, null)
|
|
997
|
-
}),
|
|
1163
|
+
}), t(c("el-button"), {
|
|
998
1164
|
link: !0,
|
|
999
1165
|
type: "primary",
|
|
1000
1166
|
class: "custom-btn",
|
|
1001
|
-
onClick: () =>
|
|
1167
|
+
onClick: () => f(e.row)
|
|
1002
1168
|
}, {
|
|
1003
|
-
icon: () =>
|
|
1169
|
+
icon: () => t(c("tds-svg-icon"), {
|
|
1004
1170
|
name: "docker",
|
|
1005
1171
|
tip: "自动安装docker环境"
|
|
1006
1172
|
}, null)
|
|
1007
|
-
}),
|
|
1173
|
+
}), t(c("el-button"), {
|
|
1008
1174
|
link: !0,
|
|
1009
1175
|
type: "primary",
|
|
1010
1176
|
class: "custom-btn",
|
|
1011
|
-
onClick: () =>
|
|
1177
|
+
onClick: () => y(e.row)
|
|
1012
1178
|
}, {
|
|
1013
|
-
icon: () =>
|
|
1179
|
+
icon: () => t(c("tds-svg-icon"), {
|
|
1014
1180
|
name: "deployed",
|
|
1015
1181
|
tip: "部署"
|
|
1016
1182
|
}, null)
|
|
1017
|
-
}),
|
|
1183
|
+
}), t(c("el-button"), {
|
|
1018
1184
|
link: !0,
|
|
1019
1185
|
type: "danger",
|
|
1020
1186
|
icon: "Delete",
|
|
1021
|
-
title:
|
|
1022
|
-
onClick: () =>
|
|
1187
|
+
title: o("button.delete"),
|
|
1188
|
+
onClick: () => u([e.row])
|
|
1023
1189
|
}, null)])
|
|
1024
1190
|
}]);
|
|
1025
|
-
return (
|
|
1026
|
-
const
|
|
1027
|
-
return
|
|
1191
|
+
return (e, i) => {
|
|
1192
|
+
const B = c("el-button"), L = c("Delete"), d = c("el-icon"), T = c("el-table-column"), j = c("TdsTable");
|
|
1193
|
+
return h(), x("div", Ze, [t(j, {
|
|
1028
1194
|
ref_key: "refTdsTable",
|
|
1029
|
-
ref:
|
|
1195
|
+
ref: a,
|
|
1030
1196
|
columns: A,
|
|
1031
|
-
"request-api":
|
|
1197
|
+
"request-api": F(ie),
|
|
1032
1198
|
"search-col": 4,
|
|
1033
|
-
"init-param":
|
|
1034
|
-
options:
|
|
1199
|
+
"init-param": k,
|
|
1200
|
+
options: e.$tableOptions({
|
|
1201
|
+
refresh: {
|
|
1202
|
+
ssh_status: [1],
|
|
1203
|
+
check_env_ok: [1]
|
|
1204
|
+
}
|
|
1205
|
+
}),
|
|
1035
1206
|
"reserve-selection": ""
|
|
1036
1207
|
}, {
|
|
1037
|
-
tableHeader:
|
|
1208
|
+
tableHeader: b(() => [p("div", Qe, [t(B, {
|
|
1038
1209
|
class: "custom-btn",
|
|
1039
1210
|
type: "primary",
|
|
1040
1211
|
icon: "Plus",
|
|
1041
1212
|
plain: "",
|
|
1042
|
-
onClick: i[0] || (i[0] = (D) =>
|
|
1213
|
+
onClick: i[0] || (i[0] = (D) => g())
|
|
1043
1214
|
}, {
|
|
1044
|
-
default:
|
|
1215
|
+
default: b(() => [E(q(F(o)("button.add")), 1)]),
|
|
1045
1216
|
_: 1
|
|
1046
1217
|
})])]),
|
|
1047
|
-
default:
|
|
1218
|
+
default: b(() => [t(T, {
|
|
1048
1219
|
type: "expand"
|
|
1049
1220
|
}, {
|
|
1050
|
-
default:
|
|
1221
|
+
default: b((D) => [D.row.deployment_packages && D.row.deployment_packages.length > 0 ? (h(), x("div", Xe, [i[4] || (i[4] = p("div", {
|
|
1051
1222
|
class: "font-bold text-14px mt-12px"
|
|
1052
|
-
}, "已部署的探针包", -1)),
|
|
1053
|
-
key:
|
|
1054
|
-
class: "w-
|
|
1055
|
-
}, [
|
|
1223
|
+
}, "已部署的探针包", -1)), p("div", Ye, [(h(!0), x(z, null, G(D.row.deployment_packages, (C) => (h(), x("div", {
|
|
1224
|
+
key: C.id,
|
|
1225
|
+
class: "group w-25% px-20px py-10px rounded-8px bg-[var(--el-fill-color-light)] border border-solid border-[var(--el-border-color-lighter)] hover:shadow-lg transition-all duration-300 relative overflow-hidden"
|
|
1226
|
+
}, [p("div", {
|
|
1227
|
+
class: te(["absolute top-0 right-0 px-2 py-1 text-12px font-medium border-b border-l rounded-bl-8px", {
|
|
1228
|
+
"text-green-600 bg-green-50 border-green-200": C.deploy_type === 0,
|
|
1229
|
+
"text-amber-600 bg-amber-50 border-amber-200": C.deploy_type === 1,
|
|
1230
|
+
"text-red-600 bg-red-50 border-red-200": C.deploy_type === 2
|
|
1231
|
+
}])
|
|
1232
|
+
}, q(C.deploy_type === 0 ? "安装" : C.deploy_type === 1 ? "升级" : "卸载"), 3), p("div", et, q(C.file_name), 1), p("div", tt, [p("p", lt, [i[1] || (i[1] = p("span", {
|
|
1233
|
+
class: "opacity-70 mr-2"
|
|
1234
|
+
}, "版本:", -1)), E(" " + q(C.version), 1)]), p("p", ot, [i[2] || (i[2] = p("span", {
|
|
1235
|
+
class: "opacity-70 mr-2"
|
|
1236
|
+
}, "部署时间:", -1)), E(" " + q(C.deployment_time), 1)])]), p("div", rt, [t(B, {
|
|
1237
|
+
type: "danger",
|
|
1238
|
+
circle: "",
|
|
1239
|
+
class: "mb-2 transform scale-90 group-hover:scale-100 transition-transform duration-300",
|
|
1240
|
+
onClick: le((Z) => U(C), ["stop"])
|
|
1241
|
+
}, {
|
|
1242
|
+
default: b(() => [t(d, {
|
|
1243
|
+
size: "20"
|
|
1244
|
+
}, {
|
|
1245
|
+
default: b(() => [t(L)]),
|
|
1246
|
+
_: 1
|
|
1247
|
+
})]),
|
|
1248
|
+
_: 1
|
|
1249
|
+
}, 8, ["onClick"]), i[3] || (i[3] = p("span", {
|
|
1250
|
+
class: "text-white text-12px font-medium tracking-wide"
|
|
1251
|
+
}, "卸载", -1))])]))), 128))])])) : (h(), x("div", nt, "暂无部署服务器记录"))]),
|
|
1056
1252
|
_: 1
|
|
1057
1253
|
})]),
|
|
1058
1254
|
_: 1
|
|
1059
|
-
}, 8, ["columns", "request-api", "init-param", "options"]),
|
|
1255
|
+
}, 8, ["columns", "request-api", "init-param", "options"]), t(F(re), oe({
|
|
1060
1256
|
ref_key: "refTdsForm",
|
|
1061
|
-
ref:
|
|
1062
|
-
},
|
|
1063
|
-
title:
|
|
1064
|
-
form:
|
|
1257
|
+
ref: m
|
|
1258
|
+
}, e.$formBindProps({
|
|
1259
|
+
title: _.value,
|
|
1260
|
+
form: r.value,
|
|
1065
1261
|
columns: A,
|
|
1066
|
-
formKey:
|
|
1262
|
+
formKey: v.value
|
|
1067
1263
|
}), {
|
|
1068
|
-
onSubmit:
|
|
1264
|
+
onSubmit: R
|
|
1069
1265
|
}), null, 16)]);
|
|
1070
1266
|
};
|
|
1071
1267
|
}
|
|
1072
|
-
}),
|
|
1268
|
+
}), st = {
|
|
1073
1269
|
class: "table-box"
|
|
1074
|
-
},
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
}
|
|
1078
|
-
}, Ge = /* @__PURE__ */ K({
|
|
1270
|
+
}, it = {
|
|
1271
|
+
class: "whitespace-pre-wrap font-mono py-20px px-10px bg-gray-100 rounded text-sm text-gray-800"
|
|
1272
|
+
}, ut = /* @__PURE__ */ W({
|
|
1079
1273
|
__name: "index",
|
|
1080
|
-
setup(
|
|
1081
|
-
const
|
|
1274
|
+
setup(l) {
|
|
1275
|
+
const o = H({
|
|
1082
1276
|
service_type: window.$prodType
|
|
1083
|
-
}), a = H([{
|
|
1277
|
+
}), n = w(), a = H([{
|
|
1084
1278
|
field: "packages_name",
|
|
1085
1279
|
name: "探针包",
|
|
1086
|
-
render: (
|
|
1280
|
+
render: (_) => t(z, null, [t("p", {
|
|
1087
1281
|
class: "font-bold"
|
|
1088
|
-
}, [
|
|
1282
|
+
}, [_.row.packages_name]), t("p", {
|
|
1089
1283
|
class: "text-gray-400"
|
|
1090
|
-
}, [
|
|
1284
|
+
}, [_.row.packages_version])])
|
|
1091
1285
|
}, {
|
|
1092
1286
|
field: "server_name",
|
|
1093
1287
|
name: "服务器",
|
|
1094
|
-
render: (
|
|
1288
|
+
render: (_) => t(z, null, [t("p", {
|
|
1095
1289
|
class: "font-bold"
|
|
1096
|
-
}, [
|
|
1290
|
+
}, [_.row.server_name]), t("p", {
|
|
1097
1291
|
class: "text-gray-400"
|
|
1098
|
-
}, [
|
|
1292
|
+
}, [_.row.ip_address])])
|
|
1099
1293
|
}, {
|
|
1100
1294
|
field: "deployment_time",
|
|
1101
1295
|
name: "部署时间"
|
|
@@ -1104,9 +1298,13 @@ const L = {
|
|
|
1104
1298
|
name: "状态",
|
|
1105
1299
|
tag: !0,
|
|
1106
1300
|
enum: [{
|
|
1107
|
-
label: "
|
|
1301
|
+
label: "未知",
|
|
1302
|
+
value: -1,
|
|
1303
|
+
tagType: "default"
|
|
1304
|
+
}, {
|
|
1305
|
+
label: "待执行",
|
|
1108
1306
|
value: 0,
|
|
1109
|
-
tagType: "
|
|
1307
|
+
tagType: "default"
|
|
1110
1308
|
}, {
|
|
1111
1309
|
label: "部署中",
|
|
1112
1310
|
value: 1,
|
|
@@ -1115,30 +1313,39 @@ const L = {
|
|
|
1115
1313
|
label: "部署成功",
|
|
1116
1314
|
value: 2,
|
|
1117
1315
|
tagType: "success"
|
|
1316
|
+
}, {
|
|
1317
|
+
label: "部署失败",
|
|
1318
|
+
value: 3,
|
|
1319
|
+
tagType: "danger"
|
|
1118
1320
|
}]
|
|
1119
|
-
}])
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1321
|
+
}]), m = setInterval(() => {
|
|
1322
|
+
n.value && n.value.getTableList();
|
|
1323
|
+
}, 5e3);
|
|
1324
|
+
return pe(() => {
|
|
1325
|
+
clearInterval(m);
|
|
1326
|
+
}), (_, r) => {
|
|
1327
|
+
const v = c("el-table-column"), k = c("TdsTable");
|
|
1328
|
+
return h(), x("div", st, [t(k, {
|
|
1329
|
+
ref_key: "refTdsTable",
|
|
1330
|
+
ref: n,
|
|
1124
1331
|
columns: a,
|
|
1125
1332
|
"search-col": 4,
|
|
1126
|
-
"request-api":
|
|
1127
|
-
options:
|
|
1128
|
-
"init-param":
|
|
1333
|
+
"request-api": F(Ue),
|
|
1334
|
+
options: _.$tableOptions(),
|
|
1335
|
+
"init-param": o,
|
|
1129
1336
|
"reserve-selection": ""
|
|
1130
1337
|
}, {
|
|
1131
|
-
default:
|
|
1338
|
+
default: b(() => [t(v, {
|
|
1132
1339
|
type: "expand"
|
|
1133
1340
|
}, {
|
|
1134
|
-
default:
|
|
1341
|
+
default: b((g) => [p("div", it, q(g.row.deployment_log), 1)]),
|
|
1135
1342
|
_: 1
|
|
1136
1343
|
})]),
|
|
1137
1344
|
_: 1
|
|
1138
1345
|
}, 8, ["columns", "request-api", "options", "init-param"])]);
|
|
1139
1346
|
};
|
|
1140
1347
|
}
|
|
1141
|
-
}),
|
|
1348
|
+
}), dt = { class: "main-wrapper" }, pt = /* @__PURE__ */ W({
|
|
1142
1349
|
name: "TCProbe",
|
|
1143
1350
|
__name: "index",
|
|
1144
1351
|
props: {
|
|
@@ -1147,44 +1354,44 @@ const L = {
|
|
|
1147
1354
|
default: ""
|
|
1148
1355
|
}
|
|
1149
1356
|
},
|
|
1150
|
-
setup(
|
|
1151
|
-
const
|
|
1152
|
-
return (
|
|
1153
|
-
const
|
|
1154
|
-
return
|
|
1155
|
-
|
|
1156
|
-
modelValue:
|
|
1157
|
-
"onUpdate:modelValue":
|
|
1357
|
+
setup(l) {
|
|
1358
|
+
const o = w("package");
|
|
1359
|
+
return (n, a) => {
|
|
1360
|
+
const m = c("el-tab-pane"), _ = c("el-tabs");
|
|
1361
|
+
return h(), x("div", dt, [
|
|
1362
|
+
t(_, {
|
|
1363
|
+
modelValue: o.value,
|
|
1364
|
+
"onUpdate:modelValue": a[0] || (a[0] = (r) => o.value = r),
|
|
1158
1365
|
class: "demo-tabs"
|
|
1159
1366
|
}, {
|
|
1160
|
-
default:
|
|
1161
|
-
|
|
1367
|
+
default: b(() => [
|
|
1368
|
+
t(m, {
|
|
1162
1369
|
label: "安装包管理",
|
|
1163
1370
|
name: "package"
|
|
1164
1371
|
}, {
|
|
1165
|
-
default:
|
|
1166
|
-
|
|
1372
|
+
default: b(() => [
|
|
1373
|
+
o.value === "package" ? (h(), Q(Je, {
|
|
1167
1374
|
key: 0,
|
|
1168
|
-
token:
|
|
1169
|
-
}, null, 8, ["token"])) :
|
|
1375
|
+
token: l.token
|
|
1376
|
+
}, null, 8, ["token"])) : K("", !0)
|
|
1170
1377
|
]),
|
|
1171
1378
|
_: 1
|
|
1172
1379
|
}),
|
|
1173
|
-
|
|
1380
|
+
t(m, {
|
|
1174
1381
|
label: "探针部署",
|
|
1175
1382
|
name: "deploy"
|
|
1176
1383
|
}, {
|
|
1177
|
-
default:
|
|
1178
|
-
|
|
1384
|
+
default: b(() => [
|
|
1385
|
+
o.value === "deploy" ? (h(), Q(at, { key: 0 })) : K("", !0)
|
|
1179
1386
|
]),
|
|
1180
1387
|
_: 1
|
|
1181
1388
|
}),
|
|
1182
|
-
|
|
1389
|
+
t(m, {
|
|
1183
1390
|
label: "部署历史",
|
|
1184
1391
|
name: "history"
|
|
1185
1392
|
}, {
|
|
1186
|
-
default:
|
|
1187
|
-
|
|
1393
|
+
default: b(() => [
|
|
1394
|
+
o.value === "history" ? (h(), Q(ut, { key: 0 })) : K("", !0)
|
|
1188
1395
|
]),
|
|
1189
1396
|
_: 1
|
|
1190
1397
|
})
|
|
@@ -1195,24 +1402,24 @@ const L = {
|
|
|
1195
1402
|
};
|
|
1196
1403
|
}
|
|
1197
1404
|
});
|
|
1198
|
-
const
|
|
1199
|
-
if (
|
|
1200
|
-
for (const
|
|
1201
|
-
|
|
1202
|
-
},
|
|
1203
|
-
for (const [
|
|
1204
|
-
|
|
1205
|
-
return
|
|
1206
|
-
},
|
|
1207
|
-
TCProbe:
|
|
1208
|
-
},
|
|
1209
|
-
install(
|
|
1210
|
-
Object.entries(
|
|
1211
|
-
|
|
1212
|
-
}),
|
|
1405
|
+
const ct = /* @__PURE__ */ ne(pt, [["__scopeId", "data-v-f99b9b23"]]), mt = (l, o) => {
|
|
1406
|
+
if (l.install = (n) => {
|
|
1407
|
+
for (const a of [l, ...Object.values(o ?? {})])
|
|
1408
|
+
n.component(a.name, a);
|
|
1409
|
+
}, o)
|
|
1410
|
+
for (const [n, a] of Object.entries(o))
|
|
1411
|
+
l[n] = a;
|
|
1412
|
+
return l;
|
|
1413
|
+
}, _t = mt(ct), yt = {
|
|
1414
|
+
TCProbe: _t
|
|
1415
|
+
}, wt = {
|
|
1416
|
+
install(l, o) {
|
|
1417
|
+
Object.entries(yt).forEach(([n, a]) => {
|
|
1418
|
+
l.component(n, a);
|
|
1419
|
+
}), o != null && o.prodType && (window.$prodType = o.prodType), o != null && o.envURL && (window.$probeURL = o.envURL), o != null && o.dockerURL && (window.$dockerURL = o.dockerURL);
|
|
1213
1420
|
}
|
|
1214
1421
|
};
|
|
1215
1422
|
export {
|
|
1216
|
-
|
|
1217
|
-
|
|
1423
|
+
_t as TCProbe,
|
|
1424
|
+
wt as default
|
|
1218
1425
|
};
|