@topdatasec/probe 1.0.5 → 1.0.7

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