@blueking/bkflow-canvas-editor 1.1.0-beta.18 → 1.1.0-beta.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{index-BiVWIQk9.js → index-CHWYTOjB.js} +1 -1
- package/dist/{index-F3qiT5vG.cjs → index-Cd5idVeT.cjs} +1 -1
- package/dist/{index-p1yFdyJt.js → index-CzwV25Dt.js} +177 -177
- package/dist/index-D60AGDsD.js +163 -0
- package/dist/{index-DEFjdqOH.js → index-DM_4El-f.js} +9193 -9176
- package/dist/index-DR5N5g_d.cjs +1 -0
- package/dist/index-pwilZYph.cjs +1 -0
- package/dist/{index-CI0eir7v.cjs → index-x6a-1dRP.cjs} +26 -26
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +4 -4
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/index-CPc21dRG.js +0 -159
- package/dist/index-CWZHZcfp.cjs +0 -1
- package/dist/index-Dx7WmVHt.cjs +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as I, ref as S, computed as
|
|
2
|
-
import { L as ie, S as ue, E as re, _ as Y, b as de, c as ce, o as pe, t as me,
|
|
1
|
+
import { defineComponent as I, ref as S, computed as p, watch as K, nextTick as X, resolveComponent as A, openBlock as g, createElementBlock as w, createVNode as f, Fragment as Z, renderList as ee, withKeys as te, withModifiers as oe, normalizeClass as T, createElementVNode as n, createCommentVNode as F, toDisplayString as P, createSlots as j, withCtx as k, createTextVNode as B, onBeforeUnmount as se, resolveDirective as ae, normalizeStyle as ne, withDirectives as le, createBlock as q } from "vue";
|
|
2
|
+
import { L as ie, S as ue, E as re, _ as Y, b as de, c as ce, o as pe, t as me, s as ve, n as fe, D as J, C as be, d as ge, e as _e } from "./index-DM_4El-f.js";
|
|
3
3
|
import { b as U } from "./context-0LckFRIf.js";
|
|
4
|
-
const
|
|
4
|
+
const ye = { class: "debug-result-node-list" }, ke = ["data-node-id", "aria-selected", "onClick", "onKeydown"], we = ["title"], xe = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "debug-result-node-list__mock",
|
|
7
7
|
"data-test": "node-mock-flag"
|
|
8
|
-
},
|
|
8
|
+
}, Ee = {
|
|
9
9
|
key: 1,
|
|
10
10
|
class: "debug-result-node-list__empty"
|
|
11
11
|
}, Ce = /* @__PURE__ */ I({
|
|
@@ -16,139 +16,139 @@ const _e = { class: "debug-result-node-list" }, ye = ["data-node-id", "aria-sele
|
|
|
16
16
|
},
|
|
17
17
|
emits: ["update:modelValue"],
|
|
18
18
|
setup(t, { emit: r }) {
|
|
19
|
-
const e = t, l = r, o = S(""), i = S("all"), _ = S(null),
|
|
19
|
+
const e = t, l = r, o = S(""), i = S("all"), _ = S(null), m = {
|
|
20
20
|
not_run: "未执行",
|
|
21
21
|
finished: "成功",
|
|
22
22
|
failed: "失败",
|
|
23
23
|
running: "正在调试",
|
|
24
24
|
suspended: "挂起",
|
|
25
25
|
skipped: "跳过"
|
|
26
|
-
},
|
|
26
|
+
}, E = [
|
|
27
27
|
{ value: "all", label: "全部" },
|
|
28
28
|
{
|
|
29
29
|
value: "finished",
|
|
30
30
|
icon: "bkflow-canvas-dark-circle-checkbox",
|
|
31
31
|
iconColor: "#5fb8ac",
|
|
32
|
-
tooltip:
|
|
32
|
+
tooltip: m.finished
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
35
|
value: "failed",
|
|
36
36
|
icon: "bkflow-canvas-dark-circle-close",
|
|
37
37
|
iconColor: "#fa4e41",
|
|
38
|
-
tooltip:
|
|
38
|
+
tooltip: m.failed
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
41
|
value: "running",
|
|
42
42
|
iconComponent: ie,
|
|
43
43
|
iconColor: "#3a84ff",
|
|
44
|
-
tooltip:
|
|
44
|
+
tooltip: m.running
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
47
|
value: "not_run",
|
|
48
48
|
icon: "bkflow-canvas-weizhixing2",
|
|
49
49
|
iconColor: "#b8bbc4",
|
|
50
|
-
tooltip:
|
|
50
|
+
tooltip: m.not_run
|
|
51
51
|
},
|
|
52
52
|
{
|
|
53
53
|
value: "suspended",
|
|
54
54
|
icon: "bkflow-canvas-zanting",
|
|
55
55
|
iconColor: "#f59500",
|
|
56
|
-
tooltip:
|
|
56
|
+
tooltip: m.suspended
|
|
57
57
|
},
|
|
58
58
|
{
|
|
59
59
|
value: "skipped",
|
|
60
60
|
icon: "bkflow-canvas-tiaoguo2",
|
|
61
61
|
iconColor: "#6e89af",
|
|
62
|
-
tooltip:
|
|
62
|
+
tooltip: m.skipped
|
|
63
63
|
}
|
|
64
|
-
],
|
|
65
|
-
() =>
|
|
64
|
+
], R = p(
|
|
65
|
+
() => E.map((d) => ({
|
|
66
66
|
...d,
|
|
67
67
|
count: d.value === "all" ? e.nodes.length : e.nodes.filter((u) => u.status === d.value).length
|
|
68
68
|
}))
|
|
69
|
-
),
|
|
69
|
+
), C = p(() => {
|
|
70
70
|
const d = o.value.trim().toLowerCase();
|
|
71
71
|
return e.nodes.filter((u) => i.value !== "all" && u.status !== i.value ? !1 : d ? u.name.toLowerCase().includes(d) || u.type.toLowerCase().includes(d) || (u.typeName ?? "").toLowerCase().includes(d) : !0);
|
|
72
|
-
}), N =
|
|
72
|
+
}), N = p(() => o.value.trim() ? "搜索结果为空" : i.value !== "all" ? `暂无${m[i.value]}状态节点` : "暂无节点"), L = () => {
|
|
73
73
|
o.value = "", i.value = "all";
|
|
74
|
-
},
|
|
75
|
-
const u = _.value,
|
|
76
|
-
if (!u || !
|
|
77
|
-
const
|
|
78
|
-
x.top <
|
|
74
|
+
}, h = (d) => {
|
|
75
|
+
const u = _.value, b = u?.querySelector(`[data-node-id="${CSS.escape(d)}"]`);
|
|
76
|
+
if (!u || !b) return;
|
|
77
|
+
const a = u.getBoundingClientRect(), x = b.getBoundingClientRect();
|
|
78
|
+
x.top < a.top ? u.scrollTop -= a.top - x.top : x.bottom > a.bottom && (u.scrollTop += x.bottom - a.bottom);
|
|
79
79
|
};
|
|
80
80
|
return K(
|
|
81
81
|
() => e.modelValue,
|
|
82
82
|
async (d) => {
|
|
83
83
|
if (!d) return;
|
|
84
|
-
!
|
|
84
|
+
!C.value.some((b) => b.id === d) && e.nodes.some((b) => b.id === d) && (o.value = "", i.value = "all"), await X(), h(d);
|
|
85
85
|
},
|
|
86
86
|
{ flush: "post" }
|
|
87
87
|
), (d, u) => {
|
|
88
|
-
const
|
|
89
|
-
return g(), w("aside",
|
|
90
|
-
b
|
|
88
|
+
const b = A("bk-input");
|
|
89
|
+
return g(), w("aside", ye, [
|
|
90
|
+
f(b, {
|
|
91
91
|
modelValue: o.value,
|
|
92
|
-
"onUpdate:modelValue": u[0] || (u[0] = (
|
|
92
|
+
"onUpdate:modelValue": u[0] || (u[0] = (a) => o.value = a),
|
|
93
93
|
class: "debug-result-node-list__search",
|
|
94
94
|
placeholder: "搜索节点名称 / 类型",
|
|
95
95
|
type: "search",
|
|
96
96
|
clearable: "",
|
|
97
97
|
"data-test": "node-search"
|
|
98
98
|
}, null, 8, ["modelValue"]),
|
|
99
|
-
|
|
99
|
+
f(ue, {
|
|
100
100
|
modelValue: i.value,
|
|
101
|
-
"onUpdate:modelValue": u[1] || (u[1] = (
|
|
101
|
+
"onUpdate:modelValue": u[1] || (u[1] = (a) => i.value = a),
|
|
102
102
|
class: "debug-result-node-list__filters",
|
|
103
103
|
"data-test": "status-filters",
|
|
104
|
-
items:
|
|
104
|
+
items: R.value
|
|
105
105
|
}, null, 8, ["modelValue", "items"]),
|
|
106
|
-
|
|
106
|
+
C.value.length > 0 ? (g(), w("div", {
|
|
107
107
|
key: 0,
|
|
108
108
|
ref_key: "itemsRef",
|
|
109
109
|
ref: _,
|
|
110
110
|
class: "debug-result-node-list__items",
|
|
111
111
|
role: "listbox"
|
|
112
112
|
}, [
|
|
113
|
-
(g(!0), w(Z, null, ee(
|
|
114
|
-
key:
|
|
113
|
+
(g(!0), w(Z, null, ee(C.value, (a) => (g(), w("div", {
|
|
114
|
+
key: a.id,
|
|
115
115
|
class: T([
|
|
116
116
|
"debug-result-node-list__item",
|
|
117
|
-
`is-${
|
|
117
|
+
`is-${a.status}`,
|
|
118
118
|
{
|
|
119
|
-
"is-active":
|
|
120
|
-
"is-unconfigured": !
|
|
119
|
+
"is-active": a.id === e.modelValue,
|
|
120
|
+
"is-unconfigured": !a.isConfigured
|
|
121
121
|
}
|
|
122
122
|
]),
|
|
123
123
|
role: "option",
|
|
124
124
|
"data-test": "node-item",
|
|
125
|
-
"data-node-id":
|
|
126
|
-
"aria-selected":
|
|
125
|
+
"data-node-id": a.id,
|
|
126
|
+
"aria-selected": a.id === e.modelValue,
|
|
127
127
|
tabindex: "0",
|
|
128
|
-
onClick: (x) => l("update:modelValue",
|
|
129
|
-
onKeydown: te(oe((x) => l("update:modelValue",
|
|
128
|
+
onClick: (x) => l("update:modelValue", a.id),
|
|
129
|
+
onKeydown: te(oe((x) => l("update:modelValue", a.id), ["prevent"]), ["enter", "space"])
|
|
130
130
|
}, [
|
|
131
|
-
|
|
131
|
+
n("span", {
|
|
132
132
|
class: T([
|
|
133
133
|
"debug-result-node-list__status",
|
|
134
|
-
`is-${
|
|
135
|
-
{ "is-placeholder": !
|
|
134
|
+
`is-${a.status}`,
|
|
135
|
+
{ "is-placeholder": !a.isConfigured }
|
|
136
136
|
])
|
|
137
137
|
}, [
|
|
138
|
-
|
|
138
|
+
a.icon ? (g(), w("i", {
|
|
139
139
|
key: 0,
|
|
140
|
-
class: T(
|
|
140
|
+
class: T(a.icon),
|
|
141
141
|
"data-test": "node-icon"
|
|
142
|
-
}, null, 2)) :
|
|
142
|
+
}, null, 2)) : F("", !0)
|
|
143
143
|
], 2),
|
|
144
|
-
|
|
144
|
+
n("span", {
|
|
145
145
|
class: "debug-result-node-list__name",
|
|
146
|
-
title:
|
|
147
|
-
}, P(
|
|
148
|
-
|
|
149
|
-
], 42,
|
|
150
|
-
], 512)) : (g(), w("div",
|
|
151
|
-
|
|
146
|
+
title: a.isConfigured ? `${a.name} ${a.typeName || a.type}` : a.name
|
|
147
|
+
}, P(a.name), 9, we),
|
|
148
|
+
a.isMock ? (g(), w("span", xe, "MOCK")) : F("", !0)
|
|
149
|
+
], 42, ke))), 128))
|
|
150
|
+
], 512)) : (g(), w("div", Ee, [
|
|
151
|
+
f(re, {
|
|
152
152
|
"is-search": !1,
|
|
153
153
|
title: N.value,
|
|
154
154
|
onClear: L
|
|
@@ -157,8 +157,8 @@ const _e = { class: "debug-result-node-list" }, ye = ["data-node-id", "aria-sele
|
|
|
157
157
|
]);
|
|
158
158
|
};
|
|
159
159
|
}
|
|
160
|
-
}),
|
|
161
|
-
function
|
|
160
|
+
}), he = /* @__PURE__ */ Y(Ce, [["__scopeId", "data-v-f706a5cb"]]);
|
|
161
|
+
function Re(t) {
|
|
162
162
|
if (t == null) return "";
|
|
163
163
|
if (typeof t == "string") return t;
|
|
164
164
|
if (typeof t == "object") {
|
|
@@ -175,22 +175,22 @@ function he(t) {
|
|
|
175
175
|
}
|
|
176
176
|
return String(t);
|
|
177
177
|
}
|
|
178
|
-
const Ve = { class: "debug-result-tabs" },
|
|
178
|
+
const Ve = { class: "debug-result-tabs" }, Me = {
|
|
179
179
|
class: "debug-result-tabs__failed-actions",
|
|
180
180
|
"data-test": "output-error-actions"
|
|
181
|
-
},
|
|
181
|
+
}, Se = {
|
|
182
182
|
class: "debug-result-tabs__execution",
|
|
183
183
|
"data-test": "tab-execution"
|
|
184
|
-
},
|
|
184
|
+
}, Te = { class: "debug-result-tabs__row" }, Ne = { class: "value" }, Le = { class: "debug-result-tabs__row" }, $e = { class: "value" }, Ae = {
|
|
185
185
|
key: 0,
|
|
186
186
|
class: "debug-result-tabs__row is-error"
|
|
187
|
-
},
|
|
187
|
+
}, Pe = { class: "value" }, Be = {
|
|
188
188
|
class: "debug-result-tabs__mock-hint",
|
|
189
189
|
"data-test": "mock-banner"
|
|
190
|
-
},
|
|
190
|
+
}, De = {
|
|
191
191
|
class: "debug-result-tabs__logs",
|
|
192
192
|
"data-test": "tab-logs"
|
|
193
|
-
},
|
|
193
|
+
}, Ge = /* @__PURE__ */ I({
|
|
194
194
|
__name: "result-tabs",
|
|
195
195
|
props: {
|
|
196
196
|
result: {},
|
|
@@ -213,86 +213,86 @@ const Ve = { class: "debug-result-tabs" }, Re = {
|
|
|
213
213
|
failed: "失败",
|
|
214
214
|
suspended: "挂起",
|
|
215
215
|
skipped: "跳过"
|
|
216
|
-
}, _ =
|
|
217
|
-
loading:
|
|
216
|
+
}, _ = p(() => i[e.result.execution.status] ?? e.result.execution.status), m = p(() => de(e.result.execution.durationMs)), E = p(() => Re(e.result.error || e.result.execution.errorDetail)), R = p(() => e.result.execution.status === "failed"), {
|
|
217
|
+
loading: C,
|
|
218
218
|
error: N,
|
|
219
219
|
visibleInputs: L,
|
|
220
|
-
visibleOutputs:
|
|
220
|
+
visibleOutputs: h,
|
|
221
221
|
outputNameMap: d
|
|
222
|
-
} = ce({ component: () => e.component }), u =
|
|
222
|
+
} = ce({ component: () => e.component }), u = p(() => e.result.loading || C.value), b = p(() => e.result.detailError || N.value), a = p(
|
|
223
223
|
() => L.value.filter(({ key: y }) => Object.prototype.hasOwnProperty.call(e.result.inputs, y)).map(({ key: y, name: s }) => ({ key: y, name: s, value: e.result.inputs[y] }))
|
|
224
|
-
), x =
|
|
224
|
+
), x = p(
|
|
225
225
|
() => pe(
|
|
226
226
|
me(e.result.outputs, d.value),
|
|
227
|
-
|
|
227
|
+
h.value.map((y) => y.key)
|
|
228
228
|
)
|
|
229
|
-
), D =
|
|
229
|
+
), D = p(() => ve(e.isMock, h.value)), G = p(() => e.result.logs == null ? "" : fe(e.result.logs));
|
|
230
230
|
return (y, s) => {
|
|
231
|
-
const $ = A("bk-button"),
|
|
231
|
+
const $ = A("bk-button"), V = A("bk-tab-panel"), v = A("bk-tab");
|
|
232
232
|
return g(), w("div", Ve, [
|
|
233
|
-
|
|
233
|
+
f(v, {
|
|
234
234
|
active: o.value,
|
|
235
235
|
"onUpdate:active": s[3] || (s[3] = (c) => o.value = c),
|
|
236
236
|
type: "card-grid"
|
|
237
237
|
}, j({
|
|
238
238
|
default: k(() => [
|
|
239
|
-
|
|
239
|
+
f(V, {
|
|
240
240
|
name: "execution",
|
|
241
241
|
label: "执行信息"
|
|
242
242
|
}, {
|
|
243
243
|
default: k(() => [
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
s[9] || (s[9] =
|
|
247
|
-
|
|
244
|
+
n("div", Se, [
|
|
245
|
+
n("div", Te, [
|
|
246
|
+
s[9] || (s[9] = n("span", { class: "label" }, "执行状态", -1)),
|
|
247
|
+
n("span", Ne, P(_.value), 1)
|
|
248
248
|
]),
|
|
249
|
-
|
|
250
|
-
s[10] || (s[10] =
|
|
251
|
-
|
|
249
|
+
n("div", Le, [
|
|
250
|
+
s[10] || (s[10] = n("span", { class: "label" }, "调试用时", -1)),
|
|
251
|
+
n("span", $e, P(m.value), 1)
|
|
252
252
|
]),
|
|
253
|
-
|
|
254
|
-
s[11] || (s[11] =
|
|
255
|
-
|
|
256
|
-
])) :
|
|
253
|
+
E.value ? (g(), w("div", Ae, [
|
|
254
|
+
s[11] || (s[11] = n("span", { class: "label" }, "错误信息", -1)),
|
|
255
|
+
n("span", Pe, P(E.value), 1)
|
|
256
|
+
])) : F("", !0)
|
|
257
257
|
])
|
|
258
258
|
]),
|
|
259
259
|
_: 1
|
|
260
260
|
}),
|
|
261
|
-
|
|
261
|
+
f(V, {
|
|
262
262
|
name: "inputs",
|
|
263
263
|
label: "输入参数"
|
|
264
264
|
}, {
|
|
265
265
|
default: k(() => [
|
|
266
|
-
|
|
267
|
-
rows:
|
|
266
|
+
f(J, {
|
|
267
|
+
rows: a.value,
|
|
268
268
|
loading: u.value,
|
|
269
|
-
error:
|
|
269
|
+
error: b.value,
|
|
270
270
|
"empty-text": "暂无输入参数"
|
|
271
271
|
}, null, 8, ["rows", "loading", "error"])
|
|
272
272
|
]),
|
|
273
273
|
_: 1
|
|
274
274
|
}),
|
|
275
|
-
|
|
275
|
+
f(V, {
|
|
276
276
|
name: "outputs",
|
|
277
277
|
label: "输出结果"
|
|
278
278
|
}, {
|
|
279
279
|
default: k(() => [
|
|
280
|
-
|
|
280
|
+
f(J, {
|
|
281
281
|
rows: x.value,
|
|
282
282
|
loading: u.value,
|
|
283
|
-
error:
|
|
283
|
+
error: b.value,
|
|
284
284
|
"empty-text": "暂无输出结果"
|
|
285
285
|
}, j({ _: 2 }, [
|
|
286
|
-
|
|
286
|
+
D.value ? {
|
|
287
287
|
name: "toolbar",
|
|
288
288
|
fn: k(() => [
|
|
289
|
-
|
|
290
|
-
s[13] || (s[13] =
|
|
289
|
+
n("div", Be, [
|
|
290
|
+
s[13] || (s[13] = n("i", {
|
|
291
291
|
class: "bkflow-canvas-icon bkflow-canvas-info debug-result-tabs__mock-info",
|
|
292
292
|
"aria-hidden": "true"
|
|
293
293
|
}, null, -1)),
|
|
294
|
-
s[14] || (s[14] =
|
|
295
|
-
|
|
294
|
+
s[14] || (s[14] = n("span", null, "当前为 Mock 数据", -1)),
|
|
295
|
+
f($, {
|
|
296
296
|
text: "",
|
|
297
297
|
theme: "primary",
|
|
298
298
|
size: "small",
|
|
@@ -312,14 +312,14 @@ const Ve = { class: "debug-result-tabs" }, Re = {
|
|
|
312
312
|
]),
|
|
313
313
|
_: 1
|
|
314
314
|
}),
|
|
315
|
-
|
|
315
|
+
f(V, {
|
|
316
316
|
name: "logs",
|
|
317
317
|
label: "调用日志"
|
|
318
318
|
}, {
|
|
319
319
|
default: k(() => [
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
"log-text":
|
|
320
|
+
n("div", De, [
|
|
321
|
+
f(be, {
|
|
322
|
+
"log-text": G.value,
|
|
323
323
|
loading: e.result.logLoading,
|
|
324
324
|
error: e.result.logError
|
|
325
325
|
}, null, 8, ["log-text", "loading", "error"])
|
|
@@ -330,13 +330,13 @@ const Ve = { class: "debug-result-tabs" }, Re = {
|
|
|
330
330
|
]),
|
|
331
331
|
_: 2
|
|
332
332
|
}, [
|
|
333
|
-
|
|
333
|
+
R.value && e.canRunNodeDebug ? {
|
|
334
334
|
name: "setting",
|
|
335
335
|
fn: k(() => [
|
|
336
|
-
|
|
337
|
-
s[6] || (s[6] =
|
|
338
|
-
s[7] || (s[7] =
|
|
339
|
-
|
|
336
|
+
n("div", Me, [
|
|
337
|
+
s[6] || (s[6] = n("i", { class: "bkflow-canvas-icon bkflow-canvas-alert" }, null, -1)),
|
|
338
|
+
s[7] || (s[7] = n("span", null, "该节点执行失败,可", -1)),
|
|
339
|
+
f($, {
|
|
340
340
|
text: "",
|
|
341
341
|
theme: "primary",
|
|
342
342
|
"data-test": "rerun-real",
|
|
@@ -347,8 +347,8 @@ const Ve = { class: "debug-result-tabs" }, Re = {
|
|
|
347
347
|
])]),
|
|
348
348
|
_: 1
|
|
349
349
|
}),
|
|
350
|
-
s[8] || (s[8] =
|
|
351
|
-
|
|
350
|
+
s[8] || (s[8] = n("span", null, "或直接", -1)),
|
|
351
|
+
f($, {
|
|
352
352
|
text: "",
|
|
353
353
|
theme: "primary",
|
|
354
354
|
"data-test": "run-mock",
|
|
@@ -367,7 +367,7 @@ const Ve = { class: "debug-result-tabs" }, Re = {
|
|
|
367
367
|
]);
|
|
368
368
|
};
|
|
369
369
|
}
|
|
370
|
-
}),
|
|
370
|
+
}), ze = /* @__PURE__ */ Y(Ge, [["__scopeId", "data-v-c82a482a"]]), Ue = {
|
|
371
371
|
ExclusiveGateway: "bkflow-canvas-icon bkflow-canvas-fenzhiwangguan",
|
|
372
372
|
ParallelGateway: "bkflow-canvas-icon bkflow-canvas-bingxingwangguan",
|
|
373
373
|
ConditionalParallelGateway: "bkflow-canvas-icon bkflow-canvas-tiaojianbingxingwangguan",
|
|
@@ -380,8 +380,8 @@ const Ve = { class: "debug-result-tabs" }, Re = {
|
|
|
380
380
|
ParallelGateway: "并行网关",
|
|
381
381
|
ConditionalParallelGateway: "条件并行网关",
|
|
382
382
|
ConvergeGateway: "汇聚网关"
|
|
383
|
-
},
|
|
384
|
-
function
|
|
383
|
+
}, Oe = (t) => !t || t.includes("bkflow-canvas-icon") ? t : `bkflow-canvas-icon ${t}`;
|
|
384
|
+
function He(t) {
|
|
385
385
|
if (!t.component?.code) return "";
|
|
386
386
|
if (t.component.code === "uniform_api") {
|
|
387
387
|
const r = t.component.api_meta?.category?.name ?? "";
|
|
@@ -390,20 +390,20 @@ function Oe(t) {
|
|
|
390
390
|
return U.bkflow;
|
|
391
391
|
}
|
|
392
392
|
function Fe(t, r) {
|
|
393
|
-
const e = t?.location?.find((_) => _.id === r), l =
|
|
393
|
+
const e = t?.location?.find((_) => _.id === r), l = Oe(e?.icon ?? ""), o = t?.activities?.[r];
|
|
394
394
|
if (o)
|
|
395
395
|
return {
|
|
396
396
|
name: !!o.component?.code ? o.name || e?.name || r : "节点未配置",
|
|
397
397
|
type: o.type || "ServiceActivity",
|
|
398
398
|
typeName: O[o.type] ?? "任务节点",
|
|
399
|
-
icon:
|
|
399
|
+
icon: He(o)
|
|
400
400
|
};
|
|
401
401
|
const i = t?.gateways?.[r];
|
|
402
402
|
return i ? {
|
|
403
403
|
name: i.name || e?.name || O[i.type] || r,
|
|
404
404
|
type: i.type,
|
|
405
405
|
typeName: O[i.type] ?? "网关",
|
|
406
|
-
icon: l ||
|
|
406
|
+
icon: l || Ue[i.type] || ""
|
|
407
407
|
} : t?.start_event?.id === r ? {
|
|
408
408
|
name: t.start_event.name || "开始",
|
|
409
409
|
type: "EmptyStartEvent",
|
|
@@ -421,30 +421,30 @@ function Fe(t, r) {
|
|
|
421
421
|
icon: l
|
|
422
422
|
} : { name: r, type: "", typeName: "", icon: "" };
|
|
423
423
|
}
|
|
424
|
-
function
|
|
424
|
+
function Ie(t, r, e = /* @__PURE__ */ new Set()) {
|
|
425
425
|
if (!t) return [];
|
|
426
426
|
const l = new Map(
|
|
427
|
-
(r ?? []).map((o) => [o.node_id,
|
|
427
|
+
(r ?? []).map((o) => [o.node_id, ge(o.status)])
|
|
428
428
|
);
|
|
429
|
-
return
|
|
430
|
-
const i = t.activities?.[o], _ = i ? !!i.component?.code : !0,
|
|
429
|
+
return _e(t).map((o) => {
|
|
430
|
+
const i = t.activities?.[o], _ = i ? !!i.component?.code : !0, m = Fe(t, o);
|
|
431
431
|
return {
|
|
432
432
|
id: o,
|
|
433
|
-
name:
|
|
434
|
-
type:
|
|
435
|
-
typeName:
|
|
436
|
-
icon:
|
|
433
|
+
name: m.name,
|
|
434
|
+
type: m.type || i?.type || "",
|
|
435
|
+
typeName: m.typeName,
|
|
436
|
+
icon: m.icon,
|
|
437
437
|
status: l.get(o) ?? "not_run",
|
|
438
438
|
isMock: !!(i && e.has(o)),
|
|
439
439
|
isConfigured: _
|
|
440
440
|
};
|
|
441
441
|
});
|
|
442
442
|
}
|
|
443
|
-
const
|
|
443
|
+
const Ke = { class: "debug-result-drawer__header" }, Ye = { class: "debug-result-drawer__header-left" }, je = { class: "debug-result-drawer__body" }, qe = { class: "debug-result-drawer__content" }, Je = { class: "debug-result-drawer__result" }, We = {
|
|
444
444
|
key: 1,
|
|
445
445
|
class: "debug-result-drawer__unselected",
|
|
446
446
|
"data-test": "node-unselected"
|
|
447
|
-
}, M = 44,
|
|
447
|
+
}, M = 44, H = 420, Qe = /* @__PURE__ */ I({
|
|
448
448
|
__name: "index",
|
|
449
449
|
props: {
|
|
450
450
|
open: { type: Boolean },
|
|
@@ -459,76 +459,76 @@ const Ie = { class: "debug-result-drawer__header" }, Ke = { class: "debug-result
|
|
|
459
459
|
},
|
|
460
460
|
emits: ["update:open", "update:modelValue", "reEditMock", "runReal", "runMock", "viewParams", "logsTabActive"],
|
|
461
461
|
setup(t, { emit: r }) {
|
|
462
|
-
const e = t, l = r, o = S(
|
|
463
|
-
let _ = 0,
|
|
464
|
-
const
|
|
462
|
+
const e = t, l = r, o = S(H), i = S(!1);
|
|
463
|
+
let _ = 0, m = 0, E = "", R = "";
|
|
464
|
+
const C = p(() => ({
|
|
465
465
|
left: `${e.offsetLeft}px`,
|
|
466
466
|
height: `${e.open ? o.value : M}px`
|
|
467
467
|
})), N = () => {
|
|
468
|
-
e.open || (o.value =
|
|
469
|
-
}, L = (
|
|
470
|
-
const
|
|
471
|
-
|
|
472
|
-
},
|
|
473
|
-
const
|
|
474
|
-
o.value = Math.max(M, Math.min(window.innerHeight * 0.8,
|
|
468
|
+
e.open || (o.value = H), l("update:open", !e.open);
|
|
469
|
+
}, L = (v) => {
|
|
470
|
+
const c = v > M;
|
|
471
|
+
c !== e.open && l("update:open", c);
|
|
472
|
+
}, h = (v) => {
|
|
473
|
+
const c = m - (v.clientY - _);
|
|
474
|
+
o.value = Math.max(M, Math.min(window.innerHeight * 0.8, c)), L(o.value);
|
|
475
475
|
}, d = () => {
|
|
476
|
-
document.removeEventListener("mousemove",
|
|
477
|
-
}, u = (
|
|
478
|
-
|
|
476
|
+
document.removeEventListener("mousemove", h), document.removeEventListener("mouseup", d), document.body.style.cursor = E, document.body.style.userSelect = R, i.value = !1, o.value <= M && (o.value = H, l("update:open", !1));
|
|
477
|
+
}, u = (v) => {
|
|
478
|
+
v.preventDefault(), i.value = !0, _ = v.clientY, e.open ? m = o.value : (l("update:open", !0), o.value = M, m = M), E = document.body.style.cursor, R = document.body.style.userSelect, document.body.style.cursor = "ns-resize", document.body.style.userSelect = "none", document.addEventListener("mousemove", h), document.addEventListener("mouseup", d);
|
|
479
479
|
};
|
|
480
480
|
se(d);
|
|
481
|
-
const
|
|
481
|
+
const b = p({
|
|
482
482
|
get: () => e.modelValue,
|
|
483
|
-
set: (
|
|
483
|
+
set: (v) => l("update:modelValue", v)
|
|
484
484
|
});
|
|
485
485
|
K(
|
|
486
486
|
() => e.modelValue,
|
|
487
|
-
(
|
|
488
|
-
|
|
487
|
+
(v) => {
|
|
488
|
+
v || l("logsTabActive", !1);
|
|
489
489
|
},
|
|
490
490
|
{ immediate: !0 }
|
|
491
491
|
);
|
|
492
|
-
const
|
|
493
|
-
() =>
|
|
494
|
-
), x =
|
|
495
|
-
const
|
|
496
|
-
return
|
|
497
|
-
}),
|
|
492
|
+
const a = p(
|
|
493
|
+
() => Ie(e.pipelineTree, e.context?.nodes, e.mockNodeIds)
|
|
494
|
+
), x = p(() => e.mockNodeIds.has(e.modelValue)), D = p(() => e.pipelineTree?.activities?.[e.modelValue]?.component), G = p(() => {
|
|
495
|
+
const v = a.value.find((c) => c.id === e.modelValue);
|
|
496
|
+
return v?.type === "ServiceActivity" && v.isConfigured;
|
|
497
|
+
}), y = () => {
|
|
498
498
|
!e.hasGlobalRun || e.viewParamsPending || l("viewParams");
|
|
499
|
-
},
|
|
499
|
+
}, s = () => {
|
|
500
500
|
e.modelValue && l("reEditMock", e.modelValue);
|
|
501
|
-
},
|
|
501
|
+
}, $ = () => {
|
|
502
502
|
e.modelValue && l("runReal", e.modelValue);
|
|
503
|
-
},
|
|
503
|
+
}, V = () => {
|
|
504
504
|
e.modelValue && l("runMock", e.modelValue);
|
|
505
505
|
};
|
|
506
|
-
return (
|
|
507
|
-
const W = A("bk-button"), Q =
|
|
506
|
+
return (v, c) => {
|
|
507
|
+
const W = A("bk-button"), Q = ae("bk-tooltips");
|
|
508
508
|
return g(), w("div", {
|
|
509
509
|
class: T(["debug-result-drawer-wrapper", { "is-resizing": i.value }]),
|
|
510
|
-
style:
|
|
510
|
+
style: ne(C.value)
|
|
511
511
|
}, [
|
|
512
|
-
|
|
512
|
+
n("div", {
|
|
513
513
|
class: "debug-result-drawer__resize",
|
|
514
514
|
onMousedown: u
|
|
515
515
|
}, null, 32),
|
|
516
|
-
|
|
516
|
+
n("section", {
|
|
517
517
|
class: T(["debug-result-drawer", { "is-collapsed": !e.open }])
|
|
518
518
|
}, [
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
519
|
+
n("header", Ke, [
|
|
520
|
+
n("div", Ye, [
|
|
521
|
+
c[3] || (c[3] = n("span", { class: "debug-result-drawer__title" }, "调试结果", -1)),
|
|
522
|
+
c[4] || (c[4] = n("span", { class: "debug-result-drawer__divider" }, null, -1)),
|
|
523
523
|
le((g(), q(W, {
|
|
524
524
|
text: "",
|
|
525
525
|
theme: "primary",
|
|
526
526
|
disabled: !e.hasGlobalRun,
|
|
527
527
|
loading: e.viewParamsPending,
|
|
528
|
-
onClick:
|
|
528
|
+
onClick: y
|
|
529
529
|
}, {
|
|
530
|
-
default: k(() => [...
|
|
531
|
-
|
|
530
|
+
default: k(() => [...c[2] || (c[2] = [
|
|
531
|
+
n("i", { class: "bkflow-canvas-icon bkflow-canvas-audit view-params-icon" }, null, -1),
|
|
532
532
|
B(" 查看参数 ", -1)
|
|
533
533
|
])]),
|
|
534
534
|
_: 1
|
|
@@ -536,35 +536,35 @@ const Ie = { class: "debug-result-drawer__header" }, Ke = { class: "debug-result
|
|
|
536
536
|
[Q, { content: "请先进行调试", disabled: e.hasGlobalRun }]
|
|
537
537
|
])
|
|
538
538
|
]),
|
|
539
|
-
|
|
539
|
+
n("span", {
|
|
540
540
|
class: "debug-result-drawer__collapse",
|
|
541
541
|
onClick: N
|
|
542
542
|
}, [
|
|
543
|
-
|
|
544
|
-
|
|
543
|
+
n("span", null, P(e.open ? "收起" : "展开"), 1),
|
|
544
|
+
n("i", {
|
|
545
545
|
class: T(["bkflow-canvas-icon bkflow-canvas-arrows-down debug-result-drawer__collapse-icon", { "is-expanded": e.open }])
|
|
546
546
|
}, null, 2)
|
|
547
547
|
])
|
|
548
548
|
]),
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
modelValue:
|
|
553
|
-
"onUpdate:modelValue":
|
|
554
|
-
nodes:
|
|
549
|
+
n("div", je, [
|
|
550
|
+
n("div", qe, [
|
|
551
|
+
f(he, {
|
|
552
|
+
modelValue: b.value,
|
|
553
|
+
"onUpdate:modelValue": c[0] || (c[0] = (z) => b.value = z),
|
|
554
|
+
nodes: a.value
|
|
555
555
|
}, null, 8, ["modelValue", "nodes"]),
|
|
556
|
-
|
|
557
|
-
e.modelValue ? (g(), q(
|
|
556
|
+
n("div", Je, [
|
|
557
|
+
e.modelValue ? (g(), q(ze, {
|
|
558
558
|
key: 0,
|
|
559
559
|
result: e.result,
|
|
560
560
|
component: D.value,
|
|
561
561
|
"is-mock": x.value,
|
|
562
|
-
"can-run-node-debug":
|
|
563
|
-
onReEditMock:
|
|
564
|
-
onRunReal:
|
|
565
|
-
onRunMock:
|
|
566
|
-
onLogsTabActive:
|
|
567
|
-
}, null, 8, ["result", "component", "is-mock", "can-run-node-debug"])) : (g(), w("div",
|
|
562
|
+
"can-run-node-debug": G.value,
|
|
563
|
+
onReEditMock: s,
|
|
564
|
+
onRunReal: $,
|
|
565
|
+
onRunMock: V,
|
|
566
|
+
onLogsTabActive: c[1] || (c[1] = (z) => l("logsTabActive", z))
|
|
567
|
+
}, null, 8, ["result", "component", "is-mock", "can-run-node-debug"])) : (g(), w("div", We, " 请先选择节点查看调试详情 "))
|
|
568
568
|
])
|
|
569
569
|
])
|
|
570
570
|
])
|
|
@@ -572,7 +572,7 @@ const Ie = { class: "debug-result-drawer__header" }, Ke = { class: "debug-result
|
|
|
572
572
|
], 6);
|
|
573
573
|
};
|
|
574
574
|
}
|
|
575
|
-
}),
|
|
575
|
+
}), tt = /* @__PURE__ */ Y(Qe, [["__scopeId", "data-v-cf73f47a"]]);
|
|
576
576
|
export {
|
|
577
|
-
|
|
577
|
+
tt as default
|
|
578
578
|
};
|