n8n-editor-ui 1.93.0 → 1.95.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 (128) hide show
  1. package/dist/assets/{AnimatedSpinner-hbTZDd93.js → AnimatedSpinner-DlBYfeum.js} +1 -1
  2. package/dist/assets/{AnnotationTagsDropdown.ee.vue_vue_type_script_setup_true_lang-CYzc5StE.js → AnnotationTagsDropdown.ee.vue_vue_type_script_setup_true_lang-b_VpBPcV.js} +1 -1
  3. package/dist/assets/{AuthView-8SLMP0H_.js → AuthView-3BmNl_WD.js} +2 -2
  4. package/dist/assets/{CanvasChatSwitch-Dt8TgNJg.js → CanvasChatSwitch-C8GVNbZv.js} +16 -18
  5. package/dist/assets/{ChangePasswordView-DIRyDp89.js → ChangePasswordView-HptU1MSc.js} +3 -3
  6. package/dist/assets/CollectionParameter-DB_Or-wG.js +4 -0
  7. package/dist/assets/{CredentialsView-B6-VxAJ6.js → CredentialsView-Dx5hgaaC.js} +7 -7
  8. package/dist/assets/{DemoFooter-CIHwH5PG.js → DemoFooter-BkSVK4cp.js} +6 -8
  9. package/dist/assets/{ErrorView-C7i0TZwT.js → ErrorView-HDHwqLgc.js} +1 -1
  10. package/dist/assets/EvaluationsRootView-B5AhHo41.css +594 -0
  11. package/dist/assets/EvaluationsRootView-CwzFA39P.js +654 -0
  12. package/dist/assets/{TestDefinitionListView-Di-Edppe.css → EvaluationsView-6l_Invxt.css} +193 -76
  13. package/dist/assets/EvaluationsView-Y_Nzp-LP.js +570 -0
  14. package/dist/assets/{ExecutionsTime.vue_vue_type_script_setup_true_lang--2G21NNR.js → ExecutionsTime.vue_vue_type_script_setup_true_lang-BioZloew.js} +2 -2
  15. package/dist/assets/{ExecutionsView-C_YtciAr.js → ExecutionsView-SVk21vMq.js} +18 -18
  16. package/dist/assets/{FileSaver.min-bgn7Q9Gt.js → FileSaver.min-ZbRn_Jz1.js} +1 -1
  17. package/dist/assets/{FixedCollectionParameter-BPCJ5aaq.js → FixedCollectionParameter-iCfhPCTX.js} +1 -1
  18. package/dist/assets/{ForgotMyPasswordView-DyUaGd6Z.js → ForgotMyPasswordView-DID5un7M.js} +3 -3
  19. package/dist/assets/{InsightsChartAverageRuntime-BB2I2vpV.js → InsightsChartAverageRuntime-Db4OWo7M.js} +4 -4
  20. package/dist/assets/{InsightsChartFailed-CN_Rl3Bl.js → InsightsChartFailed-DjssZ9vc.js} +4 -4
  21. package/dist/assets/{InsightsChartFailureRate-CHKlg6tg.js → InsightsChartFailureRate-C4U_fOhA.js} +4 -4
  22. package/dist/assets/{InsightsChartTimeSaved-Cd05cM8q.js → InsightsChartTimeSaved-DmcamM8z.js} +4 -4
  23. package/dist/assets/{InsightsChartTotal-ChAO7myf.js → InsightsChartTotal-ywrK30zz.js} +4 -4
  24. package/dist/assets/{InsightsDashboard-Bx4vx9gz.css → InsightsDashboard-BSrakbzr.css} +42 -8
  25. package/dist/assets/{InsightsDashboard-BeCfBVUz.js → InsightsDashboard-CM-ieUCq.js} +43 -41
  26. package/dist/assets/{InsightsPaywall-Chz8CDc3.js → InsightsPaywall-D-bIgmwT.js} +1 -1
  27. package/dist/assets/InsightsSummary-CwTpu3sa.js +209 -0
  28. package/dist/assets/{InsightsSummary-CdlaUpAt.css → InsightsSummary-DzGQpM5h.css} +27 -24
  29. package/dist/assets/{InsightsTableWorkflows-5rpYY7YT.js → InsightsTableWorkflows-CVtm_fGN.js} +5 -6
  30. package/dist/assets/{InsightsTableWorkflows-Blv_GPUj.css → InsightsTableWorkflows-DfTZQkWL.css} +3 -4
  31. package/dist/assets/{Logo-DUDCllkm.js → Logo-nyJoHWQJ.js} +1 -1
  32. package/dist/assets/{LogsPanel-mTaFEGk_.css → LogsPanel-D7j-yJQx.css} +14 -14
  33. package/dist/assets/{LogsPanel-D9r5AcQH.js → LogsPanel-mX9Nf6VB.js} +457 -360
  34. package/dist/assets/{MainHeader-DkKOOZ_D.js → MainHeader-DrG-_mAG.js} +35 -25
  35. package/dist/assets/{MainHeader-CEMGASqv.css → MainHeader-Y95RcfHb.css} +18 -18
  36. package/dist/assets/{MainSidebar-ZUBIWeXm.js → MainSidebar-BMWCsLJG.js} +2 -2
  37. package/dist/assets/{NodeCreation-DCfAFuL5.js → NodeCreation-CO1xHNgA.js} +3 -4
  38. package/dist/assets/{NodeCreator-a0YVv1IE.js → NodeCreator-Bcr66G_2.js} +174 -69
  39. package/dist/assets/{NodeCreator-D18StsVZ.css → NodeCreator-Cp8Apzva.css} +38 -21
  40. package/dist/assets/{NodeDetailsView-C5_hVJzj.js → NodeDetailsView-BFW65Lly.js} +42 -19
  41. package/dist/assets/{NodeDetailsView-pYP-34nS.css → NodeDetailsView-BtWGMS7Y.css} +16 -16
  42. package/dist/assets/{useCanvasMapping-CTTq6x8X.js → NodeView-4aDk41Oy.js} +3559 -11337
  43. package/dist/assets/{useCanvasMapping-VtpW_QZA.css → NodeView-U4YkXSfU.css} +309 -6
  44. package/dist/assets/{ProjectCardBadge-DRlDZx3d.js → ProjectCardBadge-CLVVfcVb.js} +1 -1
  45. package/dist/assets/{ProjectHeader-DNm605Kk.js → ProjectHeader-DQk1kmw3.js} +2 -2
  46. package/dist/assets/{ProjectSettings-Dge_6KaR.js → ProjectSettings-BLTHRnTQ.js} +15 -4
  47. package/dist/assets/{PushConnectionTracker.vue_vue_type_script_setup_true_lang-CUf0LkWR.js → PushConnectionTracker.vue_vue_type_script_setup_true_lang-DhLSSpy6.js} +1 -1
  48. package/dist/assets/{ResourcesListLayout-Bbl-1i4l.js → ResourcesListLayout-BlDcQdXw.js} +2 -2
  49. package/dist/assets/{RunData-b0RE2JWc.js → RunData-C67Kx3bc.js} +234 -92
  50. package/dist/assets/{RunData-DQeENuzG.css → RunData-CE5FsU6k.css} +2 -2
  51. package/dist/assets/{RunDataAi-DnWcCR_0.js → RunDataAi-_rd0qTgN.js} +3 -4
  52. package/dist/assets/{RunDataJson-CptVuHuA.js → RunDataJson-BP0x4Zdv.js} +6 -7
  53. package/dist/assets/{RunDataJsonActions-3jjDztw7.js → RunDataJsonActions-Bc0fqS6Y.js} +1 -1
  54. package/dist/assets/{RunDataParsedAiContent-BbXv-NPD.js → RunDataParsedAiContent-l1979DuT.js} +4 -5
  55. package/dist/assets/{RunDataSearch-B90wjsDA.js → RunDataSearch-CCGPQjFW.js} +1 -1
  56. package/dist/assets/{RunDataTable-CpS78GlT.js → RunDataTable-uzdBjxmW.js} +2 -3
  57. package/dist/assets/{SamlOnboarding-Ch9K5rRW.js → SamlOnboarding-D4xkCaRS.js} +3 -3
  58. package/dist/assets/{SettingsApiView-9GU5n_rm.js → SettingsApiView-ijuSJs-i.js} +1 -1
  59. package/dist/assets/{SettingsCommunityNodesView-CPnVRzNX.js → SettingsCommunityNodesView-D3I8P7Ea.js} +4 -4
  60. package/dist/assets/{SettingsExternalSecrets-D7xTMV9h.js → SettingsExternalSecrets-ndwnYVtu.js} +1 -1
  61. package/dist/assets/{SettingsLdapView-OfrjGKkt.js → SettingsLdapView-Dzhh3gD4.js} +1 -1
  62. package/dist/assets/{SettingsLogStreamingView-C_VnOaeX.js → SettingsLogStreamingView-D-Rr-Jph.js} +1 -1
  63. package/dist/assets/{SettingsPersonalView-Dm24akPV.js → SettingsPersonalView-Cf1cBUw8.js} +1 -1
  64. package/dist/assets/{SettingsSourceControl-DDCmL82j.js → SettingsSourceControl-BXRyD_N0.js} +1 -1
  65. package/dist/assets/{SettingsSso-BGGQ0Cpg.js → SettingsSso-DZTsjRCO.js} +1 -1
  66. package/dist/assets/{SettingsUsageAndPlan-BzO_zdkH.js → SettingsUsageAndPlan-BqY4ptNL.js} +1 -1
  67. package/dist/assets/{SettingsUsersView-DHQUqhqB.js → SettingsUsersView-eqXFp615.js} +1 -1
  68. package/dist/assets/{SettingsView-CbtAqjOX.js → SettingsView-CHSTMDKz.js} +1 -1
  69. package/dist/assets/{SetupView-BME1OE6U.js → SetupView-D6-b4i8i.js} +3 -3
  70. package/dist/assets/{SetupWorkflowCredentialsButton-DZr4TCPC.js → SetupWorkflowCredentialsButton-6SWeqGx-.js} +1 -1
  71. package/dist/assets/{SetupWorkflowFromTemplateView-CPkKEY04.js → SetupWorkflowFromTemplateView-DTZ8dEhY.js} +3 -3
  72. package/dist/assets/{SigninView-DUeRvOiY.js → SigninView-B3mpecGJ.js} +3 -3
  73. package/dist/assets/{SignoutView-BC7SBunZ.js → SignoutView-Bq9cEhcZ.js} +1 -1
  74. package/dist/assets/{SignupView-B5ecYJ2q.js → SignupView-BTyAq-gW.js} +3 -3
  75. package/dist/assets/{TemplateDetails-DjanZgC1.js → TemplateDetails-Bf7Xg-KJ.js} +1 -1
  76. package/dist/assets/{TemplateList-8TyNGxY-.js → TemplateList-BmXxTP4v.js} +1 -1
  77. package/dist/assets/{TemplatesCollectionView-BkH4pJCv.js → TemplatesCollectionView-DKwycT_4.js} +5 -5
  78. package/dist/assets/{TemplatesSearchView-Bcdhi1SL.js → TemplatesSearchView-ciluP1sL.js} +3 -3
  79. package/dist/assets/{TemplatesView-De2XB6We.js → TemplatesView-CDdQbnxe.js} +1 -1
  80. package/dist/assets/{TemplatesWorkflowView-BVnwtrMa.js → TemplatesWorkflowView-uQ3eG-nR.js} +5 -5
  81. package/dist/assets/{VariablesView-BZCvPfan.js → VariablesView-Bve2WEng.js} +4 -4
  82. package/dist/assets/{WorkerView-CigxqnWi.js → WorkerView-CUyaAqvY.js} +6 -6
  83. package/dist/assets/{WorkflowActivator-B7jRy4L1.js → WorkflowActivator-DZSvs7Ye.js} +11 -9
  84. package/dist/assets/{WorkflowExecutionsInfoAccordion-C_ZycbsF.js → WorkflowExecutionsInfoAccordion-DTbkpnyq.js} +1 -1
  85. package/dist/assets/{WorkflowExecutionsLandingPage-DOqrfKlC.js → WorkflowExecutionsLandingPage-DNc0pN7t.js} +2 -2
  86. package/dist/assets/{WorkflowExecutionsPreview-B4Cj2gXW.js → WorkflowExecutionsPreview-SdFojcu-.js} +5 -6
  87. package/dist/assets/{WorkflowExecutionsView-RXfP7zkJ.js → WorkflowExecutionsView-CAbXPlyv.js} +10 -11
  88. package/dist/assets/{WorkflowHistory-DrXrRwIS.js → WorkflowHistory-BIFuha5h.js} +3 -3
  89. package/dist/assets/{WorkflowOnboardingView-CXH1vCW2.js → WorkflowOnboardingView-DLRgnF3H.js} +1 -1
  90. package/dist/assets/{WorkflowPreview-B_MuFEV8.js → WorkflowPreview-DRSvh1f-.js} +1 -1
  91. package/dist/assets/{WorkflowsView-D90hfJ35.js → WorkflowsView-DOQhvV_X.js} +9 -9
  92. package/dist/assets/{useClearExecutionButtonVisible-Dwc1_eG9.js → canvas-CdHFQJm7.js} +3 -2
  93. package/dist/assets/{chartjs.utils-DalQn9bk.js → chartjs.utils-hlpJdzhb.js} +2 -2
  94. package/dist/assets/{easyAiWorkflowUtils-kgtpBx2h.js → easyAiWorkflowUtils-GnIqpmRr.js} +1 -1
  95. package/dist/assets/{global-link-actions-CnWOMvqA.js → global-link-actions-CExoAUZJ.js} +1 -1
  96. package/dist/assets/{import-curl-BvX_O56D.js → import-curl-D2S8-TVc.js} +1 -1
  97. package/dist/assets/{index-DZ6VpjNj.js → index-BSlk84mz.js} +79639 -67526
  98. package/dist/assets/{index-yNaoC3fo.css → index-DH8MNLw5.css} +195 -488
  99. package/dist/assets/{index-Bb2NNknG.js → index-lOeP0Jxq.js} +1 -1
  100. package/dist/assets/{pickBy-B_HGYyxS.js → pickBy-BoYQMT9v.js} +1 -1
  101. package/dist/assets/{polyfills-CLZ4X0Ad.js → polyfills-J2x06Gdp.js} +157 -224
  102. package/dist/assets/{templateActions-DQfZ3ni5.js → templateActions-CAEk7dfj.js} +1 -1
  103. package/dist/assets/{typescript.worker-BsxN2afA.js → typescript.worker-DIrCbxuR.js} +2 -2
  104. package/dist/assets/{useBeforeUnload-Cu0LPVWe.js → useBeforeUnload-COWlK6zC.js} +1 -1
  105. package/dist/assets/{useExecutionDebugging-rc72wLIp.js → useExecutionDebugging-DOtIA9Qr.js} +1 -1
  106. package/dist/assets/{useExecutionHelpers-DqwMonFW.js → useExecutionHelpers-q1_8c2Pm.js} +2 -3
  107. package/dist/assets/{useImportCurlCommand-D_onuFvo.js → useImportCurlCommand-CbwqixK0.js} +2 -2
  108. package/dist/assets/{useProjectPages-e8b03-5_.js → useProjectPages-DlqnxMvy.js} +1 -1
  109. package/dist/assets/{usePushConnection-wm-7Id6Q.js → usePushConnection-Bysa9RG-.js} +35 -111
  110. package/dist/assets/{useWorkflowActivate-65xML23U.js → useWorkflowActivate-B1ps647W.js} +1 -1
  111. package/dist/assets/{useWorkflowSaving-CUel20JA.js → useWorkflowSaving-BVNVyvlZ.js} +1 -1
  112. package/dist/index.html +3 -3
  113. package/package.json +1 -1
  114. package/tsconfig.json +1 -0
  115. package/vite.config.mts +4 -0
  116. package/dist/assets/CollectionParameter-Cj4t6-hd.js +0 -4
  117. package/dist/assets/InsightsSummary-MECenLJQ.js +0 -207
  118. package/dist/assets/NodeView-Bk9h8GYy.js +0 -1719
  119. package/dist/assets/NodeView-C3A-bM1O.css +0 -304
  120. package/dist/assets/TestDefinitionEditView-Cwkrz308.css +0 -1189
  121. package/dist/assets/TestDefinitionEditView-DjmPnrTk.js +0 -1464
  122. package/dist/assets/TestDefinitionListView-BL2s_qBZ.js +0 -631
  123. package/dist/assets/TestDefinitionNewView-B9BqJZST.js +0 -75
  124. package/dist/assets/TestDefinitionRootView-AlWyxbc0.js +0 -39
  125. package/dist/assets/TestDefinitionRootView-DFT60fWE.css +0 -126
  126. package/dist/assets/dateFormatter-BPfJSa6q.js +0 -21
  127. package/dist/assets/useCanvasOperations-u8oSDa_u.js +0 -2834
  128. package/dist/assets/useTestDefinitionForm-DlUOnNC0.js +0 -154
@@ -1,1464 +0,0 @@
1
- import { u as useTestDefinitionForm } from "./useTestDefinitionForm-DlUOnNC0.js";
2
- import { _ as _export_sfc, i as createElementBlock, g as openBlock, k as createBaseVNode, n as normalizeClass, d as defineComponent, r as ref, Y as useCssModule, q as computed, h as resolveComponent, m as unref, j as createVNode, f as createCommentVNode, aR as N8nTooltip, w as withCtx, e as createBlock, be as N8nText, x as renderSlot, F as Fragment, l as createTextVNode, t as toDisplayString, ds as InfoTip, c as useI18n, gX as ne, Q as useWorkflowsStore, bz as useNodeTypesStore, R as useRoute, b as useRouter, gk as useModel, o as onMounted, da as N8nHeading, eh as _sfc_main$9, b7 as mergeProps, bg as N8nButton, ag as useTelemetry, a1 as useProjectsStore, gY as SAMPLE_EVALUATION_WORKFLOW, aS as N8nLink, gZ as __unplugin_components_0, V as VIEWS, gj as mergeModels, g_ as Tag, g$ as NODE_PINNING_MODAL_KEY, h0 as __unplugin_components_0$1, ai as useMessage, h1 as useCssVar, fW as dateFormat, a_ as watchEffect, D as renderList, h2 as TestTableBase, bE as N8nIcon, G as useDebounce, a as useToast, gU as useTestDefinitionStore, gy as useAnnotationTagsStore, H as useUIStore, W as useDocumentVisibility, X as watch, de as orderBy, aT as _sfc_main$a, h3 as InlineNameEdit } from "./index-DZ6VpjNj.js";
3
- import { u as useVueFlow, a as useCanvasMapping, C as Canvas, b as CanvasNode } from "./useCanvasMapping-CTTq6x8X.js";
4
- import { a as useCanvasOperations } from "./useCanvasOperations-u8oSDa_u.js";
5
- import { L as Line } from "./index-Bb2NNknG.js";
6
- import { _ as __unplugin_components_0$2 } from "./AnimatedSpinner-hbTZDd93.js";
7
- import { c as convertToDisplayDate } from "./dateFormatter-BPfJSa6q.js";
8
- const blockArrow = "_blockArrow_hbkir_123";
9
- const stalk = "_stalk_hbkir_129";
10
- const arrowHead = "_arrowHead_hbkir_136";
11
- const style0$7 = {
12
- blockArrow,
13
- stalk,
14
- arrowHead
15
- };
16
- const _sfc_main$8 = {};
17
- function _sfc_render(_ctx, _cache) {
18
- return openBlock(), createElementBlock("div", {
19
- class: normalizeClass(_ctx.$style.blockArrow)
20
- }, [
21
- createBaseVNode("div", {
22
- class: normalizeClass(_ctx.$style.stalk)
23
- }, null, 2),
24
- createBaseVNode("div", {
25
- class: normalizeClass(_ctx.$style.arrowHead)
26
- }, null, 2)
27
- ], 2);
28
- }
29
- const cssModules$7 = {
30
- "$style": style0$7
31
- };
32
- const BlockArrow = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render], ["__cssModules", cssModules$7]]);
33
- const _sfc_main$7 = /* @__PURE__ */ defineComponent({
34
- __name: "EvaluationStep",
35
- props: {
36
- title: { default: "" },
37
- warning: { type: Boolean, default: false },
38
- expanded: { type: Boolean, default: false },
39
- description: { default: "" },
40
- issues: { default: () => [] },
41
- showIssues: { type: Boolean, default: true },
42
- tooltip: {},
43
- externalTooltip: { type: Boolean }
44
- },
45
- setup(__props) {
46
- const props = __props;
47
- const locale = useI18n();
48
- const isExpanded = ref(props.expanded);
49
- const $style = useCssModule();
50
- const hasIssues = computed(() => props.issues.length > 0);
51
- const containerClass = computed(() => {
52
- return {
53
- [$style.evaluationStep]: true,
54
- [$style["has-issues"]]: true
55
- };
56
- });
57
- const toggleExpand = () => isExpanded.value = !isExpanded.value;
58
- const renderIssues = computed(() => props.showIssues && props.issues.length);
59
- const issuesList = computed(() => props.issues.map((issue) => issue.message).join(", "));
60
- const resizeModifier = {
61
- name: "resize",
62
- enabled: true,
63
- phase: "beforeWrite",
64
- requires: ["preventOverflow"],
65
- fn({ state }) {
66
- const overflow = ne(state);
67
- const MARGIN_RIGHT = 15;
68
- const maxWidth = state.rects.popper.width - overflow.right - MARGIN_RIGHT;
69
- state.styles.popper.width = `${maxWidth}px`;
70
- }
71
- };
72
- const popperModifiers = [
73
- resizeModifier,
74
- { name: "preventOverflow", options: { boundary: "document" } },
75
- { name: "flip", enabled: false }
76
- // prevent the tooltip from flipping
77
- ];
78
- return (_ctx, _cache) => {
79
- const _component_font_awesome_icon = resolveComponent("font-awesome-icon");
80
- return openBlock(), createElementBlock("div", {
81
- class: normalizeClass(containerClass.value),
82
- "data-test-id": "evaluation-step"
83
- }, [
84
- createBaseVNode("div", {
85
- class: normalizeClass(unref($style).content)
86
- }, [
87
- createVNode(unref(N8nTooltip), {
88
- placement: "right",
89
- disabled: !_ctx.externalTooltip,
90
- "show-arrow": false,
91
- "popper-class": unref($style).evaluationTooltip,
92
- "popper-options": { modifiers: popperModifiers },
93
- content: _ctx.tooltip
94
- }, {
95
- default: withCtx(() => [
96
- createBaseVNode("div", {
97
- class: normalizeClass(unref($style).header),
98
- onClick: toggleExpand
99
- }, [
100
- createBaseVNode("div", {
101
- class: normalizeClass(unref($style).label)
102
- }, [
103
- createVNode(unref(N8nText), { bold: "" }, {
104
- default: withCtx(() => [
105
- _ctx.$slots.title ? renderSlot(_ctx.$slots, "title", { key: 0 }) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
106
- createTextVNode(toDisplayString(_ctx.title), 1)
107
- ], 64))
108
- ]),
109
- _: 3
110
- }),
111
- !_ctx.externalTooltip ? (openBlock(), createBlock(unref(InfoTip), {
112
- key: 0,
113
- class: normalizeClass(unref($style).infoTip),
114
- bold: true,
115
- type: "tooltip",
116
- theme: "info",
117
- "tooltip-placement": "top",
118
- enterable: false
119
- }, {
120
- default: withCtx(() => [
121
- createTextVNode(toDisplayString(_ctx.tooltip), 1)
122
- ]),
123
- _: 1
124
- }, 8, ["class"])) : createCommentVNode("", true)
125
- ], 2),
126
- createBaseVNode("div", {
127
- class: normalizeClass(unref($style).actions)
128
- }, [
129
- renderIssues.value ? (openBlock(), createBlock(unref(InfoTip), {
130
- key: 0,
131
- bold: true,
132
- type: "tooltip",
133
- theme: "warning",
134
- "tooltip-placement": "top",
135
- enterable: false
136
- }, {
137
- default: withCtx(() => [
138
- createTextVNode(toDisplayString(issuesList.value), 1)
139
- ]),
140
- _: 1
141
- })) : createCommentVNode("", true),
142
- _ctx.$slots.cardContent ? (openBlock(), createBlock(unref(N8nText), {
143
- key: 1,
144
- "data-test-id": "evaluation-step-collapse-button",
145
- size: "xsmall",
146
- color: hasIssues.value ? "primary" : "text-base",
147
- bold: ""
148
- }, {
149
- default: withCtx(() => [
150
- createTextVNode(toDisplayString(isExpanded.value ? unref(locale).baseText("testDefinition.edit.step.collapse") : unref(locale).baseText("testDefinition.edit.step.configure")) + " ", 1),
151
- createVNode(_component_font_awesome_icon, {
152
- icon: isExpanded.value ? "angle-up" : "angle-down",
153
- size: "lg"
154
- }, null, 8, ["icon"])
155
- ]),
156
- _: 1
157
- }, 8, ["color"])) : createCommentVNode("", true)
158
- ], 2)
159
- ], 2)
160
- ]),
161
- _: 3
162
- }, 8, ["disabled", "popper-class", "popper-options", "content"]),
163
- _ctx.$slots.cardContent && isExpanded.value ? (openBlock(), createElementBlock("div", {
164
- key: 0,
165
- class: normalizeClass(unref($style).cardContentWrapper)
166
- }, [
167
- createBaseVNode("div", {
168
- class: normalizeClass(unref($style).cardContent),
169
- "data-test-id": "evaluation-step-content"
170
- }, [
171
- _ctx.description ? (openBlock(), createBlock(unref(N8nText), {
172
- key: 0,
173
- size: "small",
174
- color: "text-light"
175
- }, {
176
- default: withCtx(() => [
177
- createTextVNode(toDisplayString(_ctx.description), 1)
178
- ]),
179
- _: 1
180
- })) : createCommentVNode("", true),
181
- renderSlot(_ctx.$slots, "cardContent")
182
- ], 2)
183
- ], 2)) : createCommentVNode("", true)
184
- ], 2)
185
- ], 2);
186
- };
187
- }
188
- });
189
- const evaluationStep = "_evaluationStep_1h8fm_123";
190
- const evaluationTooltip = "_evaluationTooltip_1h8fm_133";
191
- const icon = "_icon_1h8fm_141";
192
- const warning = "_warning_1h8fm_150";
193
- const content$1 = "_content_1h8fm_154";
194
- const header$1 = "_header_1h8fm_158";
195
- const label = "_label_1h8fm_166";
196
- const infoTip = "_infoTip_1h8fm_172";
197
- const actions = "_actions_1h8fm_180";
198
- const cardContent = "_cardContent_1h8fm_186";
199
- const cardContentWrapper = "_cardContentWrapper_1h8fm_192";
200
- const style0$6 = {
201
- evaluationStep,
202
- evaluationTooltip,
203
- icon,
204
- warning,
205
- content: content$1,
206
- header: header$1,
207
- label,
208
- infoTip,
209
- actions,
210
- cardContent,
211
- cardContentWrapper,
212
- "has-issues": "_has-issues_1h8fm_196"
213
- };
214
- const cssModules$6 = {
215
- "$style": style0$6
216
- };
217
- const EvaluationStep = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__cssModules", cssModules$6]]);
218
- const _sfc_main$6 = /* @__PURE__ */ defineComponent({
219
- __name: "NodesPinning",
220
- props: {
221
- "modelValue": { required: true },
222
- "modelModifiers": {}
223
- },
224
- emits: ["update:modelValue"],
225
- setup(__props) {
226
- const workflowsStore = useWorkflowsStore();
227
- const nodeTypesStore = useNodeTypesStore();
228
- const route = useRoute();
229
- const router = useRouter();
230
- const locale = useI18n();
231
- const telemetry = useTelemetry();
232
- const { resetWorkspace, initializeWorkspace } = useCanvasOperations({ router });
233
- const uuid = crypto.randomUUID();
234
- const model = useModel(__props, "modelValue");
235
- const isLoading = ref(false);
236
- const workflowId = computed(() => route.params.name);
237
- const testId = computed(() => route.params.testId);
238
- const workflow = computed(() => workflowsStore.getWorkflowById(workflowId.value));
239
- const workflowObject = computed(() => workflowsStore.getCurrentWorkflow(true));
240
- const canvasId = computed(() => `${uuid}-${testId.value}`);
241
- const { onNodesInitialized, fitView, zoomTo, onNodeClick, viewport } = useVueFlow({
242
- id: canvasId.value
243
- });
244
- const nodes = computed(() => workflow.value.nodes ?? []);
245
- const connections = computed(() => workflow.value.connections);
246
- const { nodes: mappedNodes, connections: mappedConnections } = useCanvasMapping({
247
- nodes,
248
- connections,
249
- workflowObject
250
- });
251
- async function loadData() {
252
- isLoading.value = true;
253
- workflowsStore.resetState();
254
- resetWorkspace();
255
- await Promise.all([
256
- nodeTypesStore.getNodeTypes(),
257
- workflowsStore.fetchWorkflow(workflowId.value)
258
- ]);
259
- workflow.value.pinData = {};
260
- initializeWorkspace(workflow.value);
261
- }
262
- function getNodeNameById(id) {
263
- return mappedNodes.value.find((node) => node.id === id)?.data?.name;
264
- }
265
- function isMocked(data) {
266
- return model.value.some((node) => node.id === data.id);
267
- }
268
- function canBeMocked(outputs, inputs) {
269
- return outputs.length === 1 && inputs.length >= 1;
270
- }
271
- function handleNodeClick(data) {
272
- const nodeName = getNodeNameById(data.id);
273
- if (!nodeName || !canBeMocked(data.outputs, data.inputs)) return;
274
- const mocked = isMocked(data);
275
- model.value = mocked ? model.value.filter((node) => node.id !== data.id) : model.value.concat({ name: nodeName, id: data.id });
276
- if (!mocked) {
277
- telemetry.track("User selected node to be mocked", {
278
- node_id: data.id,
279
- test_id: testId.value
280
- });
281
- }
282
- }
283
- function tooltipContent(data) {
284
- if (nodeTypesStore.isTriggerNode(data.type)) {
285
- return locale.baseText("testDefinition.edit.nodesPinning.triggerTooltip");
286
- }
287
- if (!canBeMocked(data.outputs, data.inputs)) {
288
- return;
289
- }
290
- if (isMocked(data)) {
291
- return locale.baseText("testDefinition.edit.nodesPinning.pinButtonTooltip.pinned");
292
- } else {
293
- return locale.baseText("testDefinition.edit.nodesPinning.pinButtonTooltip");
294
- }
295
- }
296
- function tooltipOffset(data) {
297
- if (nodeTypesStore.isTriggerNode(data.type)) return;
298
- return 45 * viewport.value.zoom;
299
- }
300
- function tooltipProps(data) {
301
- const content2 = tooltipContent(data);
302
- return {
303
- disabled: !content2,
304
- content: content2,
305
- offset: tooltipOffset(data)
306
- };
307
- }
308
- onNodeClick(({ node }) => handleNodeClick(node.data));
309
- onNodesInitialized(async () => {
310
- await fitView();
311
- await zoomTo(0.7);
312
- await new Promise((resolve) => setTimeout(resolve, 400));
313
- isLoading.value = false;
314
- });
315
- onMounted(loadData);
316
- return (_ctx, _cache) => {
317
- return unref(mappedNodes).length === 0 ? (openBlock(), createElementBlock("div", {
318
- key: 0,
319
- class: normalizeClass(_ctx.$style.noNodes)
320
- }, [
321
- createVNode(unref(N8nHeading), {
322
- size: "large",
323
- bold: true,
324
- class: normalizeClass(_ctx.$style.noNodesTitle)
325
- }, {
326
- default: withCtx(() => [
327
- createTextVNode(toDisplayString(unref(locale).baseText("testDefinition.edit.pinNodes.noNodes.title")), 1)
328
- ]),
329
- _: 1
330
- }, 8, ["class"]),
331
- createVNode(unref(N8nText), null, {
332
- default: withCtx(() => [
333
- createTextVNode(toDisplayString(unref(locale).baseText("testDefinition.edit.pinNodes.noNodes.description")), 1)
334
- ]),
335
- _: 1
336
- })
337
- ], 2)) : (openBlock(), createElementBlock("div", {
338
- key: 1,
339
- class: normalizeClass(_ctx.$style.container)
340
- }, [
341
- isLoading.value ? (openBlock(), createBlock(unref(_sfc_main$9), {
342
- key: 0,
343
- size: "large",
344
- type: "dots",
345
- class: normalizeClass(_ctx.$style.spinner)
346
- }, null, 8, ["class"])) : createCommentVNode("", true),
347
- createVNode(Canvas, {
348
- id: canvasId.value,
349
- loading: isLoading.value,
350
- nodes: unref(mappedNodes),
351
- connections: unref(mappedConnections),
352
- "show-bug-reporting-button": false,
353
- "read-only": true
354
- }, {
355
- node: withCtx(({ nodeProps }) => [
356
- createVNode(unref(N8nTooltip), mergeProps({ placement: "top" }, tooltipProps(nodeProps.data)), {
357
- default: withCtx(() => [
358
- createVNode(CanvasNode, mergeProps(nodeProps, {
359
- class: {
360
- [_ctx.$style.isTrigger]: unref(nodeTypesStore).isTriggerNode(nodeProps.data.type),
361
- [_ctx.$style.mockNode]: true
362
- }
363
- }), {
364
- toolbar: withCtx(({ data, outputs, inputs }) => [
365
- canBeMocked(outputs, inputs) ? (openBlock(), createElementBlock("div", {
366
- key: 0,
367
- class: normalizeClass({
368
- [_ctx.$style.pinButtonContainer]: true,
369
- [_ctx.$style.pinButtonContainerPinned]: isMocked(data)
370
- })
371
- }, [
372
- createVNode(unref(N8nButton), {
373
- icon: "thumbtack",
374
- block: "",
375
- type: "secondary",
376
- class: normalizeClass({ [_ctx.$style.customSecondary]: isMocked(data) }),
377
- "data-test-id": "node-pin-button"
378
- }, {
379
- default: withCtx(() => [
380
- isMocked(data) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
381
- createTextVNode(toDisplayString(unref(locale).baseText("contextMenu.unpin")), 1)
382
- ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
383
- createTextVNode(toDisplayString(unref(locale).baseText("contextMenu.pin")), 1)
384
- ], 64))
385
- ]),
386
- _: 2
387
- }, 1032, ["class"])
388
- ], 2)) : createCommentVNode("", true)
389
- ]),
390
- _: 2
391
- }, 1040, ["class"])
392
- ]),
393
- _: 2
394
- }, 1040)
395
- ]),
396
- _: 1
397
- }, 8, ["id", "loading", "nodes", "connections"])
398
- ], 2));
399
- };
400
- }
401
- });
402
- const mockNode = "_mockNode_7xdc7_123";
403
- const isTrigger = "_isTrigger_7xdc7_127";
404
- const container$1 = "_container_7xdc7_131";
405
- const pinButtonContainer = "_pinButtonContainer_7xdc7_138";
406
- const pinButtonContainerPinned = "_pinButtonContainerPinned_7xdc7_149";
407
- const customSecondary = "_customSecondary_7xdc7_153";
408
- const spinner = "_spinner_7xdc7_162";
409
- const noNodes = "_noNodes_7xdc7_169";
410
- const style0$5 = {
411
- mockNode,
412
- isTrigger,
413
- container: container$1,
414
- pinButtonContainer,
415
- pinButtonContainerPinned,
416
- customSecondary,
417
- spinner,
418
- noNodes
419
- };
420
- const cssModules$5 = {
421
- "$style": style0$5
422
- };
423
- const NodesPinning = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__cssModules", cssModules$5]]);
424
- const _hoisted_1$3 = { class: "mt-xs" };
425
- const _sfc_main$5 = /* @__PURE__ */ defineComponent({
426
- __name: "WorkflowSelector",
427
- props: {
428
- modelValue: { default: () => ({
429
- mode: "id",
430
- value: "",
431
- __rl: true
432
- }) },
433
- examplePinnedData: { default: () => ({}) },
434
- sampleWorkflowName: { default: void 0 }
435
- },
436
- emits: ["update:modelValue", "workflowCreated"],
437
- setup(__props, { emit: __emit }) {
438
- const props = __props;
439
- const emit = __emit;
440
- const locale = useI18n();
441
- const projectStore = useProjectsStore();
442
- const workflowsStore = useWorkflowsStore();
443
- const router = useRouter();
444
- const subworkflowName = computed(() => {
445
- if (props.sampleWorkflowName) {
446
- return locale.baseText("testDefinition.workflowInput.subworkflowName", {
447
- interpolate: { name: props.sampleWorkflowName }
448
- });
449
- }
450
- return locale.baseText("testDefinition.workflowInput.subworkflowName.default");
451
- });
452
- const sampleWorkflow = computed(() => {
453
- return {
454
- ...SAMPLE_EVALUATION_WORKFLOW,
455
- name: subworkflowName.value,
456
- pinData: props.examplePinnedData
457
- };
458
- });
459
- const selectorVisible = ref(false);
460
- const updateModelValue = (value) => emit("update:modelValue", value);
461
- const handleDefineEvaluation = async () => {
462
- const projectId = projectStore.currentProjectId;
463
- const workflowName = sampleWorkflow.value.name ?? "My Sub-Workflow";
464
- const sampleSubWorkflows = workflowsStore.allWorkflows.filter(
465
- (w) => w.name && new RegExp(workflowName).test(w.name)
466
- );
467
- const workflow = {
468
- ...sampleWorkflow.value,
469
- name: `${workflowName} ${sampleSubWorkflows.length + 1}`
470
- };
471
- if (projectId) {
472
- workflow.projectId = projectId;
473
- }
474
- const newWorkflow = await workflowsStore.createNewWorkflow(workflow);
475
- const { href } = router.resolve({ name: VIEWS.WORKFLOW, params: { name: newWorkflow.id } });
476
- updateModelValue({
477
- ...props.modelValue,
478
- value: newWorkflow.id,
479
- cachedResultName: workflow.name
480
- });
481
- window.open(href, "_blank");
482
- };
483
- return (_ctx, _cache) => {
484
- const _component_WorkflowSelectorParameterInput = __unplugin_components_0;
485
- return openBlock(), createElementBlock("div", _hoisted_1$3, [
486
- !_ctx.modelValue.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
487
- createVNode(unref(N8nButton), {
488
- type: "secondary",
489
- class: "mb-xs",
490
- onClick: handleDefineEvaluation
491
- }, {
492
- default: withCtx(() => [
493
- createTextVNode(toDisplayString(unref(locale).baseText("testDefinition.workflow.createNew")), 1)
494
- ]),
495
- _: 1
496
- }),
497
- createVNode(unref(N8nLink), {
498
- class: "mb-xs",
499
- style: { "display": "block" },
500
- onClick: _cache[0] || (_cache[0] = ($event) => selectorVisible.value = !selectorVisible.value)
501
- }, {
502
- default: withCtx(() => [
503
- createTextVNode(toDisplayString(unref(locale).baseText("testDefinition.workflow.createNew.or")), 1)
504
- ]),
505
- _: 1
506
- })
507
- ], 64)) : createCommentVNode("", true),
508
- _ctx.modelValue.value || selectorVisible.value ? (openBlock(), createBlock(_component_WorkflowSelectorParameterInput, {
509
- key: 1,
510
- parameter: {
511
- displayName: unref(locale).baseText("testDefinition.edit.workflowSelectorDisplayName"),
512
- name: "workflowId",
513
- type: "workflowSelector",
514
- default: ""
515
- },
516
- "model-value": _ctx.modelValue,
517
- "display-title": unref(locale).baseText("testDefinition.edit.workflowSelectorTitle"),
518
- "is-value-expression": false,
519
- "expression-edit-dialog-visible": false,
520
- path: "workflows",
521
- "allow-new": false,
522
- "sample-workflow": sampleWorkflow.value,
523
- "new-resource-label": unref(locale).baseText("testDefinition.workflow.createNew"),
524
- "onUpdate:modelValue": updateModelValue,
525
- onWorkflowCreated: _cache[1] || (_cache[1] = ($event) => emit("workflowCreated", $event))
526
- }, null, 8, ["parameter", "model-value", "display-title", "sample-workflow", "new-resource-label"])) : createCommentVNode("", true)
527
- ]);
528
- };
529
- }
530
- });
531
- const _hoisted_1$2 = { style: { "display": "flex", "flex-direction": "column" } };
532
- const _sfc_main$4 = /* @__PURE__ */ defineComponent({
533
- __name: "ConfigSection",
534
- props: /* @__PURE__ */ mergeModels({
535
- tagsById: {},
536
- isLoading: { type: Boolean },
537
- examplePinnedData: {},
538
- sampleWorkflowName: {},
539
- hasRuns: { type: Boolean },
540
- getFieldIssues: { type: Function },
541
- startEditing: { type: Function },
542
- saveChanges: { type: Function },
543
- cancelEditing: { type: Function }
544
- }, {
545
- "tags": { required: true },
546
- "tagsModifiers": {},
547
- "evaluationWorkflow": { required: true },
548
- "evaluationWorkflowModifiers": {},
549
- "mockedNodes": {
550
- required: true
551
- },
552
- "mockedNodesModifiers": {}
553
- }),
554
- emits: /* @__PURE__ */ mergeModels(["openPinningModal", "openExecutionsViewForTag", "renameTag", "evaluationWorkflowCreated"], ["update:tags", "update:evaluationWorkflow", "update:mockedNodes"]),
555
- setup(__props, { emit: __emit }) {
556
- const props = __props;
557
- const emit = __emit;
558
- const locale = useI18n();
559
- const tags = useModel(__props, "tags");
560
- const renameTag = async () => {
561
- const { prompt } = useMessage();
562
- const result = await prompt(locale.baseText("testDefinition.edit.step.tag.placeholder"), {
563
- inputValue: props.tagsById[tags.value.value[0]]?.name,
564
- inputPlaceholder: locale.baseText("testDefinition.edit.step.tag.placeholder"),
565
- inputValidator: (value) => {
566
- if (!value) {
567
- return locale.baseText("testDefinition.edit.step.tag.validation.required");
568
- }
569
- if (value.length > 21) {
570
- return locale.baseText("testDefinition.edit.step.tag.validation.tooLong");
571
- }
572
- return true;
573
- }
574
- });
575
- if (result?.action === "confirm") {
576
- emit("renameTag", result.value);
577
- }
578
- };
579
- const evaluationWorkflow = useModel(
580
- __props,
581
- "evaluationWorkflow"
582
- );
583
- const mockedNodes = useModel(__props, "mockedNodes");
584
- const selectedTag = computed(() => props.tagsById[tags.value.value[0]] ?? {});
585
- function openExecutionsView() {
586
- emit("openExecutionsViewForTag");
587
- }
588
- return (_ctx, _cache) => {
589
- const _component_font_awesome_icon = resolveComponent("font-awesome-icon");
590
- const _component_i18n_t = resolveComponent("i18n-t");
591
- const _component_Modal = __unplugin_components_0$1;
592
- return openBlock(), createElementBlock("div", null, [
593
- createBaseVNode("div", {
594
- class: normalizeClass(_ctx.$style.editForm)
595
- }, [
596
- !_ctx.hasRuns ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
597
- createVNode(unref(N8nText), {
598
- tag: "div",
599
- color: "text-dark",
600
- size: "large",
601
- class: "text-center"
602
- }, {
603
- default: withCtx(() => [
604
- createTextVNode(toDisplayString(unref(locale).baseText("testDefinition.edit.step.intro")), 1)
605
- ]),
606
- _: 1
607
- }),
608
- createVNode(BlockArrow, { class: "mt-5xs mb-5xs" })
609
- ], 64)) : createCommentVNode("", true),
610
- createVNode(EvaluationStep, {
611
- issues: _ctx.getFieldIssues("tags"),
612
- tooltip: unref(locale).baseText("testDefinition.edit.step.executions.tooltip"),
613
- "external-tooltip": !_ctx.hasRuns
614
- }, {
615
- title: withCtx(() => [
616
- createTextVNode(toDisplayString(unref(locale).baseText("testDefinition.edit.step.executions", {
617
- adjustToNumber: selectedTag.value?.usageCount ?? 0
618
- })), 1)
619
- ]),
620
- cardContent: withCtx(() => [
621
- createBaseVNode("div", {
622
- class: normalizeClass(_ctx.$style.tagInputTag)
623
- }, [
624
- createVNode(_component_i18n_t, { keypath: "testDefinition.edit.step.tag" }, {
625
- tag: withCtx(() => [
626
- createVNode(unref(Tag), {
627
- text: selectedTag.value.name,
628
- clickable: true,
629
- onClick: renameTag
630
- }, {
631
- tag: withCtx(() => [
632
- createTextVNode(toDisplayString(selectedTag.value.name) + " ", 1),
633
- createVNode(_component_font_awesome_icon, {
634
- icon: "pen",
635
- size: "sm"
636
- })
637
- ]),
638
- _: 1
639
- }, 8, ["text"])
640
- ]),
641
- _: 1
642
- })
643
- ], 2),
644
- createVNode(unref(N8nButton), {
645
- label: "Select executions",
646
- type: "tertiary",
647
- size: "small",
648
- onClick: openExecutionsView
649
- })
650
- ]),
651
- _: 1
652
- }, 8, ["issues", "tooltip", "external-tooltip"]),
653
- createBaseVNode("div", {
654
- class: normalizeClass(_ctx.$style.nestedSteps)
655
- }, [
656
- createVNode(BlockArrow, { class: "mt-5xs mb-5xs" }),
657
- createBaseVNode("div", _hoisted_1$2, [
658
- createVNode(BlockArrow, { class: "mt-5xs mb-5xs ml-auto mr-2xl" }),
659
- createVNode(EvaluationStep, {
660
- issues: _ctx.getFieldIssues("mockedNodes"),
661
- tooltip: unref(locale).baseText("testDefinition.edit.step.nodes.tooltip"),
662
- "external-tooltip": !_ctx.hasRuns
663
- }, {
664
- title: withCtx(() => [
665
- createTextVNode(toDisplayString(unref(locale).baseText("testDefinition.edit.step.mockedNodes", {
666
- adjustToNumber: mockedNodes.value?.length ?? 0
667
- })) + " ", 1),
668
- createVNode(unref(N8nText), null, {
669
- default: withCtx(() => [
670
- createTextVNode("(" + toDisplayString(unref(locale).baseText("generic.optional")) + ")", 1)
671
- ]),
672
- _: 1
673
- })
674
- ]),
675
- cardContent: withCtx(() => [
676
- createVNode(unref(N8nButton), {
677
- size: "small",
678
- "data-test-id": "select-nodes-button",
679
- label: unref(locale).baseText("testDefinition.edit.selectNodes"),
680
- type: "tertiary",
681
- onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("openPinningModal"))
682
- }, null, 8, ["label"])
683
- ]),
684
- _: 1
685
- }, 8, ["issues", "tooltip", "external-tooltip"]),
686
- createVNode(BlockArrow, { class: "mt-5xs mb-5xs ml-auto mr-2xl" }),
687
- createVNode(EvaluationStep, {
688
- title: unref(locale).baseText("testDefinition.edit.step.reRunExecutions"),
689
- tooltip: unref(locale).baseText("testDefinition.edit.step.reRunExecutions.tooltip"),
690
- "external-tooltip": !_ctx.hasRuns
691
- }, null, 8, ["title", "tooltip", "external-tooltip"]),
692
- createVNode(BlockArrow, { class: "mt-5xs mb-5xs ml-auto mr-2xl" })
693
- ])
694
- ], 2),
695
- createVNode(EvaluationStep, {
696
- title: unref(locale).baseText("testDefinition.edit.step.compareExecutions"),
697
- description: unref(locale).baseText("testDefinition.edit.workflowSelectorLabel"),
698
- issues: _ctx.getFieldIssues("evaluationWorkflow"),
699
- tooltip: unref(locale).baseText("testDefinition.edit.step.compareExecutions.tooltip"),
700
- "external-tooltip": !_ctx.hasRuns
701
- }, {
702
- cardContent: withCtx(() => [
703
- createVNode(_sfc_main$5, {
704
- modelValue: evaluationWorkflow.value,
705
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => evaluationWorkflow.value = $event),
706
- "example-pinned-data": _ctx.examplePinnedData,
707
- class: normalizeClass({ "has-issues": _ctx.getFieldIssues("evaluationWorkflow").length > 0 }),
708
- "sample-workflow-name": _ctx.sampleWorkflowName,
709
- onWorkflowCreated: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("evaluationWorkflowCreated", $event))
710
- }, null, 8, ["modelValue", "example-pinned-data", "class", "sample-workflow-name"])
711
- ]),
712
- _: 1
713
- }, 8, ["title", "description", "issues", "tooltip", "external-tooltip"])
714
- ], 2),
715
- createVNode(_component_Modal, {
716
- width: "calc(100% - (48px * 2))",
717
- height: "calc(100% - (48px * 2))",
718
- "custom-class": _ctx.$style.pinnigModal,
719
- name: unref(NODE_PINNING_MODAL_KEY)
720
- }, {
721
- header: withCtx(() => [
722
- createVNode(unref(N8nHeading), {
723
- tag: "h3",
724
- size: "xlarge",
725
- color: "text-dark",
726
- class: "mb-2xs"
727
- }, {
728
- default: withCtx(() => [
729
- createTextVNode(toDisplayString(unref(locale).baseText("testDefinition.edit.selectNodes")), 1)
730
- ]),
731
- _: 1
732
- }),
733
- createVNode(unref(N8nText), { color: "text-base" }, {
734
- default: withCtx(() => [
735
- createTextVNode(toDisplayString(unref(locale).baseText("testDefinition.edit.modal.description")), 1)
736
- ]),
737
- _: 1
738
- })
739
- ]),
740
- content: withCtx(() => [
741
- createVNode(NodesPinning, {
742
- modelValue: mockedNodes.value,
743
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => mockedNodes.value = $event),
744
- "data-test-id": "nodes-pinning-modal"
745
- }, null, 8, ["modelValue"])
746
- ]),
747
- _: 1
748
- }, 8, ["custom-class", "name"])
749
- ]);
750
- };
751
- }
752
- });
753
- const pinnigModal = "_pinnigModal_1qbos_123";
754
- const nestedSteps = "_nestedSteps_1qbos_128";
755
- const tagInputTag = "_tagInputTag_1qbos_133";
756
- const style0$4 = {
757
- pinnigModal,
758
- nestedSteps,
759
- tagInputTag
760
- };
761
- const cssModules$4 = {
762
- "$style": style0$4
763
- };
764
- const ConfigSection = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__cssModules", cssModules$4]]);
765
- function useMetricsChart() {
766
- const colors = {
767
- primary: useCssVar("--color-primary", document.body).value,
768
- textBase: useCssVar("--color-text-base", document.body).value,
769
- backgroundXLight: useCssVar("--color-background-xlight", document.body).value,
770
- foregroundLight: useCssVar("--color-foreground-light", document.body).value,
771
- foregroundBase: useCssVar("--color-foreground-base", document.body).value,
772
- foregroundDark: useCssVar("--color-foreground-dark", document.body).value
773
- };
774
- function generateChartData(runs2, metric) {
775
- const data = {
776
- datasets: [
777
- {
778
- data: runs2,
779
- parsing: {
780
- xAxisKey: "id",
781
- yAxisKey: `metrics.${metric}`
782
- },
783
- borderColor: colors.primary,
784
- backgroundColor: colors.backgroundXLight,
785
- borderWidth: 1,
786
- pointRadius: 2,
787
- pointHoverRadius: 4,
788
- pointBackgroundColor: colors.backgroundXLight,
789
- pointHoverBackgroundColor: colors.backgroundXLight
790
- }
791
- ]
792
- };
793
- return data;
794
- }
795
- function generateChartOptions({
796
- metric,
797
- data
798
- }) {
799
- return {
800
- responsive: true,
801
- maintainAspectRatio: false,
802
- animation: false,
803
- devicePixelRatio: 2,
804
- interaction: {
805
- mode: "index",
806
- intersect: false
807
- },
808
- scales: {
809
- y: {
810
- border: {
811
- display: false
812
- },
813
- grid: {
814
- color: colors.foregroundBase
815
- },
816
- ticks: {
817
- padding: 8,
818
- color: colors.textBase
819
- }
820
- },
821
- x: {
822
- border: {
823
- display: false
824
- },
825
- grid: {
826
- display: false
827
- },
828
- ticks: {
829
- color: colors.textBase,
830
- // eslint-disable-next-line id-denylist
831
- callback(_tickValue, index) {
832
- return `#${data[index].index}`;
833
- }
834
- }
835
- }
836
- },
837
- plugins: {
838
- tooltip: {
839
- backgroundColor: colors.backgroundXLight,
840
- titleColor: colors.textBase,
841
- titleFont: {
842
- weight: "600"
843
- },
844
- bodyColor: colors.textBase,
845
- bodySpacing: 4,
846
- padding: 12,
847
- borderColor: colors.foregroundBase,
848
- borderWidth: 1,
849
- displayColors: true,
850
- callbacks: {
851
- title: (tooltipItems) => {
852
- return dateFormat(tooltipItems[0].raw.runAt, "yyyy-mm-dd HH:MM");
853
- },
854
- label: (context) => `${metric}: ${context.parsed.y.toFixed(2)}`,
855
- labelColor() {
856
- return {
857
- borderColor: "rgba(29, 21, 21, 0)",
858
- backgroundColor: colors.primary,
859
- borderWidth: 0,
860
- borderRadius: 5
861
- };
862
- }
863
- }
864
- },
865
- legend: {
866
- display: false
867
- }
868
- }
869
- };
870
- }
871
- return {
872
- generateChartData,
873
- generateChartOptions
874
- };
875
- }
876
- const _sfc_main$3 = /* @__PURE__ */ defineComponent({
877
- __name: "MetricsChart",
878
- props: {
879
- selectedMetric: {},
880
- runs: {}
881
- },
882
- emits: ["update:selectedMetric"],
883
- setup(__props, { emit: __emit }) {
884
- const emit = __emit;
885
- const props = __props;
886
- const metricsChart = useMetricsChart();
887
- const availableMetrics = computed(() => {
888
- return props.runs.reduce((acc, run) => {
889
- const metricKeys = Object.keys(run.metrics ?? {});
890
- return [.../* @__PURE__ */ new Set([...acc, ...metricKeys])];
891
- }, []);
892
- });
893
- const filteredRuns = computed(
894
- () => props.runs.filter((run) => run.metrics?.[props.selectedMetric] !== void 0)
895
- );
896
- const chartData = computed(
897
- () => metricsChart.generateChartData(filteredRuns.value, props.selectedMetric)
898
- );
899
- const chartOptions = computed(
900
- () => metricsChart.generateChartOptions({
901
- metric: props.selectedMetric,
902
- data: filteredRuns.value
903
- })
904
- );
905
- watchEffect(() => {
906
- if (props.runs.length > 0 && !props.selectedMetric) {
907
- emit("update:selectedMetric", availableMetrics.value[0]);
908
- }
909
- });
910
- return (_ctx, _cache) => {
911
- const _component_N8nOption = resolveComponent("N8nOption");
912
- const _component_N8nSelect = resolveComponent("N8nSelect");
913
- return openBlock(), createElementBlock("div", {
914
- class: normalizeClass(_ctx.$style.metricsChartContainer)
915
- }, [
916
- createBaseVNode("div", {
917
- class: normalizeClass(_ctx.$style.chartHeader)
918
- }, [
919
- createVNode(_component_N8nSelect, {
920
- "model-value": _ctx.selectedMetric,
921
- class: normalizeClass(_ctx.$style.metricSelect),
922
- placeholder: "Select metric",
923
- size: "small",
924
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => emit("update:selectedMetric", $event))
925
- }, {
926
- default: withCtx(() => [
927
- (openBlock(true), createElementBlock(Fragment, null, renderList(availableMetrics.value, (metric) => {
928
- return openBlock(), createBlock(_component_N8nOption, {
929
- key: metric,
930
- label: metric,
931
- value: metric
932
- }, null, 8, ["label", "value"]);
933
- }), 128))
934
- ]),
935
- _: 1
936
- }, 8, ["model-value", "class"])
937
- ], 2),
938
- createBaseVNode("div", {
939
- class: normalizeClass(_ctx.$style.chartWrapper)
940
- }, [
941
- (openBlock(), createBlock(unref(Line), {
942
- key: _ctx.selectedMetric,
943
- data: chartData.value,
944
- options: chartOptions.value,
945
- class: normalizeClass(_ctx.$style.metricsChart)
946
- }, null, 8, ["data", "options", "class"]))
947
- ], 2)
948
- ], 2);
949
- };
950
- }
951
- });
952
- const metricsChartContainer = "_metricsChartContainer_1xhz2_123";
953
- const chartHeader = "_chartHeader_1xhz2_128";
954
- const chartTitle = "_chartTitle_1xhz2_131";
955
- const metricSelect = "_metricSelect_1xhz2_136";
956
- const chartWrapper = "_chartWrapper_1xhz2_139";
957
- const style0$3 = {
958
- metricsChartContainer,
959
- chartHeader,
960
- chartTitle,
961
- metricSelect,
962
- chartWrapper
963
- };
964
- const cssModules$3 = {
965
- "$style": style0$3
966
- };
967
- const MetricsChart = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__cssModules", cssModules$3]]);
968
- const _hoisted_1$1 = { style: { "display": "inline-flex", "gap": "8px", "text-transform": "capitalize", "align-items": "center" } };
969
- const _sfc_main$2 = /* @__PURE__ */ defineComponent({
970
- __name: "TestRunsTable",
971
- props: {
972
- runs: {},
973
- columns: {}
974
- },
975
- emits: ["rowClick"],
976
- setup(__props, { emit: __emit }) {
977
- const emit = __emit;
978
- const props = __props;
979
- const statusDictionary = {
980
- new: {
981
- icon: "status-new",
982
- color: "foreground-xdark"
983
- },
984
- running: {
985
- icon: "spinner",
986
- color: "secondary"
987
- },
988
- completed: {
989
- icon: "status-completed",
990
- color: "success"
991
- },
992
- error: {
993
- icon: "status-error",
994
- color: "danger"
995
- },
996
- cancelled: {
997
- icon: "status-canceled",
998
- color: "foreground-xdark"
999
- },
1000
- warning: {
1001
- icon: "status-warning",
1002
- color: "warning"
1003
- },
1004
- success: {
1005
- icon: "status-completed",
1006
- color: "success"
1007
- }
1008
- };
1009
- const locale = useI18n();
1010
- const runSummaries = computed(() => {
1011
- return props.runs.map(({ status, finalResult, ...run }) => {
1012
- if (status === "completed" && finalResult) {
1013
- return { ...run, status: finalResult };
1014
- }
1015
- return { ...run, status };
1016
- });
1017
- });
1018
- return (_ctx, _cache) => {
1019
- const _component_N8nHeading = resolveComponent("N8nHeading");
1020
- const _component_AnimatedSpinner = __unplugin_components_0$2;
1021
- return openBlock(), createElementBlock("div", {
1022
- class: normalizeClass(_ctx.$style.container)
1023
- }, [
1024
- createVNode(_component_N8nHeading, {
1025
- size: "large",
1026
- bold: true,
1027
- class: normalizeClass(_ctx.$style.runsTableHeading),
1028
- color: "text-base"
1029
- }, {
1030
- default: withCtx(() => [
1031
- createTextVNode(toDisplayString(unref(locale).baseText("testDefinition.edit.pastRuns.total", { adjustToNumber: _ctx.runs.length })) + " ", 1),
1032
- createVNode(unref(N8nText), null, {
1033
- default: withCtx(() => [
1034
- createTextVNode(" (" + toDisplayString(_ctx.runs.length) + ") ", 1)
1035
- ]),
1036
- _: 1
1037
- })
1038
- ]),
1039
- _: 1
1040
- }, 8, ["class"]),
1041
- createVNode(TestTableBase, {
1042
- data: runSummaries.value,
1043
- columns: _ctx.columns,
1044
- "default-sort": { prop: "runAt", order: "descending" },
1045
- onRowClick: _cache[0] || (_cache[0] = (row) => emit("rowClick", row))
1046
- }, {
1047
- id: withCtx(({ row }) => [
1048
- createTextVNode("#" + toDisplayString(row.index), 1)
1049
- ]),
1050
- status: withCtx(({ row }) => [
1051
- createBaseVNode("div", _hoisted_1$1, [
1052
- row.status === "running" ? (openBlock(), createBlock(unref(N8nText), {
1053
- key: 0,
1054
- color: "secondary",
1055
- class: "mr-2xs"
1056
- }, {
1057
- default: withCtx(() => [
1058
- createVNode(_component_AnimatedSpinner)
1059
- ]),
1060
- _: 1
1061
- })) : (openBlock(), createBlock(unref(N8nIcon), {
1062
- key: 1,
1063
- icon: statusDictionary[row.status].icon,
1064
- color: statusDictionary[row.status].color,
1065
- class: "mr-2xs"
1066
- }, null, 8, ["icon", "color"])),
1067
- row.status === "error" ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
1068
- createTextVNode(toDisplayString(row.failedCases) + " " + toDisplayString(row.status), 1)
1069
- ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 3 }, [
1070
- createTextVNode(toDisplayString(row.status), 1)
1071
- ], 64))
1072
- ])
1073
- ]),
1074
- _: 1
1075
- }, 8, ["data", "columns"])
1076
- ], 2);
1077
- };
1078
- }
1079
- });
1080
- const container = "_container_1rjad_123";
1081
- const style0$2 = {
1082
- container
1083
- };
1084
- const cssModules$2 = {
1085
- "$style": style0$2
1086
- };
1087
- const TestRunsTable = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__cssModules", cssModules$2]]);
1088
- const _sfc_main$1 = /* @__PURE__ */ defineComponent({
1089
- __name: "RunsSection",
1090
- props: /* @__PURE__ */ mergeModels({
1091
- runs: {},
1092
- testId: {}
1093
- }, {
1094
- "selectedMetric": { required: true },
1095
- "selectedMetricModifiers": {}
1096
- }),
1097
- emits: ["update:selectedMetric"],
1098
- setup(__props) {
1099
- const props = __props;
1100
- const locale = useI18n();
1101
- const router = useRouter();
1102
- const selectedMetric = useModel(__props, "selectedMetric");
1103
- const metrics = computed(() => {
1104
- const metricKeys = props.runs.reduce((acc, run) => {
1105
- Object.keys(run.metrics ?? {}).forEach((metric) => acc.add(metric));
1106
- return acc;
1107
- }, /* @__PURE__ */ new Set());
1108
- return [...metricKeys];
1109
- });
1110
- const metricColumns = computed(
1111
- () => metrics.value.map((metric) => ({
1112
- prop: `metrics.${metric}`,
1113
- label: metric,
1114
- sortable: true,
1115
- showHeaderTooltip: true,
1116
- sortMethod: (a, b) => (a.metrics?.[metric] ?? 0) - (b.metrics?.[metric] ?? 0),
1117
- formatter: (row) => row.metrics?.[metric] !== void 0 ? (row.metrics?.[metric]).toFixed(2) : ""
1118
- }))
1119
- );
1120
- const columns = computed(() => [
1121
- {
1122
- prop: "id",
1123
- label: locale.baseText("testDefinition.listRuns.runNumber"),
1124
- showOverflowTooltip: true
1125
- },
1126
- {
1127
- prop: "runAt",
1128
- label: "Run at",
1129
- sortable: true,
1130
- showOverflowTooltip: true,
1131
- formatter: (row) => {
1132
- const { date, time } = convertToDisplayDate(row.runAt);
1133
- return [date, time].join(", ");
1134
- },
1135
- sortMethod: (a, b) => new Date(a.runAt ?? a.createdAt).getTime() - new Date(b.runAt ?? b.createdAt).getTime()
1136
- },
1137
- {
1138
- prop: "status",
1139
- label: locale.baseText("testDefinition.listRuns.status"),
1140
- sortable: true
1141
- },
1142
- ...metricColumns.value
1143
- ]);
1144
- const handleRowClick = (row) => {
1145
- void router.push({
1146
- name: VIEWS.TEST_DEFINITION_RUNS_DETAIL,
1147
- params: { testId: row.testDefinitionId, runId: row.id }
1148
- });
1149
- };
1150
- return (_ctx, _cache) => {
1151
- return openBlock(), createElementBlock("div", {
1152
- class: normalizeClass(_ctx.$style.runs)
1153
- }, [
1154
- createVNode(MetricsChart, {
1155
- selectedMetric: selectedMetric.value,
1156
- "onUpdate:selectedMetric": _cache[0] || (_cache[0] = ($event) => selectedMetric.value = $event),
1157
- runs: _ctx.runs
1158
- }, null, 8, ["selectedMetric", "runs"]),
1159
- createVNode(TestRunsTable, {
1160
- class: normalizeClass(_ctx.$style.runsTable),
1161
- runs: _ctx.runs,
1162
- columns: columns.value,
1163
- selectable: true,
1164
- "data-test-id": "past-runs-table",
1165
- onRowClick: handleRowClick
1166
- }, null, 8, ["class", "runs", "columns"])
1167
- ], 2);
1168
- };
1169
- }
1170
- });
1171
- const runs = "_runs_37xaf_123";
1172
- const style0$1 = {
1173
- runs
1174
- };
1175
- const cssModules$1 = {
1176
- "$style": style0$1
1177
- };
1178
- const RunsSection = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__cssModules", cssModules$1]]);
1179
- const _hoisted_1 = { style: { "display": "flex", "align-items": "center" } };
1180
- const _hoisted_2 = { style: { "display": "flex", "align-items": "center", "gap": "10px" } };
1181
- const _sfc_main = /* @__PURE__ */ defineComponent({
1182
- __name: "TestDefinitionEditView",
1183
- props: {
1184
- testId: {},
1185
- name: {}
1186
- },
1187
- setup(__props) {
1188
- const props = __props;
1189
- const router = useRouter();
1190
- const locale = useI18n();
1191
- const { debounce } = useDebounce();
1192
- const toast = useToast();
1193
- const testDefinitionStore = useTestDefinitionStore();
1194
- const tagsStore = useAnnotationTagsStore();
1195
- const uiStore = useUIStore();
1196
- const workflowStore = useWorkflowsStore();
1197
- const telemetry = useTelemetry();
1198
- const visibility = useDocumentVisibility();
1199
- watch(visibility, async () => {
1200
- if (visibility.value !== "visible") return;
1201
- await tagsStore.fetchAll({ force: true, withUsageCount: true });
1202
- await getExamplePinnedDataForTags();
1203
- testDefinitionStore.updateRunFieldIssues(props.testId);
1204
- });
1205
- const { state, isSaving, cancelEditing, loadTestData, updateTest, startEditing, saveChanges } = useTestDefinitionForm();
1206
- const isLoading = computed(() => tagsStore.isLoading);
1207
- const tagsById = computed(() => tagsStore.tagsById);
1208
- const currentWorkflowId = computed(() => props.name);
1209
- const workflowName = computed(() => workflowStore.workflow.name);
1210
- const hasRuns = computed(() => runs2.value.length > 0);
1211
- const fieldsIssues = computed(() => testDefinitionStore.getFieldIssues(props.testId) ?? []);
1212
- const showConfig = ref(true);
1213
- const selectedMetric = ref("");
1214
- const examplePinnedData = ref({});
1215
- void loadTestData(props.testId, props.name);
1216
- const handleUpdateTest = async () => {
1217
- try {
1218
- await updateTest(props.testId);
1219
- } catch (e) {
1220
- toast.showError(e, locale.baseText("testDefinition.edit.testSaveFailed"));
1221
- }
1222
- };
1223
- const handleUpdateTestDebounced = debounce(handleUpdateTest, { debounceTime: 400, trailing: true });
1224
- function getFieldIssues(key) {
1225
- return fieldsIssues.value.filter((issue) => issue.field === key);
1226
- }
1227
- async function openPinningModal() {
1228
- uiStore.openModal(NODE_PINNING_MODAL_KEY);
1229
- }
1230
- async function runTest() {
1231
- await testDefinitionStore.startTestRun(props.testId);
1232
- await testDefinitionStore.fetchTestRuns(props.testId);
1233
- }
1234
- async function openExecutionsViewForTag() {
1235
- const executionsRoute = router.resolve({
1236
- name: VIEWS.WORKFLOW_EXECUTIONS,
1237
- params: { name: currentWorkflowId.value },
1238
- query: { tag: state.value.tags.value[0], testId: props.testId }
1239
- });
1240
- window.open(executionsRoute.href, "_blank");
1241
- }
1242
- const runs2 = computed(() => {
1243
- const testRuns = Object.values(testDefinitionStore.testRunsById ?? {}).filter(
1244
- ({ testDefinitionId }) => testDefinitionId === props.testId
1245
- );
1246
- return orderBy(testRuns, (record) => new Date(record.runAt), ["asc"]).map(
1247
- (record, index) => Object.assign(record, { index: index + 1 })
1248
- );
1249
- });
1250
- const isRunning = computed(() => runs2.value.some((run) => run.status === "running"));
1251
- const isRunTestEnabled = computed(() => fieldsIssues.value.length === 0 && !isRunning.value);
1252
- async function renameTag(newName) {
1253
- await tagsStore.rename({ id: state.value.tags.value[0], name: newName });
1254
- }
1255
- async function getExamplePinnedDataForTags() {
1256
- const exampleInput = await testDefinitionStore.fetchExampleEvaluationInput(
1257
- props.testId,
1258
- state.value.tags.value[0]
1259
- );
1260
- if (exampleInput !== null) {
1261
- examplePinnedData.value = {
1262
- "When called by a test run": [
1263
- {
1264
- json: exampleInput
1265
- }
1266
- ]
1267
- };
1268
- }
1269
- }
1270
- watch(() => state.value.tags, getExamplePinnedDataForTags);
1271
- const updateName = (value) => {
1272
- state.value.name.value = value;
1273
- void handleUpdateTestDebounced();
1274
- };
1275
- const updateDescription = (value) => {
1276
- state.value.description.value = value;
1277
- void handleUpdateTestDebounced();
1278
- };
1279
- function onEvaluationWorkflowCreated(workflowId) {
1280
- telemetry.track("User created evaluation workflow from test", {
1281
- test_id: props.testId,
1282
- subworkflow_id: workflowId
1283
- });
1284
- }
1285
- return (_ctx, _cache) => {
1286
- const _component_N8nTooltip = resolveComponent("N8nTooltip");
1287
- return !isLoading.value ? (openBlock(), createElementBlock("div", {
1288
- key: 0,
1289
- class: normalizeClass([_ctx.$style.container])
1290
- }, [
1291
- createBaseVNode("div", {
1292
- class: normalizeClass(_ctx.$style.header)
1293
- }, [
1294
- createBaseVNode("div", _hoisted_1, [
1295
- createVNode(unref(_sfc_main$a), {
1296
- icon: "arrow-left",
1297
- type: "tertiary",
1298
- text: "",
1299
- onClick: _cache[0] || (_cache[0] = ($event) => unref(router).push({ name: unref(VIEWS).TEST_DEFINITION, params: { testId: _ctx.testId } }))
1300
- }),
1301
- createVNode(InlineNameEdit, {
1302
- "model-value": unref(state).name.value,
1303
- "max-height": "none",
1304
- type: "Test name",
1305
- "onUpdate:modelValue": updateName
1306
- }, {
1307
- default: withCtx(() => [
1308
- createVNode(unref(N8nText), {
1309
- bold: "",
1310
- size: "xlarge",
1311
- color: "text-dark"
1312
- }, {
1313
- default: withCtx(() => [
1314
- createTextVNode(toDisplayString(unref(state).name.value), 1)
1315
- ]),
1316
- _: 1
1317
- })
1318
- ]),
1319
- _: 1
1320
- }, 8, ["model-value"])
1321
- ]),
1322
- createBaseVNode("div", _hoisted_2, [
1323
- hasRuns.value ? (openBlock(), createBlock(unref(N8nText), {
1324
- key: 0,
1325
- color: "text-light",
1326
- size: "small"
1327
- }, {
1328
- default: withCtx(() => [
1329
- createTextVNode(toDisplayString(unref(isSaving) ? unref(locale).baseText("testDefinition.edit.saving") : unref(locale).baseText("testDefinition.edit.saved")), 1)
1330
- ]),
1331
- _: 1
1332
- })) : createCommentVNode("", true),
1333
- createVNode(_component_N8nTooltip, {
1334
- disabled: isRunTestEnabled.value,
1335
- placement: "left"
1336
- }, {
1337
- content: withCtx(() => [
1338
- fieldsIssues.value.length > 0 ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
1339
- createBaseVNode("div", null, toDisplayString(unref(locale).baseText("testDefinition.completeConfig")), 1),
1340
- (openBlock(true), createElementBlock(Fragment, null, renderList(fieldsIssues.value, (issue) => {
1341
- return openBlock(), createElementBlock("div", {
1342
- key: issue.field
1343
- }, "- " + toDisplayString(issue.message), 1);
1344
- }), 128))
1345
- ], 64)) : createCommentVNode("", true),
1346
- isRunning.value ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
1347
- createTextVNode(toDisplayString(unref(locale).baseText("testDefinition.testIsRunning")), 1)
1348
- ], 64)) : createCommentVNode("", true)
1349
- ]),
1350
- default: withCtx(() => [
1351
- createVNode(unref(N8nButton), {
1352
- disabled: !isRunTestEnabled.value,
1353
- class: normalizeClass(_ctx.$style.runTestButton),
1354
- size: "small",
1355
- "data-test-id": "run-test-button",
1356
- label: unref(locale).baseText("testDefinition.runTest"),
1357
- type: "primary",
1358
- onClick: runTest
1359
- }, null, 8, ["disabled", "class", "label"])
1360
- ]),
1361
- _: 1
1362
- }, 8, ["disabled"])
1363
- ])
1364
- ], 2),
1365
- createBaseVNode("div", {
1366
- class: normalizeClass(_ctx.$style.wrapper)
1367
- }, [
1368
- createBaseVNode("div", {
1369
- class: normalizeClass(_ctx.$style.description)
1370
- }, [
1371
- createVNode(InlineNameEdit, {
1372
- "model-value": unref(state).description.value,
1373
- placeholder: "Add a description...",
1374
- required: false,
1375
- autosize: { minRows: 1, maxRows: 3 },
1376
- "input-type": "textarea",
1377
- maxlength: 260,
1378
- "max-height": "none",
1379
- type: "Test description",
1380
- "onUpdate:modelValue": updateDescription
1381
- }, {
1382
- default: withCtx(() => [
1383
- createVNode(unref(N8nText), {
1384
- size: "medium",
1385
- color: "text-base"
1386
- }, {
1387
- default: withCtx(() => [
1388
- createTextVNode(toDisplayString(unref(state).description.value), 1)
1389
- ]),
1390
- _: 1
1391
- })
1392
- ]),
1393
- _: 1
1394
- }, 8, ["model-value"])
1395
- ], 2),
1396
- createBaseVNode("div", {
1397
- class: normalizeClass({ [_ctx.$style.content]: true, [_ctx.$style.contentWithRuns]: hasRuns.value })
1398
- }, [
1399
- hasRuns.value ? (openBlock(), createBlock(RunsSection, {
1400
- key: 0,
1401
- selectedMetric: selectedMetric.value,
1402
- "onUpdate:selectedMetric": _cache[1] || (_cache[1] = ($event) => selectedMetric.value = $event),
1403
- class: normalizeClass(_ctx.$style.runs),
1404
- runs: runs2.value,
1405
- "test-id": _ctx.testId
1406
- }, null, 8, ["selectedMetric", "class", "runs", "test-id"])) : createCommentVNode("", true),
1407
- showConfig.value ? (openBlock(), createBlock(ConfigSection, {
1408
- key: 1,
1409
- tags: unref(state).tags,
1410
- "onUpdate:tags": _cache[2] || (_cache[2] = ($event) => unref(state).tags = $event),
1411
- evaluationWorkflow: unref(state).evaluationWorkflow,
1412
- "onUpdate:evaluationWorkflow": [
1413
- _cache[3] || (_cache[3] = ($event) => unref(state).evaluationWorkflow = $event),
1414
- unref(handleUpdateTestDebounced)
1415
- ],
1416
- mockedNodes: unref(state).mockedNodes,
1417
- "onUpdate:mockedNodes": [
1418
- _cache[4] || (_cache[4] = ($event) => unref(state).mockedNodes = $event),
1419
- unref(handleUpdateTestDebounced)
1420
- ],
1421
- class: normalizeClass(_ctx.$style.config),
1422
- "cancel-editing": unref(cancelEditing),
1423
- "tags-by-id": tagsById.value,
1424
- "is-loading": isLoading.value,
1425
- "get-field-issues": getFieldIssues,
1426
- "start-editing": unref(startEditing),
1427
- "save-changes": unref(saveChanges),
1428
- "has-runs": hasRuns.value,
1429
- "example-pinned-data": examplePinnedData.value,
1430
- "sample-workflow-name": workflowName.value,
1431
- onRenameTag: renameTag,
1432
- onOpenPinningModal: openPinningModal,
1433
- onOpenExecutionsViewForTag: openExecutionsViewForTag,
1434
- onEvaluationWorkflowCreated: _cache[5] || (_cache[5] = ($event) => onEvaluationWorkflowCreated($event))
1435
- }, null, 8, ["tags", "evaluationWorkflow", "mockedNodes", "class", "cancel-editing", "tags-by-id", "is-loading", "start-editing", "save-changes", "has-runs", "example-pinned-data", "sample-workflow-name", "onUpdate:evaluationWorkflow", "onUpdate:mockedNodes"])) : createCommentVNode("", true)
1436
- ], 2)
1437
- ], 2)
1438
- ], 2)) : createCommentVNode("", true);
1439
- };
1440
- }
1441
- });
1442
- const content = "_content_1o8sl_123";
1443
- const config = "_config_1o8sl_130";
1444
- const contentWithRuns = "_contentWithRuns_1o8sl_133";
1445
- const header = "_header_1o8sl_137";
1446
- const wrapper = "_wrapper_1o8sl_151";
1447
- const description = "_description_1o8sl_156";
1448
- const arrowBack = "_arrowBack_1o8sl_161";
1449
- const style0 = {
1450
- content,
1451
- config,
1452
- contentWithRuns,
1453
- header,
1454
- wrapper,
1455
- description,
1456
- arrowBack
1457
- };
1458
- const cssModules = {
1459
- "$style": style0
1460
- };
1461
- const TestDefinitionEditView = /* @__PURE__ */ _export_sfc(_sfc_main, [["__cssModules", cssModules]]);
1462
- export {
1463
- TestDefinitionEditView as default
1464
- };