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