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,631 +0,0 @@
1
- import { d as defineComponent, q as computed, i as createElementBlock, g as openBlock, n as normalizeClass, k as createBaseVNode, j as createVNode, w as withCtx, l as createTextVNode, m as unref, ds as N8nBadge, e as createBlock, f as createCommentVNode, t as toDisplayString, c as useI18n, bf as N8nText, bh as N8nButton, F as Fragment, _ as _export_sfc, x as renderSlot, b8 as mergeProps, bF as N8nIcon, db as _sfc_main$3, D as renderList, b as useRouter, fJ as useTestDefinitionStore, a as useToast, dq as useAsyncState, dk as orderBy, fK as N8nLoading, dg as N8nHeading, b3 as withModifiers, fL as N8nActionToggle, aR as N8nTooltip, aT as _sfc_main$4, V as VIEWS, aq as h, cv as RouterLink, ai as useMessage, aj as MODAL_CONFIRM } from "./index-hdsPF3tl.js";
2
- const _sfc_main$2 = /* @__PURE__ */ defineComponent({
3
- __name: "EmptyState",
4
- emits: ["create-test"],
5
- setup(__props) {
6
- const locale = useI18n();
7
- const canCreateEvaluations = computed(() => true);
8
- const isRegisteredCommunity = computed(() => false);
9
- const isNotRegisteredCommunity = computed(() => false);
10
- const hasReachedLimit = computed(() => false);
11
- return (_ctx, _cache) => {
12
- return openBlock(), createElementBlock("div", {
13
- class: normalizeClass(_ctx.$style.container)
14
- }, [
15
- createBaseVNode("div", {
16
- class: normalizeClass({ [_ctx.$style.card]: true, [_ctx.$style.cardActive]: true })
17
- }, [
18
- createVNode(unref(N8nBadge), {
19
- theme: "warning",
20
- size: "small"
21
- }, {
22
- default: withCtx(() => _cache[2] || (_cache[2] = [
23
- createTextVNode("New")
24
- ])),
25
- _: 1
26
- }),
27
- createBaseVNode("div", {
28
- class: normalizeClass(_ctx.$style.cardContent)
29
- }, [
30
- createVNode(unref(N8nText), {
31
- tag: "h2",
32
- size: "xlarge",
33
- color: "text-base",
34
- class: "mb-2xs"
35
- }, {
36
- default: withCtx(() => [
37
- createTextVNode(toDisplayString(unref(locale).baseText("testDefinition.list.evaluations")), 1)
38
- ]),
39
- _: 1
40
- }),
41
- createVNode(unref(N8nText), {
42
- tag: "div",
43
- color: "text-base",
44
- class: "mb-s ml-s mr-s"
45
- }, {
46
- default: withCtx(() => [
47
- createTextVNode(toDisplayString(unref(locale).baseText("testDefinition.list.actionDescription")), 1)
48
- ]),
49
- _: 1
50
- }),
51
- canCreateEvaluations.value ? (openBlock(), createBlock(unref(N8nButton), {
52
- key: 0,
53
- onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("create-test"))
54
- }, {
55
- default: withCtx(() => [
56
- createTextVNode(toDisplayString(unref(locale).baseText("testDefinition.list.actionButton")), 1)
57
- ]),
58
- _: 1
59
- })) : isRegisteredCommunity.value ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
60
- createVNode(unref(N8nButton), {
61
- onClick: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("create-test"))
62
- }, {
63
- default: withCtx(() => [
64
- createTextVNode(toDisplayString(unref(locale).baseText("testDefinition.list.actionButton")), 1)
65
- ]),
66
- _: 1
67
- }),
68
- createVNode(unref(N8nText), {
69
- tag: "div",
70
- color: "text-light",
71
- size: "small",
72
- class: "mt-2xs"
73
- }, {
74
- default: withCtx(() => [
75
- createTextVNode(toDisplayString(unref(locale).baseText("testDefinition.list.actionDescription.registered")), 1)
76
- ]),
77
- _: 1
78
- })
79
- ], 64)) : isNotRegisteredCommunity.value ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
80
- createBaseVNode("div", {
81
- class: normalizeClass([_ctx.$style.divider, "mb-s"])
82
- }, null, 2),
83
- createVNode(unref(N8nText), {
84
- tag: "div",
85
- color: "text-light",
86
- size: "small",
87
- class: "mb-s"
88
- }, {
89
- default: withCtx(() => [
90
- createTextVNode(toDisplayString(unref(locale).baseText("testDefinition.list.actionDescription.unregistered")), 1)
91
- ]),
92
- _: 1
93
- }),
94
- createVNode(unref(N8nButton), null, {
95
- default: withCtx(() => [
96
- createTextVNode(toDisplayString(unref(locale).baseText("testDefinition.list.actionButton.unregistered")), 1)
97
- ]),
98
- _: 1
99
- })
100
- ], 64)) : hasReachedLimit.value ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [
101
- createBaseVNode("div", {
102
- class: normalizeClass([_ctx.$style.divider, "mb-s"])
103
- }, null, 2),
104
- createVNode(unref(N8nText), {
105
- tag: "div",
106
- color: "text-light",
107
- size: "small",
108
- class: "mb-s"
109
- }, {
110
- default: withCtx(() => [
111
- createTextVNode(toDisplayString(unref(locale).baseText("testDefinition.list.actionDescription.atLimit")), 1)
112
- ]),
113
- _: 1
114
- }),
115
- createVNode(unref(N8nButton), null, {
116
- default: withCtx(() => [
117
- createTextVNode(toDisplayString(unref(locale).baseText("generic.upgrade")), 1)
118
- ]),
119
- _: 1
120
- })
121
- ], 64)) : createCommentVNode("", true)
122
- ], 2)
123
- ], 2),
124
- createBaseVNode("div", {
125
- class: normalizeClass({ [_ctx.$style.card]: true, [_ctx.$style.cardInActive]: true })
126
- }, [
127
- createVNode(unref(N8nBadge), null, {
128
- default: withCtx(() => [
129
- createTextVNode(toDisplayString(unref(locale).baseText("testDefinition.list.unitTests.badge")), 1)
130
- ]),
131
- _: 1
132
- }),
133
- createBaseVNode("div", {
134
- class: normalizeClass(_ctx.$style.cardContent)
135
- }, [
136
- createVNode(unref(N8nText), {
137
- tag: "h2",
138
- size: "xlarge",
139
- color: "text-base",
140
- class: "mb-2xs"
141
- }, {
142
- default: withCtx(() => [
143
- createTextVNode(toDisplayString(unref(locale).baseText("testDefinition.list.unitTests.title")), 1)
144
- ]),
145
- _: 1
146
- }),
147
- createVNode(unref(N8nText), {
148
- tag: "div",
149
- color: "text-base",
150
- class: "mb-s"
151
- }, {
152
- default: withCtx(() => [
153
- createTextVNode(toDisplayString(unref(locale).baseText("testDefinition.list.unitTests.description")), 1)
154
- ]),
155
- _: 1
156
- }),
157
- createVNode(unref(N8nButton), { type: "secondary" }, {
158
- default: withCtx(() => [
159
- createTextVNode(toDisplayString(unref(locale).baseText("testDefinition.list.unitTests.cta")), 1)
160
- ]),
161
- _: 1
162
- })
163
- ], 2)
164
- ], 2)
165
- ], 2);
166
- };
167
- }
168
- });
169
- const container$1 = "_container_q6l48_123";
170
- const card = "_card_q6l48_131";
171
- const cardContent = "_cardContent_q6l48_143";
172
- const cardActive = "_cardActive_q6l48_147";
173
- const cardInActive = "_cardInActive_q6l48_152";
174
- const divider = "_divider_q6l48_156";
175
- const style0$2 = {
176
- container: container$1,
177
- card,
178
- cardContent,
179
- cardActive,
180
- cardInActive,
181
- divider
182
- };
183
- const cssModules$2 = {
184
- "$style": style0$2
185
- };
186
- const EmptyState = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__cssModules", cssModules$2]]);
187
- const _sfc_main$1 = /* @__PURE__ */ defineComponent({
188
- __name: "TestItem",
189
- props: {
190
- name: {},
191
- testCases: {},
192
- execution: {},
193
- errors: {}
194
- },
195
- setup(__props) {
196
- const props = __props;
197
- const locale = useI18n();
198
- const statusesColorDictionary = {
199
- new: {
200
- icon: "circle",
201
- color: "foreground-dark"
202
- },
203
- running: {
204
- icon: "spinner",
205
- color: "secondary",
206
- spin: true
207
- },
208
- completed: {
209
- icon: "exclamation-circle",
210
- color: "success"
211
- },
212
- error: {
213
- icon: "exclamation-triangle",
214
- color: "danger"
215
- },
216
- cancelled: {
217
- icon: "minus-circle",
218
- color: "foreground-xdark"
219
- },
220
- warning: {
221
- icon: "exclamation-circle",
222
- color: "warning"
223
- },
224
- success: {
225
- icon: "circle-check",
226
- color: "success"
227
- }
228
- };
229
- const statusRender = computed(() => {
230
- if (props.errors?.length) {
231
- return {
232
- icon: "adjust",
233
- color: "foreground-dark",
234
- label: "Incomplete"
235
- };
236
- }
237
- if (!props.execution) {
238
- return {
239
- icon: "circle",
240
- color: "foreground-dark",
241
- label: "Never ran"
242
- };
243
- }
244
- return {
245
- ...statusesColorDictionary[props.execution.status],
246
- label: props.execution.status
247
- };
248
- });
249
- return (_ctx, _cache) => {
250
- return openBlock(), createElementBlock("div", {
251
- class: normalizeClass(_ctx.$style.testCard)
252
- }, [
253
- createBaseVNode("div", {
254
- class: normalizeClass(_ctx.$style.testCardContent)
255
- }, [
256
- createBaseVNode("div", null, [
257
- createVNode(unref(N8nText), {
258
- bold: "",
259
- tag: "div",
260
- class: normalizeClass(_ctx.$style.name)
261
- }, {
262
- default: withCtx(() => [
263
- createTextVNode(toDisplayString(_ctx.name), 1)
264
- ]),
265
- _: 1
266
- }, 8, ["class"]),
267
- createVNode(unref(N8nText), {
268
- tag: "div",
269
- color: "text-base",
270
- size: "small"
271
- }, {
272
- default: withCtx(() => [
273
- createTextVNode(toDisplayString(unref(locale).baseText("testDefinition.list.item.tests", {
274
- adjustToNumber: _ctx.testCases
275
- })), 1)
276
- ]),
277
- _: 1
278
- })
279
- ]),
280
- createBaseVNode("div", null, [
281
- createBaseVNode("div", {
282
- class: normalizeClass(_ctx.$style.status)
283
- }, [
284
- createVNode(unref(N8nIcon), mergeProps(statusRender.value, { size: "small" }), null, 16),
285
- createVNode(unref(N8nText), {
286
- size: "small",
287
- color: "text-base"
288
- }, {
289
- default: withCtx(() => [
290
- createTextVNode(toDisplayString(statusRender.value.label), 1)
291
- ]),
292
- _: 1
293
- })
294
- ], 2),
295
- _ctx.errors?.length ? (openBlock(), createBlock(unref(N8nText), {
296
- key: 0,
297
- tag: "div",
298
- color: "text-base",
299
- size: "small",
300
- class: "ml-m"
301
- }, {
302
- default: withCtx(() => [
303
- createTextVNode(toDisplayString(unref(locale).baseText("testDefinition.list.item.missingFields", {
304
- adjustToNumber: _ctx.errors.length
305
- })), 1)
306
- ]),
307
- _: 1
308
- })) : _ctx.execution ? (openBlock(), createBlock(unref(N8nText), {
309
- key: 1,
310
- tag: "div",
311
- color: "text-base",
312
- size: "small",
313
- class: "ml-m"
314
- }, {
315
- default: withCtx(() => [
316
- createVNode(_sfc_main$3, {
317
- date: _ctx.execution.updatedAt
318
- }, null, 8, ["date"])
319
- ]),
320
- _: 1
321
- })) : createCommentVNode("", true)
322
- ]),
323
- createBaseVNode("div", {
324
- class: normalizeClass(_ctx.$style.metrics)
325
- }, [
326
- _ctx.execution?.metrics ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(Object.entries(_ctx.execution.metrics), ([key, value]) => {
327
- return openBlock(), createElementBlock(Fragment, { key }, [
328
- createVNode(unref(N8nText), {
329
- color: "text-base",
330
- size: "small",
331
- style: { "overflow": "hidden", "text-overflow": "ellipsis" }
332
- }, {
333
- default: withCtx(() => [
334
- createTextVNode(toDisplayString(key), 1)
335
- ]),
336
- _: 2
337
- }, 1024),
338
- createVNode(unref(N8nText), {
339
- color: "text-base",
340
- size: "small",
341
- bold: ""
342
- }, {
343
- default: withCtx(() => [
344
- createTextVNode(toDisplayString(Math.round((value + Number.EPSILON) * 100) / 100), 1)
345
- ]),
346
- _: 2
347
- }, 1024)
348
- ], 64);
349
- }), 128)) : createCommentVNode("", true)
350
- ], 2)
351
- ], 2),
352
- renderSlot(_ctx.$slots, "prepend"),
353
- renderSlot(_ctx.$slots, "append")
354
- ], 2);
355
- };
356
- }
357
- });
358
- const testCard = "_testCard_72820_123";
359
- const name = "_name_72820_144";
360
- const status = "_status_72820_148";
361
- const testCardContent = "_testCardContent_72820_155";
362
- const metrics = "_metrics_72820_163";
363
- const style0$1 = {
364
- testCard,
365
- name,
366
- status,
367
- testCardContent,
368
- metrics
369
- };
370
- const cssModules$1 = {
371
- "$style": style0$1
372
- };
373
- const TestItem = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__cssModules", cssModules$1]]);
374
- const _sfc_main = /* @__PURE__ */ defineComponent({
375
- __name: "TestDefinitionListView",
376
- props: {
377
- name: {}
378
- },
379
- setup(__props) {
380
- const props = __props;
381
- const router = useRouter();
382
- const testDefinitionStore = useTestDefinitionStore();
383
- const toast = useToast();
384
- const locale = useI18n();
385
- const { confirm } = useMessage();
386
- const { isLoading } = useAsyncState(
387
- async () => {
388
- await testDefinitionStore.fetchAll({ workflowId: props.name });
389
- const response = testDefinitionStore.allTestDefinitionsByWorkflowId[props.name] ?? [];
390
- response.forEach((test) => testDefinitionStore.updateRunFieldIssues(test.id));
391
- return [];
392
- },
393
- [],
394
- {
395
- onError: (error) => toast.showError(error, locale.baseText("testDefinition.list.loadError")),
396
- shallow: false
397
- }
398
- );
399
- const tests = computed(() => testDefinitionStore.allTestDefinitionsByWorkflowId[props.name]);
400
- const listItems = computed(
401
- () => orderBy(tests.value, [(test) => new Date(test.updatedAt ?? test.createdAt)], ["desc"]).map(
402
- (test) => ({
403
- ...test,
404
- testCases: (testDefinitionStore.testRunsByTestId[test.id] || []).length,
405
- lastExecution: testDefinitionStore.lastRunByTestId[test.id] ?? void 0,
406
- isTestRunning: isTestRunning(test.id),
407
- setupErrors: testDefinitionStore.getFieldIssues(test.id) ?? []
408
- })
409
- )
410
- );
411
- const commands = {
412
- delete: onDeleteTest
413
- };
414
- const actions = computed(() => [
415
- {
416
- label: "Delete",
417
- value: "delete",
418
- disabled: false
419
- }
420
- ]);
421
- const handleAction = async (action, testId) => await commands[action](testId);
422
- function isTestRunning(testId) {
423
- return testDefinitionStore.lastRunByTestId[testId]?.status === "running";
424
- }
425
- function onCreateTest() {
426
- void router.push({ name: VIEWS.NEW_TEST_DEFINITION });
427
- }
428
- async function onRunTest(testId) {
429
- try {
430
- const result = await testDefinitionStore.startTestRun(testId);
431
- if (result.success) {
432
- toast.showMessage({
433
- title: locale.baseText("testDefinition.list.testStarted"),
434
- type: "success",
435
- message: h(
436
- RouterLink,
437
- { to: { name: VIEWS.TEST_DEFINITION_EDIT, params: { testId } } },
438
- () => "Go to runs"
439
- )
440
- });
441
- await testDefinitionStore.fetchTestRuns(testId);
442
- } else {
443
- throw new Error("Test run failed to start");
444
- }
445
- } catch (error) {
446
- toast.showError(error, locale.baseText("testDefinition.list.testStartError"));
447
- }
448
- }
449
- async function onCancelTestRun(testId) {
450
- try {
451
- const testRunId = testDefinitionStore.lastRunByTestId[testId]?.id;
452
- if (!testRunId) {
453
- throw new Error("Failed to cancel test run");
454
- }
455
- const result = await testDefinitionStore.cancelTestRun(testId, testRunId);
456
- if (result.success) {
457
- toast.showMessage({
458
- title: locale.baseText("testDefinition.list.testCancelled"),
459
- type: "success"
460
- });
461
- await testDefinitionStore.fetchTestRuns(testId);
462
- } else {
463
- throw new Error("Failed to cancel test run");
464
- }
465
- } catch (error) {
466
- toast.showError(error, locale.baseText("testDefinition.list.testStartError"));
467
- }
468
- }
469
- function onEditTest(testId) {
470
- void router.push({ name: VIEWS.TEST_DEFINITION_EDIT, params: { testId } });
471
- }
472
- async function onDeleteTest(testId) {
473
- const deleteConfirmed = await confirm(
474
- locale.baseText("testDefinition.deleteTest.warning"),
475
- locale.baseText("testDefinition.deleteTest"),
476
- {
477
- type: "warning",
478
- confirmButtonText: locale.baseText("generic.delete"),
479
- cancelButtonText: locale.baseText("generic.cancel"),
480
- closeOnClickModal: true
481
- }
482
- );
483
- if (deleteConfirmed !== MODAL_CONFIRM) {
484
- return;
485
- }
486
- await testDefinitionStore.deleteById(testId);
487
- toast.showMessage({
488
- title: locale.baseText("testDefinition.list.testDeleted"),
489
- type: "success"
490
- });
491
- }
492
- return (_ctx, _cache) => {
493
- return openBlock(), createElementBlock("div", {
494
- class: normalizeClass(_ctx.$style.container)
495
- }, [
496
- unref(isLoading) ? (openBlock(), createBlock(unref(N8nLoading), {
497
- key: 0,
498
- loading: "",
499
- rows: 3,
500
- "data-test-id": "test-definition-loader"
501
- })) : !listItems.value.length ? (openBlock(), createBlock(EmptyState, {
502
- key: 1,
503
- "data-test-id": "test-definition-empty-state",
504
- onCreateTest
505
- })) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [
506
- createBaseVNode("div", {
507
- class: normalizeClass(_ctx.$style.header)
508
- }, [
509
- createVNode(unref(N8nHeading), {
510
- size: "xlarge",
511
- color: "text-dark",
512
- bold: ""
513
- }, {
514
- default: withCtx(() => [
515
- createTextVNode(toDisplayString(unref(locale).baseText("testDefinition.list.tests")), 1)
516
- ]),
517
- _: 1
518
- }),
519
- createBaseVNode("div", null, [
520
- createVNode(unref(N8nButton), {
521
- label: unref(locale).baseText("testDefinition.list.createNew"),
522
- class: "mr-xs",
523
- onClick: onCreateTest
524
- }, null, 8, ["label"]),
525
- createVNode(unref(N8nButton), {
526
- label: unref(locale).baseText("testDefinition.list.runAll"),
527
- disabled: "",
528
- type: "secondary"
529
- }, null, 8, ["label"])
530
- ])
531
- ], 2),
532
- createBaseVNode("div", {
533
- class: normalizeClass(_ctx.$style.testList),
534
- "data-test-id": "test-definition-list"
535
- }, [
536
- (openBlock(true), createElementBlock(Fragment, null, renderList(listItems.value, (item) => {
537
- return openBlock(), createBlock(TestItem, {
538
- key: item.id,
539
- name: item.name,
540
- "test-cases": item.testCases,
541
- execution: item.lastExecution,
542
- errors: item.setupErrors,
543
- "data-test-id": `test-item-${item.id}`,
544
- onClick: ($event) => onEditTest(item.id)
545
- }, {
546
- prepend: withCtx(() => [
547
- createBaseVNode("div", {
548
- onClick: _cache[0] || (_cache[0] = withModifiers(() => {
549
- }, ["stop"]))
550
- }, [
551
- item.isTestRunning ? (openBlock(), createBlock(unref(N8nTooltip), {
552
- key: 0,
553
- content: "Cancel test run",
554
- placement: "top"
555
- }, {
556
- default: withCtx(() => [
557
- createVNode(unref(_sfc_main$4), {
558
- icon: "stop",
559
- type: "secondary",
560
- size: "mini",
561
- onClick: ($event) => onCancelTestRun(item.id)
562
- }, null, 8, ["onClick"])
563
- ]),
564
- _: 2
565
- }, 1024)) : (openBlock(), createBlock(unref(N8nTooltip), {
566
- key: 1,
567
- disabled: !Boolean(item.setupErrors.length),
568
- placement: "top",
569
- teleported: ""
570
- }, {
571
- content: withCtx(() => [
572
- createBaseVNode("div", null, toDisplayString(unref(locale).baseText("testDefinition.completeConfig")), 1),
573
- (openBlock(true), createElementBlock(Fragment, null, renderList(item.setupErrors, (issue) => {
574
- return openBlock(), createElementBlock("div", {
575
- key: issue.field
576
- }, " - " + toDisplayString(issue.message), 1);
577
- }), 128))
578
- ]),
579
- default: withCtx(() => [
580
- createVNode(unref(_sfc_main$4), {
581
- icon: "play",
582
- type: "secondary",
583
- size: "mini",
584
- disabled: Boolean(item.setupErrors.length),
585
- "data-test-id": `run-test-${item.id}`,
586
- onClick: ($event) => onRunTest(item.id)
587
- }, null, 8, ["disabled", "data-test-id", "onClick"])
588
- ]),
589
- _: 2
590
- }, 1032, ["disabled"]))
591
- ])
592
- ]),
593
- append: withCtx(() => [
594
- createBaseVNode("div", {
595
- onClick: _cache[1] || (_cache[1] = withModifiers(() => {
596
- }, ["stop"]))
597
- }, [
598
- createVNode(unref(N8nActionToggle), {
599
- actions: actions.value,
600
- "data-test-id": `test-actions-${item.id}`,
601
- "icon-orientation": "horizontal",
602
- onAction: (action) => handleAction(action, item.id)
603
- }, null, 8, ["actions", "data-test-id", "onAction"])
604
- ])
605
- ]),
606
- _: 2
607
- }, 1032, ["name", "test-cases", "execution", "errors", "data-test-id", "onClick"]);
608
- }), 128))
609
- ], 2)
610
- ], 64))
611
- ], 2);
612
- };
613
- }
614
- });
615
- const container = "_container_nrp6n_123";
616
- const loading = "_loading_nrp6n_131";
617
- const testList = "_testList_nrp6n_138";
618
- const header = "_header_nrp6n_145";
619
- const style0 = {
620
- container,
621
- loading,
622
- testList,
623
- header
624
- };
625
- const cssModules = {
626
- "$style": style0
627
- };
628
- const TestDefinitionListView = /* @__PURE__ */ _export_sfc(_sfc_main, [["__cssModules", cssModules]]);
629
- export {
630
- TestDefinitionListView as default
631
- };
@@ -1,75 +0,0 @@
1
- import { u as useTestDefinitionForm } from "./useTestDefinitionForm-Bi6EgFVm.js";
2
- import { d as defineComponent, fJ as useTestDefinitionStore, fn as useAnnotationTagsStore, at as useExecutionsStore, a as useToast, b as useRouter, R as useRoute, ag as useTelemetry, Z as useRootStore, V as VIEWS, e as createBlock, g as openBlock, m as unref, fK as N8nLoading } from "./index-hdsPF3tl.js";
3
- const _sfc_main = /* @__PURE__ */ defineComponent({
4
- __name: "TestDefinitionNewView",
5
- props: {
6
- name: {}
7
- },
8
- setup(__props) {
9
- const props = __props;
10
- const { state, createTest, updateTest } = useTestDefinitionForm();
11
- const testDefinitionStore = useTestDefinitionStore();
12
- const tagsStore = useAnnotationTagsStore();
13
- const executionsStore = useExecutionsStore();
14
- const toast = useToast();
15
- const telemetry = useTelemetry();
16
- const router = useRouter();
17
- const route = useRoute();
18
- function generateTagFromName(name) {
19
- let tag = name.toLowerCase().replace(/\s+/g, "_");
20
- if (tag.length > 18) {
21
- const start = tag.slice(0, 10);
22
- const end = tag.slice(-8);
23
- tag = `${start}..${end}`;
24
- }
25
- return tag;
26
- }
27
- async function createTag(tagName) {
28
- try {
29
- const newTag = await tagsStore.create(tagName, { incrementExisting: true });
30
- return newTag;
31
- } catch (error) {
32
- toast.showError(error, "Error", error.message);
33
- throw error;
34
- }
35
- }
36
- void createTest(props.name).then(async (test) => {
37
- if (!test) {
38
- throw new Error("no test found");
39
- }
40
- const tag = generateTagFromName(test.name);
41
- const testTag = await createTag(tag);
42
- state.value.tags.value = [testTag.id];
43
- if (typeof route.query?.executionId === "string" && Array.isArray(route.query.annotationTags)) {
44
- const newTags = [...route.query.annotationTags, testTag.id];
45
- await executionsStore.annotateExecution(route.query.executionId, { tags: newTags });
46
- }
47
- await updateTest(test.id);
48
- testDefinitionStore.updateRunFieldIssues(test.id);
49
- telemetry.track(
50
- "User created test",
51
- {
52
- test_id: test.id,
53
- workflow_id: props.name,
54
- session_id: useRootStore().pushRef
55
- },
56
- {
57
- withPostHog: true
58
- }
59
- );
60
- await router.replace({
61
- name: VIEWS.TEST_DEFINITION_EDIT,
62
- params: { testId: test.id }
63
- });
64
- });
65
- return (_ctx, _cache) => {
66
- return openBlock(), createBlock(unref(N8nLoading), {
67
- loading: "",
68
- rows: 3
69
- });
70
- };
71
- }
72
- });
73
- export {
74
- _sfc_main as default
75
- };