@topdatasec/probe 1.0.5 → 1.0.6
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 +425 -418
- 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 w, Fragment as F, renderList as W, createVNode as e, withCtx as T, unref as q, createCommentVNode as O, ref as b, reactive as H, createTextVNode as A, 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"), h = d("el-icon"), s = d("el-button");
|
|
27
|
+
return y(), w("div", null, [
|
|
28
|
+
(y(!0), w(F, null, W(l.value, (p, $) => (y(), w("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 ? (
|
|
54
|
+
l.value.length > 1 ? (y(), w("div", pe, [
|
|
55
55
|
e(h, {
|
|
56
|
-
onClick: (
|
|
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
|
|
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
84
|
v.onload = (h) => {
|
|
85
|
-
var
|
|
86
|
-
if (
|
|
87
|
-
const
|
|
88
|
-
l(
|
|
85
|
+
var s;
|
|
86
|
+
if (c.append((s = h.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 h =
|
|
101
|
-
v.readAsArrayBuffer(t.slice(h,
|
|
99
|
+
function E() {
|
|
100
|
+
const h = m * P, s = Math.min(h + P, t.size);
|
|
101
|
+
v.readAsArrayBuffer(t.slice(h, 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), h = 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(h));
|
|
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
|
-
}),
|
|
198
|
+
fileMd5: s
|
|
199
|
+
}), X.success(`${a.name} 上传成功`), m == null || m(s);
|
|
200
200
|
} catch (h) {
|
|
201
|
-
|
|
201
|
+
n == null || n({
|
|
202
202
|
progress: 0,
|
|
203
203
|
statusText: h.message || "上传失败",
|
|
204
204
|
status: "error"
|
|
205
|
-
}),
|
|
205
|
+
}), X.error(`${a.name} 上传失败: ${h.message}`), E == null || E(h);
|
|
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,73 @@ const M = {
|
|
|
301
301
|
}
|
|
302
302
|
},
|
|
303
303
|
setup(t) {
|
|
304
|
-
const l =
|
|
304
|
+
const l = b(), a = b(), r = b("快速部署"), c = b({}), {
|
|
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 h =
|
|
313
|
+
const h = b([{
|
|
314
314
|
ip: "",
|
|
315
315
|
port: ""
|
|
316
|
-
}]),
|
|
316
|
+
}]), s = b([{
|
|
317
317
|
ip: "",
|
|
318
318
|
port: ""
|
|
319
|
-
}]),
|
|
319
|
+
}]), p = b([{
|
|
320
320
|
ip: "",
|
|
321
321
|
port: ""
|
|
322
|
-
}]),
|
|
322
|
+
}]), $ = b([{
|
|
323
323
|
ip: "",
|
|
324
324
|
port: ""
|
|
325
325
|
}]);
|
|
326
|
-
async function
|
|
327
|
-
const
|
|
328
|
-
const
|
|
326
|
+
async function M(u) {
|
|
327
|
+
const x = (o, i) => {
|
|
328
|
+
const _ = Math.max(o.length, i.length);
|
|
329
329
|
return Array.from({
|
|
330
|
-
length:
|
|
331
|
-
}, (g,
|
|
332
|
-
var
|
|
330
|
+
length: _
|
|
331
|
+
}, (g, k) => {
|
|
332
|
+
var B, N, z, R;
|
|
333
333
|
return {
|
|
334
|
-
src_ip: ((
|
|
335
|
-
src_port: Number((
|
|
336
|
-
dst_ip: ((
|
|
337
|
-
dst_port: Number((R =
|
|
334
|
+
src_ip: ((B = o[k]) == null ? void 0 : B.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
|
+
}, D = {
|
|
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:
|
|
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: x(h.value, s.value),
|
|
351
|
+
filterBlacklist: x(p.value, $.value)
|
|
352
352
|
}
|
|
353
353
|
};
|
|
354
|
-
await
|
|
355
|
-
data:
|
|
356
|
-
}), l.value.getTableList(),
|
|
354
|
+
await le({
|
|
355
|
+
data: D
|
|
356
|
+
}), l.value.getTableList(), a.value.close();
|
|
357
357
|
}
|
|
358
|
-
async function I(
|
|
359
|
-
|
|
360
|
-
await
|
|
361
|
-
data: [
|
|
358
|
+
async function I(u) {
|
|
359
|
+
n(u, "file_name", v("button.delete"), "error").then(async () => {
|
|
360
|
+
await he({
|
|
361
|
+
data: [u.id]
|
|
362
362
|
}), l.value.getTableList();
|
|
363
363
|
});
|
|
364
364
|
}
|
|
365
|
-
const
|
|
365
|
+
const S = H([
|
|
366
366
|
// { type: 'selection', align: 'center', field: 'id', hide: true },
|
|
367
367
|
{
|
|
368
368
|
field: "server_id",
|
|
369
369
|
name: "选择服务器",
|
|
370
|
-
enum:
|
|
370
|
+
enum: ne,
|
|
371
371
|
fieldNames: {
|
|
372
372
|
value: "id",
|
|
373
373
|
label: "server_name"
|
|
@@ -403,9 +403,9 @@ const M = {
|
|
|
403
403
|
{
|
|
404
404
|
field: "deployment_server",
|
|
405
405
|
name: "已部署服务器数",
|
|
406
|
-
render: (
|
|
407
|
-
var
|
|
408
|
-
return ((
|
|
406
|
+
render: (u) => {
|
|
407
|
+
var x;
|
|
408
|
+
return ((x = u.row.deployment_server) == null ? void 0 : x.length) || 0;
|
|
409
409
|
}
|
|
410
410
|
},
|
|
411
411
|
{
|
|
@@ -488,20 +488,20 @@ const M = {
|
|
|
488
488
|
show: {
|
|
489
489
|
type: "input",
|
|
490
490
|
tooltip: "白名单配置后,仅采集白名单内相关流量,如不填写,则采集所有流量",
|
|
491
|
-
render: () => e(
|
|
491
|
+
render: () => e(F, null, [e("div", {
|
|
492
492
|
style: "width: 100%"
|
|
493
493
|
}, [e("p", {
|
|
494
494
|
class: "color-[var(--el-text-color-regular)]"
|
|
495
|
-
}, [
|
|
495
|
+
}, [A("源ip端口:")]), e(V, {
|
|
496
496
|
modelValue: h.value,
|
|
497
|
-
"onUpdate:modelValue": (
|
|
497
|
+
"onUpdate:modelValue": (u) => h.value = u
|
|
498
498
|
}, null)]), e("div", {
|
|
499
499
|
style: "width: 100%"
|
|
500
500
|
}, [e("p", {
|
|
501
501
|
class: "color-[var(--el-text-color-regular)]"
|
|
502
|
-
}, [
|
|
503
|
-
modelValue:
|
|
504
|
-
"onUpdate:modelValue": (
|
|
502
|
+
}, [A("目的ip端口:")]), e(V, {
|
|
503
|
+
modelValue: s.value,
|
|
504
|
+
"onUpdate:modelValue": (u) => s.value = u
|
|
505
505
|
}, null)])])
|
|
506
506
|
},
|
|
507
507
|
hide: !0
|
|
@@ -512,16 +512,16 @@ const M = {
|
|
|
512
512
|
show: {
|
|
513
513
|
type: "input",
|
|
514
514
|
tooltip: "黑名单配置后,将不再采集黑名单内相关流量",
|
|
515
|
-
render: () => e(
|
|
515
|
+
render: () => e(F, null, [e("p", {
|
|
516
516
|
class: "color-[var(--el-text-color-regular)]"
|
|
517
|
-
}, [
|
|
518
|
-
modelValue:
|
|
519
|
-
"onUpdate:modelValue": (
|
|
517
|
+
}, [A("源ip端口:")]), e(V, {
|
|
518
|
+
modelValue: p.value,
|
|
519
|
+
"onUpdate:modelValue": (u) => p.value = u
|
|
520
520
|
}, null), e("p", {
|
|
521
521
|
class: "color-[var(--el-text-color-regular)]"
|
|
522
|
-
}, [
|
|
523
|
-
modelValue:
|
|
524
|
-
"onUpdate:modelValue": (
|
|
522
|
+
}, [A("目的ip端口:")]), e(V, {
|
|
523
|
+
modelValue: $.value,
|
|
524
|
+
"onUpdate:modelValue": (u) => $.value = u
|
|
525
525
|
}, null)])
|
|
526
526
|
},
|
|
527
527
|
hide: !0
|
|
@@ -531,229 +531,232 @@ const M = {
|
|
|
531
531
|
name: window.$t("global.operate"),
|
|
532
532
|
width: 140,
|
|
533
533
|
fixed: "right",
|
|
534
|
-
render: (
|
|
534
|
+
render: (u) => e("div", null, [e(d("el-button"), {
|
|
535
535
|
link: !0,
|
|
536
536
|
type: "primary",
|
|
537
537
|
class: "custom-btn",
|
|
538
|
-
onClick: () =>
|
|
538
|
+
onClick: () => E(u.row)
|
|
539
539
|
}, {
|
|
540
|
-
icon: () => e(
|
|
540
|
+
icon: () => e(d("tds-svg-icon"), {
|
|
541
541
|
name: "deployed",
|
|
542
542
|
tip: "部署"
|
|
543
543
|
}, null)
|
|
544
|
-
}), e(
|
|
544
|
+
}), e(d("el-button"), {
|
|
545
545
|
link: !0,
|
|
546
546
|
type: "danger",
|
|
547
547
|
icon: "Delete",
|
|
548
548
|
title: v("button.delete"),
|
|
549
|
-
onClick: () => I([
|
|
549
|
+
onClick: () => I([u.row])
|
|
550
550
|
}, null)])
|
|
551
551
|
}
|
|
552
|
-
]),
|
|
553
|
-
function
|
|
554
|
-
const
|
|
555
|
-
if (!
|
|
552
|
+
]), U = b([]);
|
|
553
|
+
function j(u) {
|
|
554
|
+
const x = u.raw;
|
|
555
|
+
if (!x)
|
|
556
556
|
return;
|
|
557
|
-
const
|
|
558
|
-
fileName:
|
|
559
|
-
fileSize:
|
|
557
|
+
const D = {
|
|
558
|
+
fileName: x.name,
|
|
559
|
+
fileSize: x.size,
|
|
560
560
|
progress: 0,
|
|
561
561
|
progressStatus: "",
|
|
562
562
|
statusText: "准备上传..."
|
|
563
563
|
};
|
|
564
|
-
|
|
565
|
-
const
|
|
566
|
-
|
|
567
|
-
file:
|
|
564
|
+
U.value.push(D);
|
|
565
|
+
const o = U.value.length - 1;
|
|
566
|
+
fe({
|
|
567
|
+
file: x,
|
|
568
568
|
fileDesc: "探针安装包",
|
|
569
569
|
// 替换为你实际的接口地址
|
|
570
|
-
uploadUrl:
|
|
571
|
-
mergeUrl:
|
|
572
|
-
token:
|
|
570
|
+
uploadUrl: L.deployURL + "/service_deploy/deployment/packages/upload",
|
|
571
|
+
mergeUrl: L.deployURL + "/service_deploy/deployment/packages/upload_merge",
|
|
572
|
+
token: m.token,
|
|
573
573
|
// 进度回调
|
|
574
|
-
onProgress: (
|
|
575
|
-
const
|
|
576
|
-
|
|
574
|
+
onProgress: (i) => {
|
|
575
|
+
const _ = U.value[o];
|
|
576
|
+
_ && (_.progress = i.progress, _.statusText = i.statusText, i.fileMd5 && (_.fileMd5 = i.fileMd5), i.status === "error" ? _.progressStatus = "exception" : i.status === "success" ? _.progressStatus = "success" : _.progressStatus = "");
|
|
577
577
|
},
|
|
578
578
|
// 成功回调
|
|
579
579
|
onSuccess: () => {
|
|
580
|
-
var
|
|
581
|
-
const
|
|
582
|
-
|
|
583
|
-
const g =
|
|
584
|
-
g !== -1 &&
|
|
580
|
+
var _;
|
|
581
|
+
const i = U.value[o];
|
|
582
|
+
i && (i.progress = 100, i.progressStatus = "success", i.statusText = "上传成功"), (_ = l.value) == null || _.getTableList(), setTimeout(() => {
|
|
583
|
+
const g = U.value.findIndex((k) => k.fileName === x.name);
|
|
584
|
+
g !== -1 && U.value.splice(g, 1);
|
|
585
585
|
}, 3e3);
|
|
586
586
|
},
|
|
587
587
|
// 失败回调
|
|
588
|
-
onError: (
|
|
589
|
-
console.error("文件上传失败:",
|
|
590
|
-
const
|
|
591
|
-
|
|
588
|
+
onError: (i) => {
|
|
589
|
+
console.error("文件上传失败:", i);
|
|
590
|
+
const _ = U.value[o];
|
|
591
|
+
_ && (_.progressStatus = "exception", _.statusText = i.message || "上传失败");
|
|
592
592
|
}
|
|
593
593
|
});
|
|
594
594
|
}
|
|
595
|
-
return (
|
|
596
|
-
const
|
|
597
|
-
return
|
|
595
|
+
return (u, x) => {
|
|
596
|
+
const D = d("el-icon"), o = d("el-upload"), i = d("el-progress"), _ = d("el-table-column");
|
|
597
|
+
return y(), w("div", $e, [e(o, {
|
|
598
598
|
class: "upload-demo mt-10px",
|
|
599
599
|
drag: "",
|
|
600
600
|
action: "",
|
|
601
601
|
"auto-upload": !1,
|
|
602
602
|
accept: ".tar.gz,.tgz",
|
|
603
|
-
"on-change":
|
|
603
|
+
"on-change": j,
|
|
604
604
|
"show-file-list": !1,
|
|
605
605
|
multiple: ""
|
|
606
606
|
}, {
|
|
607
|
-
default:
|
|
607
|
+
default: T(() => [e(D, {
|
|
608
608
|
class: "el-icon--upload"
|
|
609
609
|
}, {
|
|
610
|
-
default:
|
|
610
|
+
default: T(() => [e(q(se))]),
|
|
611
611
|
_: 1
|
|
612
|
-
}),
|
|
612
|
+
}), x[0] || (x[0] = f("div", {
|
|
613
613
|
class: "el-upload__text"
|
|
614
|
-
}, [
|
|
614
|
+
}, [A(" 点击或拖拽文件到此处上传 "), f("br"), f("em", null, "支持的格式: tar.gz, tgz")], -1))]),
|
|
615
615
|
_: 1
|
|
616
|
-
}),
|
|
616
|
+
}), U.value.length > 0 ? (y(), w("div", Ee, [(y(!0), w(F, null, W(U.value, (g) => (y(), w("div", {
|
|
617
617
|
key: g.fileName,
|
|
618
618
|
class: "upload-progress-item"
|
|
619
|
-
}, [
|
|
619
|
+
}, [f("div", Se, [f("span", Ue, C(g.fileName), 1), f("span", Le, C(q(ye)(g.fileSize)), 1)]), e(i, {
|
|
620
620
|
percentage: g.progress,
|
|
621
621
|
status: g.progressStatus
|
|
622
|
-
}, null, 8, ["percentage", "status"]),
|
|
622
|
+
}, null, 8, ["percentage", "status"]), f("div", Me, C(g.statusText), 1)]))), 128))])) : O("", !0), f("div", Ce, [e(q(ue), {
|
|
623
623
|
ref_key: "refTdsTable",
|
|
624
624
|
ref: l,
|
|
625
|
-
columns:
|
|
626
|
-
"request-api":
|
|
627
|
-
options:
|
|
625
|
+
columns: S,
|
|
626
|
+
"request-api": q(oe),
|
|
627
|
+
options: u.$tableOptions()
|
|
628
628
|
}, {
|
|
629
|
-
default:
|
|
629
|
+
default: T(() => [e(_, {
|
|
630
630
|
type: "expand"
|
|
631
631
|
}, {
|
|
632
|
-
default:
|
|
632
|
+
default: T((g) => [g.row.deployment_server && g.row.deployment_server.length > 0 ? (y(), w("div", qe, [x[1] || (x[1] = f("div", {
|
|
633
633
|
class: "font-bold text-14px mt-12px"
|
|
634
|
-
}, "已部署的服务器", -1)),
|
|
635
|
-
key:
|
|
634
|
+
}, "已部署的服务器", -1)), f("div", Ae, [(y(!0), w(F, null, W(g.row.deployment_server, (k) => (y(), w("div", {
|
|
635
|
+
key: k.id,
|
|
636
636
|
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
|
-
}, [
|
|
637
|
+
}, [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(), w("div", De, "暂无部署服务器记录"))]),
|
|
638
638
|
_: 1
|
|
639
639
|
})]),
|
|
640
640
|
_: 1
|
|
641
|
-
}, 8, ["columns", "request-api", "options"])]), e(
|
|
641
|
+
}, 8, ["columns", "request-api", "options"])]), e(q(ee), Y({
|
|
642
642
|
ref_key: "refTdsForm",
|
|
643
|
-
ref:
|
|
644
|
-
},
|
|
645
|
-
title:
|
|
646
|
-
form:
|
|
647
|
-
columns:
|
|
643
|
+
ref: a
|
|
644
|
+
}, u.$formBindProps({
|
|
645
|
+
title: r.value,
|
|
646
|
+
form: c.value,
|
|
647
|
+
columns: S
|
|
648
648
|
}), {
|
|
649
|
-
onSubmit:
|
|
649
|
+
onSubmit: M
|
|
650
650
|
}), null, 16)]);
|
|
651
651
|
};
|
|
652
652
|
}
|
|
653
|
-
}),
|
|
653
|
+
}), Ve = {
|
|
654
654
|
class: "table-box"
|
|
655
|
-
}, Ve = {
|
|
656
|
-
class: "flex items-center"
|
|
657
655
|
}, ze = {
|
|
656
|
+
class: "flex items-center"
|
|
657
|
+
}, Pe = {
|
|
658
658
|
key: 0
|
|
659
659
|
}, Ie = {
|
|
660
660
|
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
661
|
}, Re = {
|
|
664
|
-
class: "text-
|
|
662
|
+
class: "font-bold text-14px mb-8px text-[var(--el-text-color-primary)]"
|
|
665
663
|
}, Oe = {
|
|
664
|
+
class: "text-12px text-[var(--el-text-color-regular)] space-y-4px"
|
|
665
|
+
}, He = {
|
|
666
666
|
key: 1,
|
|
667
667
|
class: "font-bold text-center text-gray-500 py-20"
|
|
668
|
-
},
|
|
668
|
+
}, Ke = /* @__PURE__ */ K({
|
|
669
669
|
__name: "index",
|
|
670
670
|
setup(t) {
|
|
671
671
|
const {
|
|
672
672
|
$t: l,
|
|
673
|
-
$messageBox:
|
|
674
|
-
} = window,
|
|
675
|
-
|
|
676
|
-
|
|
673
|
+
$messageBox: a
|
|
674
|
+
} = window, r = b(), c = b(), v = b(""), n = b({}), m = b("show"), E = H({
|
|
675
|
+
service_type: window.$prodType
|
|
676
|
+
});
|
|
677
|
+
function h() {
|
|
678
|
+
n.value = {}, m.value = "show", v.value = "添加服务器", c.value.open();
|
|
677
679
|
}
|
|
678
|
-
const
|
|
679
|
-
|
|
680
|
-
await
|
|
681
|
-
data:
|
|
682
|
-
|
|
680
|
+
const s = (o) => {
|
|
681
|
+
a(o, "server_name", l("button.delete"), "error").then(async () => {
|
|
682
|
+
await ge({
|
|
683
|
+
data: o.map((i) => i.id),
|
|
684
|
+
service_type: window.$prodType
|
|
685
|
+
}), r.value.getTableList();
|
|
683
686
|
});
|
|
684
687
|
};
|
|
685
|
-
function
|
|
686
|
-
|
|
687
|
-
id:
|
|
688
|
-
},
|
|
688
|
+
function p(o) {
|
|
689
|
+
n.value = {
|
|
690
|
+
id: o.id
|
|
691
|
+
}, m.value = "deploy", v.value = "快速部署", c.value.open();
|
|
689
692
|
}
|
|
690
|
-
const
|
|
693
|
+
const $ = b([{
|
|
691
694
|
ip: "",
|
|
692
695
|
port: ""
|
|
693
|
-
}]),
|
|
696
|
+
}]), M = b([{
|
|
694
697
|
ip: "",
|
|
695
698
|
port: ""
|
|
696
|
-
}]),
|
|
699
|
+
}]), I = b([{
|
|
697
700
|
ip: "",
|
|
698
701
|
port: ""
|
|
699
|
-
}]),
|
|
702
|
+
}]), S = b([{
|
|
700
703
|
ip: "",
|
|
701
704
|
port: ""
|
|
702
705
|
}]);
|
|
703
|
-
async function U(
|
|
704
|
-
if (
|
|
706
|
+
async function U(o) {
|
|
707
|
+
if (m.value === "show") {
|
|
705
708
|
await ve({
|
|
706
|
-
data:
|
|
707
|
-
}),
|
|
709
|
+
data: o
|
|
710
|
+
}), r.value.getTableList(), c.value.close();
|
|
708
711
|
return;
|
|
709
712
|
}
|
|
710
|
-
const
|
|
711
|
-
const
|
|
713
|
+
const i = (g, k) => {
|
|
714
|
+
const B = Math.max(g.length, k.length);
|
|
712
715
|
return Array.from({
|
|
713
|
-
length:
|
|
714
|
-
}, (
|
|
715
|
-
var
|
|
716
|
+
length: B
|
|
717
|
+
}, (N, z) => {
|
|
718
|
+
var R, J, Z, Q;
|
|
716
719
|
return {
|
|
717
|
-
src_ip: ((
|
|
718
|
-
src_port: Number((
|
|
719
|
-
dst_ip: ((
|
|
720
|
-
dst_port: Number((
|
|
720
|
+
src_ip: ((R = g[z]) == null ? void 0 : R.ip) || "",
|
|
721
|
+
src_port: Number((J = g[z]) == null ? void 0 : J.port) || 0,
|
|
722
|
+
dst_ip: ((Z = k[z]) == null ? void 0 : Z.ip) || "",
|
|
723
|
+
dst_port: Number((Q = k[z]) == null ? void 0 : Q.port) || 0
|
|
721
724
|
};
|
|
722
725
|
});
|
|
723
|
-
},
|
|
724
|
-
packages_id: [
|
|
725
|
-
server_id: [
|
|
726
|
+
}, _ = {
|
|
727
|
+
packages_id: [o.packages_id],
|
|
728
|
+
server_id: [n.value.id],
|
|
726
729
|
service_type: window.$prodType,
|
|
727
730
|
deploy_params: {
|
|
728
|
-
probe_name:
|
|
729
|
-
collection_mode:
|
|
730
|
-
interface:
|
|
731
|
-
engine_ip:
|
|
732
|
-
engine_port:
|
|
733
|
-
filterWhitelist:
|
|
734
|
-
filterBlacklist:
|
|
731
|
+
probe_name: o.probe_name || "",
|
|
732
|
+
collection_mode: o.collection_mode,
|
|
733
|
+
interface: o.interface || "",
|
|
734
|
+
engine_ip: o.engine_ip || "",
|
|
735
|
+
engine_port: o.engine_port || "",
|
|
736
|
+
filterWhitelist: i($.value, M.value),
|
|
737
|
+
filterBlacklist: i(I.value, S.value)
|
|
735
738
|
}
|
|
736
739
|
};
|
|
737
|
-
await
|
|
738
|
-
data:
|
|
739
|
-
}),
|
|
740
|
+
await le({
|
|
741
|
+
data: _
|
|
742
|
+
}), r.value.getTableList(), c.value.close();
|
|
740
743
|
}
|
|
741
|
-
function
|
|
742
|
-
we({
|
|
743
|
-
data: [r.id]
|
|
744
|
-
}), s.value.getTableList();
|
|
745
|
-
}
|
|
746
|
-
function W(r) {
|
|
744
|
+
function j(o) {
|
|
747
745
|
xe({
|
|
748
|
-
data: [
|
|
749
|
-
}),
|
|
746
|
+
data: [o.id]
|
|
747
|
+
}), r.value.getTableList();
|
|
750
748
|
}
|
|
751
|
-
function
|
|
749
|
+
function u(o) {
|
|
752
750
|
ke({
|
|
753
|
-
data: [
|
|
754
|
-
}),
|
|
751
|
+
data: [o.id]
|
|
752
|
+
}), r.value.getTableList();
|
|
753
|
+
}
|
|
754
|
+
function x(o) {
|
|
755
|
+
Te({
|
|
756
|
+
data: [o.id]
|
|
757
|
+
}), r.value.getTableList();
|
|
755
758
|
}
|
|
756
|
-
const
|
|
759
|
+
const D = H([{
|
|
757
760
|
field: "server_name",
|
|
758
761
|
name: "服务器名称",
|
|
759
762
|
show: {
|
|
@@ -808,7 +811,7 @@ const M = {
|
|
|
808
811
|
}, {
|
|
809
812
|
field: "arch",
|
|
810
813
|
name: "架构",
|
|
811
|
-
enum:
|
|
814
|
+
enum: be,
|
|
812
815
|
show: {
|
|
813
816
|
type: "select"
|
|
814
817
|
},
|
|
@@ -818,7 +821,7 @@ const M = {
|
|
|
818
821
|
}, {
|
|
819
822
|
field: "deployed_count",
|
|
820
823
|
name: "已部署探针数量",
|
|
821
|
-
render: (
|
|
824
|
+
render: (o) => e("span", null, [o.row.deployment_packages.length])
|
|
822
825
|
}, {
|
|
823
826
|
field: "status",
|
|
824
827
|
name: "状态",
|
|
@@ -861,7 +864,7 @@ const M = {
|
|
|
861
864
|
}, {
|
|
862
865
|
field: "packages_id",
|
|
863
866
|
name: "安装包",
|
|
864
|
-
enum:
|
|
867
|
+
enum: oe,
|
|
865
868
|
fieldNames: {
|
|
866
869
|
value: "id",
|
|
867
870
|
label: "file_name"
|
|
@@ -934,16 +937,16 @@ const M = {
|
|
|
934
937
|
deploy: {
|
|
935
938
|
type: "input",
|
|
936
939
|
tooltip: "白名单配置后,仅采集白名单内相关流量,如不填写,则采集所有流量",
|
|
937
|
-
render: () => e(
|
|
940
|
+
render: () => e(F, null, [e("p", {
|
|
938
941
|
class: "color-[var(--el-text-color-regular)]"
|
|
939
|
-
}, [
|
|
940
|
-
modelValue:
|
|
941
|
-
"onUpdate:modelValue": (
|
|
942
|
+
}, [A("源ip端口:")]), e(V, {
|
|
943
|
+
modelValue: $.value,
|
|
944
|
+
"onUpdate:modelValue": (o) => $.value = o
|
|
942
945
|
}, null), e("p", {
|
|
943
946
|
class: "color-[var(--el-text-color-regular)]"
|
|
944
|
-
}, [
|
|
945
|
-
modelValue:
|
|
946
|
-
"onUpdate:modelValue": (
|
|
947
|
+
}, [A("目的ip端口:")]), e(V, {
|
|
948
|
+
modelValue: M.value,
|
|
949
|
+
"onUpdate:modelValue": (o) => M.value = o
|
|
947
950
|
}, null)])
|
|
948
951
|
},
|
|
949
952
|
hide: !0
|
|
@@ -953,16 +956,16 @@ const M = {
|
|
|
953
956
|
deploy: {
|
|
954
957
|
type: "input",
|
|
955
958
|
tooltip: "黑名单配置后,将不再采集黑名单内相关流量",
|
|
956
|
-
render: () => e(
|
|
959
|
+
render: () => e(F, null, [e("p", {
|
|
957
960
|
class: "color-[var(--el-text-color-regular)]"
|
|
958
|
-
}, [
|
|
959
|
-
modelValue:
|
|
960
|
-
"onUpdate:modelValue": (
|
|
961
|
+
}, [A("源ip端口:")]), e(V, {
|
|
962
|
+
modelValue: I.value,
|
|
963
|
+
"onUpdate:modelValue": (o) => I.value = o
|
|
961
964
|
}, null), e("p", {
|
|
962
965
|
class: "color-[var(--el-text-color-regular)]"
|
|
963
|
-
}, [
|
|
964
|
-
modelValue:
|
|
965
|
-
"onUpdate:modelValue": (
|
|
966
|
+
}, [A("目的ip端口:")]), e(V, {
|
|
967
|
+
modelValue: S.value,
|
|
968
|
+
"onUpdate:modelValue": (o) => S.value = o
|
|
966
969
|
}, null)])
|
|
967
970
|
},
|
|
968
971
|
hide: !0
|
|
@@ -971,122 +974,125 @@ const M = {
|
|
|
971
974
|
name: window.$t("global.operate"),
|
|
972
975
|
width: 180,
|
|
973
976
|
fixed: "right",
|
|
974
|
-
render: (
|
|
977
|
+
render: (o) => e("div", null, [e(d("el-button"), {
|
|
975
978
|
link: !0,
|
|
976
979
|
type: "primary",
|
|
977
980
|
icon: "Connection",
|
|
978
981
|
title: "连通性检查",
|
|
979
982
|
class: "custom-btn",
|
|
980
|
-
onClick: () =>
|
|
981
|
-
}, null), e(
|
|
983
|
+
onClick: () => j(o.row)
|
|
984
|
+
}, null), e(d("el-button"), {
|
|
982
985
|
link: !0,
|
|
983
986
|
type: "primary",
|
|
984
987
|
class: "custom-btn",
|
|
985
|
-
onClick: () =>
|
|
988
|
+
onClick: () => u(o.row)
|
|
986
989
|
}, {
|
|
987
|
-
icon: () => e(
|
|
990
|
+
icon: () => e(d("tds-svg-icon"), {
|
|
988
991
|
name: "install_env",
|
|
989
992
|
tip: "测试安装环境"
|
|
990
993
|
}, null)
|
|
991
|
-
}), e(
|
|
994
|
+
}), e(d("el-button"), {
|
|
992
995
|
link: !0,
|
|
993
996
|
type: "primary",
|
|
994
997
|
class: "custom-btn",
|
|
995
|
-
onClick: () =>
|
|
998
|
+
onClick: () => x(o.row)
|
|
996
999
|
}, {
|
|
997
|
-
icon: () => e(
|
|
1000
|
+
icon: () => e(d("tds-svg-icon"), {
|
|
998
1001
|
name: "docker",
|
|
999
1002
|
tip: "自动安装docker环境"
|
|
1000
1003
|
}, null)
|
|
1001
|
-
}), e(
|
|
1004
|
+
}), e(d("el-button"), {
|
|
1002
1005
|
link: !0,
|
|
1003
1006
|
type: "primary",
|
|
1004
1007
|
class: "custom-btn",
|
|
1005
|
-
onClick: () =>
|
|
1008
|
+
onClick: () => p(o.row)
|
|
1006
1009
|
}, {
|
|
1007
|
-
icon: () => e(
|
|
1010
|
+
icon: () => e(d("tds-svg-icon"), {
|
|
1008
1011
|
name: "deployed",
|
|
1009
1012
|
tip: "部署"
|
|
1010
1013
|
}, null)
|
|
1011
|
-
}), e(
|
|
1014
|
+
}), e(d("el-button"), {
|
|
1012
1015
|
link: !0,
|
|
1013
1016
|
type: "danger",
|
|
1014
1017
|
icon: "Delete",
|
|
1015
1018
|
title: l("button.delete"),
|
|
1016
|
-
onClick: () =>
|
|
1019
|
+
onClick: () => s([o.row])
|
|
1017
1020
|
}, null)])
|
|
1018
1021
|
}]);
|
|
1019
|
-
return (
|
|
1020
|
-
const
|
|
1021
|
-
return
|
|
1022
|
+
return (o, i) => {
|
|
1023
|
+
const _ = d("el-button"), g = d("el-table-column"), k = d("TdsTable");
|
|
1024
|
+
return y(), w("div", Ve, [e(k, {
|
|
1022
1025
|
ref_key: "refTdsTable",
|
|
1023
|
-
ref:
|
|
1024
|
-
columns:
|
|
1025
|
-
"request-api":
|
|
1026
|
+
ref: r,
|
|
1027
|
+
columns: D,
|
|
1028
|
+
"request-api": q(ne),
|
|
1026
1029
|
"search-col": 4,
|
|
1027
|
-
|
|
1030
|
+
"init-param": E,
|
|
1031
|
+
options: o.$tableOptions(),
|
|
1028
1032
|
"reserve-selection": ""
|
|
1029
1033
|
}, {
|
|
1030
|
-
tableHeader:
|
|
1034
|
+
tableHeader: T(() => [f("div", ze, [e(_, {
|
|
1031
1035
|
class: "custom-btn",
|
|
1032
1036
|
type: "primary",
|
|
1033
1037
|
icon: "Plus",
|
|
1034
1038
|
plain: "",
|
|
1035
|
-
onClick:
|
|
1039
|
+
onClick: i[0] || (i[0] = (B) => h())
|
|
1036
1040
|
}, {
|
|
1037
|
-
default:
|
|
1041
|
+
default: T(() => [A(C(q(l)("button.add")), 1)]),
|
|
1038
1042
|
_: 1
|
|
1039
1043
|
})])]),
|
|
1040
|
-
default:
|
|
1044
|
+
default: T(() => [e(g, {
|
|
1041
1045
|
type: "expand"
|
|
1042
1046
|
}, {
|
|
1043
|
-
default:
|
|
1047
|
+
default: T((B) => [B.row.deployment_packages && B.row.deployment_packages.length > 0 ? (y(), w("div", Pe, [i[1] || (i[1] = f("div", {
|
|
1044
1048
|
class: "font-bold text-14px mt-12px"
|
|
1045
|
-
}, "已部署的探针包", -1)),
|
|
1046
|
-
key:
|
|
1049
|
+
}, "已部署的探针包", -1)), f("div", Ie, [(y(!0), w(F, null, W(B.row.deployment_packages, (N) => (y(), w("div", {
|
|
1050
|
+
key: N.id,
|
|
1047
1051
|
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
|
-
}, [
|
|
1052
|
+
}, [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(), w("div", He, "暂无部署服务器记录"))]),
|
|
1049
1053
|
_: 1
|
|
1050
1054
|
})]),
|
|
1051
1055
|
_: 1
|
|
1052
|
-
}, 8, ["columns", "request-api", "options"]), e(
|
|
1056
|
+
}, 8, ["columns", "request-api", "init-param", "options"]), e(q(ee), Y({
|
|
1053
1057
|
ref_key: "refTdsForm",
|
|
1054
|
-
ref:
|
|
1055
|
-
},
|
|
1058
|
+
ref: c
|
|
1059
|
+
}, o.$formBindProps({
|
|
1056
1060
|
title: v.value,
|
|
1057
|
-
form:
|
|
1058
|
-
columns:
|
|
1059
|
-
formKey:
|
|
1061
|
+
form: n.value,
|
|
1062
|
+
columns: D,
|
|
1063
|
+
formKey: m.value
|
|
1060
1064
|
}), {
|
|
1061
1065
|
onSubmit: U
|
|
1062
1066
|
}), null, 16)]);
|
|
1063
1067
|
};
|
|
1064
1068
|
}
|
|
1065
|
-
}),
|
|
1069
|
+
}), We = {
|
|
1066
1070
|
class: "table-box"
|
|
1067
|
-
},
|
|
1071
|
+
}, je = {
|
|
1068
1072
|
style: {
|
|
1069
1073
|
padding: "0 50px"
|
|
1070
1074
|
}
|
|
1071
|
-
},
|
|
1075
|
+
}, Ge = /* @__PURE__ */ K({
|
|
1072
1076
|
__name: "index",
|
|
1073
1077
|
setup(t) {
|
|
1074
|
-
const l =
|
|
1078
|
+
const l = H({
|
|
1079
|
+
service_type: window.$prodType
|
|
1080
|
+
}), a = H([{
|
|
1075
1081
|
field: "packages_name",
|
|
1076
1082
|
name: "探针包",
|
|
1077
|
-
render: (
|
|
1083
|
+
render: (r) => e(F, null, [e("p", {
|
|
1078
1084
|
class: "font-bold"
|
|
1079
|
-
}, [
|
|
1085
|
+
}, [r.row.packages_name]), e("p", {
|
|
1080
1086
|
class: "text-gray-400"
|
|
1081
|
-
}, [
|
|
1087
|
+
}, [r.row.packages_version])])
|
|
1082
1088
|
}, {
|
|
1083
1089
|
field: "server_name",
|
|
1084
1090
|
name: "服务器",
|
|
1085
|
-
render: (
|
|
1091
|
+
render: (r) => e(F, null, [e("p", {
|
|
1086
1092
|
class: "font-bold"
|
|
1087
|
-
}, [
|
|
1093
|
+
}, [r.row.server_name]), e("p", {
|
|
1088
1094
|
class: "text-gray-400"
|
|
1089
|
-
}, [
|
|
1095
|
+
}, [r.row.ip_address])])
|
|
1090
1096
|
}, {
|
|
1091
1097
|
field: "deployment_time",
|
|
1092
1098
|
name: "部署时间"
|
|
@@ -1108,27 +1114,28 @@ const M = {
|
|
|
1108
1114
|
tagType: "success"
|
|
1109
1115
|
}]
|
|
1110
1116
|
}]);
|
|
1111
|
-
return (
|
|
1112
|
-
const
|
|
1113
|
-
return
|
|
1117
|
+
return (r, c) => {
|
|
1118
|
+
const v = d("el-table-column"), n = d("TdsTable");
|
|
1119
|
+
return y(), w("div", We, [e(n, {
|
|
1114
1120
|
ref: "refTdsTable",
|
|
1115
|
-
columns:
|
|
1121
|
+
columns: a,
|
|
1116
1122
|
"search-col": 4,
|
|
1117
|
-
"request-api":
|
|
1118
|
-
options:
|
|
1123
|
+
"request-api": q(we),
|
|
1124
|
+
options: r.$tableOptions(),
|
|
1125
|
+
"init-param": l,
|
|
1119
1126
|
"reserve-selection": ""
|
|
1120
1127
|
}, {
|
|
1121
|
-
default:
|
|
1128
|
+
default: T(() => [e(v, {
|
|
1122
1129
|
type: "expand"
|
|
1123
1130
|
}, {
|
|
1124
|
-
default:
|
|
1131
|
+
default: T((m) => [f("div", je, C(m.row.deployment_log), 1)]),
|
|
1125
1132
|
_: 1
|
|
1126
1133
|
})]),
|
|
1127
1134
|
_: 1
|
|
1128
|
-
}, 8, ["columns", "request-api", "options"])]);
|
|
1135
|
+
}, 8, ["columns", "request-api", "options", "init-param"])]);
|
|
1129
1136
|
};
|
|
1130
1137
|
}
|
|
1131
|
-
}),
|
|
1138
|
+
}), Je = { class: "main-wrapper" }, Ze = /* @__PURE__ */ K({
|
|
1132
1139
|
name: "TCProbe",
|
|
1133
1140
|
__name: "index",
|
|
1134
1141
|
props: {
|
|
@@ -1138,43 +1145,43 @@ const M = {
|
|
|
1138
1145
|
}
|
|
1139
1146
|
},
|
|
1140
1147
|
setup(t) {
|
|
1141
|
-
const l =
|
|
1142
|
-
return (
|
|
1143
|
-
const
|
|
1144
|
-
return
|
|
1148
|
+
const l = b("package");
|
|
1149
|
+
return (a, r) => {
|
|
1150
|
+
const c = d("el-tab-pane"), v = d("el-tabs");
|
|
1151
|
+
return y(), w("div", Je, [
|
|
1145
1152
|
e(v, {
|
|
1146
1153
|
modelValue: l.value,
|
|
1147
|
-
"onUpdate:modelValue":
|
|
1154
|
+
"onUpdate:modelValue": r[0] || (r[0] = (n) => l.value = n),
|
|
1148
1155
|
class: "demo-tabs"
|
|
1149
1156
|
}, {
|
|
1150
|
-
default:
|
|
1151
|
-
e(
|
|
1157
|
+
default: T(() => [
|
|
1158
|
+
e(c, {
|
|
1152
1159
|
label: "安装包管理",
|
|
1153
1160
|
name: "package"
|
|
1154
1161
|
}, {
|
|
1155
|
-
default:
|
|
1156
|
-
l.value === "package" ? (
|
|
1162
|
+
default: T(() => [
|
|
1163
|
+
l.value === "package" ? (y(), G(Ne, {
|
|
1157
1164
|
key: 0,
|
|
1158
1165
|
token: t.token
|
|
1159
1166
|
}, null, 8, ["token"])) : O("", !0)
|
|
1160
1167
|
]),
|
|
1161
1168
|
_: 1
|
|
1162
1169
|
}),
|
|
1163
|
-
e(
|
|
1170
|
+
e(c, {
|
|
1164
1171
|
label: "探针部署",
|
|
1165
1172
|
name: "deploy"
|
|
1166
1173
|
}, {
|
|
1167
|
-
default:
|
|
1168
|
-
l.value === "deploy" ? (
|
|
1174
|
+
default: T(() => [
|
|
1175
|
+
l.value === "deploy" ? (y(), G(Ke, { key: 0 })) : O("", !0)
|
|
1169
1176
|
]),
|
|
1170
1177
|
_: 1
|
|
1171
1178
|
}),
|
|
1172
|
-
e(
|
|
1179
|
+
e(c, {
|
|
1173
1180
|
label: "部署历史",
|
|
1174
1181
|
name: "history"
|
|
1175
1182
|
}, {
|
|
1176
|
-
default:
|
|
1177
|
-
l.value === "history" ? (
|
|
1183
|
+
default: T(() => [
|
|
1184
|
+
l.value === "history" ? (y(), G(Ge, { key: 0 })) : O("", !0)
|
|
1178
1185
|
]),
|
|
1179
1186
|
_: 1
|
|
1180
1187
|
})
|
|
@@ -1185,24 +1192,24 @@ const M = {
|
|
|
1185
1192
|
};
|
|
1186
1193
|
}
|
|
1187
1194
|
});
|
|
1188
|
-
const
|
|
1189
|
-
if (t.install = (
|
|
1190
|
-
for (const
|
|
1191
|
-
|
|
1195
|
+
const Qe = /* @__PURE__ */ te(Ze, [["__scopeId", "data-v-f99b9b23"]]), Xe = (t, l) => {
|
|
1196
|
+
if (t.install = (a) => {
|
|
1197
|
+
for (const r of [t, ...Object.values(l ?? {})])
|
|
1198
|
+
a.component(r.name, r);
|
|
1192
1199
|
}, l)
|
|
1193
|
-
for (const [
|
|
1194
|
-
t[
|
|
1200
|
+
for (const [a, r] of Object.entries(l))
|
|
1201
|
+
t[a] = r;
|
|
1195
1202
|
return t;
|
|
1196
|
-
},
|
|
1197
|
-
TCProbe:
|
|
1198
|
-
},
|
|
1203
|
+
}, Ye = Xe(Qe), et = {
|
|
1204
|
+
TCProbe: Ye
|
|
1205
|
+
}, at = {
|
|
1199
1206
|
install(t, l) {
|
|
1200
|
-
Object.entries(
|
|
1201
|
-
t.component(
|
|
1207
|
+
Object.entries(et).forEach(([a, r]) => {
|
|
1208
|
+
t.component(a, r);
|
|
1202
1209
|
}), l != null && l.prodType && (window.$prodType = l.prodType), l != null && l.envURL && (window.$probeURL = l.envURL);
|
|
1203
1210
|
}
|
|
1204
1211
|
};
|
|
1205
1212
|
export {
|
|
1206
|
-
|
|
1207
|
-
|
|
1213
|
+
Ye as TCProbe,
|
|
1214
|
+
at as default
|
|
1208
1215
|
};
|