@topdatasec/probe 1.0.5 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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 w, Fragment as F, renderList as W, createVNode as e, withCtx as T, unref as q, createCommentVNode as O, ref as b, reactive as H, createTextVNode as A, createElementVNode as f, toDisplayString as C, mergeProps as Y, createBlock as G } from "vue";
2
+ import { CircleClose as ae, UploadFilled as se } from "@element-plus/icons-vue";
3
+ import { TdsTable as ue, TdsForm as ee } from "topdatasec-ui";
4
+ import ie from "spark-md5";
5
+ import { ElMessage as X } from "element-plus";
6
+ const pe = {
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"), h = d("el-icon"), s = d("el-button");
27
+ return y(), w("div", null, [
28
+ (y(!0), w(F, null, W(l.value, (p, $) => (y(), w("div", {
29
+ key: $,
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, [
54
+ l.value.length > 1 ? (y(), w("div", pe, [
55
55
  e(h, {
56
- onClick: (C) => d(E)
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;
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
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);
85
+ var s;
86
+ if (c.append((s = h.target) == null ? void 0 : s.result), m++, l) {
87
+ const p = Math.floor(m / n * 100);
88
+ l(p);
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 h = m * P, s = Math.min(h + P, t.size);
101
+ v.readAsArrayBuffer(t.slice(h, 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), h = m - n, s = new FormData();
108
+ s.append("file", E, t.name), s.append("chunkIndex", String(l + 1)), s.append("totalChunkNum", String(a)), s.append("fileMd5", r), s.append("tds_token", c), s.append("fileName", t.name), s.append("fileSize", String(t.size)), s.append("fileExt", t.name.substring(t.name.lastIndexOf(".") + 1)), s.append("chunkSize", String(P)), s.append("currentChunkSize", String(h));
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);
198
+ fileMd5: s
199
+ }), X.success(`${a.name} 上传成功`), m == null || m(s);
200
200
  } catch (h) {
201
- o == null || o({
201
+ n == null || n({
202
202
  progress: 0,
203
203
  statusText: h.message || "上传失败",
204
204
  status: "error"
205
- }), Q.error(`${n.name} 上传失败: ${h.message}`), S == null || S(h);
205
+ }), X.error(`${a.name} 上传失败: ${h.message}`), E == null || E(h);
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,73 @@ const M = {
301
301
  }
302
302
  },
303
303
  setup(t) {
304
- const l = x(), n = x(), s = x("快速部署"), d = x({}), {
304
+ const l = b(), a = b(), r = b("快速部署"), c = b({}), {
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 h = b([{
314
314
  ip: "",
315
315
  port: ""
316
- }]), a = x([{
316
+ }]), s = b([{
317
317
  ip: "",
318
318
  port: ""
319
- }]), u = x([{
319
+ }]), p = b([{
320
320
  ip: "",
321
321
  port: ""
322
- }]), E = x([{
322
+ }]), $ = b([{
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 x = (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
+ }, (g, k) => {
332
+ var B, 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: ((B = o[k]) == null ? void 0 : B.ip) || "",
335
+ src_port: Number((N = o[k]) == null ? void 0 : N.port) || 0,
336
+ dst_ip: ((z = i[k]) == null ? void 0 : z.ip) || "",
337
+ dst_port: Number((R = i[k]) == null ? void 0 : R.port) || 0
338
338
  };
339
339
  });
340
- }, r = {
341
- packages_id: [d.value.id],
342
- server_id: i.server_id,
340
+ }, D = {
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: x(h.value, s.value),
351
+ filterBlacklist: x(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: D
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
+ await he({
361
+ data: [u.id]
362
362
  }), l.value.getTableList();
363
363
  });
364
364
  }
365
- const U = G([
365
+ const S = H([
366
366
  // { type: 'selection', align: 'center', field: 'id', hide: true },
367
367
  {
368
368
  field: "server_id",
369
369
  name: "选择服务器",
370
- enum: oe,
370
+ enum: ne,
371
371
  fieldNames: {
372
372
  value: "id",
373
373
  label: "server_name"
@@ -403,9 +403,9 @@ const M = {
403
403
  {
404
404
  field: "deployment_server",
405
405
  name: "已部署服务器数",
406
- render: (i) => {
407
- var b;
408
- return ((b = i.row.deployment_server) == null ? void 0 : b.length) || 0;
406
+ render: (u) => {
407
+ var x;
408
+ return ((x = u.row.deployment_server) == null ? void 0 : x.length) || 0;
409
409
  }
410
410
  },
411
411
  {
@@ -488,20 +488,20 @@ const M = {
488
488
  show: {
489
489
  type: "input",
490
490
  tooltip: "白名单配置后,仅采集白名单内相关流量,如不填写,则采集所有流量",
491
- render: () => e(B, null, [e("div", {
491
+ render: () => e(F, null, [e("div", {
492
492
  style: "width: 100%"
493
493
  }, [e("p", {
494
494
  class: "color-[var(--el-text-color-regular)]"
495
- }, [F("源ip端口:")]), e(N, {
495
+ }, [A("源ip端口:")]), e(V, {
496
496
  modelValue: h.value,
497
- "onUpdate:modelValue": (i) => h.value = i
497
+ "onUpdate:modelValue": (u) => h.value = u
498
498
  }, null)]), e("div", {
499
499
  style: "width: 100%"
500
500
  }, [e("p", {
501
501
  class: "color-[var(--el-text-color-regular)]"
502
- }, [F("目的ip端口:")]), e(N, {
503
- modelValue: a.value,
504
- "onUpdate:modelValue": (i) => a.value = i
502
+ }, [A("目的ip端口:")]), e(V, {
503
+ modelValue: s.value,
504
+ "onUpdate:modelValue": (u) => s.value = u
505
505
  }, null)])])
506
506
  },
507
507
  hide: !0
@@ -512,16 +512,16 @@ const M = {
512
512
  show: {
513
513
  type: "input",
514
514
  tooltip: "黑名单配置后,将不再采集黑名单内相关流量",
515
- render: () => e(B, null, [e("p", {
515
+ render: () => e(F, null, [e("p", {
516
516
  class: "color-[var(--el-text-color-regular)]"
517
- }, [F("源ip端口:")]), e(N, {
518
- modelValue: u.value,
519
- "onUpdate:modelValue": (i) => u.value = i
517
+ }, [A("源ip端口:")]), e(V, {
518
+ modelValue: p.value,
519
+ "onUpdate:modelValue": (u) => p.value = u
520
520
  }, null), e("p", {
521
521
  class: "color-[var(--el-text-color-regular)]"
522
- }, [F("目的ip端口:")]), e(N, {
523
- modelValue: E.value,
524
- "onUpdate:modelValue": (i) => E.value = i
522
+ }, [A("目的ip端口:")]), e(V, {
523
+ modelValue: $.value,
524
+ "onUpdate:modelValue": (u) => $.value = u
525
525
  }, null)])
526
526
  },
527
527
  hide: !0
@@ -531,229 +531,232 @@ const M = {
531
531
  name: window.$t("global.operate"),
532
532
  width: 140,
533
533
  fixed: "right",
534
- render: (i) => e("div", null, [e(p("el-button"), {
534
+ render: (u) => e("div", null, [e(d("el-button"), {
535
535
  link: !0,
536
536
  type: "primary",
537
537
  class: "custom-btn",
538
- onClick: () => S(i.row)
538
+ onClick: () => E(u.row)
539
539
  }, {
540
- icon: () => e(p("tds-svg-icon"), {
540
+ icon: () => e(d("tds-svg-icon"), {
541
541
  name: "deployed",
542
542
  tip: "部署"
543
543
  }, null)
544
- }), e(p("el-button"), {
544
+ }), e(d("el-button"), {
545
545
  link: !0,
546
546
  type: "danger",
547
547
  icon: "Delete",
548
548
  title: v("button.delete"),
549
- onClick: () => I([i.row])
549
+ onClick: () => I([u.row])
550
550
  }, null)])
551
551
  }
552
- ]), L = x([]);
553
- function W(i) {
554
- const b = i.raw;
555
- if (!b)
552
+ ]), U = b([]);
553
+ function j(u) {
554
+ const x = u.raw;
555
+ if (!x)
556
556
  return;
557
- const r = {
558
- fileName: b.name,
559
- fileSize: b.size,
557
+ const D = {
558
+ fileName: x.name,
559
+ fileSize: x.size,
560
560
  progress: 0,
561
561
  progressStatus: "",
562
562
  statusText: "准备上传..."
563
563
  };
564
- L.value.push(r);
565
- const w = L.value.length - 1;
566
- _e({
567
- file: b,
564
+ U.value.push(D);
565
+ const o = U.value.length - 1;
566
+ fe({
567
+ file: x,
568
568
  fileDesc: "探针安装包",
569
569
  // 替换为你实际的接口地址
570
- uploadUrl: M.deployURL + "/service_deploy/deployment/packages/upload",
571
- mergeUrl: M.deployURL + "/service_deploy/deployment/packages/upload_merge",
572
- token: y.token,
570
+ uploadUrl: L.deployURL + "/service_deploy/deployment/packages/upload",
571
+ mergeUrl: L.deployURL + "/service_deploy/deployment/packages/upload_merge",
572
+ token: m.token,
573
573
  // 进度回调
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 = "");
574
+ onProgress: (i) => {
575
+ const _ = U.value[o];
576
+ _ && (_.progress = i.progress, _.statusText = i.statusText, i.fileMd5 && (_.fileMd5 = i.fileMd5), i.status === "error" ? _.progressStatus = "exception" : i.status === "success" ? _.progressStatus = "success" : _.progressStatus = "");
577
577
  },
578
578
  // 成功回调
579
579
  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);
580
+ var _;
581
+ const i = U.value[o];
582
+ i && (i.progress = 100, i.progressStatus = "success", i.statusText = "上传成功"), (_ = l.value) == null || _.getTableList(), setTimeout(() => {
583
+ const g = U.value.findIndex((k) => k.fileName === x.name);
584
+ g !== -1 && U.value.splice(g, 1);
585
585
  }, 3e3);
586
586
  },
587
587
  // 失败回调
588
- onError: (c) => {
589
- console.error("文件上传失败:", c);
590
- const m = L.value[w];
591
- m && (m.progressStatus = "exception", m.statusText = c.message || "上传失败");
588
+ onError: (i) => {
589
+ console.error("文件上传失败:", i);
590
+ const _ = U.value[o];
591
+ _ && (_.progressStatus = "exception", _.statusText = i.message || "上传失败");
592
592
  }
593
593
  });
594
594
  }
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, {
595
+ return (u, x) => {
596
+ const D = d("el-icon"), o = d("el-upload"), i = d("el-progress"), _ = d("el-table-column");
597
+ return y(), w("div", $e, [e(o, {
598
598
  class: "upload-demo mt-10px",
599
599
  drag: "",
600
600
  action: "",
601
601
  "auto-upload": !1,
602
602
  accept: ".tar.gz,.tgz",
603
- "on-change": W,
603
+ "on-change": j,
604
604
  "show-file-list": !1,
605
605
  multiple: ""
606
606
  }, {
607
- default: $(() => [e(r, {
607
+ default: T(() => [e(D, {
608
608
  class: "el-icon--upload"
609
609
  }, {
610
- default: $(() => [e(A(se))]),
610
+ default: T(() => [e(q(se))]),
611
611
  _: 1
612
- }), b[0] || (b[0] = _("div", {
612
+ }), x[0] || (x[0] = f("div", {
613
613
  class: "el-upload__text"
614
- }, [F(" 点击或拖拽文件到此处上传  "), _("br"), _("em", null, "支持的格式: tar.gz, tgz")], -1))]),
614
+ }, [A(" 点击或拖拽文件到此处上传  "), f("br"), f("em", null, "支持的格式: tar.gz, tgz")], -1))]),
615
615
  _: 1
616
- }), L.value.length > 0 ? (f(), k("div", $e, [(f(!0), k(B, null, K(L.value, (g) => (f(), k("div", {
616
+ }), U.value.length > 0 ? (y(), w("div", Ee, [(y(!0), w(F, null, W(U.value, (g) => (y(), w("div", {
617
617
  key: g.fileName,
618
618
  class: "upload-progress-item"
619
- }, [_("div", Ee, [_("span", Se, q(g.fileName), 1), _("span", Ue, q(A(fe)(g.fileSize)), 1)]), e(c, {
619
+ }, [f("div", Se, [f("span", Ue, C(g.fileName), 1), f("span", Le, C(q(ye)(g.fileSize)), 1)]), e(i, {
620
620
  percentage: g.progress,
621
621
  status: g.progressStatus
622
- }, null, 8, ["percentage", "status"]), _("div", Le, q(g.statusText), 1)]))), 128))])) : O("", !0), _("div", Me, [e(A(ae), {
622
+ }, null, 8, ["percentage", "status"]), f("div", Me, C(g.statusText), 1)]))), 128))])) : O("", !0), f("div", Ce, [e(q(ue), {
623
623
  ref_key: "refTdsTable",
624
624
  ref: l,
625
- columns: U,
626
- "request-api": A(le),
627
- options: i.$tableOptions()
625
+ columns: S,
626
+ "request-api": q(oe),
627
+ options: u.$tableOptions()
628
628
  }, {
629
- default: $(() => [e(m, {
629
+ default: T(() => [e(_, {
630
630
  type: "expand"
631
631
  }, {
632
- default: $((g) => [g.row.deployment_server && g.row.deployment_server.length > 0 ? (f(), k("div", Ce, [b[1] || (b[1] = _("div", {
632
+ default: T((g) => [g.row.deployment_server && g.row.deployment_server.length > 0 ? (y(), w("div", qe, [x[1] || (x[1] = f("div", {
633
633
  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,
634
+ }, "已部署的服务器", -1)), f("div", Ae, [(y(!0), w(F, null, W(g.row.deployment_server, (k) => (y(), w("div", {
635
+ key: k.id,
636
636
  class: "w-30% px-20px py-10px rounded-8px bg-[var(--el-fill-color-light)] border border-solid border-[var(--el-border-color-lighter)] hover:shadow-md transition-shadow"
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, "暂无部署服务器记录"))]),
637
+ }, [f("div", Fe, C(k.server_name), 1), f("div", Be, [f("p", null, "IP: " + C(k.ip_address), 1), f("p", null, "部署时间: " + C(k.deployment_time), 1)])]))), 128))])])) : (y(), w("div", De, "暂无部署服务器记录"))]),
638
638
  _: 1
639
639
  })]),
640
640
  _: 1
641
- }, 8, ["columns", "request-api", "options"])]), e(A(Y), X({
641
+ }, 8, ["columns", "request-api", "options"])]), e(q(ee), Y({
642
642
  ref_key: "refTdsForm",
643
- ref: n
644
- }, i.$formBindProps({
645
- title: s.value,
646
- form: d.value,
647
- columns: U
643
+ ref: a
644
+ }, u.$formBindProps({
645
+ title: r.value,
646
+ form: c.value,
647
+ columns: S
648
648
  }), {
649
- onSubmit: C
649
+ onSubmit: M
650
650
  }), null, 16)]);
651
651
  };
652
652
  }
653
- }), Ne = {
653
+ }), Ve = {
654
654
  class: "table-box"
655
- }, Ve = {
656
- class: "flex items-center"
657
655
  }, ze = {
656
+ class: "flex items-center"
657
+ }, Pe = {
658
658
  key: 0
659
659
  }, Ie = {
660
660
  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
661
  }, Re = {
664
- class: "text-12px text-[var(--el-text-color-regular)] space-y-4px"
662
+ class: "font-bold text-14px mb-8px text-[var(--el-text-color-primary)]"
665
663
  }, Oe = {
664
+ class: "text-12px text-[var(--el-text-color-regular)] space-y-4px"
665
+ }, He = {
666
666
  key: 1,
667
667
  class: "font-bold text-center text-gray-500 py-20"
668
- }, He = /* @__PURE__ */ H({
668
+ }, Ke = /* @__PURE__ */ K({
669
669
  __name: "index",
670
670
  setup(t) {
671
671
  const {
672
672
  $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();
673
+ $messageBox: a
674
+ } = window, r = b(), c = b(), v = b(""), n = b({}), m = b("show"), E = H({
675
+ service_type: window.$prodType
676
+ });
677
+ function h() {
678
+ n.value = {}, m.value = "show", v.value = "添加服务器", c.value.open();
677
679
  }
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();
680
+ const s = (o) => {
681
+ a(o, "server_name", l("button.delete"), "error").then(async () => {
682
+ await ge({
683
+ data: o.map((i) => i.id),
684
+ service_type: window.$prodType
685
+ }), r.value.getTableList();
683
686
  });
684
687
  };
685
- function a(r) {
686
- o.value = {
687
- id: r.id
688
- }, y.value = "deploy", v.value = "快速部署", d.value.open();
688
+ function p(o) {
689
+ n.value = {
690
+ id: o.id
691
+ }, m.value = "deploy", v.value = "快速部署", c.value.open();
689
692
  }
690
- const u = x([{
693
+ const $ = b([{
691
694
  ip: "",
692
695
  port: ""
693
- }]), E = x([{
696
+ }]), M = b([{
694
697
  ip: "",
695
698
  port: ""
696
- }]), C = x([{
699
+ }]), I = b([{
697
700
  ip: "",
698
701
  port: ""
699
- }]), I = x([{
702
+ }]), S = b([{
700
703
  ip: "",
701
704
  port: ""
702
705
  }]);
703
- async function U(r) {
704
- if (y.value === "show") {
706
+ async function U(o) {
707
+ if (m.value === "show") {
705
708
  await ve({
706
- data: r
707
- }), s.value.getTableList(), d.value.close();
709
+ data: o
710
+ }), r.value.getTableList(), c.value.close();
708
711
  return;
709
712
  }
710
- const w = (m, g) => {
711
- const T = Math.max(m.length, g.length);
713
+ const i = (g, k) => {
714
+ const B = Math.max(g.length, k.length);
712
715
  return Array.from({
713
- length: T
714
- }, (D, V) => {
715
- var P, R, J, Z;
716
+ length: B
717
+ }, (N, z) => {
718
+ var R, J, Z, Q;
716
719
  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
720
+ src_ip: ((R = g[z]) == null ? void 0 : R.ip) || "",
721
+ src_port: Number((J = g[z]) == null ? void 0 : J.port) || 0,
722
+ dst_ip: ((Z = k[z]) == null ? void 0 : Z.ip) || "",
723
+ dst_port: Number((Q = k[z]) == null ? void 0 : Q.port) || 0
721
724
  };
722
725
  });
723
- }, c = {
724
- packages_id: [r.packages_id],
725
- server_id: [o.value.id],
726
+ }, _ = {
727
+ packages_id: [o.packages_id],
728
+ server_id: [n.value.id],
726
729
  service_type: window.$prodType,
727
730
  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)
731
+ probe_name: o.probe_name || "",
732
+ collection_mode: o.collection_mode,
733
+ interface: o.interface || "",
734
+ engine_ip: o.engine_ip || "",
735
+ engine_port: o.engine_port || "",
736
+ filterWhitelist: i($.value, M.value),
737
+ filterBlacklist: i(I.value, S.value)
735
738
  }
736
739
  };
737
- await te({
738
- data: c
739
- }), s.value.getTableList(), d.value.close();
740
+ await le({
741
+ data: _
742
+ }), r.value.getTableList(), c.value.close();
740
743
  }
741
- function L(r) {
742
- we({
743
- data: [r.id]
744
- }), s.value.getTableList();
745
- }
746
- function W(r) {
744
+ function j(o) {
747
745
  xe({
748
- data: [r.id]
749
- }), s.value.getTableList();
746
+ data: [o.id]
747
+ }), r.value.getTableList();
750
748
  }
751
- function i(r) {
749
+ function u(o) {
752
750
  ke({
753
- data: [r.id]
754
- }), s.value.getTableList();
751
+ data: [o.id]
752
+ }), r.value.getTableList();
753
+ }
754
+ function x(o) {
755
+ Te({
756
+ data: [o.id]
757
+ }), r.value.getTableList();
755
758
  }
756
- const b = G([{
759
+ const D = H([{
757
760
  field: "server_name",
758
761
  name: "服务器名称",
759
762
  show: {
@@ -808,7 +811,7 @@ const M = {
808
811
  }, {
809
812
  field: "arch",
810
813
  name: "架构",
811
- enum: he,
814
+ enum: be,
812
815
  show: {
813
816
  type: "select"
814
817
  },
@@ -818,7 +821,7 @@ const M = {
818
821
  }, {
819
822
  field: "deployed_count",
820
823
  name: "已部署探针数量",
821
- render: (r) => e("span", null, [r.row.deployment_packages.length])
824
+ render: (o) => e("span", null, [o.row.deployment_packages.length])
822
825
  }, {
823
826
  field: "status",
824
827
  name: "状态",
@@ -861,7 +864,7 @@ const M = {
861
864
  }, {
862
865
  field: "packages_id",
863
866
  name: "安装包",
864
- enum: le,
867
+ enum: oe,
865
868
  fieldNames: {
866
869
  value: "id",
867
870
  label: "file_name"
@@ -934,16 +937,16 @@ const M = {
934
937
  deploy: {
935
938
  type: "input",
936
939
  tooltip: "白名单配置后,仅采集白名单内相关流量,如不填写,则采集所有流量",
937
- render: () => e(B, null, [e("p", {
940
+ render: () => e(F, null, [e("p", {
938
941
  class: "color-[var(--el-text-color-regular)]"
939
- }, [F("源ip端口:")]), e(N, {
940
- modelValue: u.value,
941
- "onUpdate:modelValue": (r) => u.value = r
942
+ }, [A("源ip端口:")]), e(V, {
943
+ modelValue: $.value,
944
+ "onUpdate:modelValue": (o) => $.value = o
942
945
  }, null), e("p", {
943
946
  class: "color-[var(--el-text-color-regular)]"
944
- }, [F("目的ip端口:")]), e(N, {
945
- modelValue: E.value,
946
- "onUpdate:modelValue": (r) => E.value = r
947
+ }, [A("目的ip端口:")]), e(V, {
948
+ modelValue: M.value,
949
+ "onUpdate:modelValue": (o) => M.value = o
947
950
  }, null)])
948
951
  },
949
952
  hide: !0
@@ -953,16 +956,16 @@ const M = {
953
956
  deploy: {
954
957
  type: "input",
955
958
  tooltip: "黑名单配置后,将不再采集黑名单内相关流量",
956
- render: () => e(B, null, [e("p", {
959
+ render: () => e(F, null, [e("p", {
957
960
  class: "color-[var(--el-text-color-regular)]"
958
- }, [F("源ip端口:")]), e(N, {
959
- modelValue: C.value,
960
- "onUpdate:modelValue": (r) => C.value = r
961
+ }, [A("源ip端口:")]), e(V, {
962
+ modelValue: I.value,
963
+ "onUpdate:modelValue": (o) => I.value = o
961
964
  }, null), e("p", {
962
965
  class: "color-[var(--el-text-color-regular)]"
963
- }, [F("目的ip端口:")]), e(N, {
964
- modelValue: I.value,
965
- "onUpdate:modelValue": (r) => I.value = r
966
+ }, [A("目的ip端口:")]), e(V, {
967
+ modelValue: S.value,
968
+ "onUpdate:modelValue": (o) => S.value = o
966
969
  }, null)])
967
970
  },
968
971
  hide: !0
@@ -971,122 +974,125 @@ const M = {
971
974
  name: window.$t("global.operate"),
972
975
  width: 180,
973
976
  fixed: "right",
974
- render: (r) => e("div", null, [e(p("el-button"), {
977
+ render: (o) => e("div", null, [e(d("el-button"), {
975
978
  link: !0,
976
979
  type: "primary",
977
980
  icon: "Connection",
978
981
  title: "连通性检查",
979
982
  class: "custom-btn",
980
- onClick: () => L(r.row)
981
- }, null), e(p("el-button"), {
983
+ onClick: () => j(o.row)
984
+ }, null), e(d("el-button"), {
982
985
  link: !0,
983
986
  type: "primary",
984
987
  class: "custom-btn",
985
- onClick: () => W(r.row)
988
+ onClick: () => u(o.row)
986
989
  }, {
987
- icon: () => e(p("tds-svg-icon"), {
990
+ icon: () => e(d("tds-svg-icon"), {
988
991
  name: "install_env",
989
992
  tip: "测试安装环境"
990
993
  }, null)
991
- }), e(p("el-button"), {
994
+ }), e(d("el-button"), {
992
995
  link: !0,
993
996
  type: "primary",
994
997
  class: "custom-btn",
995
- onClick: () => i(r.row)
998
+ onClick: () => x(o.row)
996
999
  }, {
997
- icon: () => e(p("tds-svg-icon"), {
1000
+ icon: () => e(d("tds-svg-icon"), {
998
1001
  name: "docker",
999
1002
  tip: "自动安装docker环境"
1000
1003
  }, null)
1001
- }), e(p("el-button"), {
1004
+ }), e(d("el-button"), {
1002
1005
  link: !0,
1003
1006
  type: "primary",
1004
1007
  class: "custom-btn",
1005
- onClick: () => a(r.row)
1008
+ onClick: () => p(o.row)
1006
1009
  }, {
1007
- icon: () => e(p("tds-svg-icon"), {
1010
+ icon: () => e(d("tds-svg-icon"), {
1008
1011
  name: "deployed",
1009
1012
  tip: "部署"
1010
1013
  }, null)
1011
- }), e(p("el-button"), {
1014
+ }), e(d("el-button"), {
1012
1015
  link: !0,
1013
1016
  type: "danger",
1014
1017
  icon: "Delete",
1015
1018
  title: l("button.delete"),
1016
- onClick: () => h([r.row])
1019
+ onClick: () => s([o.row])
1017
1020
  }, null)])
1018
1021
  }]);
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, {
1022
+ return (o, i) => {
1023
+ const _ = d("el-button"), g = d("el-table-column"), k = d("TdsTable");
1024
+ return y(), w("div", Ve, [e(k, {
1022
1025
  ref_key: "refTdsTable",
1023
- ref: s,
1024
- columns: b,
1025
- "request-api": A(oe),
1026
+ ref: r,
1027
+ columns: D,
1028
+ "request-api": q(ne),
1026
1029
  "search-col": 4,
1027
- options: r.$tableOptions(),
1030
+ "init-param": E,
1031
+ options: o.$tableOptions(),
1028
1032
  "reserve-selection": ""
1029
1033
  }, {
1030
- tableHeader: $(() => [_("div", Ve, [e(c, {
1034
+ tableHeader: T(() => [f("div", ze, [e(_, {
1031
1035
  class: "custom-btn",
1032
1036
  type: "primary",
1033
1037
  icon: "Plus",
1034
1038
  plain: "",
1035
- onClick: w[0] || (w[0] = (T) => S())
1039
+ onClick: i[0] || (i[0] = (B) => h())
1036
1040
  }, {
1037
- default: $(() => [F(q(A(l)("button.add")), 1)]),
1041
+ default: T(() => [A(C(q(l)("button.add")), 1)]),
1038
1042
  _: 1
1039
1043
  })])]),
1040
- default: $(() => [e(m, {
1044
+ default: T(() => [e(g, {
1041
1045
  type: "expand"
1042
1046
  }, {
1043
- default: $((T) => [T.row.deployment_packages && T.row.deployment_packages.length > 0 ? (f(), k("div", ze, [w[1] || (w[1] = _("div", {
1047
+ default: T((B) => [B.row.deployment_packages && B.row.deployment_packages.length > 0 ? (y(), w("div", Pe, [i[1] || (i[1] = f("div", {
1044
1048
  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,
1049
+ }, "已部署的探针包", -1)), f("div", Ie, [(y(!0), w(F, null, W(B.row.deployment_packages, (N) => (y(), w("div", {
1050
+ key: N.id,
1047
1051
  class: "w-30% px-20px py-10px rounded-8px bg-[var(--el-fill-color-light)] border border-solid border-[var(--el-border-color-lighter)] hover:shadow-md transition-shadow"
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, "暂无部署服务器记录"))]),
1052
+ }, [f("div", Re, C(N.file_name), 1), f("div", Oe, [f("p", null, "版本: " + C(N.version), 1), f("p", null, "部署时间: " + C(N.deployment_time), 1)])]))), 128))])])) : (y(), w("div", He, "暂无部署服务器记录"))]),
1049
1053
  _: 1
1050
1054
  })]),
1051
1055
  _: 1
1052
- }, 8, ["columns", "request-api", "options"]), e(A(Y), X({
1056
+ }, 8, ["columns", "request-api", "init-param", "options"]), e(q(ee), Y({
1053
1057
  ref_key: "refTdsForm",
1054
- ref: d
1055
- }, r.$formBindProps({
1058
+ ref: c
1059
+ }, o.$formBindProps({
1056
1060
  title: v.value,
1057
- form: o.value,
1058
- columns: b,
1059
- formKey: y.value
1061
+ form: n.value,
1062
+ columns: D,
1063
+ formKey: m.value
1060
1064
  }), {
1061
1065
  onSubmit: U
1062
1066
  }), null, 16)]);
1063
1067
  };
1064
1068
  }
1065
- }), Ke = {
1069
+ }), We = {
1066
1070
  class: "table-box"
1067
- }, We = {
1071
+ }, je = {
1068
1072
  style: {
1069
1073
  padding: "0 50px"
1070
1074
  }
1071
- }, je = /* @__PURE__ */ H({
1075
+ }, Ge = /* @__PURE__ */ K({
1072
1076
  __name: "index",
1073
1077
  setup(t) {
1074
- const l = G([{
1078
+ const l = H({
1079
+ service_type: window.$prodType
1080
+ }), a = H([{
1075
1081
  field: "packages_name",
1076
1082
  name: "探针包",
1077
- render: (n) => e(B, null, [e("p", {
1083
+ render: (r) => e(F, null, [e("p", {
1078
1084
  class: "font-bold"
1079
- }, [n.row.packages_name]), e("p", {
1085
+ }, [r.row.packages_name]), e("p", {
1080
1086
  class: "text-gray-400"
1081
- }, [n.row.packages_version])])
1087
+ }, [r.row.packages_version])])
1082
1088
  }, {
1083
1089
  field: "server_name",
1084
1090
  name: "服务器",
1085
- render: (n) => e(B, null, [e("p", {
1091
+ render: (r) => e(F, null, [e("p", {
1086
1092
  class: "font-bold"
1087
- }, [n.row.server_name]), e("p", {
1093
+ }, [r.row.server_name]), e("p", {
1088
1094
  class: "text-gray-400"
1089
- }, [n.row.ip_address])])
1095
+ }, [r.row.ip_address])])
1090
1096
  }, {
1091
1097
  field: "deployment_time",
1092
1098
  name: "部署时间"
@@ -1108,27 +1114,28 @@ const M = {
1108
1114
  tagType: "success"
1109
1115
  }]
1110
1116
  }]);
1111
- return (n, s) => {
1112
- const d = p("el-table-column"), v = p("TdsTable");
1113
- return f(), k("div", Ke, [e(v, {
1117
+ return (r, c) => {
1118
+ const v = d("el-table-column"), n = d("TdsTable");
1119
+ return y(), w("div", We, [e(n, {
1114
1120
  ref: "refTdsTable",
1115
- columns: l,
1121
+ columns: a,
1116
1122
  "search-col": 4,
1117
- "request-api": A(be),
1118
- options: n.$tableOptions(),
1123
+ "request-api": q(we),
1124
+ options: r.$tableOptions(),
1125
+ "init-param": l,
1119
1126
  "reserve-selection": ""
1120
1127
  }, {
1121
- default: $(() => [e(d, {
1128
+ default: T(() => [e(v, {
1122
1129
  type: "expand"
1123
1130
  }, {
1124
- default: $((o) => [_("div", We, q(o.row.deployment_log), 1)]),
1131
+ default: T((m) => [f("div", je, C(m.row.deployment_log), 1)]),
1125
1132
  _: 1
1126
1133
  })]),
1127
1134
  _: 1
1128
- }, 8, ["columns", "request-api", "options"])]);
1135
+ }, 8, ["columns", "request-api", "options", "init-param"])]);
1129
1136
  };
1130
1137
  }
1131
- }), Ge = { class: "main-wrapper" }, Je = /* @__PURE__ */ H({
1138
+ }), Je = { class: "main-wrapper" }, Ze = /* @__PURE__ */ K({
1132
1139
  name: "TCProbe",
1133
1140
  __name: "index",
1134
1141
  props: {
@@ -1138,43 +1145,43 @@ const M = {
1138
1145
  }
1139
1146
  },
1140
1147
  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, [
1148
+ const l = b("package");
1149
+ return (a, r) => {
1150
+ const c = d("el-tab-pane"), v = d("el-tabs");
1151
+ return y(), w("div", Je, [
1145
1152
  e(v, {
1146
1153
  modelValue: l.value,
1147
- "onUpdate:modelValue": s[0] || (s[0] = (o) => l.value = o),
1154
+ "onUpdate:modelValue": r[0] || (r[0] = (n) => l.value = n),
1148
1155
  class: "demo-tabs"
1149
1156
  }, {
1150
- default: $(() => [
1151
- e(d, {
1157
+ default: T(() => [
1158
+ e(c, {
1152
1159
  label: "安装包管理",
1153
1160
  name: "package"
1154
1161
  }, {
1155
- default: $(() => [
1156
- l.value === "package" ? (f(), j(De, {
1162
+ default: T(() => [
1163
+ l.value === "package" ? (y(), G(Ne, {
1157
1164
  key: 0,
1158
1165
  token: t.token
1159
1166
  }, null, 8, ["token"])) : O("", !0)
1160
1167
  ]),
1161
1168
  _: 1
1162
1169
  }),
1163
- e(d, {
1170
+ e(c, {
1164
1171
  label: "探针部署",
1165
1172
  name: "deploy"
1166
1173
  }, {
1167
- default: $(() => [
1168
- l.value === "deploy" ? (f(), j(He, { key: 0 })) : O("", !0)
1174
+ default: T(() => [
1175
+ l.value === "deploy" ? (y(), G(Ke, { key: 0 })) : O("", !0)
1169
1176
  ]),
1170
1177
  _: 1
1171
1178
  }),
1172
- e(d, {
1179
+ e(c, {
1173
1180
  label: "部署历史",
1174
1181
  name: "history"
1175
1182
  }, {
1176
- default: $(() => [
1177
- l.value === "history" ? (f(), j(je, { key: 0 })) : O("", !0)
1183
+ default: T(() => [
1184
+ l.value === "history" ? (y(), G(Ge, { key: 0 })) : O("", !0)
1178
1185
  ]),
1179
1186
  _: 1
1180
1187
  })
@@ -1185,24 +1192,24 @@ const M = {
1185
1192
  };
1186
1193
  }
1187
1194
  });
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);
1195
+ const Qe = /* @__PURE__ */ te(Ze, [["__scopeId", "data-v-f99b9b23"]]), Xe = (t, l) => {
1196
+ if (t.install = (a) => {
1197
+ for (const r of [t, ...Object.values(l ?? {})])
1198
+ a.component(r.name, r);
1192
1199
  }, l)
1193
- for (const [n, s] of Object.entries(l))
1194
- t[n] = s;
1200
+ for (const [a, r] of Object.entries(l))
1201
+ t[a] = r;
1195
1202
  return t;
1196
- }, Xe = Qe(Ze), Ye = {
1197
- TCProbe: Xe
1198
- }, rt = {
1203
+ }, Ye = Xe(Qe), et = {
1204
+ TCProbe: Ye
1205
+ }, at = {
1199
1206
  install(t, l) {
1200
- Object.entries(Ye).forEach(([n, s]) => {
1201
- t.component(n, s);
1207
+ Object.entries(et).forEach(([a, r]) => {
1208
+ t.component(a, r);
1202
1209
  }), l != null && l.prodType && (window.$prodType = l.prodType), l != null && l.envURL && (window.$probeURL = l.envURL);
1203
1210
  }
1204
1211
  };
1205
1212
  export {
1206
- Xe as TCProbe,
1207
- rt as default
1213
+ Ye as TCProbe,
1214
+ at as default
1208
1215
  };