n8n-editor-ui 1.94.0 → 1.95.1

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