n8n-editor-ui 1.73.0 → 1.74.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.
- package/LICENSE.md +5 -3
- package/dist/assets/{AnnotationTagsDropdown.ee.vue_vue_type_script_setup_true_lang-DfdMypiE.js → AnnotationTagsDropdown.ee.vue_vue_type_script_setup_true_lang-CRv-7oGl.js} +1 -1
- package/dist/assets/AuthView-D4i2WDPk.css +408 -0
- package/dist/assets/{AuthView-ns622vck.js → AuthView-DiVCkmJO.js} +7 -7
- package/dist/assets/{CanvasChat-CxcfSR2i.js → CanvasChat-BMwaSHw5.js} +30 -29
- package/dist/assets/CanvasChat-oFfeuF_m.css +2735 -0
- package/dist/assets/{CanvasControls-pos7-QhU.js → CanvasControls-B3S4M5tk.js} +4 -4
- package/dist/assets/CanvasControls-DTjEPKS0.css +148 -0
- package/dist/assets/{ChangePasswordView-Db0MLvV3.js → ChangePasswordView-DMNxdEvW.js} +3 -3
- package/dist/assets/CollectionParameter-Cmdh94LV.js +4 -0
- package/dist/assets/{ConcurrentExecutionsHeader-D35VlIVA.js → ConcurrentExecutionsHeader-Cz1SdK5W.js} +11 -11
- package/dist/assets/ConcurrentExecutionsHeader-DETjSHgm.css +438 -0
- package/dist/assets/{CredentialsView-BV4NcyAR.js → CredentialsView-BdvSQS_L.js} +42 -14
- package/dist/assets/CredentialsView-DRWQyccW.css +294 -0
- package/dist/assets/ErrorView-DPS9icAS.css +144 -0
- package/dist/assets/{ErrorView-ClpY9Omy.js → ErrorView-pJv59Fp1.js} +4 -4
- package/dist/assets/ExecutionsView-C0P3HAAt.css +710 -0
- package/dist/assets/{ExecutionsView-CqWfQ-OS.js → ExecutionsView-DizYSIgZ.js} +35 -35
- package/dist/assets/{FileSaver.min-gIFS8BdZ.js → FileSaver.min-CYFZIcxk.js} +1 -1
- package/dist/assets/{FixedCollectionParameter-x6YwFDm3.js → FixedCollectionParameter-C-azlgUa.js} +1 -1
- package/dist/assets/{FixedCollectionParameter-YwQknIIC.css → FixedCollectionParameter-DvdC-9QQ.css} +122 -0
- package/dist/assets/{ForgotMyPasswordView-BgI4UOal.js → ForgotMyPasswordView-DLg1bxUi.js} +3 -3
- package/dist/assets/Logo-1eGohTKw.css +160 -0
- package/dist/assets/{Logo-DkVmhuQi.js → Logo-DN8dwlbz.js} +11 -10
- package/dist/assets/MainHeader-BIKp2Ncp.css +1449 -0
- package/dist/assets/{MainHeader-DzT-lrog.js → MainHeader-Dj7ade30.js} +46 -26
- package/dist/assets/MainSidebar-Djaxwdmm.css +985 -0
- package/dist/assets/{MainSidebar-5Pl77alo.js → MainSidebar-DlNj8GJy.js} +180 -98
- package/dist/assets/NodeCreation-RKvezEeg.css +152 -0
- package/dist/assets/{NodeCreation-CuUKKWoi.js → NodeCreation-ZBewl4bk.js} +10 -10
- package/dist/assets/NodeCreator-DDiuO5S0.css +2493 -0
- package/dist/assets/{NodeCreator-D7v1eC6a.js → NodeCreator-DdQP0uVg.js} +108 -84
- package/dist/assets/NodeViewSwitcher-Bdg8qofd.js +14837 -0
- package/dist/assets/NodeViewSwitcher-UPCWvuIo.css +6801 -0
- package/dist/assets/ProjectCardBadge-CKGc0yDi.css +145 -0
- package/dist/assets/{ProjectCardBadge-D7xb-Eyd.js → ProjectCardBadge-pbI58Ond.js} +9 -6
- package/dist/assets/ProjectHeader-CQjB5wC7.css +285 -0
- package/dist/assets/{ProjectHeader-K-i88xtf.js → ProjectHeader-D7XYidpZ.js} +67 -49
- package/dist/assets/ProjectSettings-BgunHp-2.css +286 -0
- package/dist/assets/{ProjectSettings-BO2wFmU7.js → ProjectSettings-CXSvZq_1.js} +87 -47
- package/dist/assets/{PushConnectionTracker.vue_vue_type_script_setup_true_lang-a7Fc7Xy7.js → PushConnectionTracker.vue_vue_type_script_setup_true_lang-B8guxlKC.js} +1 -1
- package/dist/assets/{ResourcesListLayout-CRrq5kQe.js → ResourcesListLayout-BhSNEyun.js} +25 -21
- package/dist/assets/ResourcesListLayout-Dw1dU1aW.css +748 -0
- package/dist/assets/RunDataJson-BXTLuo7i.css +323 -0
- package/dist/assets/{RunDataJson-DklR3U0f.js → RunDataJson-DyoK2r6Z.js} +19 -16
- package/dist/assets/{RunDataJsonActions-CHdDowSE.js → RunDataJsonActions-DmM5PsDX.js} +3 -4
- package/dist/assets/RunDataJsonActions-DrgwFS0W.css +133 -0
- package/dist/assets/{RunDataSearch-DWL0Lv8j.js → RunDataSearch-B9xsocwZ.js} +4 -4
- package/dist/assets/RunDataSearch-R6qtl0Jf.css +150 -0
- package/dist/assets/RunDataTable-CX7gToH4.css +272 -0
- package/dist/assets/{RunDataTable-C-K-SFOI.js → RunDataTable-iUS0fcZW.js} +28 -28
- package/dist/assets/{SamlOnboarding-CmE16j09.js → SamlOnboarding-c9rXuzta.js} +3 -3
- package/dist/assets/{SettingsApiView-Bm7VfYUo.js → SettingsApiView-BbA8em4X.js} +6 -6
- package/dist/assets/SettingsApiView-DJKJO7zM.css +145 -0
- package/dist/assets/{SettingsCommunityNodesView-BvoqYDi6.js → SettingsCommunityNodesView-BUA0OLqR.js} +18 -17
- package/dist/assets/SettingsCommunityNodesView-CAggjsaT.css +317 -0
- package/dist/assets/{SettingsExternalSecrets-_w5OFPo8.js → SettingsExternalSecrets-Bp4-QTpk.js} +7 -7
- package/dist/assets/SettingsExternalSecrets-d1KDgYYp.css +151 -0
- package/dist/assets/SettingsLdapView-Bx1eqk76.css +156 -0
- package/dist/assets/{SettingsLdapView-TS7oUlks.js → SettingsLdapView-DAraUZwU.js} +8 -8
- package/dist/assets/SettingsLogStreamingView-CflEMmu9.css +290 -0
- package/dist/assets/{SettingsLogStreamingView-CAarolrh.js → SettingsLogStreamingView-DTgMc-WZ.js} +8 -8
- package/dist/assets/{SettingsPersonalView-Dms8_Ph5.js → SettingsPersonalView-BDWzpO2x.js} +9 -9
- package/dist/assets/SettingsPersonalView-CwV8ImYG.css +175 -0
- package/dist/assets/{SettingsSourceControl-P9lNmLfg.js → SettingsSourceControl-Dr974WK5.js} +12 -12
- package/dist/assets/SettingsSourceControl-DxshapuD.css +202 -0
- package/dist/assets/SettingsSso-BjoJZ2DU.css +163 -0
- package/dist/assets/{SettingsSso-ICCxzOQe.js → SettingsSso-BxAzGPEO.js} +7 -7
- package/dist/assets/SettingsUsageAndPlan-B5DEUrT3.css +333 -0
- package/dist/assets/{SettingsUsageAndPlan-BSEPUc4B.js → SettingsUsageAndPlan-DXkQcpTq.js} +12 -12
- package/dist/assets/SettingsUsersView-By12E2li.css +143 -0
- package/dist/assets/{SettingsUsersView-BzekHfPV.js → SettingsUsersView-ioxWjgmR.js} +6 -6
- package/dist/assets/{SettingsView-DupTDURU.js → SettingsView-B_btgRH4.js} +7 -7
- package/dist/assets/SettingsView-Bawwm19P.css +285 -0
- package/dist/assets/{SetupView-Cq64VV9c.js → SetupView-r9ZPGr7D.js} +3 -3
- package/dist/assets/{SetupWorkflowCredentialsButton-LuQ_SEWx.js → SetupWorkflowCredentialsButton-BQTw1Lni.js} +1 -1
- package/dist/assets/{SetupWorkflowFromTemplateView-ClOfcHle.js → SetupWorkflowFromTemplateView-ChO-yyKZ.js} +8 -8
- package/dist/assets/SetupWorkflowFromTemplateView-ZPJL_m2F.css +148 -0
- package/dist/assets/SigninView-D57wRRHz.css +150 -0
- package/dist/assets/{SigninView-DM8DhinJ.js → SigninView-D7_W1amk.js} +9 -9
- package/dist/assets/{SignoutView-BK-qDL3I.js → SignoutView-BvPOsQQ0.js} +1 -1
- package/dist/assets/{SignupView-CWOVKxEj.js → SignupView-Bf0vYlCQ.js} +3 -3
- package/dist/assets/{TemplateDetails-DUTNl1QK.js → TemplateDetails-D-RiAVQD.js} +7 -7
- package/dist/assets/TemplateDetails-DyUqVhf2.css +265 -0
- package/dist/assets/TemplateList-DcOqRM10.css +480 -0
- package/dist/assets/{TemplateList-DYRBepI5.js → TemplateList-DeJfbzYl.js} +24 -24
- package/dist/assets/TemplatesCollectionView-2q1rzsOG.css +156 -0
- package/dist/assets/{TemplatesCollectionView-BxG1bRhA.js → TemplatesCollectionView-uSsfhIa9.js} +12 -12
- package/dist/assets/{TemplatesSearchView-UBZQnh-e.js → TemplatesSearchView-DBbTV_xi.js} +18 -18
- package/dist/assets/TemplatesSearchView-DETaMpDt.css +953 -0
- package/dist/assets/TemplatesView-Cyu28Dlo.css +285 -0
- package/dist/assets/{TemplatesView-mU_A1pwb.js → TemplatesView-Qt03GfQO.js} +8 -8
- package/dist/assets/{TemplatesWorkflowView-D5N-R1lr.js → TemplatesWorkflowView-CLplrMA6.js} +13 -13
- package/dist/assets/TemplatesWorkflowView-DpIiJjJp.css +168 -0
- package/dist/assets/{TestDefinitionEditView-CAgd51U-.js → TestDefinitionEditView-CEfQepq8.js} +587 -197
- package/dist/assets/TestDefinitionEditView-DM4tV2LS.css +1267 -0
- package/dist/assets/{TestDefinitionListView-CKSy47GW.js → TestDefinitionListView-6hn-gG-H.js} +96 -65
- package/dist/assets/TestDefinitionListView-BD5_O4Fx.css +567 -0
- package/dist/assets/{VariablesView-DPbCYxLS.js → VariablesView-BrXojLhD.js} +8 -8
- package/dist/assets/VariablesView-D4pRzSuY.css +434 -0
- package/dist/assets/WorkerView-BrSoYcbf.css +977 -0
- package/dist/assets/{WorkerView-CtrrcIx2.js → WorkerView-DwULN80E.js} +30 -177
- package/dist/assets/WorkflowActivator-DQhm5t0U.css +260 -0
- package/dist/assets/{WorkflowActivator-BbwFaJ9a.js → WorkflowActivator-Dm9xwqOB.js} +3 -3
- package/dist/assets/{WorkflowExecutionsInfoAccordion-D-0JKX5I.js → WorkflowExecutionsInfoAccordion-B-Z0pyld.js} +3 -3
- package/dist/assets/WorkflowExecutionsInfoAccordion-BBtwnPZQ.css +155 -0
- package/dist/assets/WorkflowExecutionsLandingPage-Bm_hJMl4.css +145 -0
- package/dist/assets/{WorkflowExecutionsLandingPage-C9P1l_M7.js → WorkflowExecutionsLandingPage-HJBYlJAc.js} +5 -5
- package/dist/assets/WorkflowExecutionsPreview-CrGxxhLQ.css +537 -0
- package/dist/assets/{WorkflowExecutionsPreview-C05AfyP-.js → WorkflowExecutionsPreview-nYDpKm_b.js} +37 -37
- package/dist/assets/{WorkflowExecutionsView-qXpp42wG.js → WorkflowExecutionsView-Chvs3FQ3.js} +35 -35
- package/dist/assets/WorkflowExecutionsView-DEqJNNDZ.css +676 -0
- package/dist/assets/{WorkflowHistory-CbBn3xYH.js → WorkflowHistory-6MCJq0xa.js} +22 -22
- package/dist/assets/WorkflowHistory-7Ad0Va7M.css +669 -0
- package/dist/assets/{WorkflowOnboardingView-Cb8Efn6T.js → WorkflowOnboardingView-7WiSlKOU.js} +1 -19
- package/dist/assets/WorkflowPreview-CIOAVgxK.css +162 -0
- package/dist/assets/{WorkflowPreview-DzTTLI8R.js → WorkflowPreview-Dw2NtUVX.js} +8 -8
- package/dist/assets/WorkflowsView-DMIGjzPW.css +323 -0
- package/dist/assets/{WorkflowsView-BUM-Mmss.js → WorkflowsView-DXnpDXEX.js} +29 -19
- package/dist/assets/easyAiWorkflowUtils-BTWwHsY8.js +181 -0
- package/dist/assets/{index-LIwDUX8i.css → index-B7TFhNa2.css} +30882 -6572
- package/dist/assets/{index-DYxqsGB9.js → index-D0W-rAl_.js} +78733 -72194
- package/dist/assets/{pushConnection.store-BVUirLTG.js → pushConnection.store-SZWXnCKb.js} +1 -1
- package/dist/assets/{templateActions-CXAWj8IS.js → templateActions-DDtJe_-b.js} +1 -1
- package/dist/assets/typescript.worker-H0DmdklC.js +213997 -0
- package/dist/assets/{useBugReporting-C3NtP4ZZ.js → useBugReporting-BGxycXGV.js} +1 -1
- package/dist/assets/{NodeViewSwitcher-hKoOeK8j.js → useCanvasOperations-BsWyQUek.js} +19402 -33901
- package/dist/assets/useCanvasOperations-Byu1Z5ea.css +4144 -0
- package/dist/assets/{useExecutionDebugging-BnF8o4vE.js → useExecutionDebugging-CB_jUGyC.js} +1 -1
- package/dist/assets/{useExecutionHelpers-7qmdZ0on.js → useExecutionHelpers-COwnTHmy.js} +1 -1
- package/dist/assets/{useNodeViewVersionSwitcher-tFqgPPim.js → useNodeViewVersionSwitcher-C8AkOtTL.js} +1 -1
- package/dist/assets/usePinnedData-872bXiu-.js +274 -0
- package/dist/assets/{usePushConnection-FexDCcd7.js → usePushConnection-CXpJRez7.js} +11 -4
- package/dist/assets/{useRunWorkflow-BDl-2MsN.css → useRunWorkflow-DWoFsQdi.css} +406 -40
- package/dist/assets/{useRunWorkflow-BPsvjsSm.js → useRunWorkflow-u9KNHrnZ.js} +31 -301
- package/dist/assets/{useWorkflowActivate-CIqICdFm.js → useWorkflowActivate-D8Du1iYk.js} +1 -1
- package/dist/index.html +2 -2
- package/package.json +1 -1
- package/tsconfig.json +2 -1
- package/vite.config.mts +8 -1
- package/dist/assets/AuthView-CvfW_aKu.css +0 -42
- package/dist/assets/CanvasChat-DhkdJLy7.css +0 -661
- package/dist/assets/CanvasControls-BEOkwFDJ.css +0 -26
- package/dist/assets/CollectionParameter-DYy0fmgJ.js +0 -4
- package/dist/assets/ConcurrentExecutionsHeader-ChCLnjVG.css +0 -72
- package/dist/assets/CredentialsView-CzforIh7.css +0 -36
- package/dist/assets/ErrorView-DZCz_7-d.css +0 -22
- package/dist/assets/ExecutionsView-CLxQdDnP.css +0 -217
- package/dist/assets/Logo-1JT6Fq4s.css +0 -38
- package/dist/assets/MainHeader-B1mQLyCP.css +0 -224
- package/dist/assets/MainSidebar-BQss-EVY.css +0 -245
- package/dist/assets/NodeCreation-DTNNkgVv.css +0 -30
- package/dist/assets/NodeCreator-BvqI_pdC.css +0 -522
- package/dist/assets/NodeViewSwitcher-D0jynVNt.css +0 -3108
- package/dist/assets/ProjectCardBadge-DQvW5T7s.css +0 -20
- package/dist/assets/ProjectHeader-CY9vPy_p.css +0 -37
- package/dist/assets/ProjectSettings-DZws5IzZ.css +0 -34
- package/dist/assets/ResourcesListLayout-NZz6R66g.css +0 -96
- package/dist/assets/RunDataJson-DW_khHj4.css +0 -79
- package/dist/assets/RunDataJsonActions-CoiM0oFP.css +0 -11
- package/dist/assets/RunDataSearch-B4q8H9Ex.css +0 -28
- package/dist/assets/RunDataTable-BOaG0Pms.css +0 -150
- package/dist/assets/SettingsApiView-DX3S-5pa.css +0 -23
- package/dist/assets/SettingsCommunityNodesView-kzxtAoLp.css +0 -73
- package/dist/assets/SettingsExternalSecrets-BnXyxlJd.css +0 -29
- package/dist/assets/SettingsLdapView-BPh_inzE.css +0 -34
- package/dist/assets/SettingsLogStreamingView-Uz298HNW.css +0 -46
- package/dist/assets/SettingsPersonalView-CqzRUitO.css +0 -53
- package/dist/assets/SettingsSourceControl-C7H8sLJN.css +0 -80
- package/dist/assets/SettingsSso-Be_ejj46.css +0 -41
- package/dist/assets/SettingsUsageAndPlan-C3fKPMTY.css +0 -89
- package/dist/assets/SettingsUsersView-C13eCMjh.css +0 -21
- package/dist/assets/SettingsView-o6uNYu0t.css +0 -41
- package/dist/assets/SetupWorkflowFromTemplateView-DjBcyMCl.css +0 -26
- package/dist/assets/SigninView-BbpzRtoX.css +0 -28
- package/dist/assets/TemplateDetails-p3M6A7jr.css +0 -21
- package/dist/assets/TemplateList-BR3bpDTv.css +0 -114
- package/dist/assets/TemplatesCollectionView-DJVlK4Bb.css +0 -34
- package/dist/assets/TemplatesSearchView-CFrHWGcY.css +0 -221
- package/dist/assets/TemplatesView-CBNZZ_X1.css +0 -41
- package/dist/assets/TemplatesWorkflowView-CVC0fbb6.css +0 -46
- package/dist/assets/TestDefinitionEditView-CVRXpJ4c.css +0 -220
- package/dist/assets/TestDefinitionListView-BJVxwUdb.css +0 -80
- package/dist/assets/VariablesView-BnGnRwcl.css +0 -182
- package/dist/assets/WorkerView-CvXMClDD.css +0 -123
- package/dist/assets/WorkflowActivator-DSBGQvK0.css +0 -16
- package/dist/assets/WorkflowExecutionsInfoAccordion-f5tIRAwu.css +0 -33
- package/dist/assets/WorkflowExecutionsLandingPage-BodEQ5Bq.css +0 -23
- package/dist/assets/WorkflowExecutionsPreview-C-e7WZrK.css +0 -171
- package/dist/assets/WorkflowExecutionsView-CFOgmzpK.css +0 -178
- package/dist/assets/WorkflowHistory-D0ufvWsH.css +0 -181
- package/dist/assets/WorkflowPreview-DuLM6rtd.css +0 -40
- package/dist/assets/WorkflowsView-D5fBzfD4.css +0 -65
- package/dist/assets/testDefinition.store.ee-D3IYMf-K.js +0 -138
package/dist/assets/{TestDefinitionEditView-CAgd51U-.js → TestDefinitionEditView-CEfQepq8.js}
RENAMED
|
@@ -1,6 +1,175 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { f as useCanvasOperations, d as useVueFlow, e as useCanvasMapping, _ as __unplugin_components_0$1 } from "./useCanvasOperations-BsWyQUek.js";
|
|
2
|
+
import { d as defineComponent, T as useWorkflowsStore, bn as useNodeTypesStore, U as useRoute, b as useRouter, r as ref, q as computed, o as onMounted, c as openBlock, h as createElementBlock, e as createBlock, n as normalizeClass, f as createCommentVNode, i as createVNode, w as withCtx, j as createBaseVNode, k as createTextVNode, t as toDisplayString, l as unref, aO as N8nTooltip, g as useI18n, C as createEventBus, aa as useCssModule, m as resolveComponent, _ as _export_sfc, hI as useTestDefinitionStore, F as Fragment, s as renderSlot, ay as withDirectives, az as vShow, hJ as ElCollapseTransition, y as nextTick, A as renderList, hC as _sfc_main$9, hK as __unplugin_components_0$2, J as useDebounce, a as useToast, hA as useAnnotationTagsStore, K as useUIStore, V as VIEWS, H as watch, hL as TestRunsTable, hM as NODE_PINNING_MODAL_KEY, hN as Modal } from "./index-D0W-rAl_.js";
|
|
3
|
+
import "./useBugReporting-BGxycXGV.js";
|
|
4
|
+
import "./usePinnedData-872bXiu-.js";
|
|
5
|
+
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
6
|
+
__name: "NodesPinning",
|
|
7
|
+
props: {
|
|
8
|
+
modelValue: {}
|
|
9
|
+
},
|
|
10
|
+
emits: ["update:modelValue"],
|
|
11
|
+
setup(__props, { emit: __emit }) {
|
|
12
|
+
const workflowsStore = useWorkflowsStore();
|
|
13
|
+
const nodeTypesStore = useNodeTypesStore();
|
|
14
|
+
const route = useRoute();
|
|
15
|
+
const router = useRouter();
|
|
16
|
+
const locale = useI18n();
|
|
17
|
+
const { resetWorkspace, initializeWorkspace } = useCanvasOperations({ router });
|
|
18
|
+
const eventBus = createEventBus();
|
|
19
|
+
const style = useCssModule();
|
|
20
|
+
const uuid = crypto.randomUUID();
|
|
21
|
+
const props = __props;
|
|
22
|
+
const emit = __emit;
|
|
23
|
+
const isLoading = ref(true);
|
|
24
|
+
const workflowId = computed(() => route.params.name);
|
|
25
|
+
const testId = computed(() => route.params.testId);
|
|
26
|
+
const workflow2 = computed(() => workflowsStore.getWorkflowById(workflowId.value));
|
|
27
|
+
const workflowObject = computed(() => workflowsStore.getCurrentWorkflow(true));
|
|
28
|
+
const canvasId = computed(() => `${uuid}-${testId.value}`);
|
|
29
|
+
const { onNodesInitialized, fitView, zoomTo } = useVueFlow({ id: canvasId.value });
|
|
30
|
+
const nodes = computed(() => {
|
|
31
|
+
return workflow2.value.nodes ?? [];
|
|
32
|
+
});
|
|
33
|
+
const connections = computed(() => workflow2.value.connections);
|
|
34
|
+
const { nodes: mappedNodes, connections: mappedConnections } = useCanvasMapping({
|
|
35
|
+
nodes,
|
|
36
|
+
connections,
|
|
37
|
+
workflowObject
|
|
38
|
+
});
|
|
39
|
+
async function loadData() {
|
|
40
|
+
workflowsStore.resetState();
|
|
41
|
+
resetWorkspace();
|
|
42
|
+
const loadingPromise = Promise.all([
|
|
43
|
+
nodeTypesStore.getNodeTypes(),
|
|
44
|
+
workflowsStore.fetchWorkflow(workflowId.value)
|
|
45
|
+
]);
|
|
46
|
+
await loadingPromise;
|
|
47
|
+
initializeWorkspace(workflow2.value);
|
|
48
|
+
disableAllNodes();
|
|
49
|
+
}
|
|
50
|
+
function getNodeNameById(id) {
|
|
51
|
+
return mappedNodes.value.find((node) => node.id === id)?.data?.name;
|
|
52
|
+
}
|
|
53
|
+
function updateNodeClasses(nodeIds, isPinned) {
|
|
54
|
+
eventBus.emit("nodes:action", {
|
|
55
|
+
ids: nodeIds,
|
|
56
|
+
action: "update:node:class",
|
|
57
|
+
payload: {
|
|
58
|
+
className: style.pinnedNode,
|
|
59
|
+
add: isPinned
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
eventBus.emit("nodes:action", {
|
|
63
|
+
ids: nodeIds,
|
|
64
|
+
action: "update:node:class",
|
|
65
|
+
payload: {
|
|
66
|
+
className: style.notPinnedNode,
|
|
67
|
+
add: !isPinned
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
function disableAllNodes() {
|
|
72
|
+
const ids = mappedNodes.value.map((node) => node.id);
|
|
73
|
+
updateNodeClasses(ids, false);
|
|
74
|
+
const pinnedNodes = props.modelValue.map((node) => {
|
|
75
|
+
const matchedNode = mappedNodes.value.find(
|
|
76
|
+
(mappedNode) => mappedNode?.data?.name === node.name
|
|
77
|
+
);
|
|
78
|
+
return matchedNode?.id ?? null;
|
|
79
|
+
}).filter((n) => n !== null);
|
|
80
|
+
if (pinnedNodes.length > 0) {
|
|
81
|
+
updateNodeClasses(pinnedNodes, true);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
function onPinButtonClick(data) {
|
|
85
|
+
const nodeName = getNodeNameById(data.id);
|
|
86
|
+
if (!nodeName) return;
|
|
87
|
+
const isPinned = props.modelValue.some((node) => node.name === nodeName);
|
|
88
|
+
const updatedNodes = isPinned ? props.modelValue.filter((node) => node.name !== nodeName) : [...props.modelValue, { name: nodeName }];
|
|
89
|
+
emit("update:modelValue", updatedNodes);
|
|
90
|
+
updateNodeClasses([data.id], !isPinned);
|
|
91
|
+
}
|
|
92
|
+
function isPinButtonVisible(outputs) {
|
|
93
|
+
return outputs.length === 1;
|
|
94
|
+
}
|
|
95
|
+
onNodesInitialized(async () => {
|
|
96
|
+
await fitView();
|
|
97
|
+
isLoading.value = false;
|
|
98
|
+
await zoomTo(0.7, { duration: 400 });
|
|
99
|
+
});
|
|
100
|
+
onMounted(loadData);
|
|
101
|
+
return (_ctx, _cache) => {
|
|
102
|
+
const _component_N8nSpinner = resolveComponent("N8nSpinner");
|
|
103
|
+
const _component_n8n_icon_button = resolveComponent("n8n-icon-button");
|
|
104
|
+
const _component_Canvas = __unplugin_components_0$1;
|
|
105
|
+
return openBlock(), createElementBlock("div", {
|
|
106
|
+
class: normalizeClass(_ctx.$style.container)
|
|
107
|
+
}, [
|
|
108
|
+
isLoading.value ? (openBlock(), createBlock(_component_N8nSpinner, {
|
|
109
|
+
key: 0,
|
|
110
|
+
size: "xlarge",
|
|
111
|
+
type: "dots",
|
|
112
|
+
class: normalizeClass(_ctx.$style.spinner)
|
|
113
|
+
}, null, 8, ["class"])) : createCommentVNode("", true),
|
|
114
|
+
createVNode(_component_Canvas, {
|
|
115
|
+
id: canvasId.value,
|
|
116
|
+
loading: isLoading.value,
|
|
117
|
+
class: normalizeClass({ [_ctx.$style.canvas]: true }),
|
|
118
|
+
nodes: unref(mappedNodes),
|
|
119
|
+
connections: unref(mappedConnections),
|
|
120
|
+
"show-bug-reporting-button": false,
|
|
121
|
+
"read-only": true,
|
|
122
|
+
"event-bus": unref(eventBus)
|
|
123
|
+
}, {
|
|
124
|
+
nodeToolbar: withCtx(({ data, outputs }) => [
|
|
125
|
+
createBaseVNode("div", {
|
|
126
|
+
class: normalizeClass(_ctx.$style.pinButtonContainer)
|
|
127
|
+
}, [
|
|
128
|
+
isPinButtonVisible(outputs) ? (openBlock(), createBlock(unref(N8nTooltip), {
|
|
129
|
+
key: 0,
|
|
130
|
+
placement: "left"
|
|
131
|
+
}, {
|
|
132
|
+
content: withCtx(() => [
|
|
133
|
+
createTextVNode(toDisplayString(unref(locale).baseText("testDefinition.edit.nodesPinning.pinButtonTooltip")), 1)
|
|
134
|
+
]),
|
|
135
|
+
default: withCtx(() => [
|
|
136
|
+
createVNode(_component_n8n_icon_button, {
|
|
137
|
+
type: "tertiary",
|
|
138
|
+
size: "large",
|
|
139
|
+
icon: "thumbtack",
|
|
140
|
+
class: normalizeClass(_ctx.$style.pinButton),
|
|
141
|
+
onClick: ($event) => onPinButtonClick(data)
|
|
142
|
+
}, null, 8, ["class", "onClick"])
|
|
143
|
+
]),
|
|
144
|
+
_: 2
|
|
145
|
+
}, 1024)) : createCommentVNode("", true)
|
|
146
|
+
], 2)
|
|
147
|
+
]),
|
|
148
|
+
_: 1
|
|
149
|
+
}, 8, ["id", "loading", "class", "nodes", "connections", "event-bus"])
|
|
150
|
+
], 2);
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
const container$1 = "_container_1ogu0_123";
|
|
155
|
+
const pinButtonContainer = "_pinButtonContainer_1ogu0_128";
|
|
156
|
+
const pinButton = "_pinButton_1ogu0_128";
|
|
157
|
+
const notPinnedNode = "_notPinnedNode_1ogu0_142";
|
|
158
|
+
const pinnedNode = "_pinnedNode_1ogu0_143";
|
|
159
|
+
const spinner = "_spinner_1ogu0_154";
|
|
160
|
+
const style0$7 = {
|
|
161
|
+
container: container$1,
|
|
162
|
+
pinButtonContainer,
|
|
163
|
+
pinButton,
|
|
164
|
+
notPinnedNode,
|
|
165
|
+
pinnedNode,
|
|
166
|
+
spinner
|
|
167
|
+
};
|
|
168
|
+
const cssModules$7 = {
|
|
169
|
+
"$style": style0$7
|
|
170
|
+
};
|
|
171
|
+
const __unplugin_components_1 = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__cssModules", cssModules$7]]);
|
|
172
|
+
const arrowConnector = "_arrowConnector_1mi41_123";
|
|
4
173
|
const style0$6 = {
|
|
5
174
|
arrowConnector
|
|
6
175
|
};
|
|
@@ -17,49 +186,56 @@ const __unplugin_components_0 = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["rend
|
|
|
17
186
|
function useTestDefinitionForm() {
|
|
18
187
|
const evaluationsStore = useTestDefinitionStore();
|
|
19
188
|
const state = ref({
|
|
20
|
-
description: "",
|
|
21
189
|
name: {
|
|
22
|
-
value: `My Test
|
|
23
|
-
|
|
24
|
-
|
|
190
|
+
value: `My Test ${evaluationsStore.allTestDefinitions.length + 1}`,
|
|
191
|
+
tempValue: "",
|
|
192
|
+
isEditing: false
|
|
25
193
|
},
|
|
26
194
|
tags: {
|
|
27
|
-
|
|
28
|
-
|
|
195
|
+
value: [],
|
|
196
|
+
tempValue: [],
|
|
197
|
+
isEditing: false
|
|
29
198
|
},
|
|
199
|
+
description: "",
|
|
30
200
|
evaluationWorkflow: {
|
|
31
201
|
mode: "list",
|
|
32
202
|
value: "",
|
|
33
203
|
__rl: true
|
|
34
204
|
},
|
|
35
|
-
metrics: [
|
|
205
|
+
metrics: [],
|
|
206
|
+
mockedNodes: []
|
|
36
207
|
});
|
|
37
208
|
const isSaving = ref(false);
|
|
38
209
|
const fieldsIssues = ref([]);
|
|
39
210
|
const fields = ref({});
|
|
211
|
+
const editableFields = computed(() => ({
|
|
212
|
+
name: state.value.name,
|
|
213
|
+
tags: state.value.tags
|
|
214
|
+
}));
|
|
40
215
|
const loadTestData = async (testId) => {
|
|
41
216
|
try {
|
|
42
217
|
await evaluationsStore.fetchAll({ force: true });
|
|
43
218
|
const testDefinition = evaluationsStore.testDefinitionsById[testId];
|
|
44
219
|
if (testDefinition) {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
metrics: [""]
|
|
220
|
+
const metrics = await evaluationsStore.fetchMetrics(testId);
|
|
221
|
+
state.value.description = testDefinition.description ?? "";
|
|
222
|
+
state.value.name = {
|
|
223
|
+
value: testDefinition.name ?? "",
|
|
224
|
+
isEditing: false,
|
|
225
|
+
tempValue: ""
|
|
226
|
+
};
|
|
227
|
+
state.value.tags = {
|
|
228
|
+
isEditing: false,
|
|
229
|
+
value: testDefinition.annotationTagId ? [testDefinition.annotationTagId] : [],
|
|
230
|
+
tempValue: []
|
|
231
|
+
};
|
|
232
|
+
state.value.evaluationWorkflow = {
|
|
233
|
+
mode: "list",
|
|
234
|
+
value: testDefinition.evaluationWorkflowId ?? "",
|
|
235
|
+
__rl: true
|
|
62
236
|
};
|
|
237
|
+
state.value.metrics = metrics;
|
|
238
|
+
state.value.mockedNodes = testDefinition.mockedNodes ?? [];
|
|
63
239
|
}
|
|
64
240
|
} catch (error) {
|
|
65
241
|
console.error("Failed to load test data", error);
|
|
@@ -75,14 +251,34 @@ function useTestDefinitionForm() {
|
|
|
75
251
|
workflowId,
|
|
76
252
|
description: state.value.description
|
|
77
253
|
};
|
|
78
|
-
|
|
79
|
-
return newTest;
|
|
80
|
-
} catch (error) {
|
|
81
|
-
throw error;
|
|
254
|
+
return await evaluationsStore.create(params);
|
|
82
255
|
} finally {
|
|
83
256
|
isSaving.value = false;
|
|
84
257
|
}
|
|
85
258
|
};
|
|
259
|
+
const deleteMetric = async (metricId, testId) => {
|
|
260
|
+
await evaluationsStore.deleteMetric({ id: metricId, testDefinitionId: testId });
|
|
261
|
+
state.value.metrics = state.value.metrics.filter((metric) => metric.id !== metricId);
|
|
262
|
+
};
|
|
263
|
+
const updateMetrics = async (testId) => {
|
|
264
|
+
const promises = state.value.metrics.map(async (metric) => {
|
|
265
|
+
if (!metric.name) return;
|
|
266
|
+
if (!metric.id) {
|
|
267
|
+
const createdMetric = await evaluationsStore.createMetric({
|
|
268
|
+
name: metric.name,
|
|
269
|
+
testDefinitionId: testId
|
|
270
|
+
});
|
|
271
|
+
metric.id = createdMetric.id;
|
|
272
|
+
} else {
|
|
273
|
+
await evaluationsStore.updateMetric({
|
|
274
|
+
name: metric.name,
|
|
275
|
+
id: metric.id,
|
|
276
|
+
testDefinitionId: testId
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
});
|
|
280
|
+
await Promise.all(promises);
|
|
281
|
+
};
|
|
86
282
|
const updateTest = async (testId) => {
|
|
87
283
|
if (isSaving.value) return;
|
|
88
284
|
isSaving.value = true;
|
|
@@ -98,54 +294,59 @@ function useTestDefinitionForm() {
|
|
|
98
294
|
if (state.value.evaluationWorkflow.value) {
|
|
99
295
|
params.evaluationWorkflowId = state.value.evaluationWorkflow.value.toString();
|
|
100
296
|
}
|
|
101
|
-
const annotationTagId = state.value.tags.
|
|
297
|
+
const annotationTagId = state.value.tags.value[0];
|
|
102
298
|
if (annotationTagId) {
|
|
103
299
|
params.annotationTagId = annotationTagId;
|
|
104
300
|
}
|
|
301
|
+
if (state.value.mockedNodes.length > 0) {
|
|
302
|
+
params.mockedNodes = state.value.mockedNodes;
|
|
303
|
+
}
|
|
105
304
|
return await evaluationsStore.update({ ...params, id: testId });
|
|
106
|
-
} catch (error) {
|
|
107
|
-
throw error;
|
|
108
305
|
} finally {
|
|
109
306
|
isSaving.value = false;
|
|
110
307
|
}
|
|
111
308
|
};
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
} else {
|
|
117
|
-
state.value.tags.isEditing = true;
|
|
309
|
+
function startEditing(field2) {
|
|
310
|
+
const fieldObj = editableFields.value[field2];
|
|
311
|
+
if (fieldObj.isEditing) {
|
|
312
|
+
return;
|
|
118
313
|
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
if (field2 === "name") {
|
|
122
|
-
state.value.name.value = state.value.name.tempValue;
|
|
123
|
-
state.value.name.isEditing = false;
|
|
314
|
+
if (Array.isArray(fieldObj.value)) {
|
|
315
|
+
fieldObj.tempValue = [...fieldObj.value];
|
|
124
316
|
} else {
|
|
125
|
-
|
|
317
|
+
fieldObj.tempValue = fieldObj.value;
|
|
126
318
|
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
319
|
+
fieldObj.isEditing = true;
|
|
320
|
+
}
|
|
321
|
+
function saveChanges(field2) {
|
|
322
|
+
const fieldObj = editableFields.value[field2];
|
|
323
|
+
fieldObj.value = Array.isArray(fieldObj.tempValue) ? [...fieldObj.tempValue] : fieldObj.tempValue;
|
|
324
|
+
fieldObj.isEditing = false;
|
|
325
|
+
}
|
|
326
|
+
function cancelEditing(field2) {
|
|
327
|
+
const fieldObj = editableFields.value[field2];
|
|
328
|
+
if (Array.isArray(fieldObj.value)) {
|
|
329
|
+
fieldObj.tempValue = [...fieldObj.value];
|
|
132
330
|
} else {
|
|
133
|
-
|
|
331
|
+
fieldObj.tempValue = fieldObj.value;
|
|
134
332
|
}
|
|
135
|
-
|
|
136
|
-
|
|
333
|
+
fieldObj.isEditing = false;
|
|
334
|
+
}
|
|
335
|
+
function handleKeydown(event, field2) {
|
|
137
336
|
if (event.key === "Escape") {
|
|
138
337
|
cancelEditing(field2);
|
|
139
338
|
} else if (event.key === "Enter" && !event.shiftKey) {
|
|
140
339
|
event.preventDefault();
|
|
141
340
|
saveChanges(field2);
|
|
142
341
|
}
|
|
143
|
-
}
|
|
342
|
+
}
|
|
144
343
|
return {
|
|
145
344
|
state,
|
|
146
345
|
fields,
|
|
147
346
|
isSaving: computed(() => isSaving.value),
|
|
148
347
|
fieldsIssues: computed(() => fieldsIssues.value),
|
|
348
|
+
deleteMetric,
|
|
349
|
+
updateMetrics,
|
|
149
350
|
loadTestData,
|
|
150
351
|
createTest,
|
|
151
352
|
updateTest,
|
|
@@ -208,11 +409,11 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
208
409
|
};
|
|
209
410
|
}
|
|
210
411
|
});
|
|
211
|
-
const header$1 = "
|
|
212
|
-
const editInputButton$1 = "
|
|
213
|
-
const title$1 = "
|
|
214
|
-
const titleText = "
|
|
215
|
-
const backButton = "
|
|
412
|
+
const header$1 = "_header_vi783_123";
|
|
413
|
+
const editInputButton$1 = "_editInputButton_vi783_129";
|
|
414
|
+
const title$1 = "_title_vi783_133";
|
|
415
|
+
const titleText = "_titleText_vi783_144";
|
|
416
|
+
const backButton = "_backButton_vi783_157";
|
|
216
417
|
const style0$5 = {
|
|
217
418
|
header: header$1,
|
|
218
419
|
editInputButton: editInputButton$1,
|
|
@@ -258,7 +459,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
258
459
|
};
|
|
259
460
|
}
|
|
260
461
|
});
|
|
261
|
-
const field = "
|
|
462
|
+
const field = "_field_2al59_123";
|
|
262
463
|
const style0$4 = {
|
|
263
464
|
field
|
|
264
465
|
};
|
|
@@ -273,7 +474,8 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
273
474
|
title: {},
|
|
274
475
|
warning: { type: Boolean, default: false },
|
|
275
476
|
small: { type: Boolean, default: false },
|
|
276
|
-
expanded: { type: Boolean, default: true }
|
|
477
|
+
expanded: { type: Boolean, default: true },
|
|
478
|
+
tooltip: { default: "" }
|
|
277
479
|
},
|
|
278
480
|
setup(__props) {
|
|
279
481
|
const props = __props;
|
|
@@ -281,6 +483,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
281
483
|
const isExpanded = ref(props.expanded);
|
|
282
484
|
const contentRef = ref(null);
|
|
283
485
|
const containerRef = ref(null);
|
|
486
|
+
const isTooltipVisible = ref(false);
|
|
284
487
|
const toggleExpand = async () => {
|
|
285
488
|
isExpanded.value = !isExpanded.value;
|
|
286
489
|
if (isExpanded.value) {
|
|
@@ -290,15 +493,40 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
290
493
|
}
|
|
291
494
|
}
|
|
292
495
|
};
|
|
496
|
+
const showTooltip = () => {
|
|
497
|
+
isTooltipVisible.value = true;
|
|
498
|
+
};
|
|
499
|
+
const hideTooltip = () => {
|
|
500
|
+
isTooltipVisible.value = false;
|
|
501
|
+
};
|
|
293
502
|
return (_ctx, _cache) => {
|
|
294
503
|
const _component_font_awesome_icon = resolveComponent("font-awesome-icon");
|
|
295
504
|
return openBlock(), createElementBlock("div", {
|
|
296
505
|
ref_key: "containerRef",
|
|
297
506
|
ref: containerRef,
|
|
298
|
-
class: normalizeClass([_ctx.$style.evaluationStep, _ctx.small && _ctx.$style.small])
|
|
507
|
+
class: normalizeClass([_ctx.$style.evaluationStep, _ctx.small && _ctx.$style.small]),
|
|
508
|
+
"data-test-id": "evaluation-step"
|
|
299
509
|
}, [
|
|
510
|
+
createVNode(unref(N8nTooltip), {
|
|
511
|
+
disabled: !_ctx.tooltip,
|
|
512
|
+
placement: "right",
|
|
513
|
+
offset: 25,
|
|
514
|
+
visible: isTooltipVisible.value
|
|
515
|
+
}, {
|
|
516
|
+
content: withCtx(() => [
|
|
517
|
+
createTextVNode(toDisplayString(_ctx.tooltip), 1)
|
|
518
|
+
]),
|
|
519
|
+
default: withCtx(() => [
|
|
520
|
+
createBaseVNode("div", {
|
|
521
|
+
class: normalizeClass(_ctx.$style.contentPlaceholder)
|
|
522
|
+
}, null, 2)
|
|
523
|
+
]),
|
|
524
|
+
_: 1
|
|
525
|
+
}, 8, ["disabled", "visible"]),
|
|
300
526
|
createBaseVNode("div", {
|
|
301
|
-
class: normalizeClass(_ctx.$style.content)
|
|
527
|
+
class: normalizeClass(_ctx.$style.content),
|
|
528
|
+
onMouseenter: showTooltip,
|
|
529
|
+
onMouseleave: hideTooltip
|
|
302
530
|
}, [
|
|
303
531
|
createBaseVNode("div", {
|
|
304
532
|
class: normalizeClass(_ctx.$style.header)
|
|
@@ -320,6 +548,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
320
548
|
class: normalizeClass(_ctx.$style.collapseButton),
|
|
321
549
|
"aria-expanded": isExpanded.value,
|
|
322
550
|
"aria-controls": "content-" + _ctx.title.replace(/\s+/g, "-"),
|
|
551
|
+
"data-test-id": "evaluation-step-collapse-button",
|
|
323
552
|
onClick: toggleExpand
|
|
324
553
|
}, [
|
|
325
554
|
createTextVNode(toDisplayString(isExpanded.value ? unref(locale).baseText("testDefinition.edit.step.collapse") : unref(locale).baseText("testDefinition.edit.step.expand")) + " ", 1),
|
|
@@ -337,7 +566,8 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
337
566
|
createBaseVNode("div", {
|
|
338
567
|
ref_key: "contentRef",
|
|
339
568
|
ref: contentRef,
|
|
340
|
-
class: normalizeClass(_ctx.$style.cardContent)
|
|
569
|
+
class: normalizeClass(_ctx.$style.cardContent),
|
|
570
|
+
"data-test-id": "evaluation-step-content"
|
|
341
571
|
}, [
|
|
342
572
|
renderSlot(_ctx.$slots, "cardContent")
|
|
343
573
|
], 2)
|
|
@@ -347,28 +577,30 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
347
577
|
]),
|
|
348
578
|
_: 3
|
|
349
579
|
})) : createCommentVNode("", true)
|
|
350
|
-
],
|
|
580
|
+
], 34)
|
|
351
581
|
], 2);
|
|
352
582
|
};
|
|
353
583
|
}
|
|
354
584
|
});
|
|
355
|
-
const evaluationStep = "
|
|
356
|
-
const small = "
|
|
357
|
-
const
|
|
358
|
-
const
|
|
359
|
-
const
|
|
360
|
-
const
|
|
361
|
-
const
|
|
362
|
-
const
|
|
363
|
-
const
|
|
364
|
-
const
|
|
365
|
-
const
|
|
585
|
+
const evaluationStep = "_evaluationStep_11knb_123";
|
|
586
|
+
const small = "_small_11knb_135";
|
|
587
|
+
const contentPlaceholder = "_contentPlaceholder_11knb_139";
|
|
588
|
+
const icon = "_icon_11knb_148";
|
|
589
|
+
const warning = "_warning_11knb_157";
|
|
590
|
+
const content = "_content_11knb_139";
|
|
591
|
+
const header = "_header_11knb_166";
|
|
592
|
+
const title = "_title_11knb_172";
|
|
593
|
+
const warningIcon = "_warningIcon_11knb_178";
|
|
594
|
+
const cardContent = "_cardContent_11knb_182";
|
|
595
|
+
const collapseButton = "_collapseButton_11knb_187";
|
|
596
|
+
const cardContentWrapper = "_cardContentWrapper_11knb_200";
|
|
366
597
|
const style0$3 = {
|
|
367
598
|
evaluationStep,
|
|
368
599
|
small,
|
|
600
|
+
contentPlaceholder,
|
|
369
601
|
icon,
|
|
370
602
|
warning,
|
|
371
|
-
content
|
|
603
|
+
content,
|
|
372
604
|
header,
|
|
373
605
|
title,
|
|
374
606
|
warningIcon,
|
|
@@ -386,14 +618,16 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
386
618
|
props: {
|
|
387
619
|
modelValue: { default: () => ({
|
|
388
620
|
isEditing: false,
|
|
389
|
-
|
|
621
|
+
value: [],
|
|
622
|
+
tempValue: []
|
|
390
623
|
}) },
|
|
391
624
|
allTags: {},
|
|
392
625
|
tagsById: {},
|
|
393
626
|
isLoading: { type: Boolean },
|
|
394
627
|
startEditing: {},
|
|
395
628
|
saveChanges: {},
|
|
396
|
-
cancelEditing: {}
|
|
629
|
+
cancelEditing: {},
|
|
630
|
+
createTag: { type: Function, default: void 0 }
|
|
397
631
|
},
|
|
398
632
|
emits: ["update:modelValue"],
|
|
399
633
|
setup(__props, { emit: __emit }) {
|
|
@@ -405,17 +639,16 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
405
639
|
return props.tagsById[tagId]?.name ?? "";
|
|
406
640
|
});
|
|
407
641
|
function updateTags(tags) {
|
|
408
|
-
const newTags = tags[0] ? [tags[0]] : [];
|
|
409
642
|
emit("update:modelValue", {
|
|
410
643
|
...props.modelValue,
|
|
411
|
-
|
|
644
|
+
tempValue: tags
|
|
412
645
|
});
|
|
413
646
|
}
|
|
414
647
|
return (_ctx, _cache) => {
|
|
415
648
|
const _component_n8n_text = resolveComponent("n8n-text");
|
|
416
649
|
const _component_n8n_tag = resolveComponent("n8n-tag");
|
|
417
650
|
const _component_n8n_icon_button = resolveComponent("n8n-icon-button");
|
|
418
|
-
const _component_TagsDropdown = _sfc_main$
|
|
651
|
+
const _component_TagsDropdown = _sfc_main$9;
|
|
419
652
|
const _component_n8n_input_label = resolveComponent("n8n-input-label");
|
|
420
653
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
421
654
|
createVNode(_component_n8n_input_label, {
|
|
@@ -429,7 +662,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
429
662
|
class: normalizeClass(_ctx.$style.tagsRead),
|
|
430
663
|
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.startEditing("tags"))
|
|
431
664
|
}, [
|
|
432
|
-
_ctx.modelValue.
|
|
665
|
+
_ctx.modelValue.value.length === 0 ? (openBlock(), createBlock(_component_n8n_text, {
|
|
433
666
|
key: 0,
|
|
434
667
|
size: "small"
|
|
435
668
|
}, {
|
|
@@ -438,7 +671,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
438
671
|
]),
|
|
439
672
|
_: 1
|
|
440
673
|
})) : createCommentVNode("", true),
|
|
441
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.modelValue.
|
|
674
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.modelValue.value, (tagId) => {
|
|
442
675
|
return openBlock(), createBlock(_component_n8n_tag, {
|
|
443
676
|
key: tagId,
|
|
444
677
|
text: getTagName.value(tagId),
|
|
@@ -454,36 +687,30 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
454
687
|
}, null, 8, ["class"])
|
|
455
688
|
], 2)) : (openBlock(), createBlock(_component_TagsDropdown, {
|
|
456
689
|
key: 1,
|
|
457
|
-
"model-value": _ctx.modelValue.
|
|
690
|
+
"model-value": _ctx.modelValue.tempValue,
|
|
458
691
|
placeholder: unref(locale).baseText("executionAnnotationView.chooseOrCreateATag"),
|
|
459
|
-
"create-enabled":
|
|
692
|
+
"create-enabled": _ctx.modelValue.tempValue.length === 0,
|
|
460
693
|
"all-tags": _ctx.allTags,
|
|
461
694
|
"is-loading": _ctx.isLoading,
|
|
462
695
|
"tags-by-id": _ctx.tagsById,
|
|
463
696
|
"data-test-id": "workflow-tags-dropdown",
|
|
464
697
|
"event-bus": unref(tagsEventBus),
|
|
698
|
+
"create-tag": _ctx.createTag,
|
|
699
|
+
"manage-enabled": false,
|
|
700
|
+
"multiple-limit": 1,
|
|
465
701
|
"onUpdate:modelValue": updateTags,
|
|
466
702
|
onEsc: _cache[1] || (_cache[1] = ($event) => _ctx.cancelEditing("tags")),
|
|
467
703
|
onBlur: _cache[2] || (_cache[2] = ($event) => _ctx.saveChanges("tags"))
|
|
468
|
-
}, null, 8, ["model-value", "placeholder", "all-tags", "is-loading", "tags-by-id", "event-bus"]))
|
|
469
|
-
]),
|
|
470
|
-
_: 1
|
|
471
|
-
}, 8, ["label"]),
|
|
472
|
-
createVNode(_component_n8n_text, {
|
|
473
|
-
size: "small",
|
|
474
|
-
color: "text-light"
|
|
475
|
-
}, {
|
|
476
|
-
default: withCtx(() => [
|
|
477
|
-
createTextVNode(toDisplayString(unref(locale).baseText("testDefinition.edit.tagsHelpText")), 1)
|
|
704
|
+
}, null, 8, ["model-value", "placeholder", "create-enabled", "all-tags", "is-loading", "tags-by-id", "event-bus", "create-tag"]))
|
|
478
705
|
]),
|
|
479
706
|
_: 1
|
|
480
|
-
})
|
|
707
|
+
}, 8, ["label"])
|
|
481
708
|
]);
|
|
482
709
|
};
|
|
483
710
|
}
|
|
484
711
|
});
|
|
485
|
-
const tagsRead = "
|
|
486
|
-
const editInputButton = "
|
|
712
|
+
const tagsRead = "_tagsRead_z5pm4_123";
|
|
713
|
+
const editInputButton = "_editInputButton_z5pm4_123";
|
|
487
714
|
const style0$2 = {
|
|
488
715
|
tagsRead,
|
|
489
716
|
editInputButton
|
|
@@ -505,7 +732,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
505
732
|
setup(__props) {
|
|
506
733
|
const locale = useI18n();
|
|
507
734
|
return (_ctx, _cache) => {
|
|
508
|
-
const _component_WorkflowSelectorParameterInput = __unplugin_components_0$
|
|
735
|
+
const _component_WorkflowSelectorParameterInput = __unplugin_components_0$2;
|
|
509
736
|
const _component_n8n_input_label = resolveComponent("n8n-input-label");
|
|
510
737
|
return openBlock(), createElementBlock("div", null, [
|
|
511
738
|
createVNode(_component_n8n_input_label, {
|
|
@@ -541,21 +768,25 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
541
768
|
props: {
|
|
542
769
|
modelValue: {}
|
|
543
770
|
},
|
|
544
|
-
emits: ["update:modelValue"],
|
|
771
|
+
emits: ["update:modelValue", "deleteMetric"],
|
|
545
772
|
setup(__props, { emit: __emit }) {
|
|
546
773
|
const props = __props;
|
|
547
774
|
const emit = __emit;
|
|
548
775
|
const locale = useI18n();
|
|
549
776
|
function addNewMetric() {
|
|
550
|
-
emit("update:modelValue", [...props.modelValue, ""]);
|
|
777
|
+
emit("update:modelValue", [...props.modelValue, { name: "" }]);
|
|
551
778
|
}
|
|
552
|
-
function updateMetric(index,
|
|
779
|
+
function updateMetric(index, name) {
|
|
553
780
|
const newMetrics = [...props.modelValue];
|
|
554
|
-
newMetrics[index] =
|
|
781
|
+
newMetrics[index].name = name;
|
|
555
782
|
emit("update:modelValue", newMetrics);
|
|
556
783
|
}
|
|
784
|
+
function onDeleteMetric(metric) {
|
|
785
|
+
emit("deleteMetric", metric);
|
|
786
|
+
}
|
|
557
787
|
return (_ctx, _cache) => {
|
|
558
788
|
const _component_N8nInput = resolveComponent("N8nInput");
|
|
789
|
+
const _component_n8n_icon_button = resolveComponent("n8n-icon-button");
|
|
559
790
|
const _component_n8n_button = resolveComponent("n8n-button");
|
|
560
791
|
const _component_n8n_input_label = resolveComponent("n8n-input-label");
|
|
561
792
|
return openBlock(), createElementBlock("div", {
|
|
@@ -571,16 +802,24 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
571
802
|
class: normalizeClass(_ctx.$style.metricsContainer)
|
|
572
803
|
}, [
|
|
573
804
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.modelValue, (metric, index) => {
|
|
574
|
-
return openBlock(), createElementBlock("div", {
|
|
805
|
+
return openBlock(), createElementBlock("div", {
|
|
806
|
+
key: index,
|
|
807
|
+
class: normalizeClass(_ctx.$style.metricItem)
|
|
808
|
+
}, [
|
|
575
809
|
createVNode(_component_N8nInput, {
|
|
576
810
|
ref_for: true,
|
|
577
811
|
ref: `metric_${index}`,
|
|
578
812
|
"data-test-id": "evaluation-metric-item",
|
|
579
|
-
"model-value": metric,
|
|
813
|
+
"model-value": metric.name,
|
|
580
814
|
placeholder: unref(locale).baseText("testDefinition.edit.metricsPlaceholder"),
|
|
581
815
|
"onUpdate:modelValue": (value) => updateMetric(index, value)
|
|
582
|
-
}, null, 8, ["model-value", "placeholder", "onUpdate:modelValue"])
|
|
583
|
-
|
|
816
|
+
}, null, 8, ["model-value", "placeholder", "onUpdate:modelValue"]),
|
|
817
|
+
createVNode(_component_n8n_icon_button, {
|
|
818
|
+
icon: "trash",
|
|
819
|
+
type: "text",
|
|
820
|
+
onClick: ($event) => onDeleteMetric(metric)
|
|
821
|
+
}, null, 8, ["onClick"])
|
|
822
|
+
], 2);
|
|
584
823
|
}), 128)),
|
|
585
824
|
createVNode(_component_n8n_button, {
|
|
586
825
|
type: "tertiary",
|
|
@@ -596,12 +835,14 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
596
835
|
};
|
|
597
836
|
}
|
|
598
837
|
});
|
|
599
|
-
const metricsContainer = "
|
|
600
|
-
const
|
|
601
|
-
const
|
|
602
|
-
const
|
|
838
|
+
const metricsContainer = "_metricsContainer_1eaf8_123";
|
|
839
|
+
const metricItem = "_metricItem_1eaf8_129";
|
|
840
|
+
const metricField = "_metricField_1eaf8_134";
|
|
841
|
+
const metricsDivider = "_metricsDivider_1eaf8_139";
|
|
842
|
+
const newMetricButton = "_newMetricButton_1eaf8_144";
|
|
603
843
|
const style0$1 = {
|
|
604
844
|
metricsContainer,
|
|
845
|
+
metricItem,
|
|
605
846
|
metricField,
|
|
606
847
|
metricsDivider,
|
|
607
848
|
newMetricButton
|
|
@@ -622,26 +863,45 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
622
863
|
const locale = useI18n();
|
|
623
864
|
const { debounce } = useDebounce();
|
|
624
865
|
const toast = useToast();
|
|
625
|
-
const
|
|
626
|
-
const
|
|
627
|
-
const
|
|
628
|
-
const buttonLabel = computed(
|
|
629
|
-
() => testId.value ? locale.baseText("testDefinition.edit.updateTest") : locale.baseText("testDefinition.edit.saveTest")
|
|
630
|
-
);
|
|
866
|
+
const testDefinitionStore = useTestDefinitionStore();
|
|
867
|
+
const tagsStore = useAnnotationTagsStore();
|
|
868
|
+
const uiStore = useUIStore();
|
|
631
869
|
const {
|
|
632
870
|
state,
|
|
633
871
|
fieldsIssues,
|
|
634
|
-
|
|
872
|
+
cancelEditing,
|
|
635
873
|
loadTestData,
|
|
636
874
|
createTest,
|
|
637
875
|
updateTest,
|
|
638
876
|
startEditing,
|
|
639
877
|
saveChanges,
|
|
640
|
-
|
|
641
|
-
|
|
878
|
+
handleKeydown,
|
|
879
|
+
deleteMetric,
|
|
880
|
+
updateMetrics
|
|
642
881
|
} = useTestDefinitionForm();
|
|
882
|
+
const isLoading = computed(() => tagsStore.isLoading);
|
|
883
|
+
const allTags = computed(() => tagsStore.allTags);
|
|
884
|
+
const tagsById = computed(() => tagsStore.tagsById);
|
|
885
|
+
const testId = computed(() => props.testId ?? route.params.testId);
|
|
886
|
+
const currentWorkflowId = computed(() => route.params.name);
|
|
887
|
+
const tagUsageCount = computed(
|
|
888
|
+
() => tagsStore.tagsById[state.value.tags.value[0]]?.usageCount ?? 0
|
|
889
|
+
);
|
|
890
|
+
const nodePinningModal = ref(null);
|
|
891
|
+
const modalContentWidth = ref(0);
|
|
643
892
|
onMounted(async () => {
|
|
644
|
-
|
|
893
|
+
if (!testDefinitionStore.isFeatureEnabled) {
|
|
894
|
+
toast.showMessage({
|
|
895
|
+
title: locale.baseText("testDefinition.notImplemented"),
|
|
896
|
+
type: "warning"
|
|
897
|
+
});
|
|
898
|
+
void router.push({
|
|
899
|
+
name: VIEWS.WORKFLOW,
|
|
900
|
+
params: { name: router.currentRoute.value.params.name }
|
|
901
|
+
});
|
|
902
|
+
return;
|
|
903
|
+
}
|
|
904
|
+
void tagsStore.fetchAll({ withUsageCount: true });
|
|
645
905
|
if (testId.value) {
|
|
646
906
|
await loadTestData(testId.value);
|
|
647
907
|
} else {
|
|
@@ -656,16 +916,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
656
916
|
} else {
|
|
657
917
|
savedTest = await createTest(currentWorkflowId.value);
|
|
658
918
|
}
|
|
659
|
-
if (savedTest && route.name === VIEWS.
|
|
919
|
+
if (savedTest && route.name === VIEWS.NEW_TEST_DEFINITION) {
|
|
660
920
|
await router.replace({
|
|
661
921
|
name: VIEWS.TEST_DEFINITION_EDIT,
|
|
662
922
|
params: { testId: savedTest.id }
|
|
663
923
|
});
|
|
664
924
|
}
|
|
665
|
-
toast.showMessage({
|
|
666
|
-
title: locale.baseText("testDefinition.edit.testSaved"),
|
|
667
|
-
type: "success"
|
|
668
|
-
});
|
|
669
925
|
} catch (e) {
|
|
670
926
|
toast.showError(e, locale.baseText("testDefinition.edit.testSaveFailed"));
|
|
671
927
|
}
|
|
@@ -673,16 +929,66 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
673
929
|
function hasIssues(key) {
|
|
674
930
|
return fieldsIssues.value.some((issue) => issue.field === key);
|
|
675
931
|
}
|
|
676
|
-
|
|
932
|
+
async function onDeleteMetric(deletedMetric) {
|
|
933
|
+
if (deletedMetric.id) {
|
|
934
|
+
await deleteMetric(deletedMetric.id, testId.value);
|
|
935
|
+
}
|
|
936
|
+
}
|
|
937
|
+
async function handleCreateTag(tagName) {
|
|
938
|
+
try {
|
|
939
|
+
const newTag = await tagsStore.create(tagName);
|
|
940
|
+
return newTag;
|
|
941
|
+
} catch (error) {
|
|
942
|
+
toast.showError(error, "Error", error.message);
|
|
943
|
+
throw error;
|
|
944
|
+
}
|
|
945
|
+
}
|
|
946
|
+
async function openPinningModal() {
|
|
947
|
+
uiStore.openModal(NODE_PINNING_MODAL_KEY);
|
|
948
|
+
}
|
|
949
|
+
async function runTest() {
|
|
950
|
+
await testDefinitionStore.startTestRun(testId.value);
|
|
951
|
+
await testDefinitionStore.fetchTestRuns(testId.value);
|
|
952
|
+
}
|
|
953
|
+
const runs = computed(
|
|
954
|
+
() => Object.values(testDefinitionStore.testRunsById ?? {}).filter(
|
|
955
|
+
(run) => run.testDefinitionId === testId.value
|
|
956
|
+
)
|
|
957
|
+
);
|
|
958
|
+
async function onDeleteRuns(runs2) {
|
|
959
|
+
await Promise.all(
|
|
960
|
+
runs2.map(async (run) => {
|
|
961
|
+
await testDefinitionStore.deleteTestRun({ testDefinitionId: testId.value, runId: run.id });
|
|
962
|
+
})
|
|
963
|
+
);
|
|
964
|
+
}
|
|
965
|
+
watch(
|
|
966
|
+
() => state.value.metrics,
|
|
967
|
+
debounce(async () => await updateMetrics(testId.value), { debounceTime: 400 }),
|
|
968
|
+
{ deep: true }
|
|
969
|
+
);
|
|
970
|
+
watch(
|
|
971
|
+
() => [
|
|
972
|
+
state.value.description,
|
|
973
|
+
state.value.name,
|
|
974
|
+
state.value.tags,
|
|
975
|
+
state.value.evaluationWorkflow,
|
|
976
|
+
state.value.mockedNodes
|
|
977
|
+
],
|
|
978
|
+
debounce(onSaveTest, { debounceTime: 400 }),
|
|
979
|
+
{ deep: true }
|
|
980
|
+
);
|
|
677
981
|
return (_ctx, _cache) => {
|
|
678
982
|
const _component_font_awesome_icon = resolveComponent("font-awesome-icon");
|
|
679
983
|
const _component_BlockArrow = __unplugin_components_0;
|
|
680
984
|
const _component_n8n_button = resolveComponent("n8n-button");
|
|
985
|
+
const _component_N8nHeading = resolveComponent("N8nHeading");
|
|
986
|
+
const _component_NodesPinning = __unplugin_components_1;
|
|
681
987
|
return openBlock(), createElementBlock("div", {
|
|
682
988
|
class: normalizeClass(_ctx.$style.container)
|
|
683
989
|
}, [
|
|
684
990
|
createBaseVNode("div", {
|
|
685
|
-
class: normalizeClass(_ctx.$style.
|
|
991
|
+
class: normalizeClass(_ctx.$style.formContent)
|
|
686
992
|
}, [
|
|
687
993
|
createVNode(EvaluationHeader, {
|
|
688
994
|
modelValue: unref(state).name,
|
|
@@ -692,37 +998,41 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
692
998
|
"save-changes": unref(saveChanges),
|
|
693
999
|
"handle-keydown": unref(handleKeydown)
|
|
694
1000
|
}, null, 8, ["modelValue", "class", "start-editing", "save-changes", "handle-keydown"]),
|
|
695
|
-
createVNode(EvaluationStep, {
|
|
696
|
-
class: normalizeClass(_ctx.$style.step),
|
|
697
|
-
title: unref(locale).baseText("testDefinition.edit.description"),
|
|
698
|
-
expanded: false
|
|
699
|
-
}, {
|
|
700
|
-
icon: withCtx(() => [
|
|
701
|
-
createVNode(_component_font_awesome_icon, {
|
|
702
|
-
icon: "thumbtack",
|
|
703
|
-
size: "lg"
|
|
704
|
-
})
|
|
705
|
-
]),
|
|
706
|
-
cardContent: withCtx(() => [
|
|
707
|
-
createVNode(DescriptionInput, {
|
|
708
|
-
modelValue: unref(state).description,
|
|
709
|
-
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => unref(state).description = $event)
|
|
710
|
-
}, null, 8, ["modelValue"])
|
|
711
|
-
]),
|
|
712
|
-
_: 1
|
|
713
|
-
}, 8, ["class", "title"]),
|
|
714
|
-
createBaseVNode("div", {
|
|
715
|
-
class: normalizeClass(_ctx.$style.panelIntro)
|
|
716
|
-
}, toDisplayString(unref(locale).baseText("testDefinition.edit.step.intro")), 3),
|
|
717
|
-
createVNode(_component_BlockArrow, {
|
|
718
|
-
class: normalizeClass(_ctx.$style.introArrow)
|
|
719
|
-
}, null, 8, ["class"]),
|
|
720
1001
|
createBaseVNode("div", {
|
|
721
1002
|
class: normalizeClass(_ctx.$style.panelBlock)
|
|
722
1003
|
}, [
|
|
723
1004
|
createVNode(EvaluationStep, {
|
|
724
1005
|
class: normalizeClass(_ctx.$style.step),
|
|
725
|
-
title: unref(locale).baseText("testDefinition.edit.
|
|
1006
|
+
title: unref(locale).baseText("testDefinition.edit.description"),
|
|
1007
|
+
expanded: false,
|
|
1008
|
+
tooltip: unref(locale).baseText("testDefinition.edit.description.tooltip")
|
|
1009
|
+
}, {
|
|
1010
|
+
icon: withCtx(() => [
|
|
1011
|
+
createVNode(_component_font_awesome_icon, {
|
|
1012
|
+
icon: "thumbtack",
|
|
1013
|
+
size: "lg"
|
|
1014
|
+
})
|
|
1015
|
+
]),
|
|
1016
|
+
cardContent: withCtx(() => [
|
|
1017
|
+
createVNode(DescriptionInput, {
|
|
1018
|
+
modelValue: unref(state).description,
|
|
1019
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => unref(state).description = $event)
|
|
1020
|
+
}, null, 8, ["modelValue"])
|
|
1021
|
+
]),
|
|
1022
|
+
_: 1
|
|
1023
|
+
}, 8, ["class", "title", "tooltip"]),
|
|
1024
|
+
createBaseVNode("div", {
|
|
1025
|
+
class: normalizeClass(_ctx.$style.panelIntro)
|
|
1026
|
+
}, toDisplayString(unref(locale).baseText("testDefinition.edit.step.intro")), 3),
|
|
1027
|
+
createVNode(_component_BlockArrow, {
|
|
1028
|
+
class: normalizeClass(_ctx.$style.introArrow)
|
|
1029
|
+
}, null, 8, ["class"]),
|
|
1030
|
+
createVNode(EvaluationStep, {
|
|
1031
|
+
class: normalizeClass(_ctx.$style.step),
|
|
1032
|
+
title: unref(locale).baseText("testDefinition.edit.step.executions", {
|
|
1033
|
+
adjustToNumber: tagUsageCount.value
|
|
1034
|
+
}),
|
|
1035
|
+
tooltip: unref(locale).baseText("testDefinition.edit.step.executions.tooltip")
|
|
726
1036
|
}, {
|
|
727
1037
|
icon: withCtx(() => [
|
|
728
1038
|
createVNode(_component_font_awesome_icon, {
|
|
@@ -735,16 +1045,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
735
1045
|
modelValue: unref(state).tags,
|
|
736
1046
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => unref(state).tags = $event),
|
|
737
1047
|
class: normalizeClass({ "has-issues": hasIssues("tags") }),
|
|
738
|
-
"all-tags":
|
|
739
|
-
"tags-by-id":
|
|
740
|
-
"is-loading":
|
|
1048
|
+
"all-tags": allTags.value,
|
|
1049
|
+
"tags-by-id": tagsById.value,
|
|
1050
|
+
"is-loading": isLoading.value,
|
|
741
1051
|
"start-editing": unref(startEditing),
|
|
742
1052
|
"save-changes": unref(saveChanges),
|
|
743
|
-
"cancel-editing": unref(cancelEditing)
|
|
1053
|
+
"cancel-editing": unref(cancelEditing),
|
|
1054
|
+
"create-tag": handleCreateTag
|
|
744
1055
|
}, null, 8, ["modelValue", "class", "all-tags", "tags-by-id", "is-loading", "start-editing", "save-changes", "cancel-editing"])
|
|
745
1056
|
]),
|
|
746
1057
|
_: 1
|
|
747
|
-
}, 8, ["class", "title"]),
|
|
1058
|
+
}, 8, ["class", "title", "tooltip"]),
|
|
748
1059
|
createBaseVNode("div", {
|
|
749
1060
|
class: normalizeClass(_ctx.$style.evaluationArrows)
|
|
750
1061
|
}, [
|
|
@@ -753,9 +1064,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
753
1064
|
], 2),
|
|
754
1065
|
createVNode(EvaluationStep, {
|
|
755
1066
|
class: normalizeClass(_ctx.$style.step),
|
|
756
|
-
title: unref(locale).baseText("testDefinition.edit.step.
|
|
1067
|
+
title: unref(locale).baseText("testDefinition.edit.step.mockedNodes", {
|
|
1068
|
+
adjustToNumber: unref(state).mockedNodes?.length ?? 0
|
|
1069
|
+
}),
|
|
757
1070
|
small: true,
|
|
758
|
-
expanded:
|
|
1071
|
+
expanded: true,
|
|
1072
|
+
tooltip: unref(locale).baseText("testDefinition.edit.step.nodes.tooltip")
|
|
759
1073
|
}, {
|
|
760
1074
|
icon: withCtx(() => [
|
|
761
1075
|
createVNode(_component_font_awesome_icon, {
|
|
@@ -764,14 +1078,21 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
764
1078
|
})
|
|
765
1079
|
]),
|
|
766
1080
|
cardContent: withCtx(() => [
|
|
767
|
-
|
|
1081
|
+
createVNode(_component_n8n_button, {
|
|
1082
|
+
size: "small",
|
|
1083
|
+
"data-test-id": "select-nodes-button",
|
|
1084
|
+
label: unref(locale).baseText("testDefinition.edit.selectNodes"),
|
|
1085
|
+
type: "tertiary",
|
|
1086
|
+
onClick: openPinningModal
|
|
1087
|
+
}, null, 8, ["label"])
|
|
768
1088
|
]),
|
|
769
1089
|
_: 1
|
|
770
|
-
}, 8, ["class", "title"]),
|
|
1090
|
+
}, 8, ["class", "title", "tooltip"]),
|
|
771
1091
|
createVNode(EvaluationStep, {
|
|
772
1092
|
class: normalizeClass(_ctx.$style.step),
|
|
773
1093
|
title: unref(locale).baseText("testDefinition.edit.step.reRunExecutions"),
|
|
774
|
-
small: true
|
|
1094
|
+
small: true,
|
|
1095
|
+
tooltip: unref(locale).baseText("testDefinition.edit.step.reRunExecutions.tooltip")
|
|
775
1096
|
}, {
|
|
776
1097
|
icon: withCtx(() => [
|
|
777
1098
|
createVNode(_component_font_awesome_icon, {
|
|
@@ -780,10 +1101,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
780
1101
|
})
|
|
781
1102
|
]),
|
|
782
1103
|
_: 1
|
|
783
|
-
}, 8, ["class", "title"]),
|
|
1104
|
+
}, 8, ["class", "title", "tooltip"]),
|
|
784
1105
|
createVNode(EvaluationStep, {
|
|
785
1106
|
class: normalizeClass(_ctx.$style.step),
|
|
786
|
-
title: unref(locale).baseText("testDefinition.edit.step.compareExecutions")
|
|
1107
|
+
title: unref(locale).baseText("testDefinition.edit.step.compareExecutions"),
|
|
1108
|
+
tooltip: unref(locale).baseText("testDefinition.edit.step.compareExecutions.tooltip")
|
|
787
1109
|
}, {
|
|
788
1110
|
icon: withCtx(() => [
|
|
789
1111
|
createVNode(_component_font_awesome_icon, {
|
|
@@ -799,10 +1121,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
799
1121
|
}, null, 8, ["modelValue", "class"])
|
|
800
1122
|
]),
|
|
801
1123
|
_: 1
|
|
802
|
-
}, 8, ["class", "title"]),
|
|
1124
|
+
}, 8, ["class", "title", "tooltip"]),
|
|
803
1125
|
createVNode(EvaluationStep, {
|
|
804
1126
|
class: normalizeClass(_ctx.$style.step),
|
|
805
|
-
title: unref(locale).baseText("testDefinition.edit.step.metrics")
|
|
1127
|
+
title: unref(locale).baseText("testDefinition.edit.step.metrics"),
|
|
1128
|
+
tooltip: unref(locale).baseText("testDefinition.edit.step.metrics.tooltip")
|
|
806
1129
|
}, {
|
|
807
1130
|
icon: withCtx(() => [
|
|
808
1131
|
createVNode(_component_font_awesome_icon, {
|
|
@@ -814,42 +1137,107 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
814
1137
|
createVNode(MetricsInput, {
|
|
815
1138
|
modelValue: unref(state).metrics,
|
|
816
1139
|
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => unref(state).metrics = $event),
|
|
817
|
-
class: normalizeClass({ "has-issues": hasIssues("metrics") })
|
|
1140
|
+
class: normalizeClass({ "has-issues": hasIssues("metrics") }),
|
|
1141
|
+
onDeleteMetric
|
|
818
1142
|
}, null, 8, ["modelValue", "class"])
|
|
819
1143
|
]),
|
|
820
1144
|
_: 1
|
|
821
|
-
}, 8, ["class", "title"])
|
|
1145
|
+
}, 8, ["class", "title", "tooltip"])
|
|
822
1146
|
], 2),
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
1147
|
+
unref(state).evaluationWorkflow.value && unref(state).tags.value.length > 0 ? (openBlock(), createBlock(_component_n8n_button, {
|
|
1148
|
+
key: 0,
|
|
1149
|
+
class: normalizeClass(_ctx.$style.runTestButton),
|
|
1150
|
+
size: "small",
|
|
1151
|
+
"data-test-id": "run-test-button",
|
|
1152
|
+
label: unref(locale).baseText("testDefinition.runTest"),
|
|
1153
|
+
type: "primary",
|
|
1154
|
+
onClick: runTest
|
|
1155
|
+
}, null, 8, ["class", "label"])) : (openBlock(), createBlock(_component_n8n_button, {
|
|
1156
|
+
key: 1,
|
|
1157
|
+
class: normalizeClass(_ctx.$style.runTestButton),
|
|
1158
|
+
size: "small",
|
|
1159
|
+
"data-test-id": "run-test-button",
|
|
1160
|
+
label: "Save Test",
|
|
1161
|
+
type: "primary",
|
|
1162
|
+
onClick: onSaveTest
|
|
1163
|
+
}, null, 8, ["class"]))
|
|
1164
|
+
], 2),
|
|
1165
|
+
runs.value.length > 0 ? (openBlock(), createElementBlock("div", {
|
|
1166
|
+
key: 0,
|
|
1167
|
+
class: normalizeClass(_ctx.$style.runsTable)
|
|
1168
|
+
}, [
|
|
1169
|
+
createVNode(_component_N8nHeading, {
|
|
1170
|
+
size: "large",
|
|
1171
|
+
bold: true,
|
|
1172
|
+
class: normalizeClass(_ctx.$style.runsTableHeading)
|
|
1173
|
+
}, {
|
|
1174
|
+
default: withCtx(() => [
|
|
1175
|
+
createTextVNode(toDisplayString(unref(locale).baseText("testDefinition.edit.pastRuns")), 1)
|
|
1176
|
+
]),
|
|
1177
|
+
_: 1
|
|
1178
|
+
}, 8, ["class"]),
|
|
1179
|
+
createVNode(TestRunsTable, {
|
|
1180
|
+
runs: runs.value,
|
|
1181
|
+
selectable: true,
|
|
1182
|
+
"data-test-id": "past-runs-table",
|
|
1183
|
+
onDeleteRuns
|
|
1184
|
+
}, null, 8, ["runs"])
|
|
1185
|
+
], 2)) : createCommentVNode("", true),
|
|
1186
|
+
createVNode(Modal, {
|
|
1187
|
+
ref_key: "nodePinningModal",
|
|
1188
|
+
ref: nodePinningModal,
|
|
1189
|
+
width: "80vw",
|
|
1190
|
+
height: "85vh",
|
|
1191
|
+
name: unref(NODE_PINNING_MODAL_KEY)
|
|
1192
|
+
}, {
|
|
1193
|
+
header: withCtx(() => [
|
|
1194
|
+
createVNode(_component_N8nHeading, {
|
|
1195
|
+
size: "large",
|
|
1196
|
+
bold: true,
|
|
1197
|
+
class: normalizeClass(_ctx.$style.runsTableHeading)
|
|
1198
|
+
}, {
|
|
1199
|
+
default: withCtx(() => [
|
|
1200
|
+
createTextVNode(toDisplayString(unref(locale).baseText("testDefinition.edit.selectNodes")), 1)
|
|
1201
|
+
]),
|
|
1202
|
+
_: 1
|
|
1203
|
+
}, 8, ["class"])
|
|
1204
|
+
]),
|
|
1205
|
+
content: withCtx(() => [
|
|
1206
|
+
createVNode(_component_NodesPinning, {
|
|
1207
|
+
modelValue: unref(state).mockedNodes,
|
|
1208
|
+
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => unref(state).mockedNodes = $event),
|
|
1209
|
+
width: modalContentWidth.value,
|
|
1210
|
+
"data-test-id": "nodes-pinning-modal"
|
|
1211
|
+
}, null, 8, ["modelValue", "width"])
|
|
1212
|
+
]),
|
|
1213
|
+
_: 1
|
|
1214
|
+
}, 8, ["name"])
|
|
835
1215
|
], 2);
|
|
836
1216
|
};
|
|
837
1217
|
}
|
|
838
1218
|
});
|
|
839
|
-
const container = "
|
|
840
|
-
const
|
|
841
|
-
const
|
|
842
|
-
const
|
|
843
|
-
const
|
|
844
|
-
const
|
|
845
|
-
const
|
|
846
|
-
const
|
|
847
|
-
const
|
|
848
|
-
const
|
|
849
|
-
const
|
|
1219
|
+
const container = "_container_7ygna_123";
|
|
1220
|
+
const formContent = "_formContent_7ygna_133";
|
|
1221
|
+
const runsTableTotal = "_runsTableTotal_7ygna_142";
|
|
1222
|
+
const runsTable = "_runsTable_7ygna_142";
|
|
1223
|
+
const runsTableHeading = "_runsTableHeading_7ygna_154";
|
|
1224
|
+
const panelBlock = "_panelBlock_7ygna_159";
|
|
1225
|
+
const panelIntro = "_panelIntro_7ygna_166";
|
|
1226
|
+
const step = "_step_7ygna_175";
|
|
1227
|
+
const introArrow = "_introArrow_7ygna_182";
|
|
1228
|
+
const evaluationArrows = "_evaluationArrows_7ygna_187";
|
|
1229
|
+
const footer = "_footer_7ygna_198";
|
|
1230
|
+
const workflow = "_workflow_7ygna_204";
|
|
1231
|
+
const workflowSteps = "_workflowSteps_7ygna_211";
|
|
1232
|
+
const sideBySide = "_sideBySide_7ygna_218";
|
|
1233
|
+
const mockedNodesLabel = "_mockedNodesLabel_7ygna_226";
|
|
1234
|
+
const runTestButton = "_runTestButton_7ygna_231";
|
|
850
1235
|
const style0 = {
|
|
851
1236
|
container,
|
|
852
|
-
|
|
1237
|
+
formContent,
|
|
1238
|
+
runsTableTotal,
|
|
1239
|
+
runsTable,
|
|
1240
|
+
runsTableHeading,
|
|
853
1241
|
panelBlock,
|
|
854
1242
|
panelIntro,
|
|
855
1243
|
step,
|
|
@@ -858,7 +1246,9 @@ const style0 = {
|
|
|
858
1246
|
footer,
|
|
859
1247
|
workflow,
|
|
860
1248
|
workflowSteps,
|
|
861
|
-
sideBySide
|
|
1249
|
+
sideBySide,
|
|
1250
|
+
mockedNodesLabel,
|
|
1251
|
+
runTestButton
|
|
862
1252
|
};
|
|
863
1253
|
const cssModules = {
|
|
864
1254
|
"$style": style0
|