@blueking/bkflow-canvas-editor 1.1.0-beta.10 → 1.1.0-beta.11
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/README.md +8 -5
- package/dist/advanced.cjs.js +1 -1
- package/dist/advanced.d.ts +7 -32
- package/dist/advanced.esm.js +1 -1
- package/dist/{composable-YlUVct40.cjs → composable-CxeoRvet.cjs} +1 -1
- package/dist/{composable-Cf47ka9M.js → composable-kbjnTzFy.js} +394 -350
- package/dist/{index-DoCdunh9.js → index-BAyKjume.js} +1 -1
- package/dist/{index-CKYqFEfP.cjs → index-BDjgQxXH.cjs} +1 -1
- package/dist/{index-C16qU3Yx.js → index-CCwVVpg5.js} +2786 -2780
- package/dist/{index-Dm3eGl5T.js → index-DNOsjdMW.js} +178 -165
- package/dist/index-DTNdhHD2.cjs +1 -0
- package/dist/{index-DOcgB3JP.cjs → index-DcCa3dC3.cjs} +19 -19
- package/dist/{index-CyWnToNA.js → index-DtEEErOZ.js} +1 -1
- package/dist/{index-DzvB2ICU.cjs → index-Dw82RceW.cjs} +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +7 -32
- package/dist/index.esm.js +2 -2
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/index-Bf3z3UZx.cjs +0 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { L as te, S as se, E as oe, _ as
|
|
3
|
-
import { a as P } from "./composable-
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as z, ref as R, computed as v, watch as D, nextTick as Y, resolveComponent as $, openBlock as d, createElementBlock as m, createVNode as p, Fragment as K, renderList as q, withKeys as J, withModifiers as W, normalizeClass as S, createElementVNode as l, createCommentVNode as T, toDisplayString as V, withCtx as w, createTextVNode as L, createBlock as G, onBeforeUnmount as Q, resolveDirective as X, normalizeStyle as Z, withDirectives as ee } from "vue";
|
|
2
|
+
import { L as te, S as se, E as oe, _ as U, t as ne, n as ae, D as F, C as le, b as ie } from "./index-CCwVVpg5.js";
|
|
3
|
+
import { a as P } from "./composable-kbjnTzFy.js";
|
|
4
|
+
const ue = { class: "debug-result-node-list" }, re = ["data-node-id", "aria-selected", "onClick", "onKeydown"], de = ["title"], ce = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "debug-result-node-list__mock",
|
|
7
7
|
"data-test": "node-mock-flag"
|
|
8
|
-
},
|
|
8
|
+
}, me = {
|
|
9
9
|
key: 1,
|
|
10
10
|
class: "debug-result-node-list__empty"
|
|
11
|
-
},
|
|
11
|
+
}, pe = /* @__PURE__ */ z({
|
|
12
12
|
__name: "node-list",
|
|
13
13
|
props: {
|
|
14
14
|
nodes: {},
|
|
@@ -16,7 +16,7 @@ const ie = { class: "debug-result-node-list" }, ue = ["data-node-id", "aria-sele
|
|
|
16
16
|
},
|
|
17
17
|
emits: ["update:modelValue"],
|
|
18
18
|
setup(n, { emit: r }) {
|
|
19
|
-
const e = n,
|
|
19
|
+
const e = n, a = r, u = R(""), o = R("all"), b = R(null), g = [
|
|
20
20
|
{ value: "all", label: "全部" },
|
|
21
21
|
{ value: "finished", icon: "bkflow-canvas-dark-circle-checkbox", iconColor: "#5fb8ac" },
|
|
22
22
|
{ value: "failed", icon: "bkflow-canvas-dark-circle-close", iconColor: "#fa4e41" },
|
|
@@ -24,40 +24,40 @@ const ie = { class: "debug-result-node-list" }, ue = ["data-node-id", "aria-sele
|
|
|
24
24
|
{ value: "not_run", icon: "bkflow-canvas-weizhixing2", iconColor: "#b8bbc4" },
|
|
25
25
|
{ value: "suspended", icon: "bkflow-canvas-zanting", iconColor: "#f59500" },
|
|
26
26
|
{ value: "skipped", icon: "bkflow-canvas-tiaoguo2", iconColor: "#6e89af" }
|
|
27
|
-
], y =
|
|
27
|
+
], y = v(
|
|
28
28
|
() => g.map((i) => ({
|
|
29
29
|
...i,
|
|
30
30
|
count: i.value === "all" ? e.nodes.length : e.nodes.filter((t) => t.status === i.value).length
|
|
31
31
|
}))
|
|
32
|
-
),
|
|
32
|
+
), x = v(() => {
|
|
33
33
|
const i = u.value.trim().toLowerCase();
|
|
34
34
|
return e.nodes.filter((t) => o.value !== "all" && t.status !== o.value ? !1 : i ? t.name.toLowerCase().includes(i) || t.type.toLowerCase().includes(i) || (t.typeName ?? "").toLowerCase().includes(i) : !0);
|
|
35
|
-
}),
|
|
35
|
+
}), M = {
|
|
36
36
|
not_run: "未执行",
|
|
37
37
|
finished: "成功",
|
|
38
38
|
failed: "失败",
|
|
39
39
|
running: "正在调试",
|
|
40
40
|
suspended: "挂起",
|
|
41
41
|
skipped: "跳过"
|
|
42
|
-
}, N =
|
|
42
|
+
}, N = v(() => u.value.trim() ? "搜索结果为空" : o.value !== "all" ? `暂无${M[o.value]}状态节点` : "暂无节点"), E = () => {
|
|
43
43
|
u.value = "", o.value = "all";
|
|
44
|
-
},
|
|
45
|
-
const t = b.value,
|
|
46
|
-
if (!t || !
|
|
47
|
-
const s = t.getBoundingClientRect(), f =
|
|
44
|
+
}, C = (i) => {
|
|
45
|
+
const t = b.value, c = t?.querySelector(`[data-node-id="${CSS.escape(i)}"]`);
|
|
46
|
+
if (!t || !c) return;
|
|
47
|
+
const s = t.getBoundingClientRect(), f = c.getBoundingClientRect();
|
|
48
48
|
f.top < s.top ? t.scrollTop -= s.top - f.top : f.bottom > s.bottom && (t.scrollTop += f.bottom - s.bottom);
|
|
49
49
|
};
|
|
50
|
-
return
|
|
50
|
+
return D(
|
|
51
51
|
() => e.modelValue,
|
|
52
52
|
async (i) => {
|
|
53
53
|
if (!i) return;
|
|
54
|
-
!
|
|
54
|
+
!x.value.some((c) => c.id === i) && e.nodes.some((c) => c.id === i) && (u.value = "", o.value = "all"), await Y(), C(i);
|
|
55
55
|
},
|
|
56
56
|
{ flush: "post" }
|
|
57
57
|
), (i, t) => {
|
|
58
|
-
const
|
|
59
|
-
return
|
|
60
|
-
|
|
58
|
+
const c = $("bk-input");
|
|
59
|
+
return d(), m("aside", ue, [
|
|
60
|
+
p(c, {
|
|
61
61
|
modelValue: u.value,
|
|
62
62
|
"onUpdate:modelValue": t[0] || (t[0] = (s) => u.value = s),
|
|
63
63
|
class: "debug-result-node-list__search",
|
|
@@ -66,23 +66,23 @@ const ie = { class: "debug-result-node-list" }, ue = ["data-node-id", "aria-sele
|
|
|
66
66
|
clearable: "",
|
|
67
67
|
"data-test": "node-search"
|
|
68
68
|
}, null, 8, ["modelValue"]),
|
|
69
|
-
|
|
69
|
+
p(se, {
|
|
70
70
|
modelValue: o.value,
|
|
71
71
|
"onUpdate:modelValue": t[1] || (t[1] = (s) => o.value = s),
|
|
72
72
|
class: "debug-result-node-list__filters",
|
|
73
73
|
"data-test": "status-filters",
|
|
74
74
|
items: y.value
|
|
75
75
|
}, null, 8, ["modelValue", "items"]),
|
|
76
|
-
|
|
76
|
+
x.value.length > 0 ? (d(), m("div", {
|
|
77
77
|
key: 0,
|
|
78
78
|
ref_key: "itemsRef",
|
|
79
79
|
ref: b,
|
|
80
80
|
class: "debug-result-node-list__items",
|
|
81
81
|
role: "listbox"
|
|
82
82
|
}, [
|
|
83
|
-
(
|
|
83
|
+
(d(!0), m(K, null, q(x.value, (s) => (d(), m("div", {
|
|
84
84
|
key: s.id,
|
|
85
|
-
class:
|
|
85
|
+
class: S([
|
|
86
86
|
"debug-result-node-list__item",
|
|
87
87
|
`is-${s.status}`,
|
|
88
88
|
{
|
|
@@ -95,47 +95,47 @@ const ie = { class: "debug-result-node-list" }, ue = ["data-node-id", "aria-sele
|
|
|
95
95
|
"data-node-id": s.id,
|
|
96
96
|
"aria-selected": s.id === e.modelValue,
|
|
97
97
|
tabindex: "0",
|
|
98
|
-
onClick: (f) =>
|
|
99
|
-
onKeydown: J(W((f) =>
|
|
98
|
+
onClick: (f) => a("update:modelValue", s.id),
|
|
99
|
+
onKeydown: J(W((f) => a("update:modelValue", s.id), ["prevent"]), ["enter", "space"])
|
|
100
100
|
}, [
|
|
101
|
-
|
|
102
|
-
class:
|
|
101
|
+
l("span", {
|
|
102
|
+
class: S([
|
|
103
103
|
"debug-result-node-list__status",
|
|
104
104
|
`is-${s.status}`,
|
|
105
105
|
{ "is-placeholder": !s.isConfigured }
|
|
106
106
|
])
|
|
107
107
|
}, [
|
|
108
|
-
s.icon ? (
|
|
108
|
+
s.icon ? (d(), m("i", {
|
|
109
109
|
key: 0,
|
|
110
|
-
class:
|
|
110
|
+
class: S(s.icon),
|
|
111
111
|
"data-test": "node-icon"
|
|
112
112
|
}, null, 2)) : T("", !0)
|
|
113
113
|
], 2),
|
|
114
|
-
|
|
114
|
+
l("span", {
|
|
115
115
|
class: "debug-result-node-list__name",
|
|
116
116
|
title: s.isConfigured ? `${s.name} ${s.typeName || s.type}` : s.name
|
|
117
|
-
},
|
|
118
|
-
s.isMock ? (
|
|
119
|
-
], 42,
|
|
120
|
-
], 512)) : (
|
|
121
|
-
|
|
117
|
+
}, V(s.name), 9, de),
|
|
118
|
+
s.isMock ? (d(), m("span", ce, "MOCK")) : T("", !0)
|
|
119
|
+
], 42, re))), 128))
|
|
120
|
+
], 512)) : (d(), m("div", me, [
|
|
121
|
+
p(oe, {
|
|
122
122
|
"is-search": !1,
|
|
123
123
|
title: N.value,
|
|
124
|
-
onClear:
|
|
124
|
+
onClear: E
|
|
125
125
|
}, null, 8, ["title"])
|
|
126
126
|
]))
|
|
127
127
|
]);
|
|
128
128
|
};
|
|
129
129
|
}
|
|
130
|
-
}),
|
|
131
|
-
function
|
|
130
|
+
}), ve = /* @__PURE__ */ U(pe, [["__scopeId", "data-v-5f1b1514"]]);
|
|
131
|
+
function be(n) {
|
|
132
132
|
if (n == null) return "";
|
|
133
133
|
if (typeof n == "string") return n;
|
|
134
134
|
if (typeof n == "object") {
|
|
135
135
|
const r = n, e = r.message;
|
|
136
136
|
if (typeof e == "string" && e) {
|
|
137
|
-
const
|
|
138
|
-
return typeof
|
|
137
|
+
const a = r.type;
|
|
138
|
+
return typeof a == "string" && a ? `${a}: ${e}` : e;
|
|
139
139
|
}
|
|
140
140
|
try {
|
|
141
141
|
return JSON.stringify(n);
|
|
@@ -145,27 +145,27 @@ function ve(n) {
|
|
|
145
145
|
}
|
|
146
146
|
return String(n);
|
|
147
147
|
}
|
|
148
|
-
const
|
|
148
|
+
const _e = { class: "debug-result-tabs" }, ge = {
|
|
149
149
|
class: "debug-result-tabs__execution",
|
|
150
150
|
"data-test": "tab-execution"
|
|
151
|
-
},
|
|
151
|
+
}, fe = { class: "debug-result-tabs__row" }, ye = { class: "value" }, ke = { class: "debug-result-tabs__row" }, we = { class: "value" }, xe = {
|
|
152
152
|
key: 0,
|
|
153
153
|
class: "debug-result-tabs__row is-error"
|
|
154
|
-
},
|
|
154
|
+
}, Ce = { class: "value" }, Ee = {
|
|
155
155
|
key: 0,
|
|
156
156
|
class: "debug-result-tabs__mock-banner",
|
|
157
157
|
"data-test": "mock-banner"
|
|
158
|
-
},
|
|
158
|
+
}, he = {
|
|
159
159
|
key: 1,
|
|
160
160
|
class: "debug-result-tabs__error-banner",
|
|
161
161
|
"data-test": "output-error"
|
|
162
|
-
},
|
|
162
|
+
}, Ve = {
|
|
163
163
|
key: 0,
|
|
164
164
|
class: "debug-result-tabs__error-text"
|
|
165
|
-
},
|
|
165
|
+
}, Re = { class: "debug-result-tabs__error-guide" }, Se = {
|
|
166
166
|
class: "debug-result-tabs__logs",
|
|
167
167
|
"data-test": "tab-logs"
|
|
168
|
-
},
|
|
168
|
+
}, Te = /* @__PURE__ */ z({
|
|
169
169
|
__name: "result-tabs",
|
|
170
170
|
props: {
|
|
171
171
|
result: {},
|
|
@@ -173,10 +173,10 @@ const be = { class: "debug-result-tabs" }, _e = {
|
|
|
173
173
|
},
|
|
174
174
|
emits: ["reEditMock", "runReal", "runMock", "logsTabActive"],
|
|
175
175
|
setup(n, { emit: r }) {
|
|
176
|
-
const e = n,
|
|
177
|
-
|
|
176
|
+
const e = n, a = r, u = R("execution");
|
|
177
|
+
D(
|
|
178
178
|
u,
|
|
179
|
-
(i) =>
|
|
179
|
+
(i) => a("logsTabActive", i === "logs"),
|
|
180
180
|
{ immediate: !0 }
|
|
181
181
|
);
|
|
182
182
|
const o = {
|
|
@@ -186,47 +186,47 @@ const be = { class: "debug-result-tabs" }, _e = {
|
|
|
186
186
|
failed: "失败",
|
|
187
187
|
suspended: "挂起",
|
|
188
188
|
skipped: "跳过"
|
|
189
|
-
}, b =
|
|
189
|
+
}, b = v(() => o[e.result.execution.status] ?? e.result.execution.status), g = v(() => {
|
|
190
190
|
const i = e.result.execution.durationMs;
|
|
191
191
|
return i == null ? "--" : `${(i / 1e3).toFixed(1)}s`;
|
|
192
|
-
}), y =
|
|
192
|
+
}), y = v(() => be(e.result.error || e.result.execution.errorDetail)), x = v(() => e.result.execution.status === "failed"), M = (i) => Object.entries(i ?? {}).map(([t, c]) => ({ key: t, name: t, value: c })), N = v(() => M(e.result.inputs)), E = v(() => ne(e.result.outputs)), C = v(() => e.result.logs == null ? "" : ae(e.result.logs));
|
|
193
193
|
return (i, t) => {
|
|
194
|
-
const
|
|
195
|
-
return
|
|
196
|
-
|
|
194
|
+
const c = $("bk-tab-panel"), s = $("bk-button"), f = $("bk-tab");
|
|
195
|
+
return d(), m("div", _e, [
|
|
196
|
+
p(f, {
|
|
197
197
|
active: u.value,
|
|
198
|
-
"onUpdate:active": t[3] || (t[3] = (
|
|
198
|
+
"onUpdate:active": t[3] || (t[3] = (h) => u.value = h),
|
|
199
199
|
type: "card-grid"
|
|
200
200
|
}, {
|
|
201
|
-
default:
|
|
202
|
-
|
|
201
|
+
default: w(() => [
|
|
202
|
+
p(c, {
|
|
203
203
|
name: "execution",
|
|
204
204
|
label: "执行信息"
|
|
205
205
|
}, {
|
|
206
|
-
default:
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
t[4] || (t[4] =
|
|
210
|
-
|
|
206
|
+
default: w(() => [
|
|
207
|
+
l("div", ge, [
|
|
208
|
+
l("div", fe, [
|
|
209
|
+
t[4] || (t[4] = l("span", { class: "label" }, "执行状态", -1)),
|
|
210
|
+
l("span", ye, V(b.value), 1)
|
|
211
211
|
]),
|
|
212
|
-
|
|
213
|
-
t[5] || (t[5] =
|
|
214
|
-
|
|
212
|
+
l("div", ke, [
|
|
213
|
+
t[5] || (t[5] = l("span", { class: "label" }, "调试用时", -1)),
|
|
214
|
+
l("span", we, V(g.value), 1)
|
|
215
215
|
]),
|
|
216
|
-
y.value ? (
|
|
217
|
-
t[6] || (t[6] =
|
|
218
|
-
|
|
216
|
+
y.value ? (d(), m("div", xe, [
|
|
217
|
+
t[6] || (t[6] = l("span", { class: "label" }, "错误信息", -1)),
|
|
218
|
+
l("span", Ce, V(y.value), 1)
|
|
219
219
|
])) : T("", !0)
|
|
220
220
|
])
|
|
221
221
|
]),
|
|
222
222
|
_: 1
|
|
223
223
|
}),
|
|
224
|
-
|
|
224
|
+
p(c, {
|
|
225
225
|
name: "inputs",
|
|
226
226
|
label: "输入参数"
|
|
227
227
|
}, {
|
|
228
|
-
default:
|
|
229
|
-
|
|
228
|
+
default: w(() => [
|
|
229
|
+
p(F, {
|
|
230
230
|
rows: N.value,
|
|
231
231
|
loading: e.result.loading,
|
|
232
232
|
error: e.result.detailError,
|
|
@@ -235,57 +235,57 @@ const be = { class: "debug-result-tabs" }, _e = {
|
|
|
235
235
|
]),
|
|
236
236
|
_: 1
|
|
237
237
|
}),
|
|
238
|
-
|
|
238
|
+
p(c, {
|
|
239
239
|
name: "outputs",
|
|
240
240
|
label: "输出结果"
|
|
241
241
|
}, {
|
|
242
|
-
default:
|
|
243
|
-
e.isMock ? (
|
|
244
|
-
t[8] || (t[8] =
|
|
245
|
-
|
|
242
|
+
default: w(() => [
|
|
243
|
+
e.isMock ? (d(), m("div", Ee, [
|
|
244
|
+
t[8] || (t[8] = l("span", null, "当前为 Mock 数据", -1)),
|
|
245
|
+
p(s, {
|
|
246
246
|
text: "",
|
|
247
247
|
theme: "primary",
|
|
248
248
|
size: "small",
|
|
249
249
|
"data-test": "re-edit-mock",
|
|
250
|
-
onClick: t[0] || (t[0] = (
|
|
250
|
+
onClick: t[0] || (t[0] = (h) => a("reEditMock"))
|
|
251
251
|
}, {
|
|
252
|
-
default:
|
|
252
|
+
default: w(() => [...t[7] || (t[7] = [
|
|
253
253
|
L(" 重新编辑 ", -1)
|
|
254
254
|
])]),
|
|
255
255
|
_: 1
|
|
256
256
|
})
|
|
257
257
|
])) : T("", !0),
|
|
258
|
-
|
|
259
|
-
y.value ? (
|
|
260
|
-
|
|
261
|
-
t[11] || (t[11] =
|
|
262
|
-
|
|
258
|
+
x.value ? (d(), m("div", he, [
|
|
259
|
+
y.value ? (d(), m("p", Ve, V(y.value), 1)) : T("", !0),
|
|
260
|
+
l("p", Re, [
|
|
261
|
+
t[11] || (t[11] = l("span", null, "该节点调试失败,可", -1)),
|
|
262
|
+
p(s, {
|
|
263
263
|
text: "",
|
|
264
264
|
theme: "primary",
|
|
265
265
|
"data-test": "rerun-real",
|
|
266
|
-
onClick: t[1] || (t[1] = (
|
|
266
|
+
onClick: t[1] || (t[1] = (h) => a("runReal"))
|
|
267
267
|
}, {
|
|
268
|
-
default:
|
|
268
|
+
default: w(() => [...t[9] || (t[9] = [
|
|
269
269
|
L("重新调试", -1)
|
|
270
270
|
])]),
|
|
271
271
|
_: 1
|
|
272
272
|
}),
|
|
273
|
-
t[12] || (t[12] =
|
|
274
|
-
|
|
273
|
+
t[12] || (t[12] = l("span", null, "或直接", -1)),
|
|
274
|
+
p(s, {
|
|
275
275
|
text: "",
|
|
276
276
|
theme: "primary",
|
|
277
277
|
"data-test": "run-mock",
|
|
278
|
-
onClick: t[2] || (t[2] = (
|
|
278
|
+
onClick: t[2] || (t[2] = (h) => a("runMock"))
|
|
279
279
|
}, {
|
|
280
|
-
default:
|
|
280
|
+
default: w(() => [...t[10] || (t[10] = [
|
|
281
281
|
L("Mock输出", -1)
|
|
282
282
|
])]),
|
|
283
283
|
_: 1
|
|
284
284
|
})
|
|
285
285
|
])
|
|
286
|
-
])) : (
|
|
286
|
+
])) : (d(), G(F, {
|
|
287
287
|
key: 2,
|
|
288
|
-
rows:
|
|
288
|
+
rows: E.value,
|
|
289
289
|
loading: e.result.loading,
|
|
290
290
|
error: e.result.detailError,
|
|
291
291
|
"empty-text": "暂无输出结果"
|
|
@@ -293,14 +293,14 @@ const be = { class: "debug-result-tabs" }, _e = {
|
|
|
293
293
|
]),
|
|
294
294
|
_: 1
|
|
295
295
|
}),
|
|
296
|
-
|
|
296
|
+
p(c, {
|
|
297
297
|
name: "logs",
|
|
298
298
|
label: "调用日志"
|
|
299
299
|
}, {
|
|
300
|
-
default:
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
"log-text":
|
|
300
|
+
default: w(() => [
|
|
301
|
+
l("div", Se, [
|
|
302
|
+
p(le, {
|
|
303
|
+
"log-text": C.value,
|
|
304
304
|
loading: e.result.logLoading,
|
|
305
305
|
error: e.result.logError
|
|
306
306
|
}, null, 8, ["log-text", "loading", "error"])
|
|
@@ -314,7 +314,7 @@ const be = { class: "debug-result-tabs" }, _e = {
|
|
|
314
314
|
]);
|
|
315
315
|
};
|
|
316
316
|
}
|
|
317
|
-
}), Me = /* @__PURE__ */
|
|
317
|
+
}), Me = /* @__PURE__ */ U(Te, [["__scopeId", "data-v-dfee6bc2"]]), Ne = {
|
|
318
318
|
ExclusiveGateway: "bkflow-canvas-fenzhiwangguan",
|
|
319
319
|
ParallelGateway: "bkflow-canvas-bingxingwangguan",
|
|
320
320
|
ConditionalParallelGateway: "bkflow-canvas-tiaojianbingxingwangguan",
|
|
@@ -328,7 +328,7 @@ const be = { class: "debug-result-tabs" }, _e = {
|
|
|
328
328
|
ConditionalParallelGateway: "条件并行网关",
|
|
329
329
|
ConvergeGateway: "汇聚网关"
|
|
330
330
|
};
|
|
331
|
-
function
|
|
331
|
+
function $e(n) {
|
|
332
332
|
if (!n.component?.code) return "";
|
|
333
333
|
if (n.component.code === "uniform_api") {
|
|
334
334
|
const r = n.component.api_meta?.category?.name ?? "";
|
|
@@ -336,46 +336,46 @@ function Ne(n) {
|
|
|
336
336
|
}
|
|
337
337
|
return P.bkflow;
|
|
338
338
|
}
|
|
339
|
-
function
|
|
340
|
-
const e = n?.location?.find((b) => b.id === r),
|
|
339
|
+
function Le(n, r) {
|
|
340
|
+
const e = n?.location?.find((b) => b.id === r), a = e?.icon ?? "", u = n?.activities?.[r];
|
|
341
341
|
if (u)
|
|
342
342
|
return {
|
|
343
343
|
name: !!u.component?.code ? u.name || e?.name || r : "节点未配置",
|
|
344
344
|
type: u.type || "ServiceActivity",
|
|
345
345
|
typeName: B[u.type] ?? "任务节点",
|
|
346
|
-
icon:
|
|
346
|
+
icon: $e(u)
|
|
347
347
|
};
|
|
348
348
|
const o = n?.gateways?.[r];
|
|
349
349
|
return o ? {
|
|
350
350
|
name: o.name || e?.name || B[o.type] || r,
|
|
351
351
|
type: o.type,
|
|
352
352
|
typeName: B[o.type] ?? "网关",
|
|
353
|
-
icon:
|
|
353
|
+
icon: a || Ne[o.type] || ""
|
|
354
354
|
} : n?.start_event?.id === r ? {
|
|
355
355
|
name: n.start_event.name || "开始",
|
|
356
356
|
type: "EmptyStartEvent",
|
|
357
357
|
typeName: "开始节点",
|
|
358
|
-
icon:
|
|
358
|
+
icon: a || "bkflow-canvas-kaishi"
|
|
359
359
|
} : n?.end_event?.id === r ? {
|
|
360
360
|
name: n.end_event.name || "结束",
|
|
361
361
|
type: "EmptyEndEvent",
|
|
362
362
|
typeName: "结束节点",
|
|
363
|
-
icon:
|
|
363
|
+
icon: a || "bkflow-canvas-stop"
|
|
364
364
|
} : e ? {
|
|
365
365
|
name: e.name || r,
|
|
366
366
|
type: e.type || "",
|
|
367
367
|
typeName: "",
|
|
368
|
-
icon:
|
|
368
|
+
icon: a
|
|
369
369
|
} : { name: r, type: "", typeName: "", icon: "" };
|
|
370
370
|
}
|
|
371
|
-
function
|
|
372
|
-
const
|
|
373
|
-
if (!
|
|
371
|
+
function Ae(n, r, e = /* @__PURE__ */ new Set()) {
|
|
372
|
+
const a = n?.activities;
|
|
373
|
+
if (!a) return [];
|
|
374
374
|
const u = new Map(
|
|
375
|
-
(r ?? []).map((o) => [o.node_id,
|
|
375
|
+
(r ?? []).map((o) => [o.node_id, ie(o.status)])
|
|
376
376
|
);
|
|
377
|
-
return Object.values(
|
|
378
|
-
const b = !!o.component?.code, g =
|
|
377
|
+
return Object.values(a).map((o) => {
|
|
378
|
+
const b = !!o.component?.code, g = Le(n, o.id);
|
|
379
379
|
return {
|
|
380
380
|
id: o.id,
|
|
381
381
|
name: g.name,
|
|
@@ -388,7 +388,11 @@ function Le(n, r, e = /* @__PURE__ */ new Set()) {
|
|
|
388
388
|
};
|
|
389
389
|
});
|
|
390
390
|
}
|
|
391
|
-
const
|
|
391
|
+
const Pe = { class: "debug-result-drawer__header" }, Be = { class: "debug-result-drawer__header-left" }, Ge = { class: "debug-result-drawer__body" }, ze = { class: "debug-result-drawer__content" }, De = { class: "debug-result-drawer__result" }, Ue = {
|
|
392
|
+
key: 1,
|
|
393
|
+
class: "debug-result-drawer__unselected",
|
|
394
|
+
"data-test": "node-unselected"
|
|
395
|
+
}, Fe = 44, Ie = /* @__PURE__ */ z({
|
|
392
396
|
__name: "index",
|
|
393
397
|
props: {
|
|
394
398
|
open: { type: Boolean },
|
|
@@ -402,62 +406,70 @@ const Ae = { class: "debug-result-drawer__header" }, Pe = { class: "debug-result
|
|
|
402
406
|
},
|
|
403
407
|
emits: ["update:open", "update:modelValue", "reEditMock", "runReal", "runMock", "viewParams", "logsTabActive"],
|
|
404
408
|
setup(n, { emit: r }) {
|
|
405
|
-
const e = n,
|
|
406
|
-
let b = 0, g = 0, y = "",
|
|
407
|
-
const
|
|
408
|
-
height: `${e.open ? u.value :
|
|
409
|
+
const e = n, a = r, u = R(420), o = R(!1);
|
|
410
|
+
let b = 0, g = 0, y = "", x = "";
|
|
411
|
+
const M = v(() => ({
|
|
412
|
+
height: `${e.open ? u.value : Fe}px`
|
|
409
413
|
})), N = () => {
|
|
410
|
-
|
|
411
|
-
},
|
|
412
|
-
const _ = g - (
|
|
414
|
+
a("update:open", !e.open);
|
|
415
|
+
}, E = (k) => {
|
|
416
|
+
const _ = g - (k.clientY - b);
|
|
413
417
|
u.value = Math.max(200, Math.min(window.innerHeight * 0.8, _));
|
|
414
|
-
},
|
|
415
|
-
document.removeEventListener("mousemove",
|
|
416
|
-
}, i = (
|
|
417
|
-
|
|
418
|
+
}, C = () => {
|
|
419
|
+
document.removeEventListener("mousemove", E), document.removeEventListener("mouseup", C), document.body.style.cursor = y, document.body.style.userSelect = x, o.value = !1;
|
|
420
|
+
}, i = (k) => {
|
|
421
|
+
k.preventDefault(), o.value = !0, b = k.clientY, g = u.value, y = document.body.style.cursor, x = document.body.style.userSelect, document.body.style.cursor = "ns-resize", document.body.style.userSelect = "none", document.addEventListener("mousemove", E), document.addEventListener("mouseup", C);
|
|
418
422
|
};
|
|
419
|
-
Q(
|
|
420
|
-
const t =
|
|
423
|
+
Q(C);
|
|
424
|
+
const t = v({
|
|
421
425
|
get: () => e.modelValue,
|
|
422
|
-
set: (
|
|
423
|
-
})
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
426
|
+
set: (k) => a("update:modelValue", k)
|
|
427
|
+
});
|
|
428
|
+
D(
|
|
429
|
+
() => e.modelValue,
|
|
430
|
+
(k) => {
|
|
431
|
+
k || a("logsTabActive", !1);
|
|
432
|
+
},
|
|
433
|
+
{ immediate: !0 }
|
|
434
|
+
);
|
|
435
|
+
const c = v(
|
|
436
|
+
() => Ae(e.pipelineTree, e.context?.nodes, e.mockNodeIds)
|
|
437
|
+
), s = v(() => e.mockNodeIds.has(e.modelValue)), f = () => {
|
|
438
|
+
!e.hasGlobalRun || e.viewParamsPending || a("viewParams");
|
|
439
|
+
}, h = () => {
|
|
440
|
+
e.modelValue && a("reEditMock", e.modelValue);
|
|
429
441
|
}, I = () => {
|
|
430
|
-
e.modelValue &&
|
|
442
|
+
e.modelValue && a("runReal", e.modelValue);
|
|
431
443
|
}, O = () => {
|
|
432
|
-
e.modelValue &&
|
|
444
|
+
e.modelValue && a("runMock", e.modelValue);
|
|
433
445
|
};
|
|
434
|
-
return (
|
|
446
|
+
return (k, _) => {
|
|
435
447
|
const j = $("bk-button"), H = X("bk-tooltips");
|
|
436
|
-
return
|
|
437
|
-
class:
|
|
438
|
-
style: Z(
|
|
448
|
+
return d(), m("div", {
|
|
449
|
+
class: S(["debug-result-drawer-wrapper", { "is-resizing": o.value }]),
|
|
450
|
+
style: Z(M.value)
|
|
439
451
|
}, [
|
|
440
|
-
e.open ? (
|
|
452
|
+
e.open ? (d(), m("div", {
|
|
441
453
|
key: 0,
|
|
442
454
|
class: "debug-result-drawer__resize",
|
|
443
455
|
onMousedown: i
|
|
444
456
|
}, null, 32)) : T("", !0),
|
|
445
|
-
|
|
446
|
-
class:
|
|
457
|
+
l("section", {
|
|
458
|
+
class: S(["debug-result-drawer", { "is-collapsed": !e.open }])
|
|
447
459
|
}, [
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
_[3] || (_[3] =
|
|
451
|
-
_[4] || (_[4] =
|
|
452
|
-
ee((
|
|
460
|
+
l("header", Pe, [
|
|
461
|
+
l("div", Be, [
|
|
462
|
+
_[3] || (_[3] = l("span", { class: "debug-result-drawer__title" }, "调试结果", -1)),
|
|
463
|
+
_[4] || (_[4] = l("span", { class: "debug-result-drawer__divider" }, null, -1)),
|
|
464
|
+
ee((d(), G(j, {
|
|
453
465
|
text: "",
|
|
454
466
|
theme: "primary",
|
|
455
467
|
disabled: !e.hasGlobalRun,
|
|
456
468
|
loading: e.viewParamsPending,
|
|
457
469
|
onClick: f
|
|
458
470
|
}, {
|
|
459
|
-
default:
|
|
460
|
-
|
|
471
|
+
default: w(() => [..._[2] || (_[2] = [
|
|
472
|
+
l("i", { class: "bkflow-canvas-icon bkflow-canvas-audit view-params-icon" }, null, -1),
|
|
461
473
|
L(" 查看参数 ", -1)
|
|
462
474
|
])]),
|
|
463
475
|
_: 1
|
|
@@ -465,32 +477,33 @@ const Ae = { class: "debug-result-drawer__header" }, Pe = { class: "debug-result
|
|
|
465
477
|
[H, { content: "请先进行调试", disabled: e.hasGlobalRun }]
|
|
466
478
|
])
|
|
467
479
|
]),
|
|
468
|
-
|
|
480
|
+
l("span", {
|
|
469
481
|
class: "debug-result-drawer__collapse",
|
|
470
482
|
onClick: N
|
|
471
483
|
}, [
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
class:
|
|
484
|
+
l("span", null, V(e.open ? "收起" : "展开"), 1),
|
|
485
|
+
l("i", {
|
|
486
|
+
class: S(["bkflow-canvas-icon bkflow-canvas-arrows-down debug-result-drawer__collapse-icon", { "is-expanded": e.open }])
|
|
475
487
|
}, null, 2)
|
|
476
488
|
])
|
|
477
489
|
]),
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
490
|
+
l("div", Ge, [
|
|
491
|
+
l("div", ze, [
|
|
492
|
+
p(ve, {
|
|
481
493
|
modelValue: t.value,
|
|
482
494
|
"onUpdate:modelValue": _[0] || (_[0] = (A) => t.value = A),
|
|
483
|
-
nodes:
|
|
495
|
+
nodes: c.value
|
|
484
496
|
}, null, 8, ["modelValue", "nodes"]),
|
|
485
|
-
|
|
486
|
-
|
|
497
|
+
l("div", De, [
|
|
498
|
+
e.modelValue ? (d(), G(Me, {
|
|
499
|
+
key: 0,
|
|
487
500
|
result: e.result,
|
|
488
501
|
"is-mock": s.value,
|
|
489
|
-
onReEditMock:
|
|
502
|
+
onReEditMock: h,
|
|
490
503
|
onRunReal: I,
|
|
491
504
|
onRunMock: O,
|
|
492
|
-
onLogsTabActive: _[1] || (_[1] = (A) =>
|
|
493
|
-
}, null, 8, ["result", "is-mock"])
|
|
505
|
+
onLogsTabActive: _[1] || (_[1] = (A) => a("logsTabActive", A))
|
|
506
|
+
}, null, 8, ["result", "is-mock"])) : (d(), m("div", Ue, " 请先选择节点查看执行详情 "))
|
|
494
507
|
])
|
|
495
508
|
])
|
|
496
509
|
])
|
|
@@ -498,7 +511,7 @@ const Ae = { class: "debug-result-drawer__header" }, Pe = { class: "debug-result
|
|
|
498
511
|
], 6);
|
|
499
512
|
};
|
|
500
513
|
}
|
|
501
|
-
}),
|
|
514
|
+
}), Ye = /* @__PURE__ */ U(Ie, [["__scopeId", "data-v-dcc6149f"]]);
|
|
502
515
|
export {
|
|
503
|
-
|
|
516
|
+
Ye as default
|
|
504
517
|
};
|