@topdatasec/probe 1.0.8 → 1.0.10
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 +682 -476
- package/lib/t-probe-ui.umd.js +1 -1
- package/package.json +1 -1
package/lib/t-probe-ui.es.js
CHANGED
|
@@ -1,298 +1,325 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { CircleClose as
|
|
3
|
-
import { TdsTable as
|
|
4
|
-
import
|
|
5
|
-
import { ElMessage as
|
|
6
|
-
const
|
|
1
|
+
import { defineComponent as W, useModel as de, resolveComponent as c, openBlock as h, createElementBlock as x, Fragment as z, renderList as G, createVNode as e, withCtx as b, unref as F, createCommentVNode as K, ref as w, reactive as H, createTextVNode as E, createElementVNode as p, toDisplayString as q, normalizeClass as te, withModifiers as le, mergeProps as oe, onUnmounted as pe, createBlock as Q } from "vue";
|
|
2
|
+
import { CircleClose as ce, UploadFilled as me } from "@element-plus/icons-vue";
|
|
3
|
+
import { TdsTable as _e, TdsForm as re } from "topdatasec-ui";
|
|
4
|
+
import ye from "spark-md5";
|
|
5
|
+
import { ElMessage as ee } from "element-plus";
|
|
6
|
+
const fe = {
|
|
7
7
|
key: 0,
|
|
8
8
|
class: "absolute right--13px text-#f56c6c hover:cursor-pointer"
|
|
9
|
-
},
|
|
9
|
+
}, ve = /* @__PURE__ */ W({
|
|
10
10
|
__name: "IpPortList",
|
|
11
11
|
props: {
|
|
12
12
|
modelValue: { default: () => [{ ip: "", port: "" }] },
|
|
13
13
|
modelModifiers: {}
|
|
14
14
|
},
|
|
15
15
|
emits: ["update:modelValue"],
|
|
16
|
-
setup(
|
|
17
|
-
const
|
|
18
|
-
function
|
|
19
|
-
|
|
16
|
+
setup(l) {
|
|
17
|
+
const o = de(l, "modelValue"), { $t: n } = window;
|
|
18
|
+
function a() {
|
|
19
|
+
o.value = [...o.value, { ip: "", port: "" }];
|
|
20
20
|
}
|
|
21
|
-
function
|
|
22
|
-
const
|
|
23
|
-
|
|
21
|
+
function m(y) {
|
|
22
|
+
const r = [...o.value];
|
|
23
|
+
r.splice(y, 1), o.value = r;
|
|
24
24
|
}
|
|
25
|
-
return (
|
|
26
|
-
const
|
|
27
|
-
return
|
|
28
|
-
(
|
|
29
|
-
key:
|
|
25
|
+
return (y, r) => {
|
|
26
|
+
const v = c("el-input"), k = c("el-form-item"), g = c("el-icon"), i = c("el-button");
|
|
27
|
+
return h(), x("div", null, [
|
|
28
|
+
(h(!0), x(z, null, G(o.value, (_, U) => (h(), x("div", {
|
|
29
|
+
key: U,
|
|
30
30
|
class: "flex form-m0 w-100% mb-5px"
|
|
31
31
|
}, [
|
|
32
|
-
e(
|
|
33
|
-
default:
|
|
34
|
-
e(
|
|
35
|
-
modelValue:
|
|
36
|
-
"onUpdate:modelValue": (M) =>
|
|
32
|
+
e(k, { class: "w-70%" }, {
|
|
33
|
+
default: b(() => [
|
|
34
|
+
e(v, {
|
|
35
|
+
modelValue: _.ip,
|
|
36
|
+
"onUpdate:modelValue": (M) => _.ip = M,
|
|
37
37
|
class: "min-w-300px w-100%",
|
|
38
38
|
placeholder: "IP"
|
|
39
39
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
40
40
|
]),
|
|
41
41
|
_: 2
|
|
42
42
|
}, 1024),
|
|
43
|
-
e(
|
|
44
|
-
default:
|
|
45
|
-
e(
|
|
46
|
-
modelValue:
|
|
47
|
-
"onUpdate:modelValue": (M) =>
|
|
43
|
+
e(k, { class: "ml-auto w-30%" }, {
|
|
44
|
+
default: b(() => [
|
|
45
|
+
e(v, {
|
|
46
|
+
modelValue: _.port,
|
|
47
|
+
"onUpdate:modelValue": (M) => _.port = M,
|
|
48
48
|
class: "ml-10",
|
|
49
|
-
placeholder:
|
|
49
|
+
placeholder: F(n)("global.port")
|
|
50
50
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])
|
|
51
51
|
]),
|
|
52
52
|
_: 2
|
|
53
53
|
}, 1024),
|
|
54
|
-
|
|
55
|
-
e(
|
|
56
|
-
onClick: (M) =>
|
|
54
|
+
o.value.length > 1 ? (h(), x("div", fe, [
|
|
55
|
+
e(g, {
|
|
56
|
+
onClick: (M) => m(U)
|
|
57
57
|
}, {
|
|
58
|
-
default:
|
|
59
|
-
e(
|
|
58
|
+
default: b(() => [
|
|
59
|
+
e(F(ce))
|
|
60
60
|
]),
|
|
61
61
|
_: 1
|
|
62
62
|
}, 8, ["onClick"])
|
|
63
|
-
])) :
|
|
63
|
+
])) : K("", !0)
|
|
64
64
|
]))), 128)),
|
|
65
|
-
e(
|
|
65
|
+
e(i, {
|
|
66
66
|
class: "w-100% mt-10px border-dashed!",
|
|
67
67
|
icon: "Plus",
|
|
68
|
-
onClick:
|
|
68
|
+
onClick: a
|
|
69
69
|
})
|
|
70
70
|
]);
|
|
71
71
|
};
|
|
72
72
|
}
|
|
73
73
|
});
|
|
74
|
-
const
|
|
75
|
-
const
|
|
76
|
-
for (const [
|
|
77
|
-
a
|
|
78
|
-
return
|
|
79
|
-
},
|
|
80
|
-
function
|
|
81
|
-
return new Promise((
|
|
82
|
-
const
|
|
83
|
-
let
|
|
84
|
-
|
|
85
|
-
var
|
|
86
|
-
if (
|
|
87
|
-
const
|
|
88
|
-
|
|
74
|
+
const ne = (l, o) => {
|
|
75
|
+
const n = l.__vccOpts || l;
|
|
76
|
+
for (const [a, m] of o)
|
|
77
|
+
n[a] = m;
|
|
78
|
+
return n;
|
|
79
|
+
}, P = /* @__PURE__ */ ne(ve, [["__scopeId", "data-v-16fc9c64"]]), V = 4 * 1024 * 1024;
|
|
80
|
+
function ge(l, o) {
|
|
81
|
+
return new Promise((n, a) => {
|
|
82
|
+
const m = new ye.ArrayBuffer(), y = new FileReader(), r = Math.ceil(l.size / V);
|
|
83
|
+
let v = 0;
|
|
84
|
+
y.onload = (g) => {
|
|
85
|
+
var i;
|
|
86
|
+
if (m.append((i = g.target) == null ? void 0 : i.result), v++, o) {
|
|
87
|
+
const _ = Math.floor(v / r * 100);
|
|
88
|
+
o(_);
|
|
89
89
|
}
|
|
90
|
-
if (
|
|
91
|
-
|
|
90
|
+
if (v < r)
|
|
91
|
+
k();
|
|
92
92
|
else {
|
|
93
|
-
const
|
|
94
|
-
|
|
93
|
+
const _ = m.end();
|
|
94
|
+
n(_);
|
|
95
95
|
}
|
|
96
|
-
},
|
|
97
|
-
|
|
96
|
+
}, y.onerror = () => {
|
|
97
|
+
a(new Error("MD5计算失败"));
|
|
98
98
|
};
|
|
99
|
-
function
|
|
100
|
-
const
|
|
101
|
-
|
|
99
|
+
function k() {
|
|
100
|
+
const g = v * V, i = Math.min(g + V, l.size);
|
|
101
|
+
y.readAsArrayBuffer(l.slice(g, i));
|
|
102
102
|
}
|
|
103
|
-
|
|
103
|
+
k();
|
|
104
104
|
});
|
|
105
105
|
}
|
|
106
|
-
async function
|
|
107
|
-
const
|
|
108
|
-
|
|
106
|
+
async function he(l, o, n, a, m, y = "/api/upload/chunk") {
|
|
107
|
+
const r = o * V, v = Math.min(r + V, l.size), k = l.slice(r, v), g = v - r, i = new FormData();
|
|
108
|
+
i.append("file", k, l.name), i.append("chunkIndex", String(o + 1)), i.append("totalChunkNum", String(n)), i.append("fileMd5", a), i.append("tds_token", m), i.append("fileName", l.name), i.append("fileSize", String(l.size)), i.append("fileExt", l.name.substring(l.name.lastIndexOf(".") + 1)), i.append("chunkSize", String(V)), i.append("currentChunkSize", String(g));
|
|
109
109
|
try {
|
|
110
|
-
const
|
|
110
|
+
const _ = await fetch(y, {
|
|
111
111
|
method: "POST",
|
|
112
|
-
body:
|
|
112
|
+
body: i
|
|
113
113
|
});
|
|
114
|
-
if (console.log(
|
|
115
|
-
throw new Error(`分片 ${
|
|
116
|
-
const
|
|
117
|
-
if (console.log(
|
|
118
|
-
throw new Error(`上传失败: ${
|
|
114
|
+
if (console.log(_, "upload response"), !_.ok)
|
|
115
|
+
throw new Error(`分片 ${o + 1} 上传失败,HTTP状态码: ${_.status}`);
|
|
116
|
+
const U = await _.json();
|
|
117
|
+
if (console.log(U, "upload result"), U.recode !== 0)
|
|
118
|
+
throw new Error(`上传失败: ${U.remsg || "未知错误"}`);
|
|
119
119
|
return !0;
|
|
120
|
-
} catch (
|
|
121
|
-
throw console.error(`上传分片 ${
|
|
120
|
+
} catch (_) {
|
|
121
|
+
throw console.error(`上传分片 ${o + 1} 时出错:`, _), _;
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
|
-
async function
|
|
124
|
+
async function be(l, o = "/api/upload/merge") {
|
|
125
125
|
try {
|
|
126
|
-
if (!(await fetch(
|
|
126
|
+
if (!(await fetch(o, {
|
|
127
127
|
method: "POST",
|
|
128
128
|
headers: {
|
|
129
129
|
"Content-Type": "application/json"
|
|
130
130
|
},
|
|
131
|
-
body: JSON.stringify(
|
|
131
|
+
body: JSON.stringify(l)
|
|
132
132
|
})).ok)
|
|
133
133
|
throw new Error("文件合并失败");
|
|
134
134
|
return !0;
|
|
135
|
-
} catch (
|
|
136
|
-
return console.error("合并分片时出错:",
|
|
135
|
+
} catch (n) {
|
|
136
|
+
return console.error("合并分片时出错:", n), !1;
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
|
-
async function
|
|
140
|
-
const { token:
|
|
139
|
+
async function we(l) {
|
|
140
|
+
const { token: o, file: n, fileDesc: a = "", uploadUrl: m = "/api/upload/chunk", mergeUrl: y = "/api/upload/merge", onProgress: r, onSuccess: v, onError: k } = l;
|
|
141
141
|
try {
|
|
142
|
-
|
|
142
|
+
r == null || r({
|
|
143
143
|
progress: 0,
|
|
144
144
|
statusText: "正在计算文件MD5...",
|
|
145
145
|
status: "preparing"
|
|
146
146
|
});
|
|
147
|
-
const
|
|
148
|
-
|
|
147
|
+
const i = await ge(n, (S) => {
|
|
148
|
+
r == null || r({
|
|
149
149
|
progress: Math.floor(S * 0.1),
|
|
150
150
|
// MD5计算占10%进度
|
|
151
151
|
statusText: `正在计算文件MD5... ${S}%`,
|
|
152
152
|
status: "preparing"
|
|
153
153
|
});
|
|
154
154
|
});
|
|
155
|
-
|
|
155
|
+
r == null || r({
|
|
156
156
|
progress: 10,
|
|
157
157
|
statusText: "MD5计算完成",
|
|
158
158
|
status: "preparing",
|
|
159
|
-
fileMd5:
|
|
159
|
+
fileMd5: i
|
|
160
160
|
});
|
|
161
|
-
const
|
|
162
|
-
|
|
161
|
+
const _ = Math.ceil(n.size / V);
|
|
162
|
+
r == null || r({
|
|
163
163
|
progress: 10,
|
|
164
|
-
statusText: `开始上传 (共${
|
|
164
|
+
statusText: `开始上传 (共${_}个分片)`,
|
|
165
165
|
status: "uploading",
|
|
166
|
-
fileMd5:
|
|
166
|
+
fileMd5: i
|
|
167
167
|
});
|
|
168
|
-
for (let S = 0; S <
|
|
169
|
-
const
|
|
170
|
-
|
|
171
|
-
progress: 10 +
|
|
172
|
-
statusText: `正在上传分片 ${S + 1}/${
|
|
168
|
+
for (let S = 0; S < _; S++) {
|
|
169
|
+
const I = Math.floor(S / _ * 80);
|
|
170
|
+
r == null || r({
|
|
171
|
+
progress: 10 + I,
|
|
172
|
+
statusText: `正在上传分片 ${S + 1}/${_}`,
|
|
173
173
|
status: "uploading",
|
|
174
|
-
fileMd5:
|
|
175
|
-
}), await
|
|
174
|
+
fileMd5: i
|
|
175
|
+
}), await he(n, S, _, i, o, m);
|
|
176
176
|
}
|
|
177
|
-
|
|
177
|
+
r == null || r({
|
|
178
178
|
progress: 90,
|
|
179
179
|
statusText: "正在合并文件...",
|
|
180
180
|
status: "merging",
|
|
181
|
-
fileMd5:
|
|
181
|
+
fileMd5: i
|
|
182
182
|
});
|
|
183
|
-
const
|
|
184
|
-
fileDesc:
|
|
185
|
-
fileExt:
|
|
186
|
-
fileMd5:
|
|
187
|
-
fileName:
|
|
188
|
-
fileSize: String(
|
|
189
|
-
tds_token:
|
|
190
|
-
totalChunkNum: String(
|
|
183
|
+
const U = n.name.substring(n.name.lastIndexOf(".") + 1), M = {
|
|
184
|
+
fileDesc: a,
|
|
185
|
+
fileExt: U,
|
|
186
|
+
fileMd5: i,
|
|
187
|
+
fileName: n.name,
|
|
188
|
+
fileSize: String(n.size),
|
|
189
|
+
tds_token: o,
|
|
190
|
+
totalChunkNum: String(_)
|
|
191
191
|
};
|
|
192
|
-
if (!await
|
|
192
|
+
if (!await be(M, y))
|
|
193
193
|
throw new Error("文件合并失败");
|
|
194
|
-
|
|
194
|
+
r == null || r({
|
|
195
195
|
progress: 100,
|
|
196
196
|
statusText: "上传成功",
|
|
197
197
|
status: "success",
|
|
198
|
-
fileMd5:
|
|
199
|
-
}),
|
|
200
|
-
} catch (
|
|
201
|
-
|
|
198
|
+
fileMd5: i
|
|
199
|
+
}), ee.success(`${n.name} 上传成功`), v == null || v(i);
|
|
200
|
+
} catch (g) {
|
|
201
|
+
r == null || r({
|
|
202
202
|
progress: 0,
|
|
203
|
-
statusText:
|
|
203
|
+
statusText: g.message || "上传失败",
|
|
204
204
|
status: "error"
|
|
205
|
-
}),
|
|
205
|
+
}), ee.error(`${n.name} 上传失败: ${g.message}`), k == null || k(g);
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
|
-
function
|
|
209
|
-
if (
|
|
208
|
+
function xe(l) {
|
|
209
|
+
if (l === 0)
|
|
210
210
|
return "0 B";
|
|
211
|
-
const
|
|
212
|
-
return Math.round(
|
|
211
|
+
const o = 1024, n = ["B", "KB", "MB", "GB", "TB"], a = Math.floor(Math.log(l) / Math.log(o));
|
|
212
|
+
return Math.round(l / Math.pow(o, a) * 100) / 100 + " " + n[a];
|
|
213
213
|
}
|
|
214
|
-
const
|
|
214
|
+
const $ = {
|
|
215
215
|
get deployURL() {
|
|
216
216
|
return window.$probeURL || "";
|
|
217
|
+
},
|
|
218
|
+
get dockerURL() {
|
|
219
|
+
return window.$dockerURL || "";
|
|
217
220
|
}
|
|
218
|
-
},
|
|
219
|
-
url: `${
|
|
221
|
+
}, ae = (l = {}) => window.$http.request({
|
|
222
|
+
url: `${$.deployURL}/service_deploy/deployment/deploy`,
|
|
223
|
+
method: "post",
|
|
224
|
+
data: l
|
|
225
|
+
}), ke = (l = {}) => window.$http.request({
|
|
226
|
+
url: `${$.deployURL}/service_deploy/deployment/servers/add`,
|
|
220
227
|
method: "post",
|
|
221
|
-
data:
|
|
222
|
-
}),
|
|
223
|
-
url: `${
|
|
228
|
+
data: l
|
|
229
|
+
}), Te = (l = {}) => window.$http.request({
|
|
230
|
+
url: `${$.deployURL}/service_deploy/deployment/servers/update`,
|
|
224
231
|
method: "post",
|
|
225
|
-
data:
|
|
226
|
-
}),
|
|
227
|
-
url: `${
|
|
232
|
+
data: l
|
|
233
|
+
}), se = (l = {}) => window.$http.request({
|
|
234
|
+
url: `${$.deployURL}/service_deploy/deployment/packages/get`,
|
|
228
235
|
method: "post",
|
|
229
|
-
data:
|
|
236
|
+
data: l,
|
|
230
237
|
isError: !1
|
|
231
|
-
}),
|
|
232
|
-
url: `${
|
|
238
|
+
}), ie = (l = {}) => window.$http.request({
|
|
239
|
+
url: `${$.deployURL}/service_deploy/deployment/servers/get`,
|
|
233
240
|
method: "post",
|
|
234
|
-
data:
|
|
241
|
+
data: l,
|
|
235
242
|
isError: !1
|
|
236
|
-
}),
|
|
237
|
-
url: `${
|
|
243
|
+
}), $e = (l = {}) => window.$http.request({
|
|
244
|
+
url: `${$.deployURL}/service_deploy/deployment/servers/del`,
|
|
238
245
|
method: "post",
|
|
239
|
-
data:
|
|
240
|
-
}),
|
|
241
|
-
url: `${
|
|
246
|
+
data: l
|
|
247
|
+
}), Le = (l = {}) => window.$http.request({
|
|
248
|
+
url: `${$.deployURL}/service_deploy/deployment/packages/del`,
|
|
242
249
|
method: "post",
|
|
243
|
-
data:
|
|
244
|
-
}),
|
|
245
|
-
url: `${
|
|
250
|
+
data: l
|
|
251
|
+
}), Ee = (l = {}) => window.$http.request({
|
|
252
|
+
url: `${$.deployURL}/service_deploy/deployment/servers/get_arch`,
|
|
246
253
|
method: "post",
|
|
247
|
-
data:
|
|
254
|
+
data: l,
|
|
248
255
|
isError: !1
|
|
249
|
-
}),
|
|
250
|
-
url: `${
|
|
256
|
+
}), Ue = (l = {}) => window.$http.request({
|
|
257
|
+
url: `${$.deployURL}/service_deploy/deployment/deployment_history/get`,
|
|
251
258
|
method: "post",
|
|
252
|
-
data:
|
|
259
|
+
data: l,
|
|
253
260
|
isError: !1
|
|
254
|
-
}),
|
|
255
|
-
url: `${
|
|
261
|
+
}), Se = (l = {}) => window.$http.request({
|
|
262
|
+
url: `${$.deployURL}/service_deploy/deployment/servers/test_ssh`,
|
|
263
|
+
method: "post",
|
|
264
|
+
data: l
|
|
265
|
+
}), Ce = (l = {}) => window.$http.request({
|
|
266
|
+
url: `${$.deployURL}/service_deploy/deployment/servers/check_env`,
|
|
267
|
+
method: "post",
|
|
268
|
+
data: l
|
|
269
|
+
}), qe = (l = {}) => window.$http.request({
|
|
270
|
+
url: `${$.deployURL}/service_deploy/deployment/servers/install_env`,
|
|
256
271
|
method: "post",
|
|
257
|
-
data:
|
|
258
|
-
}),
|
|
259
|
-
url: `${
|
|
272
|
+
data: l
|
|
273
|
+
}), ue = (l = {}) => window.$http.request({
|
|
274
|
+
url: `${$.deployURL}/service_deploy/deployment/deploy/del`,
|
|
260
275
|
method: "post",
|
|
261
|
-
data:
|
|
262
|
-
}),
|
|
263
|
-
url: `${
|
|
276
|
+
data: l
|
|
277
|
+
}), Me = (l = {}) => window.$http.request({
|
|
278
|
+
url: `${$.dockerURL}/api/auth`,
|
|
264
279
|
method: "post",
|
|
265
|
-
data:
|
|
266
|
-
|
|
280
|
+
data: l,
|
|
281
|
+
isError: !1
|
|
282
|
+
}), Ae = (l = {}) => window.$http.request({
|
|
283
|
+
url: `${$.dockerURL}/api/endpoints`,
|
|
284
|
+
method: "post",
|
|
285
|
+
data: l.data,
|
|
286
|
+
headers: l.headers
|
|
287
|
+
}), De = {
|
|
267
288
|
class: "h-100%"
|
|
268
|
-
},
|
|
289
|
+
}, Re = {
|
|
269
290
|
key: 0,
|
|
270
291
|
class: "upload-progress-list"
|
|
271
|
-
},
|
|
292
|
+
}, Fe = {
|
|
272
293
|
class: "file-info"
|
|
273
|
-
},
|
|
294
|
+
}, ze = {
|
|
274
295
|
class: "file-name"
|
|
275
|
-
},
|
|
296
|
+
}, Ne = {
|
|
276
297
|
class: "file-size"
|
|
277
|
-
},
|
|
298
|
+
}, Be = {
|
|
278
299
|
class: "progress-text"
|
|
279
|
-
},
|
|
300
|
+
}, Ie = {
|
|
280
301
|
class: "table-box h-[calc(100%-220px)]",
|
|
281
302
|
style: {
|
|
282
303
|
height: "calc(100% - 220px)"
|
|
283
304
|
}
|
|
284
|
-
},
|
|
305
|
+
}, Pe = {
|
|
285
306
|
key: 0
|
|
286
|
-
},
|
|
307
|
+
}, Ve = {
|
|
287
308
|
class: "flex flex-wrap gap-12px p-12px"
|
|
288
|
-
},
|
|
289
|
-
class: "font-bold text-14px mb-8px text-[var(--el-text-color-primary)]"
|
|
290
|
-
},
|
|
309
|
+
}, Oe = {
|
|
310
|
+
class: "font-bold text-14px mb-8px text-[var(--el-text-color-primary)] pr-12"
|
|
311
|
+
}, je = {
|
|
291
312
|
class: "text-12px text-[var(--el-text-color-regular)] space-y-4px"
|
|
292
|
-
},
|
|
313
|
+
}, Ke = {
|
|
314
|
+
class: "flex items-center"
|
|
315
|
+
}, He = {
|
|
316
|
+
class: "flex items-center"
|
|
317
|
+
}, We = {
|
|
318
|
+
class: "absolute inset-0 bg-black/60 backdrop-blur-[2px] flex flex-col items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity duration-300 z-10"
|
|
319
|
+
}, Ge = {
|
|
293
320
|
key: 1,
|
|
294
321
|
class: "font-bold text-center text-gray-500 py-20"
|
|
295
|
-
},
|
|
322
|
+
}, Je = /* @__PURE__ */ W({
|
|
296
323
|
__name: "index",
|
|
297
324
|
props: {
|
|
298
325
|
token: {
|
|
@@ -300,45 +327,45 @@ const L = {
|
|
|
300
327
|
default: ""
|
|
301
328
|
}
|
|
302
329
|
},
|
|
303
|
-
setup(
|
|
304
|
-
const
|
|
305
|
-
$t:
|
|
306
|
-
$messageBox:
|
|
307
|
-
} = window,
|
|
308
|
-
function
|
|
309
|
-
|
|
330
|
+
setup(l) {
|
|
331
|
+
const o = w(), n = w(), a = w("快速部署"), m = w({}), {
|
|
332
|
+
$t: y,
|
|
333
|
+
$messageBox: r
|
|
334
|
+
} = window, v = l;
|
|
335
|
+
function k(u) {
|
|
336
|
+
m.value = {
|
|
310
337
|
id: u.id
|
|
311
|
-
},
|
|
338
|
+
}, n.value.open();
|
|
312
339
|
}
|
|
313
|
-
const
|
|
340
|
+
const g = w([{
|
|
314
341
|
ip: "",
|
|
315
342
|
port: ""
|
|
316
|
-
}]),
|
|
343
|
+
}]), i = w([{
|
|
317
344
|
ip: "",
|
|
318
345
|
port: ""
|
|
319
|
-
}]),
|
|
346
|
+
}]), _ = w([{
|
|
320
347
|
ip: "",
|
|
321
348
|
port: ""
|
|
322
|
-
}]),
|
|
349
|
+
}]), U = w([{
|
|
323
350
|
ip: "",
|
|
324
351
|
port: ""
|
|
325
352
|
}]);
|
|
326
353
|
async function M(u) {
|
|
327
|
-
const
|
|
328
|
-
const
|
|
354
|
+
const f = (A, t) => {
|
|
355
|
+
const s = Math.max(A.length, t.length);
|
|
329
356
|
return Array.from({
|
|
330
|
-
length:
|
|
331
|
-
}, (
|
|
332
|
-
var
|
|
357
|
+
length: s
|
|
358
|
+
}, (B, L) => {
|
|
359
|
+
var d, T, j, D;
|
|
333
360
|
return {
|
|
334
|
-
src_ip: ((
|
|
335
|
-
src_port: Number((
|
|
336
|
-
dst_ip: ((
|
|
337
|
-
dst_port: Number((
|
|
361
|
+
src_ip: ((d = A[L]) == null ? void 0 : d.ip) || "",
|
|
362
|
+
src_port: Number((T = A[L]) == null ? void 0 : T.port) || 0,
|
|
363
|
+
dst_ip: ((j = t[L]) == null ? void 0 : j.ip) || "",
|
|
364
|
+
dst_port: Number((D = t[L]) == null ? void 0 : D.port) || 0
|
|
338
365
|
};
|
|
339
366
|
});
|
|
340
|
-
},
|
|
341
|
-
packages_id: [
|
|
367
|
+
}, N = {
|
|
368
|
+
packages_id: [m.value.id],
|
|
342
369
|
server_id: u.server_id,
|
|
343
370
|
service_type: window.$prodType,
|
|
344
371
|
deploy_params: {
|
|
@@ -347,28 +374,36 @@ const L = {
|
|
|
347
374
|
interface: u.interface || "",
|
|
348
375
|
engine_ip: u.engine_ip || "",
|
|
349
376
|
engine_port: u.engine_port || "",
|
|
350
|
-
filterWhitelist: g
|
|
351
|
-
filterBlacklist:
|
|
377
|
+
filterWhitelist: f(g.value, i.value),
|
|
378
|
+
filterBlacklist: f(_.value, U.value)
|
|
352
379
|
}
|
|
353
380
|
};
|
|
354
|
-
await
|
|
355
|
-
data:
|
|
356
|
-
}),
|
|
381
|
+
await ae({
|
|
382
|
+
data: N
|
|
383
|
+
}), o.value.getTableList(), n.value.close();
|
|
384
|
+
}
|
|
385
|
+
async function O(u) {
|
|
386
|
+
r(u, "file_name", y("button.delete"), "error").then(async () => {
|
|
387
|
+
const f = u.map((N) => N.id);
|
|
388
|
+
await Le({
|
|
389
|
+
data: f
|
|
390
|
+
}), o.value.getTableList();
|
|
391
|
+
});
|
|
357
392
|
}
|
|
358
|
-
async function
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
}),
|
|
393
|
+
async function S(u) {
|
|
394
|
+
r("是否卸载该探针", "", "卸载", "error").then(async () => {
|
|
395
|
+
await ue({
|
|
396
|
+
deploy_id: [u.id],
|
|
397
|
+
service_type: window.$prodType
|
|
398
|
+
}), o.value.getTableList();
|
|
364
399
|
});
|
|
365
400
|
}
|
|
366
|
-
const
|
|
401
|
+
const I = H([
|
|
367
402
|
// { type: 'selection', align: 'center', field: 'id', hide: true },
|
|
368
403
|
{
|
|
369
404
|
field: "server_id",
|
|
370
405
|
name: "选择服务器",
|
|
371
|
-
enum: () =>
|
|
406
|
+
enum: () => ie({
|
|
372
407
|
service_type: window.$prodType
|
|
373
408
|
}),
|
|
374
409
|
fieldNames: {
|
|
@@ -407,8 +442,8 @@ const L = {
|
|
|
407
442
|
field: "deployment_server",
|
|
408
443
|
name: "已部署服务器数",
|
|
409
444
|
render: (u) => {
|
|
410
|
-
var
|
|
411
|
-
return ((
|
|
445
|
+
var f;
|
|
446
|
+
return ((f = u.row.deployment_server) == null ? void 0 : f.length) || 0;
|
|
412
447
|
}
|
|
413
448
|
},
|
|
414
449
|
{
|
|
@@ -470,14 +505,19 @@ const L = {
|
|
|
470
505
|
show: {
|
|
471
506
|
type: "input"
|
|
472
507
|
},
|
|
473
|
-
hide: !0
|
|
508
|
+
hide: !0,
|
|
509
|
+
rules: [{
|
|
510
|
+
required: !0,
|
|
511
|
+
type: "any"
|
|
512
|
+
}]
|
|
474
513
|
},
|
|
475
514
|
{
|
|
476
515
|
field: "engine_port",
|
|
477
516
|
name: "流量接收引擎端口",
|
|
478
517
|
show: {
|
|
479
518
|
type: "input",
|
|
480
|
-
dataType: "number"
|
|
519
|
+
dataType: "number",
|
|
520
|
+
value: 6379
|
|
481
521
|
},
|
|
482
522
|
hide: !0,
|
|
483
523
|
rules: [{
|
|
@@ -491,20 +531,20 @@ const L = {
|
|
|
491
531
|
show: {
|
|
492
532
|
type: "input",
|
|
493
533
|
tooltip: "白名单配置后,仅采集白名单内相关流量,如不填写,则采集所有流量",
|
|
494
|
-
render: () => e(
|
|
534
|
+
render: () => e(z, null, [e("div", {
|
|
495
535
|
style: "width: 100%"
|
|
496
536
|
}, [e("p", {
|
|
497
537
|
class: "color-[var(--el-text-color-regular)]"
|
|
498
|
-
}, [
|
|
499
|
-
modelValue:
|
|
500
|
-
"onUpdate:modelValue": (u) =>
|
|
538
|
+
}, [E("源ip端口:")]), e(P, {
|
|
539
|
+
modelValue: g.value,
|
|
540
|
+
"onUpdate:modelValue": (u) => g.value = u
|
|
501
541
|
}, null)]), e("div", {
|
|
502
542
|
style: "width: 100%"
|
|
503
543
|
}, [e("p", {
|
|
504
544
|
class: "color-[var(--el-text-color-regular)]"
|
|
505
|
-
}, [
|
|
506
|
-
modelValue:
|
|
507
|
-
"onUpdate:modelValue": (u) =>
|
|
545
|
+
}, [E("目的ip端口:")]), e(P, {
|
|
546
|
+
modelValue: i.value,
|
|
547
|
+
"onUpdate:modelValue": (u) => i.value = u
|
|
508
548
|
}, null)])])
|
|
509
549
|
},
|
|
510
550
|
hide: !0
|
|
@@ -515,16 +555,16 @@ const L = {
|
|
|
515
555
|
show: {
|
|
516
556
|
type: "input",
|
|
517
557
|
tooltip: "黑名单配置后,将不再采集黑名单内相关流量",
|
|
518
|
-
render: () => e(
|
|
558
|
+
render: () => e(z, null, [e("p", {
|
|
519
559
|
class: "color-[var(--el-text-color-regular)]"
|
|
520
|
-
}, [
|
|
521
|
-
modelValue:
|
|
522
|
-
"onUpdate:modelValue": (u) =>
|
|
560
|
+
}, [E("源ip端口:")]), e(P, {
|
|
561
|
+
modelValue: _.value,
|
|
562
|
+
"onUpdate:modelValue": (u) => _.value = u
|
|
523
563
|
}, null), e("p", {
|
|
524
564
|
class: "color-[var(--el-text-color-regular)]"
|
|
525
|
-
}, [
|
|
526
|
-
modelValue:
|
|
527
|
-
"onUpdate:modelValue": (u) =>
|
|
565
|
+
}, [E("目的ip端口:")]), e(P, {
|
|
566
|
+
modelValue: U.value,
|
|
567
|
+
"onUpdate:modelValue": (u) => U.value = u
|
|
528
568
|
}, null)])
|
|
529
569
|
},
|
|
530
570
|
hide: !0
|
|
@@ -534,230 +574,292 @@ const L = {
|
|
|
534
574
|
name: window.$t("global.operate"),
|
|
535
575
|
width: 140,
|
|
536
576
|
fixed: "right",
|
|
537
|
-
render: (u) => e("div", null, [e(
|
|
577
|
+
render: (u) => e("div", null, [e(c("el-button"), {
|
|
538
578
|
link: !0,
|
|
539
579
|
type: "primary",
|
|
540
580
|
class: "custom-btn",
|
|
541
|
-
onClick: () =>
|
|
581
|
+
onClick: () => k(u.row)
|
|
542
582
|
}, {
|
|
543
|
-
icon: () => e(
|
|
583
|
+
icon: () => e(c("tds-svg-icon"), {
|
|
544
584
|
name: "deployed",
|
|
545
585
|
tip: "部署"
|
|
546
586
|
}, null)
|
|
547
|
-
}), e(
|
|
587
|
+
}), e(c("el-button"), {
|
|
548
588
|
link: !0,
|
|
549
589
|
type: "danger",
|
|
550
590
|
icon: "Delete",
|
|
551
|
-
title:
|
|
552
|
-
onClick: () =>
|
|
591
|
+
title: y("button.delete"),
|
|
592
|
+
onClick: () => O([u.row])
|
|
553
593
|
}, null)])
|
|
554
594
|
}
|
|
555
|
-
]),
|
|
556
|
-
function
|
|
557
|
-
const
|
|
558
|
-
if (!
|
|
595
|
+
]), R = w([]);
|
|
596
|
+
function J(u) {
|
|
597
|
+
const f = u.raw;
|
|
598
|
+
if (!f)
|
|
559
599
|
return;
|
|
560
|
-
const
|
|
561
|
-
fileName:
|
|
562
|
-
fileSize:
|
|
600
|
+
const N = {
|
|
601
|
+
fileName: f.name,
|
|
602
|
+
fileSize: f.size,
|
|
563
603
|
progress: 0,
|
|
564
604
|
progressStatus: "",
|
|
565
605
|
statusText: "准备上传..."
|
|
566
606
|
};
|
|
567
|
-
|
|
568
|
-
const
|
|
569
|
-
|
|
570
|
-
file:
|
|
607
|
+
R.value.push(N);
|
|
608
|
+
const A = R.value.length - 1;
|
|
609
|
+
we({
|
|
610
|
+
file: f,
|
|
571
611
|
fileDesc: "探针安装包",
|
|
572
612
|
// 替换为你实际的接口地址
|
|
573
|
-
uploadUrl:
|
|
574
|
-
mergeUrl:
|
|
575
|
-
token:
|
|
613
|
+
uploadUrl: $.deployURL + "/service_deploy/deployment/packages/upload",
|
|
614
|
+
mergeUrl: $.deployURL + "/service_deploy/deployment/packages/upload_merge",
|
|
615
|
+
token: v.token,
|
|
576
616
|
// 进度回调
|
|
577
|
-
onProgress: (
|
|
578
|
-
const
|
|
579
|
-
|
|
617
|
+
onProgress: (t) => {
|
|
618
|
+
const s = R.value[A];
|
|
619
|
+
s && (s.progress = t.progress, s.statusText = t.statusText, t.fileMd5 && (s.fileMd5 = t.fileMd5), t.status === "error" ? s.progressStatus = "exception" : t.status === "success" ? s.progressStatus = "success" : s.progressStatus = "");
|
|
580
620
|
},
|
|
581
621
|
// 成功回调
|
|
582
622
|
onSuccess: () => {
|
|
583
|
-
var
|
|
584
|
-
const
|
|
585
|
-
|
|
586
|
-
const
|
|
587
|
-
|
|
623
|
+
var s;
|
|
624
|
+
const t = R.value[A];
|
|
625
|
+
t && (t.progress = 100, t.progressStatus = "success", t.statusText = "上传成功"), (s = o.value) == null || s.getTableList(), setTimeout(() => {
|
|
626
|
+
const B = R.value.findIndex((L) => L.fileName === f.name);
|
|
627
|
+
B !== -1 && R.value.splice(B, 1);
|
|
588
628
|
}, 3e3);
|
|
589
629
|
},
|
|
590
630
|
// 失败回调
|
|
591
|
-
onError: (
|
|
592
|
-
console.error("文件上传失败:",
|
|
593
|
-
const
|
|
594
|
-
|
|
631
|
+
onError: (t) => {
|
|
632
|
+
console.error("文件上传失败:", t);
|
|
633
|
+
const s = R.value[A];
|
|
634
|
+
s && (s.progressStatus = "exception", s.statusText = t.message || "上传失败");
|
|
595
635
|
}
|
|
596
636
|
});
|
|
597
637
|
}
|
|
598
|
-
return (u,
|
|
599
|
-
const
|
|
600
|
-
return
|
|
638
|
+
return (u, f) => {
|
|
639
|
+
const N = c("el-icon"), A = c("el-upload"), t = c("el-progress"), s = c("Delete"), B = c("el-button"), L = c("el-table-column");
|
|
640
|
+
return h(), x("div", De, [e(A, {
|
|
601
641
|
class: "upload-demo mt-10px",
|
|
602
642
|
drag: "",
|
|
603
643
|
action: "",
|
|
604
644
|
"auto-upload": !1,
|
|
605
645
|
accept: ".tar.gz,.zip",
|
|
606
|
-
"on-change":
|
|
646
|
+
"on-change": J,
|
|
607
647
|
"show-file-list": !1,
|
|
608
648
|
multiple: ""
|
|
609
649
|
}, {
|
|
610
|
-
default:
|
|
650
|
+
default: b(() => [e(N, {
|
|
611
651
|
class: "el-icon--upload"
|
|
612
652
|
}, {
|
|
613
|
-
default:
|
|
653
|
+
default: b(() => [e(F(me))]),
|
|
614
654
|
_: 1
|
|
615
|
-
}),
|
|
655
|
+
}), f[0] || (f[0] = p("div", {
|
|
616
656
|
class: "el-upload__text"
|
|
617
|
-
}, [
|
|
657
|
+
}, [E(" 点击或拖拽文件到此处上传 "), p("br"), p("em", null, "支持的格式: tar.gz, zip")], -1))]),
|
|
618
658
|
_: 1
|
|
619
|
-
}),
|
|
620
|
-
key:
|
|
659
|
+
}), R.value.length > 0 ? (h(), x("div", Re, [(h(!0), x(z, null, G(R.value, (d) => (h(), x("div", {
|
|
660
|
+
key: d.fileName,
|
|
621
661
|
class: "upload-progress-item"
|
|
622
|
-
}, [
|
|
623
|
-
percentage:
|
|
624
|
-
status:
|
|
625
|
-
}, null, 8, ["percentage", "status"]),
|
|
662
|
+
}, [p("div", Fe, [p("span", ze, q(d.fileName), 1), p("span", Ne, q(F(xe)(d.fileSize)), 1)]), e(t, {
|
|
663
|
+
percentage: d.progress,
|
|
664
|
+
status: d.progressStatus
|
|
665
|
+
}, null, 8, ["percentage", "status"]), p("div", Be, q(d.statusText), 1)]))), 128))])) : K("", !0), p("div", Ie, [e(F(_e), {
|
|
626
666
|
ref_key: "refTdsTable",
|
|
627
|
-
ref:
|
|
628
|
-
columns:
|
|
629
|
-
"request-api":
|
|
667
|
+
ref: o,
|
|
668
|
+
columns: I,
|
|
669
|
+
"request-api": F(se),
|
|
630
670
|
options: u.$tableOptions()
|
|
631
671
|
}, {
|
|
632
|
-
default:
|
|
672
|
+
default: b(() => [e(L, {
|
|
633
673
|
type: "expand"
|
|
634
674
|
}, {
|
|
635
|
-
default:
|
|
675
|
+
default: b((d) => [d.row.deployment_server && d.row.deployment_server.length > 0 ? (h(), x("div", Pe, [f[4] || (f[4] = p("div", {
|
|
636
676
|
class: "font-bold text-14px mt-12px"
|
|
637
|
-
}, "已部署的服务器", -1)),
|
|
638
|
-
key:
|
|
639
|
-
class: "w-
|
|
640
|
-
}, [
|
|
677
|
+
}, "已部署的服务器", -1)), p("div", Ve, [(h(!0), x(z, null, G(d.row.deployment_server, (T) => (h(), x("div", {
|
|
678
|
+
key: T.id,
|
|
679
|
+
class: "group w-25% px-20px py-10px rounded-8px bg-[var(--el-fill-color-light)] border border-solid border-[var(--el-border-color-lighter)] hover:shadow-lg transition-all duration-300 relative overflow-hidden"
|
|
680
|
+
}, [p("div", {
|
|
681
|
+
class: te(["absolute top-0 right-0 px-2 py-1 text-12px font-medium border-b border-l rounded-bl-8px", {
|
|
682
|
+
"text-green-600 bg-green-50 border-green-200": T.deploy_type === 0,
|
|
683
|
+
"text-amber-600 bg-amber-50 border-amber-200": T.deploy_type === 1,
|
|
684
|
+
"text-red-600 bg-red-50 border-red-200": T.deploy_type === 2
|
|
685
|
+
}])
|
|
686
|
+
}, q(T.deploy_type === 0 ? "第一次安装" : T.deploy_type === 1 ? "升级" : "卸载"), 3), p("div", Oe, q(T.server_name), 1), p("div", je, [p("p", Ke, [f[1] || (f[1] = p("span", {
|
|
687
|
+
class: "opacity-70 mr-2"
|
|
688
|
+
}, "IP:", -1)), E(" " + q(T.ip_address), 1)]), p("p", He, [f[2] || (f[2] = p("span", {
|
|
689
|
+
class: "opacity-70 mr-2"
|
|
690
|
+
}, "时间:", -1)), E(" " + q(T.deployment_time), 1)])]), p("div", We, [e(B, {
|
|
691
|
+
type: "danger",
|
|
692
|
+
circle: "",
|
|
693
|
+
class: "mb-2 transform scale-90 group-hover:scale-100 transition-transform duration-300",
|
|
694
|
+
onClick: le((j) => S(T), ["stop"])
|
|
695
|
+
}, {
|
|
696
|
+
default: b(() => [e(N, {
|
|
697
|
+
size: "20"
|
|
698
|
+
}, {
|
|
699
|
+
default: b(() => [e(s)]),
|
|
700
|
+
_: 1
|
|
701
|
+
})]),
|
|
702
|
+
_: 1
|
|
703
|
+
}, 8, ["onClick"]), f[3] || (f[3] = p("span", {
|
|
704
|
+
class: "text-white text-12px font-medium tracking-wide"
|
|
705
|
+
}, "卸载", -1))])]))), 128))])])) : (h(), x("div", Ge, "暂无部署服务器记录"))]),
|
|
641
706
|
_: 1
|
|
642
707
|
})]),
|
|
643
708
|
_: 1
|
|
644
|
-
}, 8, ["columns", "request-api", "options"])]), e(
|
|
709
|
+
}, 8, ["columns", "request-api", "options"])]), e(F(re), oe({
|
|
645
710
|
ref_key: "refTdsForm",
|
|
646
|
-
ref:
|
|
711
|
+
ref: n
|
|
647
712
|
}, u.$formBindProps({
|
|
648
|
-
title:
|
|
649
|
-
form:
|
|
650
|
-
columns:
|
|
713
|
+
title: a.value,
|
|
714
|
+
form: m.value,
|
|
715
|
+
columns: I
|
|
651
716
|
}), {
|
|
652
717
|
onSubmit: M
|
|
653
718
|
}), null, 16)]);
|
|
654
719
|
};
|
|
655
720
|
}
|
|
656
|
-
}),
|
|
721
|
+
}), Ze = {
|
|
657
722
|
class: "table-box"
|
|
658
|
-
},
|
|
723
|
+
}, Qe = {
|
|
659
724
|
class: "flex items-center"
|
|
660
|
-
},
|
|
725
|
+
}, Xe = {
|
|
661
726
|
key: 0
|
|
662
|
-
},
|
|
727
|
+
}, Ye = {
|
|
663
728
|
class: "flex flex-wrap gap-12px p-12px"
|
|
664
|
-
},
|
|
665
|
-
class: "font-bold text-14px mb-8px text-[var(--el-text-color-primary)]"
|
|
666
|
-
},
|
|
729
|
+
}, et = {
|
|
730
|
+
class: "font-bold text-14px mb-8px text-[var(--el-text-color-primary)] pr-12"
|
|
731
|
+
}, tt = {
|
|
667
732
|
class: "text-12px text-[var(--el-text-color-regular)] space-y-4px"
|
|
668
|
-
},
|
|
733
|
+
}, lt = {
|
|
734
|
+
class: "flex items-center"
|
|
735
|
+
}, ot = {
|
|
736
|
+
class: "flex items-center"
|
|
737
|
+
}, rt = {
|
|
738
|
+
class: "absolute inset-0 bg-black/60 backdrop-blur-[2px] flex flex-col items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity duration-300 z-10"
|
|
739
|
+
}, nt = {
|
|
669
740
|
key: 1,
|
|
670
741
|
class: "font-bold text-center text-gray-500 py-20"
|
|
671
|
-
},
|
|
742
|
+
}, at = /* @__PURE__ */ W({
|
|
672
743
|
__name: "index",
|
|
673
|
-
setup(
|
|
744
|
+
setup(l) {
|
|
674
745
|
const {
|
|
675
|
-
$t:
|
|
676
|
-
$messageBox:
|
|
677
|
-
} = window,
|
|
746
|
+
$t: o,
|
|
747
|
+
$messageBox: n
|
|
748
|
+
} = window, a = w(), m = w(), y = w(""), r = w({}), v = w("show"), k = H({
|
|
678
749
|
service_type: window.$prodType
|
|
679
750
|
});
|
|
680
|
-
function
|
|
681
|
-
|
|
751
|
+
function g(t) {
|
|
752
|
+
r.value = t ? Object.assign({}, t) : {}, v.value = "show", y.value = t ? "修改服务器" : "添加服务器", m.value.open();
|
|
682
753
|
}
|
|
683
|
-
const
|
|
684
|
-
|
|
685
|
-
await
|
|
686
|
-
data:
|
|
754
|
+
const i = (t) => {
|
|
755
|
+
n(t, "server_name", o("button.delete"), "error").then(async () => {
|
|
756
|
+
await $e({
|
|
757
|
+
data: t.map((s) => s.id),
|
|
687
758
|
service_type: window.$prodType
|
|
688
|
-
}),
|
|
759
|
+
}), a.value.getTableList();
|
|
689
760
|
});
|
|
690
761
|
};
|
|
691
|
-
function
|
|
692
|
-
|
|
693
|
-
id:
|
|
694
|
-
},
|
|
762
|
+
function _(t) {
|
|
763
|
+
r.value = {
|
|
764
|
+
id: t.id
|
|
765
|
+
}, v.value = "deploy", y.value = "快速部署", m.value.open();
|
|
766
|
+
}
|
|
767
|
+
async function U(t) {
|
|
768
|
+
n("是否卸载该探针", "", "卸载", "error").then(async () => {
|
|
769
|
+
await ue({
|
|
770
|
+
deploy_id: [t.id],
|
|
771
|
+
service_type: window.$prodType
|
|
772
|
+
}), a.value.getTableList();
|
|
773
|
+
});
|
|
695
774
|
}
|
|
696
|
-
const
|
|
775
|
+
const M = w([{
|
|
697
776
|
ip: "",
|
|
698
777
|
port: ""
|
|
699
|
-
}]),
|
|
778
|
+
}]), O = w([{
|
|
700
779
|
ip: "",
|
|
701
780
|
port: ""
|
|
702
|
-
}]),
|
|
781
|
+
}]), S = w([{
|
|
703
782
|
ip: "",
|
|
704
783
|
port: ""
|
|
705
|
-
}]),
|
|
784
|
+
}]), I = w([{
|
|
706
785
|
ip: "",
|
|
707
786
|
port: ""
|
|
708
787
|
}]);
|
|
709
|
-
async function
|
|
710
|
-
if (
|
|
711
|
-
await
|
|
712
|
-
data:
|
|
713
|
-
|
|
788
|
+
async function R(t) {
|
|
789
|
+
if (v.value === "show") {
|
|
790
|
+
r.value.id ? (await Te({
|
|
791
|
+
data: {
|
|
792
|
+
...t,
|
|
793
|
+
id: r.value.id
|
|
794
|
+
}
|
|
795
|
+
}), a.value.getTableList(), m.value.close()) : (await ke({
|
|
796
|
+
data: t
|
|
797
|
+
}), a.value.getTableList(), m.value.close());
|
|
714
798
|
return;
|
|
715
799
|
}
|
|
716
|
-
|
|
717
|
-
const
|
|
800
|
+
if (v.value === "docker") {
|
|
801
|
+
const L = await Me({
|
|
802
|
+
password: "Tds@12345",
|
|
803
|
+
username: "admin"
|
|
804
|
+
}), d = new FormData();
|
|
805
|
+
d.append("Name", t.Name), d.append("EndpointType", "1"), d.append("URL", "tcp://" + t.URL), d.append("PublicURL", t.URL), d.append("GroupID", "1"), d.append("TagIds", "[]"), d.append("TLS", "false"), d.append("TLSSkipVerify", "false"), d.append("TLSSkipClientVerify", "false"), d.append("TLSCACertFile", ""), d.append("TLSCertFile", ""), d.append("TLSKeyFile", ""), await Ae({
|
|
806
|
+
data: d,
|
|
807
|
+
headers: {
|
|
808
|
+
Authorization: `${L.jwt}`
|
|
809
|
+
}
|
|
810
|
+
}), m.value.close();
|
|
811
|
+
return;
|
|
812
|
+
}
|
|
813
|
+
const s = (L, d) => {
|
|
814
|
+
const T = Math.max(L.length, d.length);
|
|
718
815
|
return Array.from({
|
|
719
|
-
length:
|
|
720
|
-
}, (
|
|
721
|
-
var
|
|
816
|
+
length: T
|
|
817
|
+
}, (j, D) => {
|
|
818
|
+
var C, Z, X, Y;
|
|
722
819
|
return {
|
|
723
|
-
src_ip: ((
|
|
724
|
-
src_port: Number((
|
|
725
|
-
dst_ip: ((
|
|
726
|
-
dst_port: Number((
|
|
820
|
+
src_ip: ((C = L[D]) == null ? void 0 : C.ip) || "",
|
|
821
|
+
src_port: Number((Z = L[D]) == null ? void 0 : Z.port) || 0,
|
|
822
|
+
dst_ip: ((X = d[D]) == null ? void 0 : X.ip) || "",
|
|
823
|
+
dst_port: Number((Y = d[D]) == null ? void 0 : Y.port) || 0
|
|
727
824
|
};
|
|
728
825
|
});
|
|
729
|
-
},
|
|
730
|
-
packages_id: [
|
|
731
|
-
server_id: [
|
|
826
|
+
}, B = {
|
|
827
|
+
packages_id: [t.packages_id],
|
|
828
|
+
server_id: [r.value.id],
|
|
732
829
|
service_type: window.$prodType,
|
|
733
830
|
deploy_params: {
|
|
734
|
-
probe_name:
|
|
735
|
-
collection_mode:
|
|
736
|
-
interface:
|
|
737
|
-
engine_ip:
|
|
738
|
-
engine_port:
|
|
739
|
-
filterWhitelist:
|
|
740
|
-
filterBlacklist:
|
|
831
|
+
probe_name: t.probe_name || "",
|
|
832
|
+
collection_mode: t.collection_mode,
|
|
833
|
+
interface: t.interface || "",
|
|
834
|
+
engine_ip: t.engine_ip || "",
|
|
835
|
+
engine_port: t.engine_port || "",
|
|
836
|
+
filterWhitelist: s(M.value, O.value),
|
|
837
|
+
filterBlacklist: s(S.value, I.value)
|
|
741
838
|
}
|
|
742
839
|
};
|
|
743
|
-
await
|
|
744
|
-
data:
|
|
745
|
-
}),
|
|
840
|
+
await ae({
|
|
841
|
+
data: B
|
|
842
|
+
}), a.value.getTableList(), m.value.close();
|
|
843
|
+
}
|
|
844
|
+
async function J(t) {
|
|
845
|
+
await Se({
|
|
846
|
+
data: [t.id]
|
|
847
|
+
}), a.value.getTableList();
|
|
746
848
|
}
|
|
747
|
-
function
|
|
748
|
-
|
|
749
|
-
data: [
|
|
750
|
-
}),
|
|
849
|
+
async function u(t) {
|
|
850
|
+
await Ce({
|
|
851
|
+
data: [t.id]
|
|
852
|
+
}), a.value.getTableList();
|
|
751
853
|
}
|
|
752
|
-
function
|
|
753
|
-
|
|
754
|
-
data: [
|
|
755
|
-
}),
|
|
854
|
+
async function f(t) {
|
|
855
|
+
await qe({
|
|
856
|
+
data: [t.id]
|
|
857
|
+
}), a.value.getTableList();
|
|
756
858
|
}
|
|
757
|
-
function
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
}
|
|
859
|
+
function N(t) {
|
|
860
|
+
v.value = "docker", y.value = "添加容器监控", r.value = {
|
|
861
|
+
URL: `${t.ip_address}:2375`
|
|
862
|
+
}, m.value.open();
|
|
761
863
|
}
|
|
762
864
|
const A = H([{
|
|
763
865
|
field: "server_name",
|
|
@@ -791,6 +893,7 @@ const L = {
|
|
|
791
893
|
}, {
|
|
792
894
|
field: "ssh_username",
|
|
793
895
|
name: "SSH用户",
|
|
896
|
+
hide: !0,
|
|
794
897
|
show: {
|
|
795
898
|
type: "input"
|
|
796
899
|
},
|
|
@@ -814,7 +917,8 @@ const L = {
|
|
|
814
917
|
}, {
|
|
815
918
|
field: "arch",
|
|
816
919
|
name: "架构",
|
|
817
|
-
enum:
|
|
920
|
+
enum: Ee,
|
|
921
|
+
hide: !0,
|
|
818
922
|
show: {
|
|
819
923
|
type: "select"
|
|
820
924
|
},
|
|
@@ -824,7 +928,7 @@ const L = {
|
|
|
824
928
|
}, {
|
|
825
929
|
field: "deployed_count",
|
|
826
930
|
name: "已部署探针数量",
|
|
827
|
-
render: (
|
|
931
|
+
render: (t) => e("span", null, [t.row.deployment_packages.length])
|
|
828
932
|
}, {
|
|
829
933
|
field: "status",
|
|
830
934
|
name: "状态",
|
|
@@ -843,31 +947,55 @@ const L = {
|
|
|
843
947
|
name: "连通性检查",
|
|
844
948
|
tag: !0,
|
|
845
949
|
enum: [{
|
|
950
|
+
label: "失败",
|
|
951
|
+
value: 3,
|
|
952
|
+
tagType: "danger"
|
|
953
|
+
}, {
|
|
846
954
|
label: "成功",
|
|
847
|
-
value:
|
|
955
|
+
value: 2,
|
|
848
956
|
tagType: "success"
|
|
849
957
|
}, {
|
|
850
|
-
label: "
|
|
958
|
+
label: "检测中",
|
|
959
|
+
value: 1,
|
|
960
|
+
tagType: "warning"
|
|
961
|
+
}, {
|
|
962
|
+
label: "未检测",
|
|
851
963
|
value: 0,
|
|
852
|
-
tagType: "
|
|
964
|
+
tagType: "default"
|
|
853
965
|
}]
|
|
966
|
+
}, {
|
|
967
|
+
field: "check_ssh_msg",
|
|
968
|
+
name: "连通性检查失败原因",
|
|
969
|
+
width: 150
|
|
854
970
|
}, {
|
|
855
971
|
field: "check_env_ok",
|
|
856
972
|
name: "安装环境",
|
|
857
973
|
tag: !0,
|
|
858
974
|
enum: [{
|
|
859
|
-
label: "
|
|
860
|
-
value:
|
|
975
|
+
label: "失败",
|
|
976
|
+
value: 3,
|
|
977
|
+
tagType: "danger"
|
|
978
|
+
}, {
|
|
979
|
+
label: "成功",
|
|
980
|
+
value: 2,
|
|
861
981
|
tagType: "success"
|
|
862
982
|
}, {
|
|
863
|
-
label: "
|
|
983
|
+
label: "检测中",
|
|
984
|
+
value: 1,
|
|
985
|
+
tagType: "warning"
|
|
986
|
+
}, {
|
|
987
|
+
label: "未检测",
|
|
864
988
|
value: 0,
|
|
865
|
-
tagType: "
|
|
989
|
+
tagType: "default"
|
|
866
990
|
}]
|
|
991
|
+
}, {
|
|
992
|
+
field: "check_env_msg",
|
|
993
|
+
name: "环境检查失败原因",
|
|
994
|
+
width: 150
|
|
867
995
|
}, {
|
|
868
996
|
field: "packages_id",
|
|
869
997
|
name: "安装包",
|
|
870
|
-
enum:
|
|
998
|
+
enum: se,
|
|
871
999
|
fieldNames: {
|
|
872
1000
|
value: "id",
|
|
873
1001
|
label: "file_name"
|
|
@@ -927,7 +1055,8 @@ const L = {
|
|
|
927
1055
|
name: "流量接收引擎端口",
|
|
928
1056
|
deploy: {
|
|
929
1057
|
type: "input",
|
|
930
|
-
dataType: "number"
|
|
1058
|
+
dataType: "number",
|
|
1059
|
+
value: 6379
|
|
931
1060
|
},
|
|
932
1061
|
hide: !0,
|
|
933
1062
|
rules: [{
|
|
@@ -940,16 +1069,16 @@ const L = {
|
|
|
940
1069
|
deploy: {
|
|
941
1070
|
type: "input",
|
|
942
1071
|
tooltip: "白名单配置后,仅采集白名单内相关流量,如不填写,则采集所有流量",
|
|
943
|
-
render: () => e(
|
|
1072
|
+
render: () => e(z, null, [e("p", {
|
|
944
1073
|
class: "color-[var(--el-text-color-regular)]"
|
|
945
|
-
}, [
|
|
946
|
-
modelValue:
|
|
947
|
-
"onUpdate:modelValue": (
|
|
1074
|
+
}, [E("源ip端口:")]), e(P, {
|
|
1075
|
+
modelValue: M.value,
|
|
1076
|
+
"onUpdate:modelValue": (t) => M.value = t
|
|
948
1077
|
}, null), e("p", {
|
|
949
1078
|
class: "color-[var(--el-text-color-regular)]"
|
|
950
|
-
}, [
|
|
951
|
-
modelValue:
|
|
952
|
-
"onUpdate:modelValue": (
|
|
1079
|
+
}, [E("目的ip端口:")]), e(P, {
|
|
1080
|
+
modelValue: O.value,
|
|
1081
|
+
"onUpdate:modelValue": (t) => O.value = t
|
|
953
1082
|
}, null)])
|
|
954
1083
|
},
|
|
955
1084
|
hide: !0
|
|
@@ -959,143 +1088,207 @@ const L = {
|
|
|
959
1088
|
deploy: {
|
|
960
1089
|
type: "input",
|
|
961
1090
|
tooltip: "黑名单配置后,将不再采集黑名单内相关流量",
|
|
962
|
-
render: () => e(
|
|
1091
|
+
render: () => e(z, null, [e("p", {
|
|
963
1092
|
class: "color-[var(--el-text-color-regular)]"
|
|
964
|
-
}, [
|
|
965
|
-
modelValue:
|
|
966
|
-
"onUpdate:modelValue": (
|
|
1093
|
+
}, [E("源ip端口:")]), e(P, {
|
|
1094
|
+
modelValue: S.value,
|
|
1095
|
+
"onUpdate:modelValue": (t) => S.value = t
|
|
967
1096
|
}, null), e("p", {
|
|
968
1097
|
class: "color-[var(--el-text-color-regular)]"
|
|
969
|
-
}, [
|
|
970
|
-
modelValue:
|
|
971
|
-
"onUpdate:modelValue": (
|
|
1098
|
+
}, [E("目的ip端口:")]), e(P, {
|
|
1099
|
+
modelValue: I.value,
|
|
1100
|
+
"onUpdate:modelValue": (t) => I.value = t
|
|
972
1101
|
}, null)])
|
|
973
1102
|
},
|
|
974
1103
|
hide: !0
|
|
1104
|
+
}, {
|
|
1105
|
+
field: "Name",
|
|
1106
|
+
name: "名称",
|
|
1107
|
+
hide: !0,
|
|
1108
|
+
docker: {
|
|
1109
|
+
type: "input"
|
|
1110
|
+
},
|
|
1111
|
+
rules: [{
|
|
1112
|
+
required: !0
|
|
1113
|
+
}]
|
|
1114
|
+
}, {
|
|
1115
|
+
field: "URL",
|
|
1116
|
+
name: "端点 URL ",
|
|
1117
|
+
hide: !0,
|
|
1118
|
+
docker: {
|
|
1119
|
+
type: "input"
|
|
1120
|
+
}
|
|
1121
|
+
}, {
|
|
1122
|
+
field: "status_monitorning",
|
|
1123
|
+
name: "状态监控",
|
|
1124
|
+
render: (t) => e(z, null, [e(c("el-button"), {
|
|
1125
|
+
class: "custom-btn",
|
|
1126
|
+
type: "primary",
|
|
1127
|
+
icon: "Plus",
|
|
1128
|
+
link: !0,
|
|
1129
|
+
onClick: () => N(t.row)
|
|
1130
|
+
}, {
|
|
1131
|
+
default: () => [E("添加")]
|
|
1132
|
+
})])
|
|
975
1133
|
}, {
|
|
976
1134
|
field: "operation",
|
|
977
1135
|
name: window.$t("global.operate"),
|
|
978
1136
|
width: 180,
|
|
979
1137
|
fixed: "right",
|
|
980
|
-
render: (
|
|
1138
|
+
render: (t) => e("div", null, [e(c("el-button"), {
|
|
1139
|
+
link: !0,
|
|
1140
|
+
type: "primary",
|
|
1141
|
+
icon: "Edit",
|
|
1142
|
+
title: "修改",
|
|
1143
|
+
class: "custom-btn",
|
|
1144
|
+
onClick: () => g(t.row)
|
|
1145
|
+
}, null), e(c("el-button"), {
|
|
981
1146
|
link: !0,
|
|
982
1147
|
type: "primary",
|
|
983
1148
|
icon: "Connection",
|
|
984
1149
|
title: "连通性检查",
|
|
985
1150
|
class: "custom-btn",
|
|
986
|
-
onClick: () =>
|
|
987
|
-
}, null), e(
|
|
1151
|
+
onClick: () => J(t.row)
|
|
1152
|
+
}, null), e(c("el-button"), {
|
|
988
1153
|
link: !0,
|
|
989
1154
|
type: "primary",
|
|
990
1155
|
class: "custom-btn",
|
|
991
|
-
onClick: () => u(
|
|
1156
|
+
onClick: () => u(t.row)
|
|
992
1157
|
}, {
|
|
993
|
-
icon: () => e(
|
|
1158
|
+
icon: () => e(c("tds-svg-icon"), {
|
|
994
1159
|
name: "install_env",
|
|
995
1160
|
tip: "测试安装环境"
|
|
996
1161
|
}, null)
|
|
997
|
-
}), e(
|
|
1162
|
+
}), e(c("el-button"), {
|
|
998
1163
|
link: !0,
|
|
999
1164
|
type: "primary",
|
|
1000
1165
|
class: "custom-btn",
|
|
1001
|
-
onClick: () =>
|
|
1166
|
+
onClick: () => f(t.row)
|
|
1002
1167
|
}, {
|
|
1003
|
-
icon: () => e(
|
|
1168
|
+
icon: () => e(c("tds-svg-icon"), {
|
|
1004
1169
|
name: "docker",
|
|
1005
1170
|
tip: "自动安装docker环境"
|
|
1006
1171
|
}, null)
|
|
1007
|
-
}), e(
|
|
1172
|
+
}), e(c("el-button"), {
|
|
1008
1173
|
link: !0,
|
|
1009
1174
|
type: "primary",
|
|
1010
1175
|
class: "custom-btn",
|
|
1011
|
-
onClick: () =>
|
|
1176
|
+
onClick: () => _(t.row)
|
|
1012
1177
|
}, {
|
|
1013
|
-
icon: () => e(
|
|
1178
|
+
icon: () => e(c("tds-svg-icon"), {
|
|
1014
1179
|
name: "deployed",
|
|
1015
1180
|
tip: "部署"
|
|
1016
1181
|
}, null)
|
|
1017
|
-
}), e(
|
|
1182
|
+
}), e(c("el-button"), {
|
|
1018
1183
|
link: !0,
|
|
1019
1184
|
type: "danger",
|
|
1020
1185
|
icon: "Delete",
|
|
1021
|
-
title:
|
|
1022
|
-
onClick: () =>
|
|
1186
|
+
title: o("button.delete"),
|
|
1187
|
+
onClick: () => i([t.row])
|
|
1023
1188
|
}, null)])
|
|
1024
1189
|
}]);
|
|
1025
|
-
return (
|
|
1026
|
-
const
|
|
1027
|
-
return
|
|
1190
|
+
return (t, s) => {
|
|
1191
|
+
const B = c("el-button"), L = c("Delete"), d = c("el-icon"), T = c("el-table-column"), j = c("TdsTable");
|
|
1192
|
+
return h(), x("div", Ze, [e(j, {
|
|
1028
1193
|
ref_key: "refTdsTable",
|
|
1029
|
-
ref:
|
|
1194
|
+
ref: a,
|
|
1030
1195
|
columns: A,
|
|
1031
|
-
"request-api":
|
|
1196
|
+
"request-api": F(ie),
|
|
1032
1197
|
"search-col": 4,
|
|
1033
|
-
"init-param":
|
|
1034
|
-
options:
|
|
1198
|
+
"init-param": k,
|
|
1199
|
+
options: t.$tableOptions({
|
|
1200
|
+
refresh: {
|
|
1201
|
+
ssh_status: [1],
|
|
1202
|
+
check_env_ok: [1]
|
|
1203
|
+
}
|
|
1204
|
+
}),
|
|
1035
1205
|
"reserve-selection": ""
|
|
1036
1206
|
}, {
|
|
1037
|
-
tableHeader:
|
|
1207
|
+
tableHeader: b(() => [p("div", Qe, [e(B, {
|
|
1038
1208
|
class: "custom-btn",
|
|
1039
1209
|
type: "primary",
|
|
1040
1210
|
icon: "Plus",
|
|
1041
1211
|
plain: "",
|
|
1042
|
-
onClick:
|
|
1212
|
+
onClick: s[0] || (s[0] = (D) => g())
|
|
1043
1213
|
}, {
|
|
1044
|
-
default:
|
|
1214
|
+
default: b(() => [E(q(F(o)("button.add")), 1)]),
|
|
1045
1215
|
_: 1
|
|
1046
1216
|
})])]),
|
|
1047
|
-
default:
|
|
1217
|
+
default: b(() => [e(T, {
|
|
1048
1218
|
type: "expand"
|
|
1049
1219
|
}, {
|
|
1050
|
-
default:
|
|
1220
|
+
default: b((D) => [D.row.deployment_packages && D.row.deployment_packages.length > 0 ? (h(), x("div", Xe, [s[4] || (s[4] = p("div", {
|
|
1051
1221
|
class: "font-bold text-14px mt-12px"
|
|
1052
|
-
}, "已部署的探针包", -1)),
|
|
1053
|
-
key:
|
|
1054
|
-
class: "w-
|
|
1055
|
-
}, [
|
|
1222
|
+
}, "已部署的探针包", -1)), p("div", Ye, [(h(!0), x(z, null, G(D.row.deployment_packages, (C) => (h(), x("div", {
|
|
1223
|
+
key: C.id,
|
|
1224
|
+
class: "group w-25% px-20px py-10px rounded-8px bg-[var(--el-fill-color-light)] border border-solid border-[var(--el-border-color-lighter)] hover:shadow-lg transition-all duration-300 relative overflow-hidden"
|
|
1225
|
+
}, [p("div", {
|
|
1226
|
+
class: te(["absolute top-0 right-0 px-2 py-1 text-12px font-medium border-b border-l rounded-bl-8px", {
|
|
1227
|
+
"text-green-600 bg-green-50 border-green-200": C.deploy_type === 0,
|
|
1228
|
+
"text-amber-600 bg-amber-50 border-amber-200": C.deploy_type === 1,
|
|
1229
|
+
"text-red-600 bg-red-50 border-red-200": C.deploy_type === 2
|
|
1230
|
+
}])
|
|
1231
|
+
}, q(C.deploy_type === 0 ? "第一次安装" : C.deploy_type === 1 ? "升级" : "卸载"), 3), p("div", et, q(C.file_name), 1), p("div", tt, [p("p", lt, [s[1] || (s[1] = p("span", {
|
|
1232
|
+
class: "opacity-70 mr-2"
|
|
1233
|
+
}, "版本:", -1)), E(" " + q(C.version), 1)]), p("p", ot, [s[2] || (s[2] = p("span", {
|
|
1234
|
+
class: "opacity-70 mr-2"
|
|
1235
|
+
}, "部署时间:", -1)), E(" " + q(C.deployment_time), 1)])]), p("div", rt, [e(B, {
|
|
1236
|
+
type: "danger",
|
|
1237
|
+
circle: "",
|
|
1238
|
+
class: "mb-2 transform scale-90 group-hover:scale-100 transition-transform duration-300",
|
|
1239
|
+
onClick: le((Z) => U(C), ["stop"])
|
|
1240
|
+
}, {
|
|
1241
|
+
default: b(() => [e(d, {
|
|
1242
|
+
size: "20"
|
|
1243
|
+
}, {
|
|
1244
|
+
default: b(() => [e(L)]),
|
|
1245
|
+
_: 1
|
|
1246
|
+
})]),
|
|
1247
|
+
_: 1
|
|
1248
|
+
}, 8, ["onClick"]), s[3] || (s[3] = p("span", {
|
|
1249
|
+
class: "text-white text-12px font-medium tracking-wide"
|
|
1250
|
+
}, "卸载", -1))])]))), 128))])])) : (h(), x("div", nt, "暂无部署服务器记录"))]),
|
|
1056
1251
|
_: 1
|
|
1057
1252
|
})]),
|
|
1058
1253
|
_: 1
|
|
1059
|
-
}, 8, ["columns", "request-api", "init-param", "options"]), e(
|
|
1254
|
+
}, 8, ["columns", "request-api", "init-param", "options"]), e(F(re), oe({
|
|
1060
1255
|
ref_key: "refTdsForm",
|
|
1061
|
-
ref:
|
|
1062
|
-
},
|
|
1063
|
-
title:
|
|
1064
|
-
form:
|
|
1256
|
+
ref: m
|
|
1257
|
+
}, t.$formBindProps({
|
|
1258
|
+
title: y.value,
|
|
1259
|
+
form: r.value,
|
|
1065
1260
|
columns: A,
|
|
1066
|
-
formKey:
|
|
1261
|
+
formKey: v.value
|
|
1067
1262
|
}), {
|
|
1068
|
-
onSubmit:
|
|
1263
|
+
onSubmit: R
|
|
1069
1264
|
}), null, 16)]);
|
|
1070
1265
|
};
|
|
1071
1266
|
}
|
|
1072
|
-
}),
|
|
1267
|
+
}), st = {
|
|
1073
1268
|
class: "table-box"
|
|
1074
|
-
},
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
}
|
|
1078
|
-
}, Ge = /* @__PURE__ */ K({
|
|
1269
|
+
}, it = {
|
|
1270
|
+
class: "whitespace-pre-wrap font-mono py-20px px-10px bg-gray-100 rounded text-sm text-gray-800"
|
|
1271
|
+
}, ut = /* @__PURE__ */ W({
|
|
1079
1272
|
__name: "index",
|
|
1080
|
-
setup(
|
|
1081
|
-
const
|
|
1273
|
+
setup(l) {
|
|
1274
|
+
const o = H({
|
|
1082
1275
|
service_type: window.$prodType
|
|
1083
|
-
}), a = H([{
|
|
1276
|
+
}), n = w(), a = H([{
|
|
1084
1277
|
field: "packages_name",
|
|
1085
1278
|
name: "探针包",
|
|
1086
|
-
render: (
|
|
1279
|
+
render: (y) => e(z, null, [e("p", {
|
|
1087
1280
|
class: "font-bold"
|
|
1088
|
-
}, [
|
|
1281
|
+
}, [y.row.packages_name]), e("p", {
|
|
1089
1282
|
class: "text-gray-400"
|
|
1090
|
-
}, [
|
|
1283
|
+
}, [y.row.packages_version])])
|
|
1091
1284
|
}, {
|
|
1092
1285
|
field: "server_name",
|
|
1093
1286
|
name: "服务器",
|
|
1094
|
-
render: (
|
|
1287
|
+
render: (y) => e(z, null, [e("p", {
|
|
1095
1288
|
class: "font-bold"
|
|
1096
|
-
}, [
|
|
1289
|
+
}, [y.row.server_name]), e("p", {
|
|
1097
1290
|
class: "text-gray-400"
|
|
1098
|
-
}, [
|
|
1291
|
+
}, [y.row.ip_address])])
|
|
1099
1292
|
}, {
|
|
1100
1293
|
field: "deployment_time",
|
|
1101
1294
|
name: "部署时间"
|
|
@@ -1104,9 +1297,13 @@ const L = {
|
|
|
1104
1297
|
name: "状态",
|
|
1105
1298
|
tag: !0,
|
|
1106
1299
|
enum: [{
|
|
1107
|
-
label: "
|
|
1300
|
+
label: "未知",
|
|
1301
|
+
value: -1,
|
|
1302
|
+
tagType: "default"
|
|
1303
|
+
}, {
|
|
1304
|
+
label: "待执行",
|
|
1108
1305
|
value: 0,
|
|
1109
|
-
tagType: "
|
|
1306
|
+
tagType: "default"
|
|
1110
1307
|
}, {
|
|
1111
1308
|
label: "部署中",
|
|
1112
1309
|
value: 1,
|
|
@@ -1115,30 +1312,39 @@ const L = {
|
|
|
1115
1312
|
label: "部署成功",
|
|
1116
1313
|
value: 2,
|
|
1117
1314
|
tagType: "success"
|
|
1315
|
+
}, {
|
|
1316
|
+
label: "部署失败",
|
|
1317
|
+
value: 3,
|
|
1318
|
+
tagType: "danger"
|
|
1118
1319
|
}]
|
|
1119
|
-
}])
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1320
|
+
}]), m = setInterval(() => {
|
|
1321
|
+
n.value && n.value.getTableList();
|
|
1322
|
+
}, 5e3);
|
|
1323
|
+
return pe(() => {
|
|
1324
|
+
clearInterval(m);
|
|
1325
|
+
}), (y, r) => {
|
|
1326
|
+
const v = c("el-table-column"), k = c("TdsTable");
|
|
1327
|
+
return h(), x("div", st, [e(k, {
|
|
1328
|
+
ref_key: "refTdsTable",
|
|
1329
|
+
ref: n,
|
|
1124
1330
|
columns: a,
|
|
1125
1331
|
"search-col": 4,
|
|
1126
|
-
"request-api":
|
|
1127
|
-
options:
|
|
1128
|
-
"init-param":
|
|
1332
|
+
"request-api": F(Ue),
|
|
1333
|
+
options: y.$tableOptions(),
|
|
1334
|
+
"init-param": o,
|
|
1129
1335
|
"reserve-selection": ""
|
|
1130
1336
|
}, {
|
|
1131
|
-
default:
|
|
1337
|
+
default: b(() => [e(v, {
|
|
1132
1338
|
type: "expand"
|
|
1133
1339
|
}, {
|
|
1134
|
-
default:
|
|
1340
|
+
default: b((g) => [p("div", it, q(g.row.deployment_log), 1)]),
|
|
1135
1341
|
_: 1
|
|
1136
1342
|
})]),
|
|
1137
1343
|
_: 1
|
|
1138
1344
|
}, 8, ["columns", "request-api", "options", "init-param"])]);
|
|
1139
1345
|
};
|
|
1140
1346
|
}
|
|
1141
|
-
}),
|
|
1347
|
+
}), dt = { class: "main-wrapper" }, pt = /* @__PURE__ */ W({
|
|
1142
1348
|
name: "TCProbe",
|
|
1143
1349
|
__name: "index",
|
|
1144
1350
|
props: {
|
|
@@ -1147,44 +1353,44 @@ const L = {
|
|
|
1147
1353
|
default: ""
|
|
1148
1354
|
}
|
|
1149
1355
|
},
|
|
1150
|
-
setup(
|
|
1151
|
-
const
|
|
1152
|
-
return (
|
|
1153
|
-
const
|
|
1154
|
-
return
|
|
1155
|
-
e(
|
|
1156
|
-
modelValue:
|
|
1157
|
-
"onUpdate:modelValue":
|
|
1356
|
+
setup(l) {
|
|
1357
|
+
const o = w("package");
|
|
1358
|
+
return (n, a) => {
|
|
1359
|
+
const m = c("el-tab-pane"), y = c("el-tabs");
|
|
1360
|
+
return h(), x("div", dt, [
|
|
1361
|
+
e(y, {
|
|
1362
|
+
modelValue: o.value,
|
|
1363
|
+
"onUpdate:modelValue": a[0] || (a[0] = (r) => o.value = r),
|
|
1158
1364
|
class: "demo-tabs"
|
|
1159
1365
|
}, {
|
|
1160
|
-
default:
|
|
1161
|
-
e(
|
|
1366
|
+
default: b(() => [
|
|
1367
|
+
e(m, {
|
|
1162
1368
|
label: "安装包管理",
|
|
1163
1369
|
name: "package"
|
|
1164
1370
|
}, {
|
|
1165
|
-
default:
|
|
1166
|
-
|
|
1371
|
+
default: b(() => [
|
|
1372
|
+
o.value === "package" ? (h(), Q(Je, {
|
|
1167
1373
|
key: 0,
|
|
1168
|
-
token:
|
|
1169
|
-
}, null, 8, ["token"])) :
|
|
1374
|
+
token: l.token
|
|
1375
|
+
}, null, 8, ["token"])) : K("", !0)
|
|
1170
1376
|
]),
|
|
1171
1377
|
_: 1
|
|
1172
1378
|
}),
|
|
1173
|
-
e(
|
|
1379
|
+
e(m, {
|
|
1174
1380
|
label: "探针部署",
|
|
1175
1381
|
name: "deploy"
|
|
1176
1382
|
}, {
|
|
1177
|
-
default:
|
|
1178
|
-
|
|
1383
|
+
default: b(() => [
|
|
1384
|
+
o.value === "deploy" ? (h(), Q(at, { key: 0 })) : K("", !0)
|
|
1179
1385
|
]),
|
|
1180
1386
|
_: 1
|
|
1181
1387
|
}),
|
|
1182
|
-
e(
|
|
1388
|
+
e(m, {
|
|
1183
1389
|
label: "部署历史",
|
|
1184
1390
|
name: "history"
|
|
1185
1391
|
}, {
|
|
1186
|
-
default:
|
|
1187
|
-
|
|
1392
|
+
default: b(() => [
|
|
1393
|
+
o.value === "history" ? (h(), Q(ut, { key: 0 })) : K("", !0)
|
|
1188
1394
|
]),
|
|
1189
1395
|
_: 1
|
|
1190
1396
|
})
|
|
@@ -1195,24 +1401,24 @@ const L = {
|
|
|
1195
1401
|
};
|
|
1196
1402
|
}
|
|
1197
1403
|
});
|
|
1198
|
-
const
|
|
1199
|
-
if (
|
|
1200
|
-
for (const
|
|
1201
|
-
|
|
1202
|
-
},
|
|
1203
|
-
for (const [
|
|
1204
|
-
|
|
1205
|
-
return
|
|
1206
|
-
},
|
|
1207
|
-
TCProbe:
|
|
1208
|
-
},
|
|
1209
|
-
install(
|
|
1210
|
-
Object.entries(
|
|
1211
|
-
|
|
1212
|
-
}),
|
|
1404
|
+
const ct = /* @__PURE__ */ ne(pt, [["__scopeId", "data-v-f99b9b23"]]), mt = (l, o) => {
|
|
1405
|
+
if (l.install = (n) => {
|
|
1406
|
+
for (const a of [l, ...Object.values(o ?? {})])
|
|
1407
|
+
n.component(a.name, a);
|
|
1408
|
+
}, o)
|
|
1409
|
+
for (const [n, a] of Object.entries(o))
|
|
1410
|
+
l[n] = a;
|
|
1411
|
+
return l;
|
|
1412
|
+
}, _t = mt(ct), yt = {
|
|
1413
|
+
TCProbe: _t
|
|
1414
|
+
}, wt = {
|
|
1415
|
+
install(l, o) {
|
|
1416
|
+
Object.entries(yt).forEach(([n, a]) => {
|
|
1417
|
+
l.component(n, a);
|
|
1418
|
+
}), o != null && o.prodType && (window.$prodType = o.prodType), o != null && o.envURL && (window.$probeURL = o.envURL), o != null && o.dockerURL && (window.$dockerURL = o.dockerURL);
|
|
1213
1419
|
}
|
|
1214
1420
|
};
|
|
1215
1421
|
export {
|
|
1216
|
-
|
|
1217
|
-
|
|
1422
|
+
_t as TCProbe,
|
|
1423
|
+
wt as default
|
|
1218
1424
|
};
|