@topdatasec/probe 1.0.5 → 1.0.7
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/t-probe-ui.es.js +433 -423
- package/lib/t-probe-ui.umd.js +1 -1
- package/package.json +1 -1
package/lib/t-probe-ui.es.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { CircleClose as
|
|
3
|
-
import { TdsTable as
|
|
4
|
-
import
|
|
5
|
-
import { ElMessage as
|
|
6
|
-
const
|
|
1
|
+
import { defineComponent as K, useModel as re, resolveComponent as d, openBlock as y, createElementBlock as x, Fragment as B, renderList as W, createVNode as e, withCtx as T, unref as q, createCommentVNode as O, ref as w, reactive as H, createTextVNode as F, createElementVNode as f, toDisplayString as C, mergeProps as Y, createBlock as G } from "vue";
|
|
2
|
+
import { CircleClose as ae, UploadFilled as se } from "@element-plus/icons-vue";
|
|
3
|
+
import { TdsTable as ue, TdsForm as ee } from "topdatasec-ui";
|
|
4
|
+
import ie from "spark-md5";
|
|
5
|
+
import { ElMessage as X } from "element-plus";
|
|
6
|
+
const pe = {
|
|
7
7
|
key: 0,
|
|
8
8
|
class: "absolute right--13px text-#f56c6c hover:cursor-pointer"
|
|
9
|
-
}, de = /* @__PURE__ */
|
|
9
|
+
}, de = /* @__PURE__ */ K({
|
|
10
10
|
__name: "IpPortList",
|
|
11
11
|
props: {
|
|
12
12
|
modelValue: { default: () => [{ ip: "", port: "" }] },
|
|
@@ -14,114 +14,114 @@ const ie = {
|
|
|
14
14
|
},
|
|
15
15
|
emits: ["update:modelValue"],
|
|
16
16
|
setup(t) {
|
|
17
|
-
const l =
|
|
18
|
-
function
|
|
17
|
+
const l = re(t, "modelValue"), { $t: a } = window;
|
|
18
|
+
function r() {
|
|
19
19
|
l.value = [...l.value, { ip: "", port: "" }];
|
|
20
20
|
}
|
|
21
|
-
function
|
|
22
|
-
const
|
|
23
|
-
|
|
21
|
+
function c(v) {
|
|
22
|
+
const n = [...l.value];
|
|
23
|
+
n.splice(v, 1), l.value = n;
|
|
24
24
|
}
|
|
25
|
-
return (v,
|
|
26
|
-
const
|
|
27
|
-
return
|
|
28
|
-
(
|
|
29
|
-
key:
|
|
25
|
+
return (v, n) => {
|
|
26
|
+
const m = d("el-input"), E = d("el-form-item"), b = d("el-icon"), s = d("el-button");
|
|
27
|
+
return y(), x("div", null, [
|
|
28
|
+
(y(!0), x(B, null, W(l.value, (p, $) => (y(), x("div", {
|
|
29
|
+
key: $,
|
|
30
30
|
class: "flex form-m0 w-100% mb-5px"
|
|
31
31
|
}, [
|
|
32
|
-
e(
|
|
33
|
-
default:
|
|
34
|
-
e(
|
|
35
|
-
modelValue:
|
|
36
|
-
"onUpdate:modelValue": (
|
|
32
|
+
e(E, { class: "w-70%" }, {
|
|
33
|
+
default: T(() => [
|
|
34
|
+
e(m, {
|
|
35
|
+
modelValue: p.ip,
|
|
36
|
+
"onUpdate:modelValue": (M) => p.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
|
-
e(
|
|
44
|
-
default:
|
|
45
|
-
e(
|
|
46
|
-
modelValue:
|
|
47
|
-
"onUpdate:modelValue": (
|
|
43
|
+
e(E, { class: "ml-auto w-30%" }, {
|
|
44
|
+
default: T(() => [
|
|
45
|
+
e(m, {
|
|
46
|
+
modelValue: p.port,
|
|
47
|
+
"onUpdate:modelValue": (M) => p.port = M,
|
|
48
48
|
class: "ml-10",
|
|
49
|
-
placeholder:
|
|
49
|
+
placeholder: q(a)("global.port")
|
|
50
50
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])
|
|
51
51
|
]),
|
|
52
52
|
_: 2
|
|
53
53
|
}, 1024),
|
|
54
|
-
l.value.length > 1 ? (
|
|
55
|
-
e(
|
|
56
|
-
onClick: (
|
|
54
|
+
l.value.length > 1 ? (y(), x("div", pe, [
|
|
55
|
+
e(b, {
|
|
56
|
+
onClick: (M) => c($)
|
|
57
57
|
}, {
|
|
58
|
-
default:
|
|
59
|
-
e(
|
|
58
|
+
default: T(() => [
|
|
59
|
+
e(q(ae))
|
|
60
60
|
]),
|
|
61
61
|
_: 1
|
|
62
62
|
}, 8, ["onClick"])
|
|
63
63
|
])) : O("", !0)
|
|
64
64
|
]))), 128)),
|
|
65
|
-
e(
|
|
65
|
+
e(s, {
|
|
66
66
|
class: "w-100% mt-10px border-dashed!",
|
|
67
67
|
icon: "Plus",
|
|
68
|
-
onClick:
|
|
68
|
+
onClick: r
|
|
69
69
|
})
|
|
70
70
|
]);
|
|
71
71
|
};
|
|
72
72
|
}
|
|
73
73
|
});
|
|
74
|
-
const
|
|
75
|
-
const
|
|
76
|
-
for (const [
|
|
77
|
-
|
|
78
|
-
return
|
|
79
|
-
},
|
|
80
|
-
function
|
|
81
|
-
return new Promise((
|
|
82
|
-
const
|
|
83
|
-
let
|
|
84
|
-
v.onload = (
|
|
85
|
-
var
|
|
86
|
-
if (
|
|
87
|
-
const
|
|
88
|
-
l(
|
|
74
|
+
const te = (t, l) => {
|
|
75
|
+
const a = t.__vccOpts || t;
|
|
76
|
+
for (const [r, c] of l)
|
|
77
|
+
a[r] = c;
|
|
78
|
+
return a;
|
|
79
|
+
}, V = /* @__PURE__ */ te(de, [["__scopeId", "data-v-16fc9c64"]]), P = 5 * 1024 * 1024;
|
|
80
|
+
function ce(t, l) {
|
|
81
|
+
return new Promise((a, r) => {
|
|
82
|
+
const c = new ie.ArrayBuffer(), v = new FileReader(), n = Math.ceil(t.size / P);
|
|
83
|
+
let m = 0;
|
|
84
|
+
v.onload = (b) => {
|
|
85
|
+
var s;
|
|
86
|
+
if (c.append((s = b.target) == null ? void 0 : s.result), m++, l) {
|
|
87
|
+
const p = Math.floor(m / n * 100);
|
|
88
|
+
l(p);
|
|
89
89
|
}
|
|
90
|
-
if (
|
|
91
|
-
|
|
90
|
+
if (m < n)
|
|
91
|
+
E();
|
|
92
92
|
else {
|
|
93
|
-
const
|
|
94
|
-
|
|
93
|
+
const p = c.end();
|
|
94
|
+
a(p);
|
|
95
95
|
}
|
|
96
96
|
}, v.onerror = () => {
|
|
97
|
-
|
|
97
|
+
r(new Error("MD5计算失败"));
|
|
98
98
|
};
|
|
99
|
-
function
|
|
100
|
-
const
|
|
101
|
-
v.readAsArrayBuffer(t.slice(
|
|
99
|
+
function E() {
|
|
100
|
+
const b = m * P, s = Math.min(b + P, t.size);
|
|
101
|
+
v.readAsArrayBuffer(t.slice(b, s));
|
|
102
102
|
}
|
|
103
|
-
|
|
103
|
+
E();
|
|
104
104
|
});
|
|
105
105
|
}
|
|
106
|
-
async function
|
|
107
|
-
const
|
|
108
|
-
|
|
106
|
+
async function me(t, l, a, r, c, v = "/api/upload/chunk") {
|
|
107
|
+
const n = l * P, m = Math.min(n + P, t.size), E = t.slice(n, m), b = m - n, s = new FormData();
|
|
108
|
+
s.append("file", E, t.name), s.append("chunkIndex", String(l + 1)), s.append("totalChunkNum", String(a)), s.append("fileMd5", r), s.append("tds_token", c), s.append("fileName", t.name), s.append("fileSize", String(t.size)), s.append("fileExt", t.name.substring(t.name.lastIndexOf(".") + 1)), s.append("chunkSize", String(P)), s.append("currentChunkSize", String(b));
|
|
109
109
|
try {
|
|
110
|
-
const
|
|
110
|
+
const p = await fetch(v, {
|
|
111
111
|
method: "POST",
|
|
112
|
-
body:
|
|
112
|
+
body: s
|
|
113
113
|
});
|
|
114
|
-
if (console.log(
|
|
115
|
-
throw new Error(`分片 ${l + 1} 上传失败,HTTP状态码: ${
|
|
116
|
-
const
|
|
117
|
-
if (console.log(
|
|
118
|
-
throw new Error(`上传失败: ${
|
|
114
|
+
if (console.log(p, "upload response"), !p.ok)
|
|
115
|
+
throw new Error(`分片 ${l + 1} 上传失败,HTTP状态码: ${p.status}`);
|
|
116
|
+
const $ = await p.json();
|
|
117
|
+
if (console.log($, "upload result"), $.recode !== 0)
|
|
118
|
+
throw new Error(`上传失败: ${$.remsg || "未知错误"}`);
|
|
119
119
|
return !0;
|
|
120
|
-
} catch (
|
|
121
|
-
throw console.error(`上传分片 ${l + 1} 时出错:`,
|
|
120
|
+
} catch (p) {
|
|
121
|
+
throw console.error(`上传分片 ${l + 1} 时出错:`, p), p;
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
|
-
async function
|
|
124
|
+
async function _e(t, l = "/api/upload/merge") {
|
|
125
125
|
try {
|
|
126
126
|
if (!(await fetch(l, {
|
|
127
127
|
method: "POST",
|
|
@@ -132,167 +132,167 @@ async function me(t, l = "/api/upload/merge") {
|
|
|
132
132
|
})).ok)
|
|
133
133
|
throw new Error("文件合并失败");
|
|
134
134
|
return !0;
|
|
135
|
-
} catch (
|
|
136
|
-
return console.error("合并分片时出错:",
|
|
135
|
+
} catch (a) {
|
|
136
|
+
return console.error("合并分片时出错:", a), !1;
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
|
-
async function
|
|
140
|
-
const { token: l, file:
|
|
139
|
+
async function fe(t) {
|
|
140
|
+
const { token: l, file: a, fileDesc: r = "", uploadUrl: c = "/api/upload/chunk", mergeUrl: v = "/api/upload/merge", onProgress: n, onSuccess: m, onError: E } = t;
|
|
141
141
|
try {
|
|
142
|
-
|
|
142
|
+
n == null || n({
|
|
143
143
|
progress: 0,
|
|
144
144
|
statusText: "正在计算文件MD5...",
|
|
145
145
|
status: "preparing"
|
|
146
146
|
});
|
|
147
|
-
const
|
|
148
|
-
|
|
149
|
-
progress: Math.floor(
|
|
147
|
+
const s = await ce(a, (S) => {
|
|
148
|
+
n == null || n({
|
|
149
|
+
progress: Math.floor(S * 0.1),
|
|
150
150
|
// MD5计算占10%进度
|
|
151
|
-
statusText: `正在计算文件MD5... ${
|
|
151
|
+
statusText: `正在计算文件MD5... ${S}%`,
|
|
152
152
|
status: "preparing"
|
|
153
153
|
});
|
|
154
154
|
});
|
|
155
|
-
|
|
155
|
+
n == null || n({
|
|
156
156
|
progress: 10,
|
|
157
157
|
statusText: "MD5计算完成",
|
|
158
158
|
status: "preparing",
|
|
159
|
-
fileMd5:
|
|
159
|
+
fileMd5: s
|
|
160
160
|
});
|
|
161
|
-
const
|
|
162
|
-
|
|
161
|
+
const p = Math.ceil(a.size / P);
|
|
162
|
+
n == null || n({
|
|
163
163
|
progress: 10,
|
|
164
|
-
statusText: `开始上传 (共${
|
|
164
|
+
statusText: `开始上传 (共${p}个分片)`,
|
|
165
165
|
status: "uploading",
|
|
166
|
-
fileMd5:
|
|
166
|
+
fileMd5: s
|
|
167
167
|
});
|
|
168
|
-
for (let
|
|
169
|
-
const
|
|
170
|
-
|
|
171
|
-
progress: 10 +
|
|
172
|
-
statusText: `正在上传分片 ${
|
|
168
|
+
for (let S = 0; S < p; S++) {
|
|
169
|
+
const U = Math.floor(S / p * 80);
|
|
170
|
+
n == null || n({
|
|
171
|
+
progress: 10 + U,
|
|
172
|
+
statusText: `正在上传分片 ${S + 1}/${p}`,
|
|
173
173
|
status: "uploading",
|
|
174
|
-
fileMd5:
|
|
175
|
-
}), await
|
|
174
|
+
fileMd5: s
|
|
175
|
+
}), await me(a, S, p, s, l, c);
|
|
176
176
|
}
|
|
177
|
-
|
|
177
|
+
n == null || n({
|
|
178
178
|
progress: 90,
|
|
179
179
|
statusText: "正在合并文件...",
|
|
180
180
|
status: "merging",
|
|
181
|
-
fileMd5:
|
|
181
|
+
fileMd5: s
|
|
182
182
|
});
|
|
183
|
-
const
|
|
184
|
-
fileDesc:
|
|
185
|
-
fileExt:
|
|
186
|
-
fileMd5:
|
|
187
|
-
fileName:
|
|
188
|
-
fileSize: String(
|
|
183
|
+
const $ = a.name.substring(a.name.lastIndexOf(".") + 1), M = {
|
|
184
|
+
fileDesc: r,
|
|
185
|
+
fileExt: $,
|
|
186
|
+
fileMd5: s,
|
|
187
|
+
fileName: a.name,
|
|
188
|
+
fileSize: String(a.size),
|
|
189
189
|
tds_token: l,
|
|
190
|
-
totalChunkNum: String(
|
|
190
|
+
totalChunkNum: String(p)
|
|
191
191
|
};
|
|
192
|
-
if (!await
|
|
192
|
+
if (!await _e(M, v))
|
|
193
193
|
throw new Error("文件合并失败");
|
|
194
|
-
|
|
194
|
+
n == null || n({
|
|
195
195
|
progress: 100,
|
|
196
196
|
statusText: "上传成功",
|
|
197
197
|
status: "success",
|
|
198
|
-
fileMd5:
|
|
199
|
-
}),
|
|
200
|
-
} catch (
|
|
201
|
-
|
|
198
|
+
fileMd5: s
|
|
199
|
+
}), X.success(`${a.name} 上传成功`), m == null || m(s);
|
|
200
|
+
} catch (b) {
|
|
201
|
+
n == null || n({
|
|
202
202
|
progress: 0,
|
|
203
|
-
statusText:
|
|
203
|
+
statusText: b.message || "上传失败",
|
|
204
204
|
status: "error"
|
|
205
|
-
}),
|
|
205
|
+
}), X.error(`${a.name} 上传失败: ${b.message}`), E == null || E(b);
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
|
-
function
|
|
208
|
+
function ye(t) {
|
|
209
209
|
if (t === 0)
|
|
210
210
|
return "0 B";
|
|
211
|
-
const l = 1024,
|
|
212
|
-
return Math.round(t / Math.pow(l,
|
|
211
|
+
const l = 1024, a = ["B", "KB", "MB", "GB", "TB"], r = Math.floor(Math.log(t) / Math.log(l));
|
|
212
|
+
return Math.round(t / Math.pow(l, r) * 100) / 100 + " " + a[r];
|
|
213
213
|
}
|
|
214
|
-
const
|
|
214
|
+
const L = {
|
|
215
215
|
get deployURL() {
|
|
216
216
|
return window.$probeURL || "";
|
|
217
217
|
}
|
|
218
|
-
},
|
|
219
|
-
url: `${
|
|
218
|
+
}, le = (t = {}) => window.$http.request({
|
|
219
|
+
url: `${L.deployURL}/service_deploy/deployment/deploy`,
|
|
220
220
|
method: "post",
|
|
221
221
|
data: t
|
|
222
222
|
}), ve = (t = {}) => window.$http.request({
|
|
223
|
-
url: `${
|
|
223
|
+
url: `${L.deployURL}/service_deploy/deployment/servers/add`,
|
|
224
224
|
method: "post",
|
|
225
225
|
data: t
|
|
226
|
-
}),
|
|
227
|
-
url: `${
|
|
226
|
+
}), oe = (t = {}) => window.$http.request({
|
|
227
|
+
url: `${L.deployURL}/service_deploy/deployment/packages/get`,
|
|
228
228
|
method: "post",
|
|
229
229
|
data: t,
|
|
230
230
|
isError: !1
|
|
231
|
-
}),
|
|
232
|
-
url: `${
|
|
231
|
+
}), ne = (t = {}) => window.$http.request({
|
|
232
|
+
url: `${L.deployURL}/service_deploy/deployment/servers/get`,
|
|
233
233
|
method: "post",
|
|
234
234
|
data: t,
|
|
235
235
|
isError: !1
|
|
236
|
-
}), ye = (t = {}) => window.$http.request({
|
|
237
|
-
url: `${M.deployURL}/service_deploy/deployment/servers/del`,
|
|
238
|
-
method: "post",
|
|
239
|
-
data: t
|
|
240
236
|
}), ge = (t = {}) => window.$http.request({
|
|
241
|
-
url: `${
|
|
237
|
+
url: `${L.deployURL}/service_deploy/deployment/servers/del`,
|
|
242
238
|
method: "post",
|
|
243
239
|
data: t
|
|
244
240
|
}), he = (t = {}) => window.$http.request({
|
|
245
|
-
url: `${
|
|
241
|
+
url: `${L.deployURL}/service_deploy/deployment/packages/del`,
|
|
246
242
|
method: "post",
|
|
247
|
-
data: t
|
|
248
|
-
isError: !1
|
|
243
|
+
data: t
|
|
249
244
|
}), be = (t = {}) => window.$http.request({
|
|
250
|
-
url: `${
|
|
245
|
+
url: `${L.deployURL}/service_deploy/deployment/servers/get_arch`,
|
|
251
246
|
method: "post",
|
|
252
247
|
data: t,
|
|
253
248
|
isError: !1
|
|
254
249
|
}), we = (t = {}) => window.$http.request({
|
|
255
|
-
url: `${
|
|
250
|
+
url: `${L.deployURL}/service_deploy/deployment/deployment_history/get`,
|
|
256
251
|
method: "post",
|
|
257
|
-
data: t
|
|
252
|
+
data: t,
|
|
253
|
+
isError: !1
|
|
258
254
|
}), xe = (t = {}) => window.$http.request({
|
|
259
|
-
url: `${
|
|
255
|
+
url: `${L.deployURL}/service_deploy/deployment/servers/test_ssh`,
|
|
260
256
|
method: "post",
|
|
261
257
|
data: t
|
|
262
258
|
}), ke = (t = {}) => window.$http.request({
|
|
263
|
-
url: `${
|
|
259
|
+
url: `${L.deployURL}/service_deploy/deployment/servers/check_env`,
|
|
264
260
|
method: "post",
|
|
265
261
|
data: t
|
|
266
|
-
}), Te = {
|
|
262
|
+
}), Te = (t = {}) => window.$http.request({
|
|
263
|
+
url: `${L.deployURL}/service_deploy/deployment/servers/install_env`,
|
|
264
|
+
method: "post",
|
|
265
|
+
data: t
|
|
266
|
+
}), $e = {
|
|
267
267
|
class: "h-100%"
|
|
268
|
-
},
|
|
268
|
+
}, Ee = {
|
|
269
269
|
key: 0,
|
|
270
270
|
class: "upload-progress-list"
|
|
271
|
-
}, Ee = {
|
|
272
|
-
class: "file-info"
|
|
273
271
|
}, Se = {
|
|
274
|
-
class: "file-
|
|
272
|
+
class: "file-info"
|
|
275
273
|
}, Ue = {
|
|
276
|
-
class: "file-
|
|
274
|
+
class: "file-name"
|
|
277
275
|
}, Le = {
|
|
278
|
-
class: "
|
|
276
|
+
class: "file-size"
|
|
279
277
|
}, Me = {
|
|
278
|
+
class: "progress-text"
|
|
279
|
+
}, Ce = {
|
|
280
280
|
class: "table-box h-[calc(100%-220px)]",
|
|
281
281
|
style: {
|
|
282
282
|
height: "calc(100% - 220px)"
|
|
283
283
|
}
|
|
284
|
-
}, Ce = {
|
|
285
|
-
key: 0
|
|
286
284
|
}, qe = {
|
|
287
|
-
|
|
285
|
+
key: 0
|
|
288
286
|
}, Ae = {
|
|
289
|
-
class: "
|
|
287
|
+
class: "flex flex-wrap gap-12px p-12px"
|
|
290
288
|
}, Fe = {
|
|
291
|
-
class: "text-
|
|
289
|
+
class: "font-bold text-14px mb-8px text-[var(--el-text-color-primary)]"
|
|
292
290
|
}, Be = {
|
|
291
|
+
class: "text-12px text-[var(--el-text-color-regular)] space-y-4px"
|
|
292
|
+
}, De = {
|
|
293
293
|
key: 1,
|
|
294
294
|
class: "font-bold text-center text-gray-500 py-20"
|
|
295
|
-
},
|
|
295
|
+
}, Ne = /* @__PURE__ */ K({
|
|
296
296
|
__name: "index",
|
|
297
297
|
props: {
|
|
298
298
|
token: {
|
|
@@ -301,73 +301,76 @@ const M = {
|
|
|
301
301
|
}
|
|
302
302
|
},
|
|
303
303
|
setup(t) {
|
|
304
|
-
const l =
|
|
304
|
+
const l = w(), a = w(), r = w("快速部署"), c = w({}), {
|
|
305
305
|
$t: v,
|
|
306
|
-
$messageBox:
|
|
307
|
-
} = window,
|
|
308
|
-
function
|
|
309
|
-
|
|
310
|
-
id:
|
|
311
|
-
},
|
|
306
|
+
$messageBox: n
|
|
307
|
+
} = window, m = t;
|
|
308
|
+
function E(u) {
|
|
309
|
+
c.value = {
|
|
310
|
+
id: u.id
|
|
311
|
+
}, a.value.open();
|
|
312
312
|
}
|
|
313
|
-
const
|
|
313
|
+
const b = w([{
|
|
314
314
|
ip: "",
|
|
315
315
|
port: ""
|
|
316
|
-
}]),
|
|
316
|
+
}]), s = w([{
|
|
317
317
|
ip: "",
|
|
318
318
|
port: ""
|
|
319
|
-
}]),
|
|
319
|
+
}]), p = w([{
|
|
320
320
|
ip: "",
|
|
321
321
|
port: ""
|
|
322
|
-
}]),
|
|
322
|
+
}]), $ = w([{
|
|
323
323
|
ip: "",
|
|
324
324
|
port: ""
|
|
325
325
|
}]);
|
|
326
|
-
async function
|
|
327
|
-
const
|
|
328
|
-
const
|
|
326
|
+
async function M(u) {
|
|
327
|
+
const g = (o, i) => {
|
|
328
|
+
const _ = Math.max(o.length, i.length);
|
|
329
329
|
return Array.from({
|
|
330
|
-
length:
|
|
331
|
-
}, (
|
|
332
|
-
var D,
|
|
330
|
+
length: _
|
|
331
|
+
}, (h, k) => {
|
|
332
|
+
var D, N, z, R;
|
|
333
333
|
return {
|
|
334
|
-
src_ip: ((D =
|
|
335
|
-
src_port: Number((
|
|
336
|
-
dst_ip: ((
|
|
337
|
-
dst_port: Number((R =
|
|
334
|
+
src_ip: ((D = o[k]) == null ? void 0 : D.ip) || "",
|
|
335
|
+
src_port: Number((N = o[k]) == null ? void 0 : N.port) || 0,
|
|
336
|
+
dst_ip: ((z = i[k]) == null ? void 0 : z.ip) || "",
|
|
337
|
+
dst_port: Number((R = i[k]) == null ? void 0 : R.port) || 0
|
|
338
338
|
};
|
|
339
339
|
});
|
|
340
|
-
},
|
|
341
|
-
packages_id: [
|
|
342
|
-
server_id:
|
|
340
|
+
}, A = {
|
|
341
|
+
packages_id: [c.value.id],
|
|
342
|
+
server_id: u.server_id,
|
|
343
343
|
service_type: window.$prodType,
|
|
344
344
|
deploy_params: {
|
|
345
|
-
probe_name:
|
|
346
|
-
collection_mode:
|
|
347
|
-
interface:
|
|
348
|
-
engine_ip:
|
|
349
|
-
engine_port:
|
|
350
|
-
filterWhitelist: b
|
|
351
|
-
filterBlacklist:
|
|
345
|
+
probe_name: u.probe_name || "",
|
|
346
|
+
collection_mode: u.collection_mode,
|
|
347
|
+
interface: u.interface || "",
|
|
348
|
+
engine_ip: u.engine_ip || "",
|
|
349
|
+
engine_port: u.engine_port || "",
|
|
350
|
+
filterWhitelist: g(b.value, s.value),
|
|
351
|
+
filterBlacklist: g(p.value, $.value)
|
|
352
352
|
}
|
|
353
353
|
};
|
|
354
|
-
await
|
|
355
|
-
data:
|
|
356
|
-
}), l.value.getTableList(),
|
|
354
|
+
await le({
|
|
355
|
+
data: A
|
|
356
|
+
}), l.value.getTableList(), a.value.close();
|
|
357
357
|
}
|
|
358
|
-
async function I(
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
358
|
+
async function I(u) {
|
|
359
|
+
n(u, "file_name", v("button.delete"), "error").then(async () => {
|
|
360
|
+
const g = u.map((A) => A.id);
|
|
361
|
+
await he({
|
|
362
|
+
data: g
|
|
362
363
|
}), l.value.getTableList();
|
|
363
364
|
});
|
|
364
365
|
}
|
|
365
|
-
const
|
|
366
|
+
const S = H([
|
|
366
367
|
// { type: 'selection', align: 'center', field: 'id', hide: true },
|
|
367
368
|
{
|
|
368
369
|
field: "server_id",
|
|
369
370
|
name: "选择服务器",
|
|
370
|
-
enum:
|
|
371
|
+
enum: () => ne({
|
|
372
|
+
service_type: window.$prodType
|
|
373
|
+
}),
|
|
371
374
|
fieldNames: {
|
|
372
375
|
value: "id",
|
|
373
376
|
label: "server_name"
|
|
@@ -403,9 +406,9 @@ const M = {
|
|
|
403
406
|
{
|
|
404
407
|
field: "deployment_server",
|
|
405
408
|
name: "已部署服务器数",
|
|
406
|
-
render: (
|
|
407
|
-
var
|
|
408
|
-
return ((
|
|
409
|
+
render: (u) => {
|
|
410
|
+
var g;
|
|
411
|
+
return ((g = u.row.deployment_server) == null ? void 0 : g.length) || 0;
|
|
409
412
|
}
|
|
410
413
|
},
|
|
411
414
|
{
|
|
@@ -492,16 +495,16 @@ const M = {
|
|
|
492
495
|
style: "width: 100%"
|
|
493
496
|
}, [e("p", {
|
|
494
497
|
class: "color-[var(--el-text-color-regular)]"
|
|
495
|
-
}, [F("源ip端口:")]), e(
|
|
496
|
-
modelValue:
|
|
497
|
-
"onUpdate:modelValue": (
|
|
498
|
+
}, [F("源ip端口:")]), e(V, {
|
|
499
|
+
modelValue: b.value,
|
|
500
|
+
"onUpdate:modelValue": (u) => b.value = u
|
|
498
501
|
}, null)]), e("div", {
|
|
499
502
|
style: "width: 100%"
|
|
500
503
|
}, [e("p", {
|
|
501
504
|
class: "color-[var(--el-text-color-regular)]"
|
|
502
|
-
}, [F("目的ip端口:")]), e(
|
|
503
|
-
modelValue:
|
|
504
|
-
"onUpdate:modelValue": (
|
|
505
|
+
}, [F("目的ip端口:")]), e(V, {
|
|
506
|
+
modelValue: s.value,
|
|
507
|
+
"onUpdate:modelValue": (u) => s.value = u
|
|
505
508
|
}, null)])])
|
|
506
509
|
},
|
|
507
510
|
hide: !0
|
|
@@ -514,14 +517,14 @@ const M = {
|
|
|
514
517
|
tooltip: "黑名单配置后,将不再采集黑名单内相关流量",
|
|
515
518
|
render: () => e(B, null, [e("p", {
|
|
516
519
|
class: "color-[var(--el-text-color-regular)]"
|
|
517
|
-
}, [F("源ip端口:")]), e(
|
|
518
|
-
modelValue:
|
|
519
|
-
"onUpdate:modelValue": (
|
|
520
|
+
}, [F("源ip端口:")]), e(V, {
|
|
521
|
+
modelValue: p.value,
|
|
522
|
+
"onUpdate:modelValue": (u) => p.value = u
|
|
520
523
|
}, null), e("p", {
|
|
521
524
|
class: "color-[var(--el-text-color-regular)]"
|
|
522
|
-
}, [F("目的ip端口:")]), e(
|
|
523
|
-
modelValue:
|
|
524
|
-
"onUpdate:modelValue": (
|
|
525
|
+
}, [F("目的ip端口:")]), e(V, {
|
|
526
|
+
modelValue: $.value,
|
|
527
|
+
"onUpdate:modelValue": (u) => $.value = u
|
|
525
528
|
}, null)])
|
|
526
529
|
},
|
|
527
530
|
hide: !0
|
|
@@ -531,229 +534,232 @@ const M = {
|
|
|
531
534
|
name: window.$t("global.operate"),
|
|
532
535
|
width: 140,
|
|
533
536
|
fixed: "right",
|
|
534
|
-
render: (
|
|
537
|
+
render: (u) => e("div", null, [e(d("el-button"), {
|
|
535
538
|
link: !0,
|
|
536
539
|
type: "primary",
|
|
537
540
|
class: "custom-btn",
|
|
538
|
-
onClick: () =>
|
|
541
|
+
onClick: () => E(u.row)
|
|
539
542
|
}, {
|
|
540
|
-
icon: () => e(
|
|
543
|
+
icon: () => e(d("tds-svg-icon"), {
|
|
541
544
|
name: "deployed",
|
|
542
545
|
tip: "部署"
|
|
543
546
|
}, null)
|
|
544
|
-
}), e(
|
|
547
|
+
}), e(d("el-button"), {
|
|
545
548
|
link: !0,
|
|
546
549
|
type: "danger",
|
|
547
550
|
icon: "Delete",
|
|
548
551
|
title: v("button.delete"),
|
|
549
|
-
onClick: () => I([
|
|
552
|
+
onClick: () => I([u.row])
|
|
550
553
|
}, null)])
|
|
551
554
|
}
|
|
552
|
-
]),
|
|
553
|
-
function
|
|
554
|
-
const
|
|
555
|
-
if (!
|
|
555
|
+
]), U = w([]);
|
|
556
|
+
function j(u) {
|
|
557
|
+
const g = u.raw;
|
|
558
|
+
if (!g)
|
|
556
559
|
return;
|
|
557
|
-
const
|
|
558
|
-
fileName:
|
|
559
|
-
fileSize:
|
|
560
|
+
const A = {
|
|
561
|
+
fileName: g.name,
|
|
562
|
+
fileSize: g.size,
|
|
560
563
|
progress: 0,
|
|
561
564
|
progressStatus: "",
|
|
562
565
|
statusText: "准备上传..."
|
|
563
566
|
};
|
|
564
|
-
|
|
565
|
-
const
|
|
566
|
-
|
|
567
|
-
file:
|
|
567
|
+
U.value.push(A);
|
|
568
|
+
const o = U.value.length - 1;
|
|
569
|
+
fe({
|
|
570
|
+
file: g,
|
|
568
571
|
fileDesc: "探针安装包",
|
|
569
572
|
// 替换为你实际的接口地址
|
|
570
|
-
uploadUrl:
|
|
571
|
-
mergeUrl:
|
|
572
|
-
token:
|
|
573
|
+
uploadUrl: L.deployURL + "/service_deploy/deployment/packages/upload",
|
|
574
|
+
mergeUrl: L.deployURL + "/service_deploy/deployment/packages/upload_merge",
|
|
575
|
+
token: m.token,
|
|
573
576
|
// 进度回调
|
|
574
|
-
onProgress: (
|
|
575
|
-
const
|
|
576
|
-
|
|
577
|
+
onProgress: (i) => {
|
|
578
|
+
const _ = U.value[o];
|
|
579
|
+
_ && (_.progress = i.progress, _.statusText = i.statusText, i.fileMd5 && (_.fileMd5 = i.fileMd5), i.status === "error" ? _.progressStatus = "exception" : i.status === "success" ? _.progressStatus = "success" : _.progressStatus = "");
|
|
577
580
|
},
|
|
578
581
|
// 成功回调
|
|
579
582
|
onSuccess: () => {
|
|
580
|
-
var
|
|
581
|
-
const
|
|
582
|
-
|
|
583
|
-
const
|
|
584
|
-
|
|
583
|
+
var _;
|
|
584
|
+
const i = U.value[o];
|
|
585
|
+
i && (i.progress = 100, i.progressStatus = "success", i.statusText = "上传成功"), (_ = l.value) == null || _.getTableList(), setTimeout(() => {
|
|
586
|
+
const h = U.value.findIndex((k) => k.fileName === g.name);
|
|
587
|
+
h !== -1 && U.value.splice(h, 1);
|
|
585
588
|
}, 3e3);
|
|
586
589
|
},
|
|
587
590
|
// 失败回调
|
|
588
|
-
onError: (
|
|
589
|
-
console.error("文件上传失败:",
|
|
590
|
-
const
|
|
591
|
-
|
|
591
|
+
onError: (i) => {
|
|
592
|
+
console.error("文件上传失败:", i);
|
|
593
|
+
const _ = U.value[o];
|
|
594
|
+
_ && (_.progressStatus = "exception", _.statusText = i.message || "上传失败");
|
|
592
595
|
}
|
|
593
596
|
});
|
|
594
597
|
}
|
|
595
|
-
return (
|
|
596
|
-
const
|
|
597
|
-
return
|
|
598
|
+
return (u, g) => {
|
|
599
|
+
const A = d("el-icon"), o = d("el-upload"), i = d("el-progress"), _ = d("el-table-column");
|
|
600
|
+
return y(), x("div", $e, [e(o, {
|
|
598
601
|
class: "upload-demo mt-10px",
|
|
599
602
|
drag: "",
|
|
600
603
|
action: "",
|
|
601
604
|
"auto-upload": !1,
|
|
602
|
-
accept: ".tar.gz,.
|
|
603
|
-
"on-change":
|
|
605
|
+
accept: ".tar.gz,.zip",
|
|
606
|
+
"on-change": j,
|
|
604
607
|
"show-file-list": !1,
|
|
605
608
|
multiple: ""
|
|
606
609
|
}, {
|
|
607
|
-
default:
|
|
610
|
+
default: T(() => [e(A, {
|
|
608
611
|
class: "el-icon--upload"
|
|
609
612
|
}, {
|
|
610
|
-
default:
|
|
613
|
+
default: T(() => [e(q(se))]),
|
|
611
614
|
_: 1
|
|
612
|
-
}),
|
|
615
|
+
}), g[0] || (g[0] = f("div", {
|
|
613
616
|
class: "el-upload__text"
|
|
614
|
-
}, [F(" 点击或拖拽文件到此处上传 "),
|
|
617
|
+
}, [F(" 点击或拖拽文件到此处上传 "), f("br"), f("em", null, "支持的格式: tar.gz, zip")], -1))]),
|
|
615
618
|
_: 1
|
|
616
|
-
}),
|
|
617
|
-
key:
|
|
619
|
+
}), U.value.length > 0 ? (y(), x("div", Ee, [(y(!0), x(B, null, W(U.value, (h) => (y(), x("div", {
|
|
620
|
+
key: h.fileName,
|
|
618
621
|
class: "upload-progress-item"
|
|
619
|
-
}, [
|
|
620
|
-
percentage:
|
|
621
|
-
status:
|
|
622
|
-
}, null, 8, ["percentage", "status"]),
|
|
622
|
+
}, [f("div", Se, [f("span", Ue, C(h.fileName), 1), f("span", Le, C(q(ye)(h.fileSize)), 1)]), e(i, {
|
|
623
|
+
percentage: h.progress,
|
|
624
|
+
status: h.progressStatus
|
|
625
|
+
}, null, 8, ["percentage", "status"]), f("div", Me, C(h.statusText), 1)]))), 128))])) : O("", !0), f("div", Ce, [e(q(ue), {
|
|
623
626
|
ref_key: "refTdsTable",
|
|
624
627
|
ref: l,
|
|
625
|
-
columns:
|
|
626
|
-
"request-api":
|
|
627
|
-
options:
|
|
628
|
+
columns: S,
|
|
629
|
+
"request-api": q(oe),
|
|
630
|
+
options: u.$tableOptions()
|
|
628
631
|
}, {
|
|
629
|
-
default:
|
|
632
|
+
default: T(() => [e(_, {
|
|
630
633
|
type: "expand"
|
|
631
634
|
}, {
|
|
632
|
-
default:
|
|
635
|
+
default: T((h) => [h.row.deployment_server && h.row.deployment_server.length > 0 ? (y(), x("div", qe, [g[1] || (g[1] = f("div", {
|
|
633
636
|
class: "font-bold text-14px mt-12px"
|
|
634
|
-
}, "已部署的服务器", -1)),
|
|
635
|
-
key:
|
|
637
|
+
}, "已部署的服务器", -1)), f("div", Ae, [(y(!0), x(B, null, W(h.row.deployment_server, (k) => (y(), x("div", {
|
|
638
|
+
key: k.id,
|
|
636
639
|
class: "w-30% px-20px py-10px rounded-8px bg-[var(--el-fill-color-light)] border border-solid border-[var(--el-border-color-lighter)] hover:shadow-md transition-shadow"
|
|
637
|
-
}, [
|
|
640
|
+
}, [f("div", Fe, C(k.server_name), 1), f("div", Be, [f("p", null, "IP: " + C(k.ip_address), 1), f("p", null, "部署时间: " + C(k.deployment_time), 1)])]))), 128))])])) : (y(), x("div", De, "暂无部署服务器记录"))]),
|
|
638
641
|
_: 1
|
|
639
642
|
})]),
|
|
640
643
|
_: 1
|
|
641
|
-
}, 8, ["columns", "request-api", "options"])]), e(
|
|
644
|
+
}, 8, ["columns", "request-api", "options"])]), e(q(ee), Y({
|
|
642
645
|
ref_key: "refTdsForm",
|
|
643
|
-
ref:
|
|
644
|
-
},
|
|
645
|
-
title:
|
|
646
|
-
form:
|
|
647
|
-
columns:
|
|
646
|
+
ref: a
|
|
647
|
+
}, u.$formBindProps({
|
|
648
|
+
title: r.value,
|
|
649
|
+
form: c.value,
|
|
650
|
+
columns: S
|
|
648
651
|
}), {
|
|
649
|
-
onSubmit:
|
|
652
|
+
onSubmit: M
|
|
650
653
|
}), null, 16)]);
|
|
651
654
|
};
|
|
652
655
|
}
|
|
653
|
-
}),
|
|
656
|
+
}), Ve = {
|
|
654
657
|
class: "table-box"
|
|
655
|
-
}, Ve = {
|
|
656
|
-
class: "flex items-center"
|
|
657
658
|
}, ze = {
|
|
659
|
+
class: "flex items-center"
|
|
660
|
+
}, Pe = {
|
|
658
661
|
key: 0
|
|
659
662
|
}, Ie = {
|
|
660
663
|
class: "flex flex-wrap gap-12px p-12px"
|
|
661
|
-
}, Pe = {
|
|
662
|
-
class: "font-bold text-14px mb-8px text-[var(--el-text-color-primary)]"
|
|
663
664
|
}, Re = {
|
|
664
|
-
class: "text-
|
|
665
|
+
class: "font-bold text-14px mb-8px text-[var(--el-text-color-primary)]"
|
|
665
666
|
}, Oe = {
|
|
667
|
+
class: "text-12px text-[var(--el-text-color-regular)] space-y-4px"
|
|
668
|
+
}, He = {
|
|
666
669
|
key: 1,
|
|
667
670
|
class: "font-bold text-center text-gray-500 py-20"
|
|
668
|
-
},
|
|
671
|
+
}, Ke = /* @__PURE__ */ K({
|
|
669
672
|
__name: "index",
|
|
670
673
|
setup(t) {
|
|
671
674
|
const {
|
|
672
675
|
$t: l,
|
|
673
|
-
$messageBox:
|
|
674
|
-
} = window,
|
|
675
|
-
|
|
676
|
-
|
|
676
|
+
$messageBox: a
|
|
677
|
+
} = window, r = w(), c = w(), v = w(""), n = w({}), m = w("show"), E = H({
|
|
678
|
+
service_type: window.$prodType
|
|
679
|
+
});
|
|
680
|
+
function b() {
|
|
681
|
+
n.value = {}, m.value = "show", v.value = "添加服务器", c.value.open();
|
|
677
682
|
}
|
|
678
|
-
const
|
|
679
|
-
|
|
680
|
-
await
|
|
681
|
-
data:
|
|
682
|
-
|
|
683
|
+
const s = (o) => {
|
|
684
|
+
a(o, "server_name", l("button.delete"), "error").then(async () => {
|
|
685
|
+
await ge({
|
|
686
|
+
data: o.map((i) => i.id),
|
|
687
|
+
service_type: window.$prodType
|
|
688
|
+
}), r.value.getTableList();
|
|
683
689
|
});
|
|
684
690
|
};
|
|
685
|
-
function
|
|
686
|
-
|
|
687
|
-
id:
|
|
688
|
-
},
|
|
691
|
+
function p(o) {
|
|
692
|
+
n.value = {
|
|
693
|
+
id: o.id
|
|
694
|
+
}, m.value = "deploy", v.value = "快速部署", c.value.open();
|
|
689
695
|
}
|
|
690
|
-
const
|
|
696
|
+
const $ = w([{
|
|
691
697
|
ip: "",
|
|
692
698
|
port: ""
|
|
693
|
-
}]),
|
|
699
|
+
}]), M = w([{
|
|
694
700
|
ip: "",
|
|
695
701
|
port: ""
|
|
696
|
-
}]),
|
|
702
|
+
}]), I = w([{
|
|
697
703
|
ip: "",
|
|
698
704
|
port: ""
|
|
699
|
-
}]),
|
|
705
|
+
}]), S = w([{
|
|
700
706
|
ip: "",
|
|
701
707
|
port: ""
|
|
702
708
|
}]);
|
|
703
|
-
async function U(
|
|
704
|
-
if (
|
|
709
|
+
async function U(o) {
|
|
710
|
+
if (m.value === "show") {
|
|
705
711
|
await ve({
|
|
706
|
-
data:
|
|
707
|
-
}),
|
|
712
|
+
data: o
|
|
713
|
+
}), r.value.getTableList(), c.value.close();
|
|
708
714
|
return;
|
|
709
715
|
}
|
|
710
|
-
const
|
|
711
|
-
const
|
|
716
|
+
const i = (h, k) => {
|
|
717
|
+
const D = Math.max(h.length, k.length);
|
|
712
718
|
return Array.from({
|
|
713
|
-
length:
|
|
714
|
-
}, (
|
|
715
|
-
var
|
|
719
|
+
length: D
|
|
720
|
+
}, (N, z) => {
|
|
721
|
+
var R, J, Z, Q;
|
|
716
722
|
return {
|
|
717
|
-
src_ip: ((
|
|
718
|
-
src_port: Number((
|
|
719
|
-
dst_ip: ((
|
|
720
|
-
dst_port: Number((
|
|
723
|
+
src_ip: ((R = h[z]) == null ? void 0 : R.ip) || "",
|
|
724
|
+
src_port: Number((J = h[z]) == null ? void 0 : J.port) || 0,
|
|
725
|
+
dst_ip: ((Z = k[z]) == null ? void 0 : Z.ip) || "",
|
|
726
|
+
dst_port: Number((Q = k[z]) == null ? void 0 : Q.port) || 0
|
|
721
727
|
};
|
|
722
728
|
});
|
|
723
|
-
},
|
|
724
|
-
packages_id: [
|
|
725
|
-
server_id: [
|
|
729
|
+
}, _ = {
|
|
730
|
+
packages_id: [o.packages_id],
|
|
731
|
+
server_id: [n.value.id],
|
|
726
732
|
service_type: window.$prodType,
|
|
727
733
|
deploy_params: {
|
|
728
|
-
probe_name:
|
|
729
|
-
collection_mode:
|
|
730
|
-
interface:
|
|
731
|
-
engine_ip:
|
|
732
|
-
engine_port:
|
|
733
|
-
filterWhitelist:
|
|
734
|
-
filterBlacklist:
|
|
734
|
+
probe_name: o.probe_name || "",
|
|
735
|
+
collection_mode: o.collection_mode,
|
|
736
|
+
interface: o.interface || "",
|
|
737
|
+
engine_ip: o.engine_ip || "",
|
|
738
|
+
engine_port: o.engine_port || "",
|
|
739
|
+
filterWhitelist: i($.value, M.value),
|
|
740
|
+
filterBlacklist: i(I.value, S.value)
|
|
735
741
|
}
|
|
736
742
|
};
|
|
737
|
-
await
|
|
738
|
-
data:
|
|
739
|
-
}),
|
|
743
|
+
await le({
|
|
744
|
+
data: _
|
|
745
|
+
}), r.value.getTableList(), c.value.close();
|
|
740
746
|
}
|
|
741
|
-
function
|
|
742
|
-
we({
|
|
743
|
-
data: [r.id]
|
|
744
|
-
}), s.value.getTableList();
|
|
745
|
-
}
|
|
746
|
-
function W(r) {
|
|
747
|
+
function j(o) {
|
|
747
748
|
xe({
|
|
748
|
-
data: [
|
|
749
|
-
}),
|
|
749
|
+
data: [o.id]
|
|
750
|
+
}), r.value.getTableList();
|
|
750
751
|
}
|
|
751
|
-
function
|
|
752
|
+
function u(o) {
|
|
752
753
|
ke({
|
|
753
|
-
data: [
|
|
754
|
-
}),
|
|
754
|
+
data: [o.id]
|
|
755
|
+
}), r.value.getTableList();
|
|
756
|
+
}
|
|
757
|
+
function g(o) {
|
|
758
|
+
Te({
|
|
759
|
+
data: [o.id]
|
|
760
|
+
}), r.value.getTableList();
|
|
755
761
|
}
|
|
756
|
-
const
|
|
762
|
+
const A = H([{
|
|
757
763
|
field: "server_name",
|
|
758
764
|
name: "服务器名称",
|
|
759
765
|
show: {
|
|
@@ -808,7 +814,7 @@ const M = {
|
|
|
808
814
|
}, {
|
|
809
815
|
field: "arch",
|
|
810
816
|
name: "架构",
|
|
811
|
-
enum:
|
|
817
|
+
enum: be,
|
|
812
818
|
show: {
|
|
813
819
|
type: "select"
|
|
814
820
|
},
|
|
@@ -818,7 +824,7 @@ const M = {
|
|
|
818
824
|
}, {
|
|
819
825
|
field: "deployed_count",
|
|
820
826
|
name: "已部署探针数量",
|
|
821
|
-
render: (
|
|
827
|
+
render: (o) => e("span", null, [o.row.deployment_packages.length])
|
|
822
828
|
}, {
|
|
823
829
|
field: "status",
|
|
824
830
|
name: "状态",
|
|
@@ -861,7 +867,7 @@ const M = {
|
|
|
861
867
|
}, {
|
|
862
868
|
field: "packages_id",
|
|
863
869
|
name: "安装包",
|
|
864
|
-
enum:
|
|
870
|
+
enum: oe,
|
|
865
871
|
fieldNames: {
|
|
866
872
|
value: "id",
|
|
867
873
|
label: "file_name"
|
|
@@ -936,14 +942,14 @@ const M = {
|
|
|
936
942
|
tooltip: "白名单配置后,仅采集白名单内相关流量,如不填写,则采集所有流量",
|
|
937
943
|
render: () => e(B, null, [e("p", {
|
|
938
944
|
class: "color-[var(--el-text-color-regular)]"
|
|
939
|
-
}, [F("源ip端口:")]), e(
|
|
940
|
-
modelValue:
|
|
941
|
-
"onUpdate:modelValue": (
|
|
945
|
+
}, [F("源ip端口:")]), e(V, {
|
|
946
|
+
modelValue: $.value,
|
|
947
|
+
"onUpdate:modelValue": (o) => $.value = o
|
|
942
948
|
}, null), e("p", {
|
|
943
949
|
class: "color-[var(--el-text-color-regular)]"
|
|
944
|
-
}, [F("目的ip端口:")]), e(
|
|
945
|
-
modelValue:
|
|
946
|
-
"onUpdate:modelValue": (
|
|
950
|
+
}, [F("目的ip端口:")]), e(V, {
|
|
951
|
+
modelValue: M.value,
|
|
952
|
+
"onUpdate:modelValue": (o) => M.value = o
|
|
947
953
|
}, null)])
|
|
948
954
|
},
|
|
949
955
|
hide: !0
|
|
@@ -955,14 +961,14 @@ const M = {
|
|
|
955
961
|
tooltip: "黑名单配置后,将不再采集黑名单内相关流量",
|
|
956
962
|
render: () => e(B, null, [e("p", {
|
|
957
963
|
class: "color-[var(--el-text-color-regular)]"
|
|
958
|
-
}, [F("源ip端口:")]), e(
|
|
959
|
-
modelValue:
|
|
960
|
-
"onUpdate:modelValue": (
|
|
964
|
+
}, [F("源ip端口:")]), e(V, {
|
|
965
|
+
modelValue: I.value,
|
|
966
|
+
"onUpdate:modelValue": (o) => I.value = o
|
|
961
967
|
}, null), e("p", {
|
|
962
968
|
class: "color-[var(--el-text-color-regular)]"
|
|
963
|
-
}, [F("目的ip端口:")]), e(
|
|
964
|
-
modelValue:
|
|
965
|
-
"onUpdate:modelValue": (
|
|
969
|
+
}, [F("目的ip端口:")]), e(V, {
|
|
970
|
+
modelValue: S.value,
|
|
971
|
+
"onUpdate:modelValue": (o) => S.value = o
|
|
966
972
|
}, null)])
|
|
967
973
|
},
|
|
968
974
|
hide: !0
|
|
@@ -971,122 +977,125 @@ const M = {
|
|
|
971
977
|
name: window.$t("global.operate"),
|
|
972
978
|
width: 180,
|
|
973
979
|
fixed: "right",
|
|
974
|
-
render: (
|
|
980
|
+
render: (o) => e("div", null, [e(d("el-button"), {
|
|
975
981
|
link: !0,
|
|
976
982
|
type: "primary",
|
|
977
983
|
icon: "Connection",
|
|
978
984
|
title: "连通性检查",
|
|
979
985
|
class: "custom-btn",
|
|
980
|
-
onClick: () =>
|
|
981
|
-
}, null), e(
|
|
986
|
+
onClick: () => j(o.row)
|
|
987
|
+
}, null), e(d("el-button"), {
|
|
982
988
|
link: !0,
|
|
983
989
|
type: "primary",
|
|
984
990
|
class: "custom-btn",
|
|
985
|
-
onClick: () =>
|
|
991
|
+
onClick: () => u(o.row)
|
|
986
992
|
}, {
|
|
987
|
-
icon: () => e(
|
|
993
|
+
icon: () => e(d("tds-svg-icon"), {
|
|
988
994
|
name: "install_env",
|
|
989
995
|
tip: "测试安装环境"
|
|
990
996
|
}, null)
|
|
991
|
-
}), e(
|
|
997
|
+
}), e(d("el-button"), {
|
|
992
998
|
link: !0,
|
|
993
999
|
type: "primary",
|
|
994
1000
|
class: "custom-btn",
|
|
995
|
-
onClick: () =>
|
|
1001
|
+
onClick: () => g(o.row)
|
|
996
1002
|
}, {
|
|
997
|
-
icon: () => e(
|
|
1003
|
+
icon: () => e(d("tds-svg-icon"), {
|
|
998
1004
|
name: "docker",
|
|
999
1005
|
tip: "自动安装docker环境"
|
|
1000
1006
|
}, null)
|
|
1001
|
-
}), e(
|
|
1007
|
+
}), e(d("el-button"), {
|
|
1002
1008
|
link: !0,
|
|
1003
1009
|
type: "primary",
|
|
1004
1010
|
class: "custom-btn",
|
|
1005
|
-
onClick: () =>
|
|
1011
|
+
onClick: () => p(o.row)
|
|
1006
1012
|
}, {
|
|
1007
|
-
icon: () => e(
|
|
1013
|
+
icon: () => e(d("tds-svg-icon"), {
|
|
1008
1014
|
name: "deployed",
|
|
1009
1015
|
tip: "部署"
|
|
1010
1016
|
}, null)
|
|
1011
|
-
}), e(
|
|
1017
|
+
}), e(d("el-button"), {
|
|
1012
1018
|
link: !0,
|
|
1013
1019
|
type: "danger",
|
|
1014
1020
|
icon: "Delete",
|
|
1015
1021
|
title: l("button.delete"),
|
|
1016
|
-
onClick: () =>
|
|
1022
|
+
onClick: () => s([o.row])
|
|
1017
1023
|
}, null)])
|
|
1018
1024
|
}]);
|
|
1019
|
-
return (
|
|
1020
|
-
const
|
|
1021
|
-
return
|
|
1025
|
+
return (o, i) => {
|
|
1026
|
+
const _ = d("el-button"), h = d("el-table-column"), k = d("TdsTable");
|
|
1027
|
+
return y(), x("div", Ve, [e(k, {
|
|
1022
1028
|
ref_key: "refTdsTable",
|
|
1023
|
-
ref:
|
|
1024
|
-
columns:
|
|
1025
|
-
"request-api":
|
|
1029
|
+
ref: r,
|
|
1030
|
+
columns: A,
|
|
1031
|
+
"request-api": q(ne),
|
|
1026
1032
|
"search-col": 4,
|
|
1027
|
-
|
|
1033
|
+
"init-param": E,
|
|
1034
|
+
options: o.$tableOptions(),
|
|
1028
1035
|
"reserve-selection": ""
|
|
1029
1036
|
}, {
|
|
1030
|
-
tableHeader:
|
|
1037
|
+
tableHeader: T(() => [f("div", ze, [e(_, {
|
|
1031
1038
|
class: "custom-btn",
|
|
1032
1039
|
type: "primary",
|
|
1033
1040
|
icon: "Plus",
|
|
1034
1041
|
plain: "",
|
|
1035
|
-
onClick:
|
|
1042
|
+
onClick: i[0] || (i[0] = (D) => b())
|
|
1036
1043
|
}, {
|
|
1037
|
-
default:
|
|
1044
|
+
default: T(() => [F(C(q(l)("button.add")), 1)]),
|
|
1038
1045
|
_: 1
|
|
1039
1046
|
})])]),
|
|
1040
|
-
default:
|
|
1047
|
+
default: T(() => [e(h, {
|
|
1041
1048
|
type: "expand"
|
|
1042
1049
|
}, {
|
|
1043
|
-
default:
|
|
1050
|
+
default: T((D) => [D.row.deployment_packages && D.row.deployment_packages.length > 0 ? (y(), x("div", Pe, [i[1] || (i[1] = f("div", {
|
|
1044
1051
|
class: "font-bold text-14px mt-12px"
|
|
1045
|
-
}, "已部署的探针包", -1)),
|
|
1046
|
-
key:
|
|
1052
|
+
}, "已部署的探针包", -1)), f("div", Ie, [(y(!0), x(B, null, W(D.row.deployment_packages, (N) => (y(), x("div", {
|
|
1053
|
+
key: N.id,
|
|
1047
1054
|
class: "w-30% px-20px py-10px rounded-8px bg-[var(--el-fill-color-light)] border border-solid border-[var(--el-border-color-lighter)] hover:shadow-md transition-shadow"
|
|
1048
|
-
}, [
|
|
1055
|
+
}, [f("div", Re, C(N.file_name), 1), f("div", Oe, [f("p", null, "版本: " + C(N.version), 1), f("p", null, "部署时间: " + C(N.deployment_time), 1)])]))), 128))])])) : (y(), x("div", He, "暂无部署服务器记录"))]),
|
|
1049
1056
|
_: 1
|
|
1050
1057
|
})]),
|
|
1051
1058
|
_: 1
|
|
1052
|
-
}, 8, ["columns", "request-api", "options"]), e(
|
|
1059
|
+
}, 8, ["columns", "request-api", "init-param", "options"]), e(q(ee), Y({
|
|
1053
1060
|
ref_key: "refTdsForm",
|
|
1054
|
-
ref:
|
|
1055
|
-
},
|
|
1061
|
+
ref: c
|
|
1062
|
+
}, o.$formBindProps({
|
|
1056
1063
|
title: v.value,
|
|
1057
|
-
form:
|
|
1058
|
-
columns:
|
|
1059
|
-
formKey:
|
|
1064
|
+
form: n.value,
|
|
1065
|
+
columns: A,
|
|
1066
|
+
formKey: m.value
|
|
1060
1067
|
}), {
|
|
1061
1068
|
onSubmit: U
|
|
1062
1069
|
}), null, 16)]);
|
|
1063
1070
|
};
|
|
1064
1071
|
}
|
|
1065
|
-
}),
|
|
1072
|
+
}), We = {
|
|
1066
1073
|
class: "table-box"
|
|
1067
|
-
},
|
|
1074
|
+
}, je = {
|
|
1068
1075
|
style: {
|
|
1069
1076
|
padding: "0 50px"
|
|
1070
1077
|
}
|
|
1071
|
-
},
|
|
1078
|
+
}, Ge = /* @__PURE__ */ K({
|
|
1072
1079
|
__name: "index",
|
|
1073
1080
|
setup(t) {
|
|
1074
|
-
const l =
|
|
1081
|
+
const l = H({
|
|
1082
|
+
service_type: window.$prodType
|
|
1083
|
+
}), a = H([{
|
|
1075
1084
|
field: "packages_name",
|
|
1076
1085
|
name: "探针包",
|
|
1077
|
-
render: (
|
|
1086
|
+
render: (r) => e(B, null, [e("p", {
|
|
1078
1087
|
class: "font-bold"
|
|
1079
|
-
}, [
|
|
1088
|
+
}, [r.row.packages_name]), e("p", {
|
|
1080
1089
|
class: "text-gray-400"
|
|
1081
|
-
}, [
|
|
1090
|
+
}, [r.row.packages_version])])
|
|
1082
1091
|
}, {
|
|
1083
1092
|
field: "server_name",
|
|
1084
1093
|
name: "服务器",
|
|
1085
|
-
render: (
|
|
1094
|
+
render: (r) => e(B, null, [e("p", {
|
|
1086
1095
|
class: "font-bold"
|
|
1087
|
-
}, [
|
|
1096
|
+
}, [r.row.server_name]), e("p", {
|
|
1088
1097
|
class: "text-gray-400"
|
|
1089
|
-
}, [
|
|
1098
|
+
}, [r.row.ip_address])])
|
|
1090
1099
|
}, {
|
|
1091
1100
|
field: "deployment_time",
|
|
1092
1101
|
name: "部署时间"
|
|
@@ -1108,27 +1117,28 @@ const M = {
|
|
|
1108
1117
|
tagType: "success"
|
|
1109
1118
|
}]
|
|
1110
1119
|
}]);
|
|
1111
|
-
return (
|
|
1112
|
-
const
|
|
1113
|
-
return
|
|
1120
|
+
return (r, c) => {
|
|
1121
|
+
const v = d("el-table-column"), n = d("TdsTable");
|
|
1122
|
+
return y(), x("div", We, [e(n, {
|
|
1114
1123
|
ref: "refTdsTable",
|
|
1115
|
-
columns:
|
|
1124
|
+
columns: a,
|
|
1116
1125
|
"search-col": 4,
|
|
1117
|
-
"request-api":
|
|
1118
|
-
options:
|
|
1126
|
+
"request-api": q(we),
|
|
1127
|
+
options: r.$tableOptions(),
|
|
1128
|
+
"init-param": l,
|
|
1119
1129
|
"reserve-selection": ""
|
|
1120
1130
|
}, {
|
|
1121
|
-
default:
|
|
1131
|
+
default: T(() => [e(v, {
|
|
1122
1132
|
type: "expand"
|
|
1123
1133
|
}, {
|
|
1124
|
-
default:
|
|
1134
|
+
default: T((m) => [f("div", je, C(m.row.deployment_log), 1)]),
|
|
1125
1135
|
_: 1
|
|
1126
1136
|
})]),
|
|
1127
1137
|
_: 1
|
|
1128
|
-
}, 8, ["columns", "request-api", "options"])]);
|
|
1138
|
+
}, 8, ["columns", "request-api", "options", "init-param"])]);
|
|
1129
1139
|
};
|
|
1130
1140
|
}
|
|
1131
|
-
}),
|
|
1141
|
+
}), Je = { class: "main-wrapper" }, Ze = /* @__PURE__ */ K({
|
|
1132
1142
|
name: "TCProbe",
|
|
1133
1143
|
__name: "index",
|
|
1134
1144
|
props: {
|
|
@@ -1138,43 +1148,43 @@ const M = {
|
|
|
1138
1148
|
}
|
|
1139
1149
|
},
|
|
1140
1150
|
setup(t) {
|
|
1141
|
-
const l =
|
|
1142
|
-
return (
|
|
1143
|
-
const
|
|
1144
|
-
return
|
|
1151
|
+
const l = w("package");
|
|
1152
|
+
return (a, r) => {
|
|
1153
|
+
const c = d("el-tab-pane"), v = d("el-tabs");
|
|
1154
|
+
return y(), x("div", Je, [
|
|
1145
1155
|
e(v, {
|
|
1146
1156
|
modelValue: l.value,
|
|
1147
|
-
"onUpdate:modelValue":
|
|
1157
|
+
"onUpdate:modelValue": r[0] || (r[0] = (n) => l.value = n),
|
|
1148
1158
|
class: "demo-tabs"
|
|
1149
1159
|
}, {
|
|
1150
|
-
default:
|
|
1151
|
-
e(
|
|
1160
|
+
default: T(() => [
|
|
1161
|
+
e(c, {
|
|
1152
1162
|
label: "安装包管理",
|
|
1153
1163
|
name: "package"
|
|
1154
1164
|
}, {
|
|
1155
|
-
default:
|
|
1156
|
-
l.value === "package" ? (
|
|
1165
|
+
default: T(() => [
|
|
1166
|
+
l.value === "package" ? (y(), G(Ne, {
|
|
1157
1167
|
key: 0,
|
|
1158
1168
|
token: t.token
|
|
1159
1169
|
}, null, 8, ["token"])) : O("", !0)
|
|
1160
1170
|
]),
|
|
1161
1171
|
_: 1
|
|
1162
1172
|
}),
|
|
1163
|
-
e(
|
|
1173
|
+
e(c, {
|
|
1164
1174
|
label: "探针部署",
|
|
1165
1175
|
name: "deploy"
|
|
1166
1176
|
}, {
|
|
1167
|
-
default:
|
|
1168
|
-
l.value === "deploy" ? (
|
|
1177
|
+
default: T(() => [
|
|
1178
|
+
l.value === "deploy" ? (y(), G(Ke, { key: 0 })) : O("", !0)
|
|
1169
1179
|
]),
|
|
1170
1180
|
_: 1
|
|
1171
1181
|
}),
|
|
1172
|
-
e(
|
|
1182
|
+
e(c, {
|
|
1173
1183
|
label: "部署历史",
|
|
1174
1184
|
name: "history"
|
|
1175
1185
|
}, {
|
|
1176
|
-
default:
|
|
1177
|
-
l.value === "history" ? (
|
|
1186
|
+
default: T(() => [
|
|
1187
|
+
l.value === "history" ? (y(), G(Ge, { key: 0 })) : O("", !0)
|
|
1178
1188
|
]),
|
|
1179
1189
|
_: 1
|
|
1180
1190
|
})
|
|
@@ -1185,24 +1195,24 @@ const M = {
|
|
|
1185
1195
|
};
|
|
1186
1196
|
}
|
|
1187
1197
|
});
|
|
1188
|
-
const
|
|
1189
|
-
if (t.install = (
|
|
1190
|
-
for (const
|
|
1191
|
-
|
|
1198
|
+
const Qe = /* @__PURE__ */ te(Ze, [["__scopeId", "data-v-f99b9b23"]]), Xe = (t, l) => {
|
|
1199
|
+
if (t.install = (a) => {
|
|
1200
|
+
for (const r of [t, ...Object.values(l ?? {})])
|
|
1201
|
+
a.component(r.name, r);
|
|
1192
1202
|
}, l)
|
|
1193
|
-
for (const [
|
|
1194
|
-
t[
|
|
1203
|
+
for (const [a, r] of Object.entries(l))
|
|
1204
|
+
t[a] = r;
|
|
1195
1205
|
return t;
|
|
1196
|
-
},
|
|
1197
|
-
TCProbe:
|
|
1198
|
-
},
|
|
1206
|
+
}, Ye = Xe(Qe), et = {
|
|
1207
|
+
TCProbe: Ye
|
|
1208
|
+
}, at = {
|
|
1199
1209
|
install(t, l) {
|
|
1200
|
-
Object.entries(
|
|
1201
|
-
t.component(
|
|
1210
|
+
Object.entries(et).forEach(([a, r]) => {
|
|
1211
|
+
t.component(a, r);
|
|
1202
1212
|
}), l != null && l.prodType && (window.$prodType = l.prodType), l != null && l.envURL && (window.$probeURL = l.envURL);
|
|
1203
1213
|
}
|
|
1204
1214
|
};
|
|
1205
1215
|
export {
|
|
1206
|
-
|
|
1207
|
-
|
|
1216
|
+
Ye as TCProbe,
|
|
1217
|
+
at as default
|
|
1208
1218
|
};
|