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