@topdatasec/probe 1.0.4 → 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 +390 -388
- 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 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
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,20 +488,20 @@ const U = {
|
|
|
487
488
|
show: {
|
|
488
489
|
type: "input",
|
|
489
490
|
tooltip: "白名单配置后,仅采集白名单内相关流量,如不填写,则采集所有流量",
|
|
490
|
-
render: () => e(
|
|
491
|
+
render: () => e(B, 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": (i) =>
|
|
495
|
+
}, [F("源ip端口:")]), e(N, {
|
|
496
|
+
modelValue: h.value,
|
|
497
|
+
"onUpdate:modelValue": (i) => h.value = i
|
|
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": (i) =>
|
|
502
|
+
}, [F("目的ip端口:")]), e(N, {
|
|
503
|
+
modelValue: a.value,
|
|
504
|
+
"onUpdate:modelValue": (i) => a.value = i
|
|
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(B, null, [e("p", {
|
|
515
516
|
class: "color-[var(--el-text-color-regular)]"
|
|
516
|
-
}, [
|
|
517
|
-
modelValue: s.value,
|
|
518
|
-
"onUpdate:modelValue": (i) => s.value = i
|
|
519
|
-
}, null), e("p", {
|
|
520
|
-
class: "color-[var(--el-text-color-regular)]"
|
|
521
|
-
}, [q("目的ip端口:")]), e(V, {
|
|
517
|
+
}, [F("源ip端口:")]), e(N, {
|
|
522
518
|
modelValue: u.value,
|
|
523
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
|
|
524
525
|
}, null)])
|
|
525
526
|
},
|
|
526
527
|
hide: !0
|
|
@@ -534,7 +535,7 @@ const U = {
|
|
|
534
535
|
link: !0,
|
|
535
536
|
type: "primary",
|
|
536
537
|
class: "custom-btn",
|
|
537
|
-
onClick: () =>
|
|
538
|
+
onClick: () => S(i.row)
|
|
538
539
|
}, {
|
|
539
540
|
icon: () => e(p("tds-svg-icon"), {
|
|
540
541
|
name: "deployed",
|
|
@@ -544,107 +545,108 @@ const U = {
|
|
|
544
545
|
link: !0,
|
|
545
546
|
type: "danger",
|
|
546
547
|
icon: "Delete",
|
|
547
|
-
title:
|
|
548
|
-
onClick: () =>
|
|
548
|
+
title: v("button.delete"),
|
|
549
|
+
onClick: () => I([i.row])
|
|
549
550
|
}, null)])
|
|
550
551
|
}
|
|
551
|
-
]),
|
|
552
|
-
function
|
|
553
|
-
const
|
|
554
|
-
if (!
|
|
552
|
+
]), L = x([]);
|
|
553
|
+
function W(i) {
|
|
554
|
+
const b = i.raw;
|
|
555
|
+
if (!b)
|
|
555
556
|
return;
|
|
556
|
-
const
|
|
557
|
-
fileName:
|
|
558
|
-
fileSize:
|
|
557
|
+
const r = {
|
|
558
|
+
fileName: b.name,
|
|
559
|
+
fileSize: b.size,
|
|
559
560
|
progress: 0,
|
|
560
561
|
progressStatus: "",
|
|
561
562
|
statusText: "准备上传..."
|
|
562
563
|
};
|
|
563
|
-
|
|
564
|
-
const
|
|
565
|
-
|
|
566
|
-
file:
|
|
564
|
+
L.value.push(r);
|
|
565
|
+
const w = L.value.length - 1;
|
|
566
|
+
_e({
|
|
567
|
+
file: b,
|
|
567
568
|
fileDesc: "探针安装包",
|
|
568
569
|
// 替换为你实际的接口地址
|
|
569
|
-
uploadUrl:
|
|
570
|
-
mergeUrl:
|
|
570
|
+
uploadUrl: M.deployURL + "/service_deploy/deployment/packages/upload",
|
|
571
|
+
mergeUrl: M.deployURL + "/service_deploy/deployment/packages/upload_merge",
|
|
572
|
+
token: y.token,
|
|
571
573
|
// 进度回调
|
|
572
|
-
onProgress: (
|
|
573
|
-
const
|
|
574
|
-
|
|
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 = "");
|
|
575
577
|
},
|
|
576
578
|
// 成功回调
|
|
577
579
|
onSuccess: () => {
|
|
578
|
-
var
|
|
579
|
-
const
|
|
580
|
-
|
|
581
|
-
const
|
|
582
|
-
|
|
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);
|
|
583
585
|
}, 3e3);
|
|
584
586
|
},
|
|
585
587
|
// 失败回调
|
|
586
|
-
onError: (
|
|
587
|
-
console.error("文件上传失败:",
|
|
588
|
-
const
|
|
589
|
-
|
|
588
|
+
onError: (c) => {
|
|
589
|
+
console.error("文件上传失败:", c);
|
|
590
|
+
const m = L.value[w];
|
|
591
|
+
m && (m.progressStatus = "exception", m.statusText = c.message || "上传失败");
|
|
590
592
|
}
|
|
591
593
|
});
|
|
592
594
|
}
|
|
593
|
-
return (i,
|
|
594
|
-
const
|
|
595
|
-
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, {
|
|
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": W,
|
|
602
604
|
"show-file-list": !1,
|
|
603
605
|
multiple: ""
|
|
604
606
|
}, {
|
|
605
|
-
default:
|
|
607
|
+
default: $(() => [e(r, {
|
|
606
608
|
class: "el-icon--upload"
|
|
607
609
|
}, {
|
|
608
|
-
default:
|
|
610
|
+
default: $(() => [e(A(se))]),
|
|
609
611
|
_: 1
|
|
610
|
-
}),
|
|
612
|
+
}), b[0] || (b[0] = _("div", {
|
|
611
613
|
class: "el-upload__text"
|
|
612
|
-
}, [
|
|
614
|
+
}, [F(" 点击或拖拽文件到此处上传 "), _("br"), _("em", null, "支持的格式: tar.gz, tgz")], -1))]),
|
|
613
615
|
_: 1
|
|
614
|
-
}),
|
|
615
|
-
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,
|
|
616
618
|
class: "upload-progress-item"
|
|
617
|
-
}, [
|
|
618
|
-
percentage:
|
|
619
|
-
status:
|
|
620
|
-
}, 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), {
|
|
621
623
|
ref_key: "refTdsTable",
|
|
622
624
|
ref: l,
|
|
623
|
-
columns:
|
|
624
|
-
"request-api":
|
|
625
|
+
columns: U,
|
|
626
|
+
"request-api": A(le),
|
|
625
627
|
options: i.$tableOptions()
|
|
626
628
|
}, {
|
|
627
|
-
default:
|
|
629
|
+
default: $(() => [e(m, {
|
|
628
630
|
type: "expand"
|
|
629
631
|
}, {
|
|
630
|
-
default:
|
|
632
|
+
default: $((g) => [g.row.deployment_server && g.row.deployment_server.length > 0 ? (f(), k("div", Ce, [b[1] || (b[1] = _("div", {
|
|
631
633
|
class: "font-bold text-14px mt-12px"
|
|
632
|
-
}, "已部署的服务器", -1)),
|
|
633
|
-
key:
|
|
634
|
+
}, "已部署的服务器", -1)), _("div", qe, [(f(!0), k(B, null, K(g.row.deployment_server, (T) => (f(), k("div", {
|
|
635
|
+
key: T.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
|
+
}, [_("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, "暂无部署服务器记录"))]),
|
|
636
638
|
_: 1
|
|
637
639
|
})]),
|
|
638
640
|
_: 1
|
|
639
|
-
}, 8, ["columns", "request-api", "options"])]), e(
|
|
641
|
+
}, 8, ["columns", "request-api", "options"])]), e(A(Y), X({
|
|
640
642
|
ref_key: "refTdsForm",
|
|
641
|
-
ref:
|
|
643
|
+
ref: n
|
|
642
644
|
}, i.$formBindProps({
|
|
643
|
-
title:
|
|
644
|
-
form:
|
|
645
|
-
columns:
|
|
645
|
+
title: s.value,
|
|
646
|
+
form: d.value,
|
|
647
|
+
columns: U
|
|
646
648
|
}), {
|
|
647
|
-
onSubmit:
|
|
649
|
+
onSubmit: C
|
|
648
650
|
}), null, 16)]);
|
|
649
651
|
};
|
|
650
652
|
}
|
|
@@ -652,106 +654,106 @@ const U = {
|
|
|
652
654
|
class: "table-box"
|
|
653
655
|
}, Ve = {
|
|
654
656
|
class: "flex items-center"
|
|
655
|
-
}, De = {
|
|
656
|
-
key: 0
|
|
657
657
|
}, ze = {
|
|
658
|
-
|
|
658
|
+
key: 0
|
|
659
659
|
}, Ie = {
|
|
660
|
-
class: "
|
|
660
|
+
class: "flex flex-wrap gap-12px p-12px"
|
|
661
661
|
}, Pe = {
|
|
662
|
-
class: "text-
|
|
662
|
+
class: "font-bold text-14px mb-8px text-[var(--el-text-color-primary)]"
|
|
663
663
|
}, Re = {
|
|
664
|
+
class: "text-12px text-[var(--el-text-color-regular)] space-y-4px"
|
|
665
|
+
}, Oe = {
|
|
664
666
|
key: 1,
|
|
665
667
|
class: "font-bold text-center text-gray-500 py-20"
|
|
666
|
-
},
|
|
668
|
+
}, He = /* @__PURE__ */ H({
|
|
667
669
|
__name: "index",
|
|
668
670
|
setup(t) {
|
|
669
671
|
const {
|
|
670
672
|
$t: l,
|
|
671
|
-
$messageBox:
|
|
672
|
-
} = window,
|
|
673
|
-
function
|
|
674
|
-
|
|
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();
|
|
675
677
|
}
|
|
676
|
-
const
|
|
677
|
-
|
|
678
|
-
await
|
|
679
|
-
data:
|
|
680
|
-
}),
|
|
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();
|
|
681
683
|
});
|
|
682
684
|
};
|
|
683
|
-
function
|
|
684
|
-
|
|
685
|
-
id:
|
|
686
|
-
},
|
|
685
|
+
function a(r) {
|
|
686
|
+
o.value = {
|
|
687
|
+
id: r.id
|
|
688
|
+
}, y.value = "deploy", v.value = "快速部署", d.value.open();
|
|
687
689
|
}
|
|
688
|
-
const u =
|
|
690
|
+
const u = x([{
|
|
689
691
|
ip: "",
|
|
690
692
|
port: ""
|
|
691
|
-
}]),
|
|
693
|
+
}]), E = x([{
|
|
692
694
|
ip: "",
|
|
693
695
|
port: ""
|
|
694
|
-
}]),
|
|
696
|
+
}]), C = x([{
|
|
695
697
|
ip: "",
|
|
696
698
|
port: ""
|
|
697
|
-
}]),
|
|
699
|
+
}]), I = x([{
|
|
698
700
|
ip: "",
|
|
699
701
|
port: ""
|
|
700
702
|
}]);
|
|
701
|
-
async function
|
|
702
|
-
if (
|
|
703
|
-
await
|
|
704
|
-
data:
|
|
705
|
-
}),
|
|
703
|
+
async function U(r) {
|
|
704
|
+
if (y.value === "show") {
|
|
705
|
+
await ve({
|
|
706
|
+
data: r
|
|
707
|
+
}), s.value.getTableList(), d.value.close();
|
|
706
708
|
return;
|
|
707
709
|
}
|
|
708
|
-
const
|
|
709
|
-
const
|
|
710
|
+
const w = (m, g) => {
|
|
711
|
+
const T = Math.max(m.length, g.length);
|
|
710
712
|
return Array.from({
|
|
711
|
-
length:
|
|
712
|
-
}, (
|
|
713
|
-
var
|
|
713
|
+
length: T
|
|
714
|
+
}, (D, V) => {
|
|
715
|
+
var P, R, J, Z;
|
|
714
716
|
return {
|
|
715
|
-
src_ip: ((
|
|
716
|
-
src_port: Number((
|
|
717
|
-
dst_ip: ((J =
|
|
718
|
-
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
|
|
719
721
|
};
|
|
720
722
|
});
|
|
721
|
-
},
|
|
722
|
-
packages_id: [
|
|
723
|
-
server_id: [
|
|
723
|
+
}, c = {
|
|
724
|
+
packages_id: [r.packages_id],
|
|
725
|
+
server_id: [o.value.id],
|
|
724
726
|
service_type: window.$prodType,
|
|
725
727
|
deploy_params: {
|
|
726
|
-
probe_name:
|
|
727
|
-
collection_mode:
|
|
728
|
-
interface:
|
|
729
|
-
engine_ip:
|
|
730
|
-
engine_port:
|
|
731
|
-
filterWhitelist:
|
|
732
|
-
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)
|
|
733
735
|
}
|
|
734
736
|
};
|
|
735
737
|
await te({
|
|
736
|
-
data:
|
|
737
|
-
}),
|
|
738
|
-
}
|
|
739
|
-
function P(n) {
|
|
740
|
-
be({
|
|
741
|
-
data: [n.id]
|
|
742
|
-
}), a.value.getTableList();
|
|
738
|
+
data: c
|
|
739
|
+
}), s.value.getTableList(), d.value.close();
|
|
743
740
|
}
|
|
744
|
-
function
|
|
741
|
+
function L(r) {
|
|
745
742
|
we({
|
|
746
|
-
data: [
|
|
747
|
-
}),
|
|
743
|
+
data: [r.id]
|
|
744
|
+
}), s.value.getTableList();
|
|
748
745
|
}
|
|
749
|
-
function
|
|
746
|
+
function W(r) {
|
|
750
747
|
xe({
|
|
751
|
-
data: [
|
|
752
|
-
}),
|
|
748
|
+
data: [r.id]
|
|
749
|
+
}), s.value.getTableList();
|
|
753
750
|
}
|
|
754
|
-
|
|
751
|
+
function i(r) {
|
|
752
|
+
ke({
|
|
753
|
+
data: [r.id]
|
|
754
|
+
}), s.value.getTableList();
|
|
755
|
+
}
|
|
756
|
+
const b = G([{
|
|
755
757
|
field: "server_name",
|
|
756
758
|
name: "服务器名称",
|
|
757
759
|
show: {
|
|
@@ -806,7 +808,7 @@ const U = {
|
|
|
806
808
|
}, {
|
|
807
809
|
field: "arch",
|
|
808
810
|
name: "架构",
|
|
809
|
-
enum:
|
|
811
|
+
enum: he,
|
|
810
812
|
show: {
|
|
811
813
|
type: "select"
|
|
812
814
|
},
|
|
@@ -816,7 +818,7 @@ const U = {
|
|
|
816
818
|
}, {
|
|
817
819
|
field: "deployed_count",
|
|
818
820
|
name: "已部署探针数量",
|
|
819
|
-
render: (
|
|
821
|
+
render: (r) => e("span", null, [r.row.deployment_packages.length])
|
|
820
822
|
}, {
|
|
821
823
|
field: "status",
|
|
822
824
|
name: "状态",
|
|
@@ -932,16 +934,16 @@ const U = {
|
|
|
932
934
|
deploy: {
|
|
933
935
|
type: "input",
|
|
934
936
|
tooltip: "白名单配置后,仅采集白名单内相关流量,如不填写,则采集所有流量",
|
|
935
|
-
render: () => e(
|
|
937
|
+
render: () => e(B, null, [e("p", {
|
|
936
938
|
class: "color-[var(--el-text-color-regular)]"
|
|
937
|
-
}, [
|
|
939
|
+
}, [F("源ip端口:")]), e(N, {
|
|
938
940
|
modelValue: u.value,
|
|
939
|
-
"onUpdate:modelValue": (
|
|
941
|
+
"onUpdate:modelValue": (r) => u.value = r
|
|
940
942
|
}, null), e("p", {
|
|
941
943
|
class: "color-[var(--el-text-color-regular)]"
|
|
942
|
-
}, [
|
|
943
|
-
modelValue:
|
|
944
|
-
"onUpdate:modelValue": (
|
|
944
|
+
}, [F("目的ip端口:")]), e(N, {
|
|
945
|
+
modelValue: E.value,
|
|
946
|
+
"onUpdate:modelValue": (r) => E.value = r
|
|
945
947
|
}, null)])
|
|
946
948
|
},
|
|
947
949
|
hide: !0
|
|
@@ -951,16 +953,16 @@ const U = {
|
|
|
951
953
|
deploy: {
|
|
952
954
|
type: "input",
|
|
953
955
|
tooltip: "黑名单配置后,将不再采集黑名单内相关流量",
|
|
954
|
-
render: () => e(
|
|
956
|
+
render: () => e(B, null, [e("p", {
|
|
955
957
|
class: "color-[var(--el-text-color-regular)]"
|
|
956
|
-
}, [
|
|
957
|
-
modelValue:
|
|
958
|
-
"onUpdate:modelValue": (
|
|
958
|
+
}, [F("源ip端口:")]), e(N, {
|
|
959
|
+
modelValue: C.value,
|
|
960
|
+
"onUpdate:modelValue": (r) => C.value = r
|
|
959
961
|
}, null), e("p", {
|
|
960
962
|
class: "color-[var(--el-text-color-regular)]"
|
|
961
|
-
}, [
|
|
962
|
-
modelValue:
|
|
963
|
-
"onUpdate:modelValue": (
|
|
963
|
+
}, [F("目的ip端口:")]), e(N, {
|
|
964
|
+
modelValue: I.value,
|
|
965
|
+
"onUpdate:modelValue": (r) => I.value = r
|
|
964
966
|
}, null)])
|
|
965
967
|
},
|
|
966
968
|
hide: !0
|
|
@@ -969,18 +971,18 @@ const U = {
|
|
|
969
971
|
name: window.$t("global.operate"),
|
|
970
972
|
width: 180,
|
|
971
973
|
fixed: "right",
|
|
972
|
-
render: (
|
|
974
|
+
render: (r) => e("div", null, [e(p("el-button"), {
|
|
973
975
|
link: !0,
|
|
974
976
|
type: "primary",
|
|
975
977
|
icon: "Connection",
|
|
976
978
|
title: "连通性检查",
|
|
977
979
|
class: "custom-btn",
|
|
978
|
-
onClick: () =>
|
|
980
|
+
onClick: () => L(r.row)
|
|
979
981
|
}, null), e(p("el-button"), {
|
|
980
982
|
link: !0,
|
|
981
983
|
type: "primary",
|
|
982
984
|
class: "custom-btn",
|
|
983
|
-
onClick: () =>
|
|
985
|
+
onClick: () => W(r.row)
|
|
984
986
|
}, {
|
|
985
987
|
icon: () => e(p("tds-svg-icon"), {
|
|
986
988
|
name: "install_env",
|
|
@@ -990,7 +992,7 @@ const U = {
|
|
|
990
992
|
link: !0,
|
|
991
993
|
type: "primary",
|
|
992
994
|
class: "custom-btn",
|
|
993
|
-
onClick: () =>
|
|
995
|
+
onClick: () => i(r.row)
|
|
994
996
|
}, {
|
|
995
997
|
icon: () => e(p("tds-svg-icon"), {
|
|
996
998
|
name: "docker",
|
|
@@ -1000,7 +1002,7 @@ const U = {
|
|
|
1000
1002
|
link: !0,
|
|
1001
1003
|
type: "primary",
|
|
1002
1004
|
class: "custom-btn",
|
|
1003
|
-
onClick: () =>
|
|
1005
|
+
onClick: () => a(r.row)
|
|
1004
1006
|
}, {
|
|
1005
1007
|
icon: () => e(p("tds-svg-icon"), {
|
|
1006
1008
|
name: "deployed",
|
|
@@ -1011,80 +1013,80 @@ const U = {
|
|
|
1011
1013
|
type: "danger",
|
|
1012
1014
|
icon: "Delete",
|
|
1013
1015
|
title: l("button.delete"),
|
|
1014
|
-
onClick: () =>
|
|
1016
|
+
onClick: () => h([r.row])
|
|
1015
1017
|
}, null)])
|
|
1016
1018
|
}]);
|
|
1017
|
-
return (
|
|
1018
|
-
const
|
|
1019
|
-
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, {
|
|
1020
1022
|
ref_key: "refTdsTable",
|
|
1021
|
-
ref:
|
|
1022
|
-
columns:
|
|
1023
|
-
"request-api":
|
|
1023
|
+
ref: s,
|
|
1024
|
+
columns: b,
|
|
1025
|
+
"request-api": A(oe),
|
|
1024
1026
|
"search-col": 4,
|
|
1025
|
-
options:
|
|
1027
|
+
options: r.$tableOptions(),
|
|
1026
1028
|
"reserve-selection": ""
|
|
1027
1029
|
}, {
|
|
1028
|
-
tableHeader:
|
|
1030
|
+
tableHeader: $(() => [_("div", Ve, [e(c, {
|
|
1029
1031
|
class: "custom-btn",
|
|
1030
1032
|
type: "primary",
|
|
1031
1033
|
icon: "Plus",
|
|
1032
1034
|
plain: "",
|
|
1033
|
-
onClick:
|
|
1035
|
+
onClick: w[0] || (w[0] = (T) => S())
|
|
1034
1036
|
}, {
|
|
1035
|
-
default:
|
|
1037
|
+
default: $(() => [F(q(A(l)("button.add")), 1)]),
|
|
1036
1038
|
_: 1
|
|
1037
1039
|
})])]),
|
|
1038
|
-
default:
|
|
1040
|
+
default: $(() => [e(m, {
|
|
1039
1041
|
type: "expand"
|
|
1040
1042
|
}, {
|
|
1041
|
-
default:
|
|
1043
|
+
default: $((T) => [T.row.deployment_packages && T.row.deployment_packages.length > 0 ? (f(), k("div", ze, [w[1] || (w[1] = _("div", {
|
|
1042
1044
|
class: "font-bold text-14px mt-12px"
|
|
1043
|
-
}, "已部署的探针包", -1)),
|
|
1044
|
-
key:
|
|
1045
|
+
}, "已部署的探针包", -1)), _("div", Ie, [(f(!0), k(B, null, K(T.row.deployment_packages, (D) => (f(), k("div", {
|
|
1046
|
+
key: D.id,
|
|
1045
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"
|
|
1046
|
-
}, [
|
|
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, "暂无部署服务器记录"))]),
|
|
1047
1049
|
_: 1
|
|
1048
1050
|
})]),
|
|
1049
1051
|
_: 1
|
|
1050
|
-
}, 8, ["columns", "request-api", "options"]), e(
|
|
1052
|
+
}, 8, ["columns", "request-api", "options"]), e(A(Y), X({
|
|
1051
1053
|
ref_key: "refTdsForm",
|
|
1052
|
-
ref:
|
|
1053
|
-
},
|
|
1054
|
-
title:
|
|
1055
|
-
form:
|
|
1056
|
-
columns:
|
|
1057
|
-
formKey:
|
|
1054
|
+
ref: d
|
|
1055
|
+
}, r.$formBindProps({
|
|
1056
|
+
title: v.value,
|
|
1057
|
+
form: o.value,
|
|
1058
|
+
columns: b,
|
|
1059
|
+
formKey: y.value
|
|
1058
1060
|
}), {
|
|
1059
|
-
onSubmit:
|
|
1061
|
+
onSubmit: U
|
|
1060
1062
|
}), null, 16)]);
|
|
1061
1063
|
};
|
|
1062
1064
|
}
|
|
1063
|
-
}),
|
|
1065
|
+
}), Ke = {
|
|
1064
1066
|
class: "table-box"
|
|
1065
|
-
},
|
|
1067
|
+
}, We = {
|
|
1066
1068
|
style: {
|
|
1067
1069
|
padding: "0 50px"
|
|
1068
1070
|
}
|
|
1069
|
-
},
|
|
1071
|
+
}, je = /* @__PURE__ */ H({
|
|
1070
1072
|
__name: "index",
|
|
1071
1073
|
setup(t) {
|
|
1072
|
-
const l =
|
|
1074
|
+
const l = G([{
|
|
1073
1075
|
field: "packages_name",
|
|
1074
1076
|
name: "探针包",
|
|
1075
|
-
render: (
|
|
1077
|
+
render: (n) => e(B, null, [e("p", {
|
|
1076
1078
|
class: "font-bold"
|
|
1077
|
-
}, [
|
|
1079
|
+
}, [n.row.packages_name]), e("p", {
|
|
1078
1080
|
class: "text-gray-400"
|
|
1079
|
-
}, [
|
|
1081
|
+
}, [n.row.packages_version])])
|
|
1080
1082
|
}, {
|
|
1081
1083
|
field: "server_name",
|
|
1082
1084
|
name: "服务器",
|
|
1083
|
-
render: (
|
|
1085
|
+
render: (n) => e(B, null, [e("p", {
|
|
1084
1086
|
class: "font-bold"
|
|
1085
|
-
}, [
|
|
1087
|
+
}, [n.row.server_name]), e("p", {
|
|
1086
1088
|
class: "text-gray-400"
|
|
1087
|
-
}, [
|
|
1089
|
+
}, [n.row.ip_address])])
|
|
1088
1090
|
}, {
|
|
1089
1091
|
field: "deployment_time",
|
|
1090
1092
|
name: "部署时间"
|
|
@@ -1106,27 +1108,27 @@ const U = {
|
|
|
1106
1108
|
tagType: "success"
|
|
1107
1109
|
}]
|
|
1108
1110
|
}]);
|
|
1109
|
-
return (
|
|
1110
|
-
const
|
|
1111
|
-
return
|
|
1111
|
+
return (n, s) => {
|
|
1112
|
+
const d = p("el-table-column"), v = p("TdsTable");
|
|
1113
|
+
return f(), k("div", Ke, [e(v, {
|
|
1112
1114
|
ref: "refTdsTable",
|
|
1113
1115
|
columns: l,
|
|
1114
1116
|
"search-col": 4,
|
|
1115
|
-
"request-api":
|
|
1116
|
-
options:
|
|
1117
|
+
"request-api": A(be),
|
|
1118
|
+
options: n.$tableOptions(),
|
|
1117
1119
|
"reserve-selection": ""
|
|
1118
1120
|
}, {
|
|
1119
|
-
default:
|
|
1121
|
+
default: $(() => [e(d, {
|
|
1120
1122
|
type: "expand"
|
|
1121
1123
|
}, {
|
|
1122
|
-
default:
|
|
1124
|
+
default: $((o) => [_("div", We, q(o.row.deployment_log), 1)]),
|
|
1123
1125
|
_: 1
|
|
1124
1126
|
})]),
|
|
1125
1127
|
_: 1
|
|
1126
1128
|
}, 8, ["columns", "request-api", "options"])]);
|
|
1127
1129
|
};
|
|
1128
1130
|
}
|
|
1129
|
-
}),
|
|
1131
|
+
}), Ge = { class: "main-wrapper" }, Je = /* @__PURE__ */ H({
|
|
1130
1132
|
name: "TCProbe",
|
|
1131
1133
|
__name: "index",
|
|
1132
1134
|
props: {
|
|
@@ -1136,43 +1138,43 @@ const U = {
|
|
|
1136
1138
|
}
|
|
1137
1139
|
},
|
|
1138
1140
|
setup(t) {
|
|
1139
|
-
const l =
|
|
1140
|
-
return (
|
|
1141
|
-
const
|
|
1142
|
-
return
|
|
1143
|
-
e(
|
|
1144
|
-
modelValue:
|
|
1145
|
-
"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),
|
|
1146
1148
|
class: "demo-tabs"
|
|
1147
1149
|
}, {
|
|
1148
|
-
default:
|
|
1149
|
-
e(
|
|
1150
|
+
default: $(() => [
|
|
1151
|
+
e(d, {
|
|
1150
1152
|
label: "安装包管理",
|
|
1151
1153
|
name: "package"
|
|
1152
1154
|
}, {
|
|
1153
|
-
default:
|
|
1154
|
-
|
|
1155
|
+
default: $(() => [
|
|
1156
|
+
l.value === "package" ? (f(), j(De, {
|
|
1155
1157
|
key: 0,
|
|
1156
|
-
token:
|
|
1158
|
+
token: t.token
|
|
1157
1159
|
}, null, 8, ["token"])) : O("", !0)
|
|
1158
1160
|
]),
|
|
1159
1161
|
_: 1
|
|
1160
1162
|
}),
|
|
1161
|
-
e(
|
|
1163
|
+
e(d, {
|
|
1162
1164
|
label: "探针部署",
|
|
1163
1165
|
name: "deploy"
|
|
1164
1166
|
}, {
|
|
1165
|
-
default:
|
|
1166
|
-
|
|
1167
|
+
default: $(() => [
|
|
1168
|
+
l.value === "deploy" ? (f(), j(He, { key: 0 })) : O("", !0)
|
|
1167
1169
|
]),
|
|
1168
1170
|
_: 1
|
|
1169
1171
|
}),
|
|
1170
|
-
e(
|
|
1172
|
+
e(d, {
|
|
1171
1173
|
label: "部署历史",
|
|
1172
1174
|
name: "history"
|
|
1173
1175
|
}, {
|
|
1174
|
-
default:
|
|
1175
|
-
|
|
1176
|
+
default: $(() => [
|
|
1177
|
+
l.value === "history" ? (f(), j(je, { key: 0 })) : O("", !0)
|
|
1176
1178
|
]),
|
|
1177
1179
|
_: 1
|
|
1178
1180
|
})
|
|
@@ -1183,24 +1185,24 @@ const U = {
|
|
|
1183
1185
|
};
|
|
1184
1186
|
}
|
|
1185
1187
|
});
|
|
1186
|
-
const
|
|
1187
|
-
if (t.install = (
|
|
1188
|
-
for (const
|
|
1189
|
-
|
|
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);
|
|
1190
1192
|
}, l)
|
|
1191
|
-
for (const [
|
|
1192
|
-
t[
|
|
1193
|
+
for (const [n, s] of Object.entries(l))
|
|
1194
|
+
t[n] = s;
|
|
1193
1195
|
return t;
|
|
1194
|
-
},
|
|
1195
|
-
TCProbe:
|
|
1196
|
-
},
|
|
1196
|
+
}, Xe = Qe(Ze), Ye = {
|
|
1197
|
+
TCProbe: Xe
|
|
1198
|
+
}, rt = {
|
|
1197
1199
|
install(t, l) {
|
|
1198
|
-
Object.entries(
|
|
1199
|
-
t.component(
|
|
1200
|
+
Object.entries(Ye).forEach(([n, s]) => {
|
|
1201
|
+
t.component(n, s);
|
|
1200
1202
|
}), l != null && l.prodType && (window.$prodType = l.prodType), l != null && l.envURL && (window.$probeURL = l.envURL);
|
|
1201
1203
|
}
|
|
1202
1204
|
};
|
|
1203
1205
|
export {
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
+
Xe as TCProbe,
|
|
1207
|
+
rt as default
|
|
1206
1208
|
};
|