n8n-editor-ui 1.75.0 → 1.76.0

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.
Files changed (94) hide show
  1. package/dist/assets/{AnnotationTagsDropdown.ee.vue_vue_type_script_setup_true_lang-CGrVAIIO.js → AnnotationTagsDropdown.ee.vue_vue_type_script_setup_true_lang-Bk0ZjgAz.js} +1 -1
  2. package/dist/assets/{AuthView-ilZ0xRQe.js → AuthView-CQW1x21E.js} +2 -2
  3. package/dist/assets/{CanvasChat-B3m7qTtB.js → CanvasChat-DuJwpZew.js} +19 -18
  4. package/dist/assets/{CanvasControls-laNSmWAd.js → CanvasControls-Br7x0c2w.js} +1 -1
  5. package/dist/assets/{ChangePasswordView-DGXlOlVn.js → ChangePasswordView-Ck-5oU_m.js} +3 -3
  6. package/dist/assets/CollectionParameter-DRNykodC.js +4 -0
  7. package/dist/assets/{ConcurrentExecutionsHeader-CDIlj36E.js → ConcurrentExecutionsHeader-Dfi130Qe.js} +2 -2
  8. package/dist/assets/{CredentialsView-BqjdkWhh.js → CredentialsView-D44diL3J.js} +4 -4
  9. package/dist/assets/{ErrorView--I-VVLk9.js → ErrorView-ub9nQRXV.js} +1 -1
  10. package/dist/assets/{ExecutionsView-BiSV7J9a.js → ExecutionsView-DsAXYzOp.js} +17 -5
  11. package/dist/assets/{FileSaver.min-LAx9vEXw.js → FileSaver.min-nbqT44De.js} +1 -1
  12. package/dist/assets/{FixedCollectionParameter-ByX4uXQc.js → FixedCollectionParameter-DwiBHQQW.js} +1 -1
  13. package/dist/assets/{ForgotMyPasswordView-C-tewPwi.js → ForgotMyPasswordView-CH0wwots.js} +3 -3
  14. package/dist/assets/{Logo-CyDV6IUz.js → Logo-CIYEwVrA.js} +1 -1
  15. package/dist/assets/{MainHeader-nG1530RP.js → MainHeader-CN6RTCuC.js} +15 -105
  16. package/dist/assets/{MainHeader-BIKp2Ncp.css → MainHeader-DC-g9NGP.css} +12 -11
  17. package/dist/assets/{MainSidebar-CF4s-Ouk.js → MainSidebar-ih4BlE0n.js} +4 -81
  18. package/dist/assets/{NodeCreation-De8juZ9k.js → NodeCreation-DQUKwvhM.js} +4 -4
  19. package/dist/assets/{NodeCreator-Cra3o41k.js → NodeCreator-B1R35yuN.js} +5 -5
  20. package/dist/assets/{NodeViewSwitcher-BE3EzD3h.js → NodeViewSwitcher-TsFkW80s.js} +89 -48
  21. package/dist/assets/{NodeViewSwitcher-CB1zkjni.css → NodeViewSwitcher-aJwrKS8o.css} +23 -23
  22. package/dist/assets/{ProjectCardBadge-CYEfBgU2.js → ProjectCardBadge-BcCHZFJ2.js} +2 -15
  23. package/dist/assets/{ProjectHeader-DUhyXx1P.js → ProjectHeader-CSOMgkVs.js} +1 -1
  24. package/dist/assets/{ProjectSettings-DmPZa04c.js → ProjectSettings-DtqNq5WU.js} +2 -2
  25. package/dist/assets/{PushConnectionTracker.vue_vue_type_script_setup_true_lang-C0Zr49w5.js → PushConnectionTracker.vue_vue_type_script_setup_true_lang-CZIKiOsY.js} +1 -1
  26. package/dist/assets/{ResourcesListLayout-BF7yHXTU.js → ResourcesListLayout-CvkkebAN.js} +21 -11
  27. package/dist/assets/{ResourcesListLayout-CJC-YvjD.css → ResourcesListLayout-d7mMNhOL.css} +6 -6
  28. package/dist/assets/{RunDataJson-D6kl_yU3.js → RunDataJson-DA1LNZGU.js} +15 -15
  29. package/dist/assets/{RunDataJson-BXTLuo7i.css → RunDataJson-Txw0lqay.css} +1 -0
  30. package/dist/assets/{RunDataJsonActions-CBSKVOkR.js → RunDataJsonActions-DZzYHsR7.js} +2 -2
  31. package/dist/assets/{RunDataSearch-C8ri_W9l.js → RunDataSearch-D6-6kSmI.js} +1 -1
  32. package/dist/assets/{RunDataTable-fDrhEtER.js → RunDataTable-bDBgkWN3.js} +2 -2
  33. package/dist/assets/{SamlOnboarding-B9rLeJiC.js → SamlOnboarding-ULq0l8s6.js} +3 -3
  34. package/dist/assets/{SettingsApiView-DYA_Z_Bm.js → SettingsApiView-CVRk9yEi.js} +1 -1
  35. package/dist/assets/{SettingsCommunityNodesView-DWF5X20Q.js → SettingsCommunityNodesView-B6We65ta.js} +4 -4
  36. package/dist/assets/{SettingsExternalSecrets-D56h6u5r.js → SettingsExternalSecrets-wrWe6ob7.js} +1 -1
  37. package/dist/assets/{SettingsLdapView-tZze_vXh.js → SettingsLdapView-CeKm7XML.js} +1 -1
  38. package/dist/assets/{SettingsLogStreamingView-Bw3FugIn.js → SettingsLogStreamingView-DxAoQ7dF.js} +1 -1
  39. package/dist/assets/{SettingsPersonalView-BRXa1jDG.js → SettingsPersonalView-DFcUFc08.js} +1 -1
  40. package/dist/assets/{SettingsSourceControl-BBn_qSA4.js → SettingsSourceControl-D9u9tDhF.js} +1 -1
  41. package/dist/assets/{SettingsSso-BJCIqJoE.js → SettingsSso-gUSJtFP0.js} +1 -1
  42. package/dist/assets/{SettingsUsageAndPlan-BLxfFlk9.js → SettingsUsageAndPlan-C4rSaxsT.js} +1 -1
  43. package/dist/assets/{SettingsUsersView-DgquKogH.js → SettingsUsersView-DSaFQg1K.js} +1 -1
  44. package/dist/assets/{SettingsView-geSqtBi5.js → SettingsView-BcBZpdTs.js} +1 -1
  45. package/dist/assets/{SetupView-BUnzDsGx.js → SetupView-BnZ-D6Jy.js} +3 -3
  46. package/dist/assets/{SetupWorkflowCredentialsButton-OMbE5FVR.js → SetupWorkflowCredentialsButton-B3DfAGgF.js} +1 -1
  47. package/dist/assets/{SetupWorkflowFromTemplateView-CDUDJkOD.js → SetupWorkflowFromTemplateView-DVLoF-kN.js} +3 -3
  48. package/dist/assets/{SigninView-BM3kNgaO.js → SigninView-BI4UTqFm.js} +3 -3
  49. package/dist/assets/{SignoutView-CpD96iu3.js → SignoutView-4KEfr3ze.js} +1 -1
  50. package/dist/assets/{SignupView-BHirfE85.js → SignupView-BdxSQxbe.js} +3 -3
  51. package/dist/assets/{TemplateDetails-CnvXukVX.js → TemplateDetails-BU5E9lAh.js} +1 -1
  52. package/dist/assets/{TemplateList-oSLDmMo9.js → TemplateList-CSyTesvr.js} +1 -1
  53. package/dist/assets/{TemplatesCollectionView-CoK7iBJV.js → TemplatesCollectionView-aqqEP8td.js} +5 -5
  54. package/dist/assets/{TemplatesSearchView-Cu2hXp49.js → TemplatesSearchView-BXQw_aAZ.js} +3 -3
  55. package/dist/assets/{TemplatesView-B0NINzN-.js → TemplatesView-BbVjMkgy.js} +1 -1
  56. package/dist/assets/{TemplatesWorkflowView-BQngHyNE.js → TemplatesWorkflowView-Cao3RpEd.js} +5 -5
  57. package/dist/assets/{TestDefinitionEditView-DQ1n3kAQ.js → TestDefinitionEditView-CgW-4tTx.js} +785 -547
  58. package/dist/assets/{TestDefinitionEditView-FI1GVbhl.css → TestDefinitionEditView-d7yfvp9P.css} +601 -238
  59. package/dist/assets/{TestDefinitionListView-BnnmuS88.js → TestDefinitionListView-D3eg62pM.js} +93 -68
  60. package/dist/assets/{TestDefinitionRootView-D0gG8g0k.js → TestDefinitionRootView-DJdsaL4M.js} +1 -1
  61. package/dist/assets/VariablesView-2TmNYpas.js +509 -0
  62. package/dist/assets/{VariablesView-D4pRzSuY.css → VariablesView-CIfrpJdg.css} +21 -54
  63. package/dist/assets/{WorkerView-Bm_msQwI.js → WorkerView-C3LhhFeZ.js} +5 -5
  64. package/dist/assets/{WorkflowActivator-B5QyeA7d.js → WorkflowActivator-DiOQiQK2.js} +2 -2
  65. package/dist/assets/{WorkflowExecutionsInfoAccordion-BYRGFbed.js → WorkflowExecutionsInfoAccordion-BmMiVSHQ.js} +1 -1
  66. package/dist/assets/{WorkflowExecutionsLandingPage-DuWFInNH.js → WorkflowExecutionsLandingPage-CxbfP9Kf.js} +2 -2
  67. package/dist/assets/{WorkflowExecutionsPreview-Bwo_dPzH.js → WorkflowExecutionsPreview-Cku-ZBQ3.js} +5 -5
  68. package/dist/assets/{WorkflowExecutionsView-BUHtKz5M.css → WorkflowExecutionsView-BjdRnQOE.css} +32 -32
  69. package/dist/assets/{WorkflowExecutionsView-9Bir7Ax7.js → WorkflowExecutionsView-C0CnXLDW.js} +43 -29
  70. package/dist/assets/{WorkflowHistory-Cu1-T0_R.js → WorkflowHistory-Bg6AIKXX.js} +3 -3
  71. package/dist/assets/{WorkflowOnboardingView-D_PW4z5K.js → WorkflowOnboardingView-LXWyp2is.js} +1 -1
  72. package/dist/assets/{WorkflowPreview-DMBM5zJ7.js → WorkflowPreview-CsR9t5iY.js} +1 -1
  73. package/dist/assets/{WorkflowsView-DTJQfqt9.js → WorkflowsView-DQJAEKqk.js} +7 -7
  74. package/dist/assets/{easyAiWorkflowUtils-oy6hZxJE.js → easyAiWorkflowUtils-D3El0FyE.js} +1 -1
  75. package/dist/assets/{index-DuAsyBNI.css → index-DsHZ4yOE.css} +255 -36
  76. package/dist/assets/{index-DVhaXv7m.js → index-DvkbRfZN.js} +2558 -1951
  77. package/dist/assets/{polyfills-BN5TIqPj.js → polyfills-DNwgos9f.js} +650 -0
  78. package/dist/assets/{pushConnection.store-nnc6AEL8.js → pushConnection.store-5KniMGTZ.js} +1 -1
  79. package/dist/assets/{templateActions-BjByEL0H.js → templateActions-UGDN8R7F.js} +1 -1
  80. package/dist/assets/useBeforeUnload-BwgAu_Gm.js +43 -0
  81. package/dist/assets/{useBugReporting-Cgoz2JMv.js → useBugReporting-Bqv4ngy7.js} +2 -1
  82. package/dist/assets/{useCanvasOperations-BSKKylIT.css → useCanvasOperations-Bjf582lB.css} +12 -12
  83. package/dist/assets/{useCanvasOperations-CZCbgXks.js → useCanvasOperations-Cw1yjntX.js} +56 -25
  84. package/dist/assets/{useExecutionDebugging-Czm5h-sB.js → useExecutionDebugging-CTzUvS-m.js} +1 -1
  85. package/dist/assets/{useExecutionHelpers-qeNSBls3.js → useExecutionHelpers-ts_ANr0X.js} +1 -1
  86. package/dist/assets/{usePinnedData-9d5rr-Ll.js → usePinnedData-CAHmwr13.js} +1 -1
  87. package/dist/assets/{usePushConnection-C5MO_Lyn.js → usePushConnection-BcVRW8VB.js} +3 -3
  88. package/dist/assets/{useRunWorkflow-BeM5B2jX.js → useRunWorkflow-DZq8rmMi.js} +7 -4
  89. package/dist/assets/{useWorkflowActivate-CAW-Lrw6.js → useWorkflowActivate-y3uHMZeh.js} +1 -1
  90. package/dist/index.html +3 -3
  91. package/package.json +1 -1
  92. package/dist/assets/CollectionParameter-CS9E8rhZ.js +0 -4
  93. package/dist/assets/VariablesView-CkD1CK7k.js +0 -599
  94. package/dist/assets/useNodeViewVersionSwitcher-Z6V-jW5s.js +0 -93
@@ -1,184 +1,7 @@
1
- import { f as useCanvasOperations, d as useVueFlow, e as useCanvasMapping, _ as __unplugin_components_0 } from "./useCanvasOperations-CZCbgXks.js";
2
- import { d as defineComponent, T as useWorkflowsStore, bp as useNodeTypesStore, U as useRoute, b as useRouter, r as ref, q as computed, o as onMounted, c as openBlock, h as createElementBlock, e as createBlock, n as normalizeClass, f as createCommentVNode, i as createVNode, w as withCtx, j as createBaseVNode, k as createTextVNode, t as toDisplayString, l as unref, aQ as N8nTooltip, g as useI18n, C as createEventBus, aa as useCssModule, m as resolveComponent, _ as _export_sfc, hM as useTestDefinitionStore, F as Fragment, s as renderSlot, ay as withDirectives, az as vShow, hN as ElCollapseTransition, y as nextTick, A as renderList, hG as _sfc_main$9, hO as __unplugin_components_0$1, J as useDebounce, a as useToast, hE as useAnnotationTagsStore, K as useUIStore, V as VIEWS, H as watch, hP as TestRunsTable, hQ as NODE_PINNING_MODAL_KEY, hR as Modal, hS as __unplugin_components_0$2 } from "./index-DVhaXv7m.js";
3
- import "./useBugReporting-Cgoz2JMv.js";
4
- import "./usePinnedData-9d5rr-Ll.js";
5
- const _sfc_main$8 = /* @__PURE__ */ defineComponent({
6
- __name: "NodesPinning",
7
- props: {
8
- modelValue: {}
9
- },
10
- emits: ["update:modelValue"],
11
- setup(__props, { emit: __emit }) {
12
- const workflowsStore = useWorkflowsStore();
13
- const nodeTypesStore = useNodeTypesStore();
14
- const route = useRoute();
15
- const router = useRouter();
16
- const locale = useI18n();
17
- const { resetWorkspace, initializeWorkspace } = useCanvasOperations({ router });
18
- const eventBus = createEventBus();
19
- const style = useCssModule();
20
- const uuid = crypto.randomUUID();
21
- const props = __props;
22
- const emit = __emit;
23
- const isLoading = ref(true);
24
- const workflowId = computed(() => route.params.name);
25
- const testId = computed(() => route.params.testId);
26
- const workflow = computed(() => workflowsStore.getWorkflowById(workflowId.value));
27
- const workflowObject = computed(() => workflowsStore.getCurrentWorkflow(true));
28
- const canvasId = computed(() => `${uuid}-${testId.value}`);
29
- const { onNodesInitialized, fitView, zoomTo } = useVueFlow({ id: canvasId.value });
30
- const nodes = computed(() => {
31
- return workflow.value.nodes ?? [];
32
- });
33
- const connections = computed(() => workflow.value.connections);
34
- const { nodes: mappedNodes, connections: mappedConnections } = useCanvasMapping({
35
- nodes,
36
- connections,
37
- workflowObject
38
- });
39
- async function loadData() {
40
- workflowsStore.resetState();
41
- resetWorkspace();
42
- const loadingPromise = Promise.all([
43
- nodeTypesStore.getNodeTypes(),
44
- workflowsStore.fetchWorkflow(workflowId.value)
45
- ]);
46
- await loadingPromise;
47
- initializeWorkspace(workflow.value);
48
- disableAllNodes();
49
- }
50
- function getNodeNameById(id) {
51
- return mappedNodes.value.find((node) => node.id === id)?.data?.name;
52
- }
53
- function updateNodeClasses(nodeIds, isPinned) {
54
- eventBus.emit("nodes:action", {
55
- ids: nodeIds,
56
- action: "update:node:class",
57
- payload: {
58
- className: style.pinnedNode,
59
- add: isPinned
60
- }
61
- });
62
- eventBus.emit("nodes:action", {
63
- ids: nodeIds,
64
- action: "update:node:class",
65
- payload: {
66
- className: style.notPinnedNode,
67
- add: !isPinned
68
- }
69
- });
70
- }
71
- function disableAllNodes() {
72
- const ids = mappedNodes.value.map((node) => node.id);
73
- updateNodeClasses(ids, false);
74
- const pinnedNodes = props.modelValue.map((node) => node.id).filter((id) => id !== null);
75
- if (pinnedNodes.length > 0) {
76
- updateNodeClasses(pinnedNodes, true);
77
- }
78
- }
79
- function onPinButtonClick(data) {
80
- const nodeName = getNodeNameById(data.id);
81
- if (!nodeName) return;
82
- const isPinned = props.modelValue.some((node) => node.id === data.id);
83
- const updatedNodes = isPinned ? props.modelValue.filter((node) => node.id !== data.id) : [...props.modelValue, { name: nodeName, id: data.id }];
84
- emit("update:modelValue", updatedNodes);
85
- updateNodeClasses([data.id], !isPinned);
86
- }
87
- function isPinButtonVisible(outputs) {
88
- return outputs.length === 1;
89
- }
90
- onNodesInitialized(async () => {
91
- await fitView();
92
- isLoading.value = false;
93
- await zoomTo(0.7, { duration: 400 });
94
- });
95
- onMounted(loadData);
96
- return (_ctx, _cache) => {
97
- const _component_N8nSpinner = resolveComponent("N8nSpinner");
98
- const _component_n8n_icon_button = resolveComponent("n8n-icon-button");
99
- const _component_Canvas = __unplugin_components_0;
100
- return openBlock(), createElementBlock("div", {
101
- class: normalizeClass(_ctx.$style.container)
102
- }, [
103
- isLoading.value ? (openBlock(), createBlock(_component_N8nSpinner, {
104
- key: 0,
105
- size: "xlarge",
106
- type: "dots",
107
- class: normalizeClass(_ctx.$style.spinner)
108
- }, null, 8, ["class"])) : createCommentVNode("", true),
109
- createVNode(_component_Canvas, {
110
- id: canvasId.value,
111
- loading: isLoading.value,
112
- class: normalizeClass({ [_ctx.$style.canvas]: true }),
113
- nodes: unref(mappedNodes),
114
- connections: unref(mappedConnections),
115
- "show-bug-reporting-button": false,
116
- "read-only": true,
117
- "event-bus": unref(eventBus)
118
- }, {
119
- nodeToolbar: withCtx(({ data, outputs }) => [
120
- createBaseVNode("div", {
121
- class: normalizeClass(_ctx.$style.pinButtonContainer)
122
- }, [
123
- isPinButtonVisible(outputs) ? (openBlock(), createBlock(unref(N8nTooltip), {
124
- key: 0,
125
- placement: "left"
126
- }, {
127
- content: withCtx(() => [
128
- createTextVNode(toDisplayString(unref(locale).baseText("testDefinition.edit.nodesPinning.pinButtonTooltip")), 1)
129
- ]),
130
- default: withCtx(() => [
131
- createVNode(_component_n8n_icon_button, {
132
- type: "tertiary",
133
- size: "large",
134
- icon: "thumbtack",
135
- class: normalizeClass(_ctx.$style.pinButton),
136
- "data-test-id": "node-pin-button",
137
- onClick: ($event) => onPinButtonClick(data)
138
- }, null, 8, ["class", "onClick"])
139
- ]),
140
- _: 2
141
- }, 1024)) : createCommentVNode("", true)
142
- ], 2)
143
- ]),
144
- _: 1
145
- }, 8, ["id", "loading", "class", "nodes", "connections", "event-bus"])
146
- ], 2);
147
- };
148
- }
149
- });
150
- const container$1 = "_container_1ogu0_123";
151
- const pinButtonContainer = "_pinButtonContainer_1ogu0_128";
152
- const pinButton = "_pinButton_1ogu0_128";
153
- const notPinnedNode = "_notPinnedNode_1ogu0_142";
154
- const pinnedNode = "_pinnedNode_1ogu0_143";
155
- const spinner = "_spinner_1ogu0_154";
156
- const style0$7 = {
157
- container: container$1,
158
- pinButtonContainer,
159
- pinButton,
160
- notPinnedNode,
161
- pinnedNode,
162
- spinner
163
- };
164
- const cssModules$7 = {
165
- "$style": style0$7
166
- };
167
- const __unplugin_components_2 = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__cssModules", cssModules$7]]);
168
- const arrowConnector = "_arrowConnector_1mi41_123";
169
- const style0$6 = {
170
- arrowConnector
171
- };
172
- const _sfc_main$7 = {};
173
- function _sfc_render(_ctx, _cache) {
174
- return openBlock(), createElementBlock("div", {
175
- class: normalizeClass(_ctx.$style.arrowConnector)
176
- }, null, 2);
177
- }
178
- const cssModules$6 = {
179
- "$style": style0$6
180
- };
181
- const __unplugin_components_1 = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render], ["__cssModules", cssModules$6]]);
1
+ import { hU as useTestDefinitionStore, r as ref, q as computed, d as defineComponent, c as openBlock, h as createElementBlock, F as Fragment, j as createBaseVNode, t as toDisplayString, n as normalizeClass, i as createVNode, e as createBlock, l as unref, g as useI18n, m as resolveComponent, _ as _export_sfc, f as createCommentVNode, w as withCtx, k as createTextVNode, hw as mergeModels, hx as useModel, s as renderSlot, hV as MetricsChart, hW as TestRunsTable, T as useWorkflowsStore, bn as useNodeTypesStore, U as useRoute, b as useRouter, o as onMounted, aO as N8nTooltip, C as createEventBus, aa as useCssModule, ax as withDirectives, ay as vShow, hX as ElCollapseTransition, y as nextTick, A as renderList, hK as _sfc_main$c, hY as __unplugin_components_0$2, hZ as NODE_PINNING_MODAL_KEY, h_ as __unplugin_components_2, J as useDebounce, a as useToast, hI as useAnnotationTagsStore, K as useUIStore, V as VIEWS, H as watch } from "./index-DvkbRfZN.js";
2
+ import { f as useCanvasOperations, d as useVueFlow, e as useCanvasMapping, _ as __unplugin_components_0$1 } from "./useCanvasOperations-Cw1yjntX.js";
3
+ import "./useBugReporting-Bqv4ngy7.js";
4
+ import "./usePinnedData-CAHmwr13.js";
182
5
  function useTestDefinitionForm() {
183
6
  const evaluationsStore = useTestDefinitionStore();
184
7
  const state = ref({
@@ -206,7 +29,6 @@ function useTestDefinitionForm() {
206
29
  mockedNodes: []
207
30
  });
208
31
  const isSaving = ref(false);
209
- const fieldsIssues = ref([]);
210
32
  const fields = ref({});
211
33
  const editableFields = computed(() => ({
212
34
  name: state.value.name,
@@ -249,7 +71,6 @@ function useTestDefinitionForm() {
249
71
  const createTest = async (workflowId) => {
250
72
  if (isSaving.value) return;
251
73
  isSaving.value = true;
252
- fieldsIssues.value = [];
253
74
  try {
254
75
  const params = {
255
76
  name: state.value.name.value,
@@ -289,7 +110,6 @@ function useTestDefinitionForm() {
289
110
  const updateTest = async (testId) => {
290
111
  if (isSaving.value) return;
291
112
  isSaving.value = true;
292
- fieldsIssues.value = [];
293
113
  try {
294
114
  if (!testId) {
295
115
  throw new Error("Test ID is required for updating a test");
@@ -352,7 +172,6 @@ function useTestDefinitionForm() {
352
172
  state,
353
173
  fields,
354
174
  isSaving: computed(() => isSaving.value),
355
- fieldsIssues: computed(() => fieldsIssues.value),
356
175
  deleteMetric,
357
176
  updateMetrics,
358
177
  loadTestData,
@@ -364,8 +183,8 @@ function useTestDefinitionForm() {
364
183
  handleKeydown
365
184
  };
366
185
  }
367
- const _sfc_main$6 = /* @__PURE__ */ defineComponent({
368
- __name: "EvaluationHeader",
186
+ const _sfc_main$b = /* @__PURE__ */ defineComponent({
187
+ __name: "TestNameInput",
369
188
  props: {
370
189
  modelValue: {},
371
190
  startEditing: { type: Function },
@@ -378,62 +197,47 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
378
197
  return (_ctx, _cache) => {
379
198
  const _component_n8n_icon_button = resolveComponent("n8n-icon-button");
380
199
  const _component_N8nInput = resolveComponent("N8nInput");
381
- return openBlock(), createElementBlock("div", {
382
- class: normalizeClass(_ctx.$style.header)
200
+ return openBlock(), createElementBlock("h2", {
201
+ class: normalizeClass(_ctx.$style.title)
383
202
  }, [
384
- createVNode(_component_n8n_icon_button, {
385
- class: normalizeClass(_ctx.$style.backButton),
386
- icon: "arrow-left",
387
- type: "tertiary",
388
- title: unref(locale).baseText("testDefinition.edit.backButtonTitle"),
389
- onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$router.back())
390
- }, null, 8, ["class", "title"]),
391
- createBaseVNode("h2", {
392
- class: normalizeClass(_ctx.$style.title)
393
- }, [
394
- !_ctx.modelValue.isEditing ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
395
- createBaseVNode("span", {
396
- class: normalizeClass(_ctx.$style.titleText)
397
- }, toDisplayString(_ctx.modelValue.value), 3),
398
- createVNode(_component_n8n_icon_button, {
399
- class: normalizeClass(_ctx.$style.editInputButton),
400
- icon: "pen",
401
- type: "tertiary",
402
- onClick: _cache[1] || (_cache[1] = ($event) => _ctx.startEditing("name"))
403
- }, null, 8, ["class"])
404
- ], 64)) : (openBlock(), createBlock(_component_N8nInput, {
405
- key: 1,
406
- ref: "nameInput",
407
- "data-test-id": "evaluation-name-input",
408
- "model-value": _ctx.modelValue.tempValue,
409
- type: "text",
410
- placeholder: unref(locale).baseText("testDefinition.edit.namePlaceholder"),
411
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => _ctx.$emit("update:modelValue", { ..._ctx.modelValue, tempValue: $event })),
412
- onBlur: _cache[3] || (_cache[3] = () => _ctx.saveChanges("name")),
413
- onKeydown: _cache[4] || (_cache[4] = (e) => _ctx.handleKeydown(e, "name"))
414
- }, null, 8, ["model-value", "placeholder"]))
415
- ], 2)
203
+ !_ctx.modelValue.isEditing ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
204
+ createBaseVNode("span", {
205
+ class: normalizeClass(_ctx.$style.titleText)
206
+ }, toDisplayString(_ctx.modelValue.value), 3),
207
+ createVNode(_component_n8n_icon_button, {
208
+ class: normalizeClass(_ctx.$style.editInputButton),
209
+ icon: "pen",
210
+ type: "tertiary",
211
+ onClick: _cache[0] || (_cache[0] = ($event) => _ctx.startEditing("name"))
212
+ }, null, 8, ["class"])
213
+ ], 64)) : (openBlock(), createBlock(_component_N8nInput, {
214
+ key: 1,
215
+ ref: "nameInput",
216
+ "data-test-id": "evaluation-name-input",
217
+ "model-value": _ctx.modelValue.tempValue,
218
+ type: "text",
219
+ placeholder: unref(locale).baseText("testDefinition.edit.namePlaceholder"),
220
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.$emit("update:modelValue", { ..._ctx.modelValue, tempValue: $event })),
221
+ onBlur: _cache[2] || (_cache[2] = () => _ctx.saveChanges("name")),
222
+ onKeydown: _cache[3] || (_cache[3] = (e) => _ctx.handleKeydown(e, "name"))
223
+ }, null, 8, ["model-value", "placeholder"]))
416
224
  ], 2);
417
225
  };
418
226
  }
419
227
  });
420
- const header$1 = "_header_qmfly_123";
421
- const editInputButton$2 = "_editInputButton_qmfly_127";
422
- const title$1 = "_title_qmfly_131";
423
- const titleText = "_titleText_qmfly_142";
424
- const backButton = "_backButton_qmfly_155";
425
- const style0$5 = {
426
- header: header$1,
427
- editInputButton: editInputButton$2,
228
+ const title$1 = "_title_1g2qi_123";
229
+ const titleText = "_titleText_1g2qi_133";
230
+ const editInputButton$2 = "_editInputButton_1g2qi_140";
231
+ const style0$a = {
428
232
  title: title$1,
429
233
  titleText,
430
- backButton
234
+ editInputButton: editInputButton$2
431
235
  };
432
- const cssModules$5 = {
433
- "$style": style0$5
236
+ const cssModules$a = {
237
+ "$style": style0$a
434
238
  };
435
- const EvaluationHeader = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__cssModules", cssModules$5]]);
436
- const _sfc_main$5 = /* @__PURE__ */ defineComponent({
239
+ const TestNameInput = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__cssModules", cssModules$a]]);
240
+ const _sfc_main$a = /* @__PURE__ */ defineComponent({
437
241
  __name: "DescriptionInput",
438
242
  props: {
439
243
  modelValue: {},
@@ -492,29 +296,413 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
492
296
  };
493
297
  }
494
298
  });
495
- const description$1 = "_description_f14k1_123";
496
- const editInputButton$1 = "_editInputButton_f14k1_129";
497
- const descriptionText = "_descriptionText_f14k1_133";
498
- const icon$1 = "_icon_f14k1_139";
499
- const style0$4 = {
500
- description: description$1,
501
- editInputButton: editInputButton$1,
502
- descriptionText,
503
- icon: icon$1
299
+ const description$1 = "_description_f14k1_123";
300
+ const editInputButton$1 = "_editInputButton_f14k1_129";
301
+ const descriptionText = "_descriptionText_f14k1_133";
302
+ const icon$1 = "_icon_f14k1_139";
303
+ const style0$9 = {
304
+ description: description$1,
305
+ editInputButton: editInputButton$1,
306
+ descriptionText,
307
+ icon: icon$1
308
+ };
309
+ const cssModules$9 = {
310
+ "$style": style0$9
311
+ };
312
+ const DescriptionInput = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__cssModules", cssModules$9]]);
313
+ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
314
+ __name: "HeaderSection",
315
+ props: /* @__PURE__ */ mergeModels({
316
+ hasRuns: { type: Boolean },
317
+ isSaving: { type: Boolean },
318
+ showConfig: { type: Boolean },
319
+ runTestEnabled: { type: Boolean },
320
+ startEditing: { type: Function },
321
+ saveChanges: { type: Function },
322
+ handleKeydown: { type: Function },
323
+ onSaveTest: { type: Function },
324
+ runTest: { type: Function },
325
+ toggleConfig: { type: Function },
326
+ getFieldIssues: { type: Function }
327
+ }, {
328
+ "name": { required: true },
329
+ "nameModifiers": {},
330
+ "description": { required: true },
331
+ "descriptionModifiers": {}
332
+ }),
333
+ emits: ["update:name", "update:description"],
334
+ setup(__props) {
335
+ const props = __props;
336
+ const name2 = useModel(__props, "name");
337
+ const description2 = useModel(__props, "description");
338
+ const locale = useI18n();
339
+ const showSavingIndicator = computed(() => {
340
+ return !name2.value.isEditing;
341
+ });
342
+ return (_ctx, _cache) => {
343
+ const _component_n8n_icon_button = resolveComponent("n8n-icon-button");
344
+ const _component_N8nButton = resolveComponent("N8nButton");
345
+ const _component_N8nTooltip = resolveComponent("N8nTooltip");
346
+ return openBlock(), createElementBlock("div", {
347
+ class: normalizeClass(_ctx.$style.headerSection)
348
+ }, [
349
+ createBaseVNode("div", {
350
+ class: normalizeClass(_ctx.$style.headerMeta)
351
+ }, [
352
+ createBaseVNode("div", {
353
+ class: normalizeClass(_ctx.$style.name)
354
+ }, [
355
+ createVNode(_component_n8n_icon_button, {
356
+ class: normalizeClass(_ctx.$style.backButton),
357
+ icon: "arrow-left",
358
+ type: "tertiary",
359
+ title: unref(locale).baseText("testDefinition.edit.backButtonTitle"),
360
+ onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$router.back())
361
+ }, null, 8, ["class", "title"]),
362
+ createVNode(TestNameInput, {
363
+ modelValue: name2.value,
364
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => name2.value = $event),
365
+ class: normalizeClass({ "has-issues": _ctx.getFieldIssues("name").length > 0 }),
366
+ "start-editing": _ctx.startEditing,
367
+ "save-changes": _ctx.saveChanges,
368
+ "handle-keydown": _ctx.handleKeydown
369
+ }, null, 8, ["modelValue", "class", "start-editing", "save-changes", "handle-keydown"]),
370
+ showSavingIndicator.value ? (openBlock(), createElementBlock("div", {
371
+ key: 0,
372
+ class: normalizeClass(_ctx.$style.lastSaved)
373
+ }, [
374
+ _ctx.isSaving ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
375
+ createTextVNode(toDisplayString(unref(locale).baseText("testDefinition.edit.saving")), 1)
376
+ ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
377
+ createTextVNode(toDisplayString(unref(locale).baseText("testDefinition.edit.saved")), 1)
378
+ ], 64))
379
+ ], 2)) : createCommentVNode("", true)
380
+ ], 2),
381
+ createVNode(DescriptionInput, {
382
+ modelValue: description2.value,
383
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => description2.value = $event),
384
+ "start-editing": _ctx.startEditing,
385
+ "save-changes": _ctx.saveChanges,
386
+ "handle-keydown": _ctx.handleKeydown,
387
+ class: normalizeClass(_ctx.$style.descriptionInput)
388
+ }, null, 8, ["modelValue", "start-editing", "save-changes", "handle-keydown", "class"])
389
+ ], 2),
390
+ createBaseVNode("div", {
391
+ class: normalizeClass(_ctx.$style.controls)
392
+ }, [
393
+ props.hasRuns ? (openBlock(), createBlock(_component_N8nButton, {
394
+ key: 0,
395
+ size: "small",
396
+ icon: _ctx.showConfig ? "eye-slash" : "eye",
397
+ "data-test-id": "toggle-config-button",
398
+ label: _ctx.showConfig ? unref(locale).baseText("testDefinition.edit.hideConfig") : unref(locale).baseText("testDefinition.edit.showConfig"),
399
+ type: "tertiary",
400
+ onClick: _ctx.toggleConfig
401
+ }, null, 8, ["icon", "label", "onClick"])) : createCommentVNode("", true),
402
+ createVNode(_component_N8nTooltip, {
403
+ disabled: _ctx.runTestEnabled,
404
+ placement: "left"
405
+ }, {
406
+ content: withCtx(() => [
407
+ renderSlot(_ctx.$slots, "runTestTooltip")
408
+ ]),
409
+ default: withCtx(() => [
410
+ createVNode(_component_N8nButton, {
411
+ disabled: !_ctx.runTestEnabled,
412
+ class: normalizeClass(_ctx.$style.runTestButton),
413
+ size: "small",
414
+ "data-test-id": "run-test-button",
415
+ label: unref(locale).baseText("testDefinition.runTest"),
416
+ type: "primary",
417
+ onClick: _ctx.runTest
418
+ }, null, 8, ["disabled", "class", "label", "onClick"])
419
+ ]),
420
+ _: 3
421
+ }, 8, ["disabled"])
422
+ ], 2)
423
+ ], 2);
424
+ };
425
+ }
426
+ });
427
+ const headerSection = "_headerSection_28wt7_123";
428
+ const headerMeta = "_headerMeta_28wt7_131";
429
+ const name = "_name_28wt7_135";
430
+ const lastSaved = "_lastSaved_28wt7_140";
431
+ const descriptionInput = "_descriptionInput_28wt7_145";
432
+ const controls = "_controls_28wt7_149";
433
+ const backButton = "_backButton_28wt7_154";
434
+ const style0$8 = {
435
+ headerSection,
436
+ headerMeta,
437
+ name,
438
+ lastSaved,
439
+ descriptionInput,
440
+ controls,
441
+ backButton
442
+ };
443
+ const cssModules$8 = {
444
+ "$style": style0$8
445
+ };
446
+ const HeaderSection = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__cssModules", cssModules$8]]);
447
+ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
448
+ __name: "RunsSection",
449
+ props: /* @__PURE__ */ mergeModels({
450
+ runs: {},
451
+ testId: {},
452
+ appliedTheme: {}
453
+ }, {
454
+ "selectedMetric": { required: true },
455
+ "selectedMetricModifiers": {}
456
+ }),
457
+ emits: /* @__PURE__ */ mergeModels(["deleteRuns"], ["update:selectedMetric"]),
458
+ setup(__props, { emit: __emit }) {
459
+ const emit = __emit;
460
+ const selectedMetric = useModel(__props, "selectedMetric");
461
+ function onDeleteRuns(toDelete) {
462
+ emit("deleteRuns", toDelete);
463
+ }
464
+ return (_ctx, _cache) => {
465
+ return openBlock(), createElementBlock("div", {
466
+ class: normalizeClass(_ctx.$style.runs)
467
+ }, [
468
+ createVNode(MetricsChart, {
469
+ selectedMetric: selectedMetric.value,
470
+ "onUpdate:selectedMetric": _cache[0] || (_cache[0] = ($event) => selectedMetric.value = $event),
471
+ runs: _ctx.runs,
472
+ theme: _ctx.appliedTheme
473
+ }, null, 8, ["selectedMetric", "runs", "theme"]),
474
+ createVNode(TestRunsTable, {
475
+ class: normalizeClass(_ctx.$style.runsTable),
476
+ runs: _ctx.runs,
477
+ selectable: true,
478
+ "data-test-id": "past-runs-table",
479
+ onDeleteRuns
480
+ }, null, 8, ["class", "runs"])
481
+ ], 2);
482
+ };
483
+ }
484
+ });
485
+ const runs = "_runs_1llgd_123";
486
+ const style0$7 = {
487
+ runs
488
+ };
489
+ const cssModules$7 = {
490
+ "$style": style0$7
491
+ };
492
+ const RunsSection = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__cssModules", cssModules$7]]);
493
+ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
494
+ __name: "NodesPinning",
495
+ props: {
496
+ modelValue: {}
497
+ },
498
+ emits: ["update:modelValue"],
499
+ setup(__props, { emit: __emit }) {
500
+ const workflowsStore = useWorkflowsStore();
501
+ const nodeTypesStore = useNodeTypesStore();
502
+ const route = useRoute();
503
+ const router = useRouter();
504
+ const locale = useI18n();
505
+ const { resetWorkspace, initializeWorkspace } = useCanvasOperations({ router });
506
+ const eventBus = createEventBus();
507
+ const style = useCssModule();
508
+ const uuid = crypto.randomUUID();
509
+ const props = __props;
510
+ const emit = __emit;
511
+ const isLoading = ref(true);
512
+ const workflowId = computed(() => route.params.name);
513
+ const testId = computed(() => route.params.testId);
514
+ const workflow = computed(() => workflowsStore.getWorkflowById(workflowId.value));
515
+ const workflowObject = computed(() => workflowsStore.getCurrentWorkflow(true));
516
+ const canvasId = computed(() => `${uuid}-${testId.value}`);
517
+ const { onNodesInitialized, fitView, zoomTo } = useVueFlow({ id: canvasId.value });
518
+ const nodes = computed(() => {
519
+ return workflow.value.nodes ?? [];
520
+ });
521
+ const connections = computed(() => workflow.value.connections);
522
+ const { nodes: mappedNodes, connections: mappedConnections } = useCanvasMapping({
523
+ nodes,
524
+ connections,
525
+ workflowObject
526
+ });
527
+ async function loadData() {
528
+ workflowsStore.resetState();
529
+ resetWorkspace();
530
+ const loadingPromise = Promise.all([
531
+ nodeTypesStore.getNodeTypes(),
532
+ workflowsStore.fetchWorkflow(workflowId.value)
533
+ ]);
534
+ await loadingPromise;
535
+ initializeWorkspace(workflow.value);
536
+ disableAllNodes();
537
+ }
538
+ function getNodeNameById(id) {
539
+ return mappedNodes.value.find((node) => node.id === id)?.data?.name;
540
+ }
541
+ function updateNodeClasses(nodeIds, isPinned) {
542
+ eventBus.emit("nodes:action", {
543
+ ids: nodeIds,
544
+ action: "update:node:class",
545
+ payload: {
546
+ className: style.pinnedNode,
547
+ add: isPinned
548
+ }
549
+ });
550
+ eventBus.emit("nodes:action", {
551
+ ids: nodeIds,
552
+ action: "update:node:class",
553
+ payload: {
554
+ className: style.notPinnedNode,
555
+ add: !isPinned
556
+ }
557
+ });
558
+ }
559
+ function disableAllNodes() {
560
+ const ids = mappedNodes.value.map((node) => node.id);
561
+ updateNodeClasses(ids, false);
562
+ const pinnedNodes = props.modelValue.map((node) => node.id).filter((id) => id !== null);
563
+ if (pinnedNodes.length > 0) {
564
+ updateNodeClasses(pinnedNodes, true);
565
+ }
566
+ }
567
+ function onPinButtonClick(data) {
568
+ const nodeName = getNodeNameById(data.id);
569
+ if (!nodeName) return;
570
+ const isPinned = props.modelValue.some((node) => node.id === data.id);
571
+ const updatedNodes = isPinned ? props.modelValue.filter((node) => node.id !== data.id) : [...props.modelValue, { name: nodeName, id: data.id }];
572
+ emit("update:modelValue", updatedNodes);
573
+ updateNodeClasses([data.id], !isPinned);
574
+ }
575
+ function isPinButtonVisible(outputs) {
576
+ return outputs.length === 1;
577
+ }
578
+ onNodesInitialized(async () => {
579
+ await fitView();
580
+ isLoading.value = false;
581
+ await zoomTo(0.7, { duration: 400 });
582
+ });
583
+ onMounted(loadData);
584
+ return (_ctx, _cache) => {
585
+ const _component_N8nHeading = resolveComponent("N8nHeading");
586
+ const _component_N8nText = resolveComponent("N8nText");
587
+ const _component_N8nSpinner = resolveComponent("N8nSpinner");
588
+ const _component_n8n_icon_button = resolveComponent("n8n-icon-button");
589
+ const _component_Canvas = __unplugin_components_0$1;
590
+ return unref(mappedNodes).length === 0 ? (openBlock(), createElementBlock("div", {
591
+ key: 0,
592
+ class: normalizeClass(_ctx.$style.noNodes)
593
+ }, [
594
+ createVNode(_component_N8nHeading, {
595
+ size: "large",
596
+ bold: true,
597
+ class: normalizeClass(_ctx.$style.noNodesTitle)
598
+ }, {
599
+ default: withCtx(() => [
600
+ createTextVNode(toDisplayString(unref(locale).baseText("testDefinition.edit.pinNodes.noNodes.title")), 1)
601
+ ]),
602
+ _: 1
603
+ }, 8, ["class"]),
604
+ createVNode(_component_N8nText, null, {
605
+ default: withCtx(() => [
606
+ createTextVNode(toDisplayString(unref(locale).baseText("testDefinition.edit.pinNodes.noNodes.description")), 1)
607
+ ]),
608
+ _: 1
609
+ })
610
+ ], 2)) : (openBlock(), createElementBlock("div", {
611
+ key: 1,
612
+ class: normalizeClass(_ctx.$style.container)
613
+ }, [
614
+ isLoading.value ? (openBlock(), createBlock(_component_N8nSpinner, {
615
+ key: 0,
616
+ size: "xlarge",
617
+ type: "dots",
618
+ class: normalizeClass(_ctx.$style.spinner)
619
+ }, null, 8, ["class"])) : createCommentVNode("", true),
620
+ createVNode(_component_Canvas, {
621
+ id: canvasId.value,
622
+ loading: isLoading.value,
623
+ class: normalizeClass({ [_ctx.$style.canvas]: true }),
624
+ nodes: unref(mappedNodes),
625
+ connections: unref(mappedConnections),
626
+ "show-bug-reporting-button": false,
627
+ "read-only": true,
628
+ "event-bus": unref(eventBus)
629
+ }, {
630
+ nodeToolbar: withCtx(({ data, outputs }) => [
631
+ createBaseVNode("div", {
632
+ class: normalizeClass(_ctx.$style.pinButtonContainer)
633
+ }, [
634
+ isPinButtonVisible(outputs) ? (openBlock(), createBlock(unref(N8nTooltip), {
635
+ key: 0,
636
+ placement: "left"
637
+ }, {
638
+ content: withCtx(() => [
639
+ createTextVNode(toDisplayString(unref(locale).baseText("testDefinition.edit.nodesPinning.pinButtonTooltip")), 1)
640
+ ]),
641
+ default: withCtx(() => [
642
+ createVNode(_component_n8n_icon_button, {
643
+ type: "tertiary",
644
+ size: "large",
645
+ icon: "thumbtack",
646
+ class: normalizeClass(_ctx.$style.pinButton),
647
+ "data-test-id": "node-pin-button",
648
+ onClick: ($event) => onPinButtonClick(data)
649
+ }, null, 8, ["class", "onClick"])
650
+ ]),
651
+ _: 2
652
+ }, 1024)) : createCommentVNode("", true)
653
+ ], 2)
654
+ ]),
655
+ _: 1
656
+ }, 8, ["id", "loading", "class", "nodes", "connections", "event-bus"])
657
+ ], 2));
658
+ };
659
+ }
660
+ });
661
+ const container$1 = "_container_108jn_123";
662
+ const pinButtonContainer = "_pinButtonContainer_108jn_128";
663
+ const pinButton = "_pinButton_108jn_128";
664
+ const notPinnedNode = "_notPinnedNode_108jn_142";
665
+ const pinnedNode = "_pinnedNode_108jn_143";
666
+ const spinner = "_spinner_108jn_154";
667
+ const noNodes = "_noNodes_108jn_161";
668
+ const style0$6 = {
669
+ container: container$1,
670
+ pinButtonContainer,
671
+ pinButton,
672
+ notPinnedNode,
673
+ pinnedNode,
674
+ spinner,
675
+ noNodes
504
676
  };
505
- const cssModules$4 = {
506
- "$style": style0$4
677
+ const cssModules$6 = {
678
+ "$style": style0$6
679
+ };
680
+ const __unplugin_components_1 = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__cssModules", cssModules$6]]);
681
+ const arrowConnector = "_arrowConnector_1mi41_123";
682
+ const style0$5 = {
683
+ arrowConnector
684
+ };
685
+ const _sfc_main$6 = {};
686
+ function _sfc_render(_ctx, _cache) {
687
+ return openBlock(), createElementBlock("div", {
688
+ class: normalizeClass(_ctx.$style.arrowConnector)
689
+ }, null, 2);
690
+ }
691
+ const cssModules$5 = {
692
+ "$style": style0$5
507
693
  };
508
- const DescriptionInput = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__cssModules", cssModules$4]]);
694
+ const __unplugin_components_0 = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render], ["__cssModules", cssModules$5]]);
509
695
  const _hoisted_1$1 = ["aria-expanded", "aria-controls"];
510
- const _sfc_main$4 = /* @__PURE__ */ defineComponent({
696
+ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
511
697
  __name: "EvaluationStep",
512
698
  props: {
513
699
  title: {},
514
700
  warning: { type: Boolean, default: false },
515
701
  small: { type: Boolean, default: false },
516
702
  expanded: { type: Boolean, default: true },
517
- description: { default: "" }
703
+ description: { default: "" },
704
+ issues: { default: () => [] },
705
+ showIssues: { type: Boolean, default: true }
518
706
  },
519
707
  setup(__props) {
520
708
  const props = __props;
@@ -532,6 +720,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
532
720
  }
533
721
  };
534
722
  return (_ctx, _cache) => {
723
+ const _component_N8nInfoTip = resolveComponent("N8nInfoTip");
535
724
  const _component_font_awesome_icon = resolveComponent("font-awesome-icon");
536
725
  return openBlock(), createElementBlock("div", {
537
726
  ref_key: "containerRef",
@@ -553,10 +742,22 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
553
742
  createBaseVNode("h3", {
554
743
  class: normalizeClass(_ctx.$style.title)
555
744
  }, toDisplayString(_ctx.title), 3),
556
- _ctx.warning ? (openBlock(), createElementBlock("span", {
745
+ _ctx.issues.length > 0 && _ctx.showIssues ? (openBlock(), createElementBlock("span", {
557
746
  key: 0,
558
747
  class: normalizeClass(_ctx.$style.warningIcon)
559
- }, "⚠", 2)) : createCommentVNode("", true),
748
+ }, [
749
+ createVNode(_component_N8nInfoTip, {
750
+ bold: true,
751
+ type: "tooltip",
752
+ theme: "warning",
753
+ "tooltip-placement": "right"
754
+ }, {
755
+ default: withCtx(() => [
756
+ createTextVNode(toDisplayString(_ctx.issues.map((issue) => issue.message).join(", ")), 1)
757
+ ]),
758
+ _: 1
759
+ })
760
+ ], 2)) : createCommentVNode("", true),
560
761
  _ctx.$slots.cardContent ? (openBlock(), createElementBlock("button", {
561
762
  key: 1,
562
763
  class: normalizeClass(_ctx.$style.collapseButton),
@@ -612,7 +813,7 @@ const cardContent = "_cardContent_65xdl_174";
612
813
  const collapseButton = "_collapseButton_65xdl_179";
613
814
  const cardContentWrapper = "_cardContentWrapper_65xdl_192";
614
815
  const description = "_description_65xdl_196";
615
- const style0$3 = {
816
+ const style0$4 = {
616
817
  evaluationStep,
617
818
  small,
618
819
  icon,
@@ -626,12 +827,12 @@ const style0$3 = {
626
827
  cardContentWrapper,
627
828
  description
628
829
  };
629
- const cssModules$3 = {
630
- "$style": style0$3
830
+ const cssModules$4 = {
831
+ "$style": style0$4
631
832
  };
632
- const EvaluationStep = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__cssModules", cssModules$3]]);
833
+ const EvaluationStep = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__cssModules", cssModules$4]]);
633
834
  const _hoisted_1 = { "data-test-id": "workflow-tags-field" };
634
- const _sfc_main$3 = /* @__PURE__ */ defineComponent({
835
+ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
635
836
  __name: "TagsInput",
636
837
  props: {
637
838
  modelValue: { default: () => ({
@@ -666,7 +867,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
666
867
  const _component_n8n_text = resolveComponent("n8n-text");
667
868
  const _component_n8n_tag = resolveComponent("n8n-tag");
668
869
  const _component_n8n_icon_button = resolveComponent("n8n-icon-button");
669
- const _component_TagsDropdown = _sfc_main$9;
870
+ const _component_TagsDropdown = _sfc_main$c;
670
871
  const _component_n8n_input_label = resolveComponent("n8n-input-label");
671
872
  return openBlock(), createElementBlock("div", _hoisted_1, [
672
873
  createVNode(_component_n8n_input_label, {
@@ -729,15 +930,15 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
729
930
  });
730
931
  const tagsRead = "_tagsRead_z5pm4_123";
731
932
  const editInputButton = "_editInputButton_z5pm4_123";
732
- const style0$2 = {
933
+ const style0$3 = {
733
934
  tagsRead,
734
935
  editInputButton
735
936
  };
736
- const cssModules$2 = {
737
- "$style": style0$2
937
+ const cssModules$3 = {
938
+ "$style": style0$3
738
939
  };
739
- const TagsInput = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__cssModules", cssModules$2]]);
740
- const _sfc_main$2 = /* @__PURE__ */ defineComponent({
940
+ const TagsInput = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__cssModules", cssModules$3]]);
941
+ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
741
942
  __name: "WorkflowSelector",
742
943
  props: {
743
944
  modelValue: { default: () => ({
@@ -750,7 +951,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
750
951
  setup(__props) {
751
952
  const locale = useI18n();
752
953
  return (_ctx, _cache) => {
753
- const _component_WorkflowSelectorParameterInput = __unplugin_components_0$1;
954
+ const _component_WorkflowSelectorParameterInput = __unplugin_components_0$2;
754
955
  const _component_n8n_input_label = resolveComponent("n8n-input-label");
755
956
  return openBlock(), createElementBlock("div", null, [
756
957
  createVNode(_component_n8n_input_label, {
@@ -781,7 +982,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
781
982
  };
782
983
  }
783
984
  });
784
- const _sfc_main$1 = /* @__PURE__ */ defineComponent({
985
+ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
785
986
  __name: "MetricsInput",
786
987
  props: {
787
988
  modelValue: {}
@@ -858,17 +1059,262 @@ const metricItem = "_metricItem_1eaf8_129";
858
1059
  const metricField = "_metricField_1eaf8_134";
859
1060
  const metricsDivider = "_metricsDivider_1eaf8_139";
860
1061
  const newMetricButton = "_newMetricButton_1eaf8_144";
861
- const style0$1 = {
1062
+ const style0$2 = {
862
1063
  metricsContainer,
863
1064
  metricItem,
864
1065
  metricField,
865
1066
  metricsDivider,
866
1067
  newMetricButton
867
1068
  };
1069
+ const cssModules$2 = {
1070
+ "$style": style0$2
1071
+ };
1072
+ const MetricsInput = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__cssModules", cssModules$2]]);
1073
+ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
1074
+ __name: "ConfigSection",
1075
+ props: /* @__PURE__ */ mergeModels({
1076
+ showConfig: { type: Boolean },
1077
+ tagUsageCount: {},
1078
+ allTags: {},
1079
+ tagsById: {},
1080
+ isLoading: { type: Boolean },
1081
+ getFieldIssues: { type: Function },
1082
+ startEditing: { type: Function },
1083
+ saveChanges: { type: Function },
1084
+ cancelEditing: { type: Function },
1085
+ createTag: { type: Function }
1086
+ }, {
1087
+ "tags": { required: true },
1088
+ "tagsModifiers": {},
1089
+ "evaluationWorkflow": { required: true },
1090
+ "evaluationWorkflowModifiers": {},
1091
+ "metrics": { required: true },
1092
+ "metricsModifiers": {},
1093
+ "mockedNodes": {
1094
+ required: true
1095
+ },
1096
+ "mockedNodesModifiers": {}
1097
+ }),
1098
+ emits: /* @__PURE__ */ mergeModels(["openPinningModal", "deleteMetric"], ["update:tags", "update:evaluationWorkflow", "update:metrics", "update:mockedNodes"]),
1099
+ setup(__props, { emit: __emit }) {
1100
+ const changedFieldsKeys = ref([]);
1101
+ const tags = useModel(__props, "tags");
1102
+ const evaluationWorkflow = useModel(
1103
+ __props,
1104
+ "evaluationWorkflow"
1105
+ );
1106
+ const metrics = useModel(__props, "metrics");
1107
+ const mockedNodes = useModel(__props, "mockedNodes");
1108
+ const nodePinningModal = ref(null);
1109
+ const emit = __emit;
1110
+ const locale = useI18n();
1111
+ function updateChangedFieldsKeys(key) {
1112
+ changedFieldsKeys.value.push(key);
1113
+ }
1114
+ function showFieldIssues(fieldKey) {
1115
+ return changedFieldsKeys.value.includes(fieldKey);
1116
+ }
1117
+ return (_ctx, _cache) => {
1118
+ const _component_BlockArrow = __unplugin_components_0;
1119
+ const _component_font_awesome_icon = resolveComponent("font-awesome-icon");
1120
+ const _component_n8n_button = resolveComponent("n8n-button");
1121
+ const _component_N8nHeading = resolveComponent("N8nHeading");
1122
+ const _component_NodesPinning = __unplugin_components_1;
1123
+ const _component_Modal = __unplugin_components_2;
1124
+ return openBlock(), createElementBlock("div", {
1125
+ class: normalizeClass([_ctx.$style.panelBlock, { [_ctx.$style.hidden]: !_ctx.showConfig }])
1126
+ }, [
1127
+ createBaseVNode("div", {
1128
+ class: normalizeClass(_ctx.$style.panelIntro)
1129
+ }, toDisplayString(unref(locale).baseText("testDefinition.edit.step.intro")), 3),
1130
+ createVNode(_component_BlockArrow, {
1131
+ class: normalizeClass(_ctx.$style.introArrow)
1132
+ }, null, 8, ["class"]),
1133
+ createVNode(EvaluationStep, {
1134
+ class: normalizeClass(_ctx.$style.step),
1135
+ title: unref(locale).baseText("testDefinition.edit.step.executions", {
1136
+ adjustToNumber: _ctx.tagUsageCount
1137
+ }),
1138
+ description: unref(locale).baseText("testDefinition.edit.step.executions.description"),
1139
+ issues: _ctx.getFieldIssues("tags"),
1140
+ "show-issues": showFieldIssues("tags")
1141
+ }, {
1142
+ icon: withCtx(() => [
1143
+ createVNode(_component_font_awesome_icon, {
1144
+ icon: "history",
1145
+ size: "lg"
1146
+ })
1147
+ ]),
1148
+ cardContent: withCtx(() => [
1149
+ createVNode(TagsInput, {
1150
+ modelValue: tags.value,
1151
+ "onUpdate:modelValue": [
1152
+ _cache[0] || (_cache[0] = ($event) => tags.value = $event),
1153
+ _cache[1] || (_cache[1] = ($event) => updateChangedFieldsKeys("tags"))
1154
+ ],
1155
+ class: normalizeClass({ "has-issues": _ctx.getFieldIssues("tags") }),
1156
+ "all-tags": _ctx.allTags,
1157
+ "tags-by-id": _ctx.tagsById,
1158
+ "is-loading": _ctx.isLoading,
1159
+ "start-editing": _ctx.startEditing,
1160
+ "save-changes": _ctx.saveChanges,
1161
+ "cancel-editing": _ctx.cancelEditing,
1162
+ "create-tag": _ctx.createTag
1163
+ }, null, 8, ["modelValue", "class", "all-tags", "tags-by-id", "is-loading", "start-editing", "save-changes", "cancel-editing", "create-tag"])
1164
+ ]),
1165
+ _: 1
1166
+ }, 8, ["class", "title", "description", "issues", "show-issues"]),
1167
+ createBaseVNode("div", {
1168
+ class: normalizeClass(_ctx.$style.evaluationArrows)
1169
+ }, [
1170
+ createVNode(_component_BlockArrow),
1171
+ createVNode(_component_BlockArrow)
1172
+ ], 2),
1173
+ createVNode(EvaluationStep, {
1174
+ class: normalizeClass(_ctx.$style.step),
1175
+ title: unref(locale).baseText("testDefinition.edit.step.mockedNodes", {
1176
+ adjustToNumber: mockedNodes.value?.length ?? 0
1177
+ }),
1178
+ small: true,
1179
+ expanded: true,
1180
+ description: unref(locale).baseText("testDefinition.edit.step.nodes.description"),
1181
+ issues: _ctx.getFieldIssues("mockedNodes"),
1182
+ "show-issues": showFieldIssues("mockedNodes")
1183
+ }, {
1184
+ icon: withCtx(() => [
1185
+ createVNode(_component_font_awesome_icon, {
1186
+ icon: "thumbtack",
1187
+ size: "lg"
1188
+ })
1189
+ ]),
1190
+ cardContent: withCtx(() => [
1191
+ createVNode(_component_n8n_button, {
1192
+ size: "small",
1193
+ "data-test-id": "select-nodes-button",
1194
+ label: unref(locale).baseText("testDefinition.edit.selectNodes"),
1195
+ type: "tertiary",
1196
+ onClick: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("openPinningModal"))
1197
+ }, null, 8, ["label"])
1198
+ ]),
1199
+ _: 1
1200
+ }, 8, ["class", "title", "description", "issues", "show-issues"]),
1201
+ createVNode(EvaluationStep, {
1202
+ class: normalizeClass(_ctx.$style.step),
1203
+ title: unref(locale).baseText("testDefinition.edit.step.reRunExecutions"),
1204
+ small: true,
1205
+ description: unref(locale).baseText("testDefinition.edit.step.reRunExecutions.description")
1206
+ }, {
1207
+ icon: withCtx(() => [
1208
+ createVNode(_component_font_awesome_icon, {
1209
+ icon: "redo",
1210
+ size: "lg"
1211
+ })
1212
+ ]),
1213
+ _: 1
1214
+ }, 8, ["class", "title", "description"]),
1215
+ createVNode(EvaluationStep, {
1216
+ class: normalizeClass(_ctx.$style.step),
1217
+ title: unref(locale).baseText("testDefinition.edit.step.compareExecutions"),
1218
+ description: unref(locale).baseText("testDefinition.edit.step.compareExecutions.description"),
1219
+ issues: _ctx.getFieldIssues("evaluationWorkflow"),
1220
+ "show-issues": showFieldIssues("evaluationWorkflow")
1221
+ }, {
1222
+ icon: withCtx(() => [
1223
+ createVNode(_component_font_awesome_icon, {
1224
+ icon: "equals",
1225
+ size: "lg"
1226
+ })
1227
+ ]),
1228
+ cardContent: withCtx(() => [
1229
+ createVNode(_sfc_main$3, {
1230
+ modelValue: evaluationWorkflow.value,
1231
+ "onUpdate:modelValue": [
1232
+ _cache[3] || (_cache[3] = ($event) => evaluationWorkflow.value = $event),
1233
+ _cache[4] || (_cache[4] = ($event) => updateChangedFieldsKeys("evaluationWorkflow"))
1234
+ ],
1235
+ class: normalizeClass({ "has-issues": _ctx.getFieldIssues("evaluationWorkflow").length > 0 })
1236
+ }, null, 8, ["modelValue", "class"])
1237
+ ]),
1238
+ _: 1
1239
+ }, 8, ["class", "title", "description", "issues", "show-issues"]),
1240
+ createVNode(EvaluationStep, {
1241
+ class: normalizeClass(_ctx.$style.step),
1242
+ title: unref(locale).baseText("testDefinition.edit.step.metrics"),
1243
+ description: unref(locale).baseText("testDefinition.edit.step.metrics.description"),
1244
+ issues: _ctx.getFieldIssues("metrics"),
1245
+ "show-issues": showFieldIssues("metrics")
1246
+ }, {
1247
+ icon: withCtx(() => [
1248
+ createVNode(_component_font_awesome_icon, {
1249
+ icon: "chart-bar",
1250
+ size: "lg"
1251
+ })
1252
+ ]),
1253
+ cardContent: withCtx(() => [
1254
+ createVNode(MetricsInput, {
1255
+ modelValue: metrics.value,
1256
+ "onUpdate:modelValue": [
1257
+ _cache[5] || (_cache[5] = ($event) => metrics.value = $event),
1258
+ _cache[7] || (_cache[7] = ($event) => updateChangedFieldsKeys("metrics"))
1259
+ ],
1260
+ class: normalizeClass({ "has-issues": _ctx.getFieldIssues("metrics").length > 0 }),
1261
+ onDeleteMetric: _cache[6] || (_cache[6] = (metric) => emit("deleteMetric", metric))
1262
+ }, null, 8, ["modelValue", "class"])
1263
+ ]),
1264
+ _: 1
1265
+ }, 8, ["class", "title", "description", "issues", "show-issues"]),
1266
+ createVNode(_component_Modal, {
1267
+ ref_key: "nodePinningModal",
1268
+ ref: nodePinningModal,
1269
+ width: "80vw",
1270
+ height: "85vh",
1271
+ name: unref(NODE_PINNING_MODAL_KEY)
1272
+ }, {
1273
+ header: withCtx(() => [
1274
+ createVNode(_component_N8nHeading, {
1275
+ size: "large",
1276
+ bold: true,
1277
+ class: normalizeClass(_ctx.$style.runsTableHeading)
1278
+ }, {
1279
+ default: withCtx(() => [
1280
+ createTextVNode(toDisplayString(unref(locale).baseText("testDefinition.edit.selectNodes")), 1)
1281
+ ]),
1282
+ _: 1
1283
+ }, 8, ["class"])
1284
+ ]),
1285
+ content: withCtx(() => [
1286
+ createVNode(_component_NodesPinning, {
1287
+ modelValue: mockedNodes.value,
1288
+ "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => mockedNodes.value = $event),
1289
+ "data-test-id": "nodes-pinning-modal"
1290
+ }, null, 8, ["modelValue"])
1291
+ ]),
1292
+ _: 1
1293
+ }, 8, ["name"])
1294
+ ], 2);
1295
+ };
1296
+ }
1297
+ });
1298
+ const panelBlock = "_panelBlock_1xhy8_123";
1299
+ const hidden = "_hidden_1xhy8_133";
1300
+ const noRuns$1 = "_noRuns_1xhy8_139";
1301
+ const panelIntro = "_panelIntro_1xhy8_143";
1302
+ const step = "_step_1xhy8_151";
1303
+ const introArrow = "_introArrow_1xhy8_158";
1304
+ const evaluationArrows = "_evaluationArrows_1xhy8_164";
1305
+ const style0$1 = {
1306
+ panelBlock,
1307
+ hidden,
1308
+ noRuns: noRuns$1,
1309
+ panelIntro,
1310
+ step,
1311
+ introArrow,
1312
+ evaluationArrows
1313
+ };
868
1314
  const cssModules$1 = {
869
1315
  "$style": style0$1
870
1316
  };
871
- const MetricsInput = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__cssModules", cssModules$1]]);
1317
+ const ConfigSection = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__cssModules", cssModules$1]]);
872
1318
  const _sfc_main = /* @__PURE__ */ defineComponent({
873
1319
  __name: "TestDefinitionEditView",
874
1320
  props: {
@@ -886,7 +1332,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
886
1332
  const uiStore = useUIStore();
887
1333
  const {
888
1334
  state,
889
- fieldsIssues,
890
1335
  isSaving,
891
1336
  cancelEditing,
892
1337
  loadTestData,
@@ -908,10 +1353,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
908
1353
  () => tagsStore.tagsById[state.value.tags.value[0]]?.usageCount ?? 0
909
1354
  );
910
1355
  const hasRuns = computed(() => runs2.value.length > 0);
911
- const nodePinningModal = ref(null);
912
- const modalContentWidth = ref(0);
913
1356
  const showConfig = ref(true);
914
1357
  const selectedMetric = ref("");
1358
+ const fieldsIssues = computed(() => testDefinitionStore.getFieldIssues(testId.value) ?? []);
915
1359
  onMounted(async () => {
916
1360
  if (!testDefinitionStore.isFeatureEnabled) {
917
1361
  toast.showMessage({
@@ -924,7 +1368,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
924
1368
  });
925
1369
  return;
926
1370
  }
927
- void tagsStore.fetchAll({ withUsageCount: true });
928
1371
  if (testId.value) {
929
1372
  await loadTestData(testId.value);
930
1373
  } else {
@@ -949,8 +1392,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
949
1392
  toast.showError(e, locale.baseText("testDefinition.edit.testSaveFailed"));
950
1393
  }
951
1394
  }
952
- function hasIssues(key) {
953
- return fieldsIssues.value.some((issue) => issue.field === key);
1395
+ function getFieldIssues(key) {
1396
+ return fieldsIssues.value.filter((issue) => issue.field === key);
954
1397
  }
955
1398
  async function onDeleteMetric(deletedMetric) {
956
1399
  if (deletedMetric.id) {
@@ -978,6 +1421,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
978
1421
  (run) => run.testDefinitionId === testId.value
979
1422
  )
980
1423
  );
1424
+ const isRunning = computed(() => runs2.value.some((run) => run.status === "running"));
1425
+ const isRunTestEnabled = computed(() => fieldsIssues.value.length === 0 && !isRunning.value);
981
1426
  async function onDeleteRuns(toDelete) {
982
1427
  await Promise.all(
983
1428
  toDelete.map(async (run) => {
@@ -1005,296 +1450,89 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1005
1450
  { deep: true }
1006
1451
  );
1007
1452
  return (_ctx, _cache) => {
1008
- const _component_n8n_button = resolveComponent("n8n-button");
1009
- const _component_MetricsChart = __unplugin_components_0$2;
1010
- const _component_BlockArrow = __unplugin_components_1;
1011
- const _component_font_awesome_icon = resolveComponent("font-awesome-icon");
1012
- const _component_N8nHeading = resolveComponent("N8nHeading");
1013
- const _component_NodesPinning = __unplugin_components_2;
1014
1453
  return openBlock(), createElementBlock("div", {
1015
1454
  class: normalizeClass([_ctx.$style.container, { [_ctx.$style.noRuns]: !hasRuns.value }])
1016
1455
  }, [
1017
- createBaseVNode("div", {
1018
- class: normalizeClass(_ctx.$style.headerSection)
1019
- }, [
1020
- createBaseVNode("div", {
1021
- class: normalizeClass(_ctx.$style.headerMeta)
1022
- }, [
1023
- createBaseVNode("div", {
1024
- class: normalizeClass(_ctx.$style.name)
1025
- }, [
1026
- createVNode(EvaluationHeader, {
1027
- modelValue: unref(state).name,
1028
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => unref(state).name = $event),
1029
- class: normalizeClass({ "has-issues": hasIssues("name") }),
1030
- "start-editing": unref(startEditing),
1031
- "save-changes": unref(saveChanges),
1032
- "handle-keydown": unref(handleKeydown)
1033
- }, null, 8, ["modelValue", "class", "start-editing", "save-changes", "handle-keydown"]),
1034
- createBaseVNode("div", {
1035
- class: normalizeClass(_ctx.$style.lastSaved)
1036
- }, [
1037
- unref(isSaving) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
1038
- createTextVNode(toDisplayString(unref(locale).baseText("testDefinition.edit.saving")), 1)
1039
- ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
1040
- createTextVNode(toDisplayString(unref(locale).baseText("testDefinition.edit.saved")), 1)
1041
- ], 64))
1042
- ], 2)
1043
- ], 2),
1044
- createVNode(DescriptionInput, {
1045
- modelValue: unref(state).description,
1046
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => unref(state).description = $event),
1047
- "start-editing": unref(startEditing),
1048
- "save-changes": unref(saveChanges),
1049
- "handle-keydown": unref(handleKeydown),
1050
- class: normalizeClass(_ctx.$style.descriptionInput)
1051
- }, null, 8, ["modelValue", "start-editing", "save-changes", "handle-keydown", "class"])
1052
- ], 2),
1053
- createBaseVNode("div", {
1054
- class: normalizeClass(_ctx.$style.controls)
1055
- }, [
1056
- runs2.value.length > 0 ? (openBlock(), createBlock(_component_n8n_button, {
1057
- key: 0,
1058
- size: "small",
1059
- icon: showConfig.value ? "eye-slash" : "eye",
1060
- "data-test-id": "toggle-config-button",
1061
- label: showConfig.value ? unref(locale).baseText("testDefinition.edit.hideConfig") : unref(locale).baseText("testDefinition.edit.showConfig"),
1062
- type: "tertiary",
1063
- onClick: toggleConfig
1064
- }, null, 8, ["icon", "label"])) : createCommentVNode("", true),
1065
- unref(state).evaluationWorkflow.value && unref(state).tags.value.length > 0 ? (openBlock(), createBlock(_component_n8n_button, {
1066
- key: 1,
1067
- class: normalizeClass(_ctx.$style.runTestButton),
1068
- size: "small",
1069
- "data-test-id": "run-test-button",
1070
- label: unref(locale).baseText("testDefinition.runTest"),
1071
- type: "primary",
1072
- onClick: runTest
1073
- }, null, 8, ["class", "label"])) : (openBlock(), createBlock(_component_n8n_button, {
1074
- key: 2,
1075
- class: normalizeClass(_ctx.$style.runTestButton),
1076
- size: "small",
1077
- "data-test-id": "run-test-button",
1078
- label: unref(locale).baseText("testDefinition.edit.saveTest"),
1079
- type: "primary",
1080
- onClick: onSaveTest
1081
- }, null, 8, ["class", "label"]))
1082
- ], 2)
1083
- ], 2),
1456
+ createVNode(HeaderSection, {
1457
+ name: unref(state).name,
1458
+ "onUpdate:name": _cache[0] || (_cache[0] = ($event) => unref(state).name = $event),
1459
+ description: unref(state).description,
1460
+ "onUpdate:description": _cache[1] || (_cache[1] = ($event) => unref(state).description = $event),
1461
+ tags: unref(state).tags,
1462
+ "onUpdate:tags": _cache[2] || (_cache[2] = ($event) => unref(state).tags = $event),
1463
+ "has-runs": hasRuns.value,
1464
+ "is-saving": unref(isSaving),
1465
+ "get-field-issues": getFieldIssues,
1466
+ "start-editing": unref(startEditing),
1467
+ "save-changes": unref(saveChanges),
1468
+ "handle-keydown": unref(handleKeydown),
1469
+ "on-save-test": onSaveTest,
1470
+ "run-test": runTest,
1471
+ "show-config": showConfig.value,
1472
+ "toggle-config": toggleConfig,
1473
+ "run-test-enabled": isRunTestEnabled.value
1474
+ }, {
1475
+ runTestTooltip: withCtx(() => [
1476
+ fieldsIssues.value.length > 0 ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
1477
+ createBaseVNode("div", null, toDisplayString(unref(locale).baseText("testDefinition.completeConfig")), 1),
1478
+ (openBlock(true), createElementBlock(Fragment, null, renderList(fieldsIssues.value, (issue) => {
1479
+ return openBlock(), createElementBlock("div", {
1480
+ key: issue.field
1481
+ }, "- " + toDisplayString(issue.message), 1);
1482
+ }), 128))
1483
+ ], 64)) : createCommentVNode("", true),
1484
+ isRunning.value ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
1485
+ createTextVNode(toDisplayString(unref(locale).baseText("testDefinition.testIsRunning")), 1)
1486
+ ], 64)) : createCommentVNode("", true)
1487
+ ]),
1488
+ _: 1
1489
+ }, 8, ["name", "description", "tags", "has-runs", "is-saving", "start-editing", "save-changes", "handle-keydown", "show-config", "run-test-enabled"]),
1084
1490
  createBaseVNode("div", {
1085
1491
  class: normalizeClass(_ctx.$style.content)
1086
1492
  }, [
1087
- runs2.value.length > 0 ? (openBlock(), createElementBlock("div", {
1493
+ runs2.value.length > 0 ? (openBlock(), createBlock(RunsSection, {
1088
1494
  key: 0,
1089
- class: normalizeClass(_ctx.$style.runs)
1090
- }, [
1091
- createVNode(_component_MetricsChart, {
1092
- selectedMetric: selectedMetric.value,
1093
- "onUpdate:selectedMetric": _cache[2] || (_cache[2] = ($event) => selectedMetric.value = $event),
1094
- runs: runs2.value,
1095
- theme: appliedTheme.value
1096
- }, null, 8, ["selectedMetric", "runs", "theme"]),
1097
- createVNode(TestRunsTable, {
1098
- class: normalizeClass(_ctx.$style.runsTable),
1099
- runs: runs2.value,
1100
- selectable: true,
1101
- "data-test-id": "past-runs-table",
1102
- onDeleteRuns
1103
- }, null, 8, ["class", "runs"])
1104
- ], 2)) : createCommentVNode("", true),
1105
- createBaseVNode("div", {
1106
- class: normalizeClass([_ctx.$style.panelBlock, { [_ctx.$style.hidden]: !showConfig.value }])
1107
- }, [
1108
- createBaseVNode("div", {
1109
- class: normalizeClass(_ctx.$style.panelIntro)
1110
- }, toDisplayString(unref(locale).baseText("testDefinition.edit.step.intro")), 3),
1111
- createVNode(_component_BlockArrow, {
1112
- class: normalizeClass(_ctx.$style.introArrow)
1113
- }, null, 8, ["class"]),
1114
- createVNode(EvaluationStep, {
1115
- class: normalizeClass(_ctx.$style.step),
1116
- title: unref(locale).baseText("testDefinition.edit.step.executions", {
1117
- adjustToNumber: tagUsageCount.value
1118
- }),
1119
- description: unref(locale).baseText("testDefinition.edit.step.executions.description")
1120
- }, {
1121
- icon: withCtx(() => [
1122
- createVNode(_component_font_awesome_icon, {
1123
- icon: "history",
1124
- size: "lg"
1125
- })
1126
- ]),
1127
- cardContent: withCtx(() => [
1128
- createVNode(TagsInput, {
1129
- modelValue: unref(state).tags,
1130
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => unref(state).tags = $event),
1131
- class: normalizeClass({ "has-issues": hasIssues("tags") }),
1132
- "all-tags": allTags.value,
1133
- "tags-by-id": tagsById.value,
1134
- "is-loading": isLoading.value,
1135
- "start-editing": unref(startEditing),
1136
- "save-changes": unref(saveChanges),
1137
- "cancel-editing": unref(cancelEditing),
1138
- "create-tag": handleCreateTag
1139
- }, null, 8, ["modelValue", "class", "all-tags", "tags-by-id", "is-loading", "start-editing", "save-changes", "cancel-editing"])
1140
- ]),
1141
- _: 1
1142
- }, 8, ["class", "title", "description"]),
1143
- createBaseVNode("div", {
1144
- class: normalizeClass(_ctx.$style.evaluationArrows)
1145
- }, [
1146
- createVNode(_component_BlockArrow),
1147
- createVNode(_component_BlockArrow)
1148
- ], 2),
1149
- createVNode(EvaluationStep, {
1150
- class: normalizeClass(_ctx.$style.step),
1151
- title: unref(locale).baseText("testDefinition.edit.step.mockedNodes", {
1152
- adjustToNumber: unref(state).mockedNodes?.length ?? 0
1153
- }),
1154
- small: true,
1155
- expanded: true,
1156
- description: unref(locale).baseText("testDefinition.edit.step.nodes.description")
1157
- }, {
1158
- icon: withCtx(() => [
1159
- createVNode(_component_font_awesome_icon, {
1160
- icon: "thumbtack",
1161
- size: "lg"
1162
- })
1163
- ]),
1164
- cardContent: withCtx(() => [
1165
- createVNode(_component_n8n_button, {
1166
- size: "small",
1167
- "data-test-id": "select-nodes-button",
1168
- label: unref(locale).baseText("testDefinition.edit.selectNodes"),
1169
- type: "tertiary",
1170
- onClick: openPinningModal
1171
- }, null, 8, ["label"])
1172
- ]),
1173
- _: 1
1174
- }, 8, ["class", "title", "description"]),
1175
- createVNode(EvaluationStep, {
1176
- class: normalizeClass(_ctx.$style.step),
1177
- title: unref(locale).baseText("testDefinition.edit.step.reRunExecutions"),
1178
- small: true,
1179
- description: unref(locale).baseText("testDefinition.edit.step.reRunExecutions.description")
1180
- }, {
1181
- icon: withCtx(() => [
1182
- createVNode(_component_font_awesome_icon, {
1183
- icon: "redo",
1184
- size: "lg"
1185
- })
1186
- ]),
1187
- _: 1
1188
- }, 8, ["class", "title", "description"]),
1189
- createVNode(EvaluationStep, {
1190
- class: normalizeClass(_ctx.$style.step),
1191
- title: unref(locale).baseText("testDefinition.edit.step.compareExecutions"),
1192
- description: unref(locale).baseText("testDefinition.edit.step.compareExecutions.description")
1193
- }, {
1194
- icon: withCtx(() => [
1195
- createVNode(_component_font_awesome_icon, {
1196
- icon: "equals",
1197
- size: "lg"
1198
- })
1199
- ]),
1200
- cardContent: withCtx(() => [
1201
- createVNode(_sfc_main$2, {
1202
- modelValue: unref(state).evaluationWorkflow,
1203
- "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => unref(state).evaluationWorkflow = $event),
1204
- class: normalizeClass({ "has-issues": hasIssues("evaluationWorkflow") })
1205
- }, null, 8, ["modelValue", "class"])
1206
- ]),
1207
- _: 1
1208
- }, 8, ["class", "title", "description"]),
1209
- createVNode(EvaluationStep, {
1210
- class: normalizeClass(_ctx.$style.step),
1211
- title: unref(locale).baseText("testDefinition.edit.step.metrics"),
1212
- description: unref(locale).baseText("testDefinition.edit.step.metrics.description")
1213
- }, {
1214
- icon: withCtx(() => [
1215
- createVNode(_component_font_awesome_icon, {
1216
- icon: "chart-bar",
1217
- size: "lg"
1218
- })
1219
- ]),
1220
- cardContent: withCtx(() => [
1221
- createVNode(MetricsInput, {
1222
- modelValue: unref(state).metrics,
1223
- "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => unref(state).metrics = $event),
1224
- class: normalizeClass({ "has-issues": hasIssues("metrics") }),
1225
- onDeleteMetric
1226
- }, null, 8, ["modelValue", "class"])
1227
- ]),
1228
- _: 1
1229
- }, 8, ["class", "title", "description"])
1230
- ], 2)
1231
- ], 2),
1232
- createVNode(Modal, {
1233
- ref_key: "nodePinningModal",
1234
- ref: nodePinningModal,
1235
- width: "80vw",
1236
- height: "85vh",
1237
- name: unref(NODE_PINNING_MODAL_KEY)
1238
- }, {
1239
- header: withCtx(() => [
1240
- createVNode(_component_N8nHeading, {
1241
- size: "large",
1242
- bold: true,
1243
- class: normalizeClass(_ctx.$style.runsTableHeading)
1244
- }, {
1245
- default: withCtx(() => [
1246
- createTextVNode(toDisplayString(unref(locale).baseText("testDefinition.edit.selectNodes")), 1)
1247
- ]),
1248
- _: 1
1249
- }, 8, ["class"])
1250
- ]),
1251
- content: withCtx(() => [
1252
- createVNode(_component_NodesPinning, {
1253
- modelValue: unref(state).mockedNodes,
1254
- "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => unref(state).mockedNodes = $event),
1255
- width: modalContentWidth.value,
1256
- "data-test-id": "nodes-pinning-modal"
1257
- }, null, 8, ["modelValue", "width"])
1258
- ]),
1259
- _: 1
1260
- }, 8, ["name"])
1495
+ selectedMetric: selectedMetric.value,
1496
+ "onUpdate:selectedMetric": _cache[3] || (_cache[3] = ($event) => selectedMetric.value = $event),
1497
+ runs: runs2.value,
1498
+ "test-id": testId.value,
1499
+ "applied-theme": appliedTheme.value,
1500
+ onDeleteRuns
1501
+ }, null, 8, ["selectedMetric", "runs", "test-id", "applied-theme"])) : createCommentVNode("", true),
1502
+ createVNode(ConfigSection, {
1503
+ tags: unref(state).tags,
1504
+ "onUpdate:tags": _cache[4] || (_cache[4] = ($event) => unref(state).tags = $event),
1505
+ evaluationWorkflow: unref(state).evaluationWorkflow,
1506
+ "onUpdate:evaluationWorkflow": _cache[5] || (_cache[5] = ($event) => unref(state).evaluationWorkflow = $event),
1507
+ metrics: unref(state).metrics,
1508
+ "onUpdate:metrics": _cache[6] || (_cache[6] = ($event) => unref(state).metrics = $event),
1509
+ mockedNodes: unref(state).mockedNodes,
1510
+ "onUpdate:mockedNodes": _cache[7] || (_cache[7] = ($event) => unref(state).mockedNodes = $event),
1511
+ "cancel-editing": unref(cancelEditing),
1512
+ "show-config": showConfig.value,
1513
+ "tag-usage-count": tagUsageCount.value,
1514
+ "all-tags": allTags.value,
1515
+ "tags-by-id": tagsById.value,
1516
+ "is-loading": isLoading.value,
1517
+ "get-field-issues": getFieldIssues,
1518
+ "start-editing": unref(startEditing),
1519
+ "save-changes": unref(saveChanges),
1520
+ "create-tag": handleCreateTag,
1521
+ onOpenPinningModal: openPinningModal,
1522
+ onDeleteMetric
1523
+ }, null, 8, ["tags", "evaluationWorkflow", "metrics", "mockedNodes", "cancel-editing", "show-config", "tag-usage-count", "all-tags", "tags-by-id", "is-loading", "start-editing", "save-changes"])
1524
+ ], 2)
1261
1525
  ], 2);
1262
1526
  };
1263
1527
  }
1264
1528
  });
1265
- const container = "_container_y9ejv_123";
1266
- const content = "_content_y9ejv_141";
1267
- const noRuns = "_noRuns_y9ejv_146";
1268
- const headerSection = "_headerSection_y9ejv_151";
1269
- const headerMeta = "_headerMeta_y9ejv_159";
1270
- const name = "_name_y9ejv_163";
1271
- const lastSaved = "_lastSaved_y9ejv_167";
1272
- const descriptionInput = "_descriptionInput_y9ejv_172";
1273
- const runs = "_runs_y9ejv_176";
1274
- const panelBlock = "_panelBlock_y9ejv_190";
1275
- const hidden = "_hidden_y9ejv_200";
1276
- const panelIntro = "_panelIntro_y9ejv_210";
1277
- const step = "_step_y9ejv_218";
1278
- const introArrow = "_introArrow_y9ejv_225";
1279
- const evaluationArrows = "_evaluationArrows_y9ejv_231";
1280
- const controls = "_controls_y9ejv_242";
1529
+ const container = "_container_wdela_123";
1530
+ const content = "_content_wdela_141";
1531
+ const noRuns = "_noRuns_wdela_146";
1281
1532
  const style0 = {
1282
1533
  container,
1283
1534
  content,
1284
- noRuns,
1285
- headerSection,
1286
- headerMeta,
1287
- name,
1288
- lastSaved,
1289
- descriptionInput,
1290
- runs,
1291
- panelBlock,
1292
- hidden,
1293
- panelIntro,
1294
- step,
1295
- introArrow,
1296
- evaluationArrows,
1297
- controls
1535
+ noRuns
1298
1536
  };
1299
1537
  const cssModules = {
1300
1538
  "$style": style0