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