n8n-editor-ui 1.68.0 → 1.69.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/AnnotationTagsDropdown.ee.vue_vue_type_script_setup_true_lang-RSY0bJ42.js +57 -0
- package/dist/assets/{AuthView-C7b2xzS9.js → AuthView-CrxWnr-e.js} +1 -1
- package/dist/assets/{CanvasChat-QctJb8ta.js → CanvasChat-D1ZEiEqI.js} +3 -2
- package/dist/assets/{CanvasControls-raoYims4.js → CanvasControls-C-GYIweg.js} +6 -5
- package/dist/assets/{ChangePasswordView-BBju88Nm.js → ChangePasswordView-BcJsOCsw.js} +2 -2
- package/dist/assets/CollectionParameter-BCa4NW-h.js +4 -0
- package/dist/assets/{CredentialsView-BfYXjOVw.js → CredentialsView-C0lKel2q.js} +11 -26
- package/dist/assets/{ErrorView-BhPrjw7c.js → ErrorView-4g2OU1Dw.js} +5 -4
- package/dist/assets/{ExecutionsTime.vue_vue_type_script_setup_true_lang-Ba-at9rw.js → ExecutionsTime.vue_vue_type_script_setup_true_lang-Ce7AgzqR.js} +2 -2
- package/dist/assets/{ExecutionsView-Dcw07XZ-.js → ExecutionsView-BjrC38YB.js} +7 -11
- package/dist/assets/{FileSaver.min-CKlTVpWB.js → FileSaver.min-Kzijnshy.js} +1 -1
- package/dist/assets/{FixedCollectionParameter-CkI6mCZG.js → FixedCollectionParameter-BlCn1bdn.js} +1 -1
- package/dist/assets/{ForgotMyPasswordView--eKPrTSW.js → ForgotMyPasswordView-DM0y4hNn.js} +2 -2
- package/dist/assets/{MainHeader-DJdd17Nh.css → MainHeader-CgL_r4xK.css} +53 -24
- package/dist/assets/{MainHeader-Btek9DoL.js → MainHeader-D1PkO9vp.js} +67 -41
- package/dist/assets/{MainSidebar-CRjg4yDv.js → MainSidebar-CGlOacQQ.js} +63 -127
- package/dist/assets/{MainSidebar-BRYJRpOA.css → MainSidebar-DL53w2zU.css} +37 -21
- package/dist/assets/{NodeCreation-CDpNw3BL.js → NodeCreation-yT3JgYis.js} +7 -6
- package/dist/assets/{NodeCreator-DPpQXLHf.js → NodeCreator-CeYHZgYz.js} +22 -21
- package/dist/assets/{NodeViewSwitcher-CNfOOUof.js → NodeViewSwitcher-DJ9GWTwy.js} +592 -370
- package/dist/assets/{NodeViewSwitcher-DuVIKqpm.css → NodeViewSwitcher-s2TUlOvE.css} +126 -106
- package/dist/assets/{ProjectCardBadge-DzaTsr93.js → ProjectCardBadge-dGORr1ye.js} +1 -1
- package/dist/assets/{ProjectHeader-wdvHJxbT.js → ProjectHeader-CFoxyI0_.js} +58 -38
- package/dist/assets/{ProjectHeader-09VQWBZH.css → ProjectHeader-CTK_rV3h.css} +13 -6
- package/dist/assets/{ProjectSettings-B6j0VJK5.js → ProjectSettings-Bgl_JGoT.js} +24 -23
- package/dist/assets/{PushConnectionTracker.vue_vue_type_script_setup_true_lang-ByoMju5L.js → PushConnectionTracker.vue_vue_type_script_setup_true_lang-BabWwsdK.js} +1 -1
- package/dist/assets/{ResourcesListLayout-9Vpyt6Ec.js → ResourcesListLayout-B1KB8fTB.js} +3 -16
- package/dist/assets/{ResourcesListLayout-CuA8O7do.css → ResourcesListLayout-BuxiQpsj.css} +8 -8
- package/dist/assets/{RunDataJson-sPhT7c2h.js → RunDataJson-BQRWHoEA.js} +12 -12
- package/dist/assets/{RunDataJsonActions-DiMvLis_.js → RunDataJsonActions-BrABJ_1T.js} +3 -2
- package/dist/assets/{RunDataSearch-CF_rpBKx.js → RunDataSearch-kYhI-gst.js} +1 -1
- package/dist/assets/{RunDataTable-T52TXUHR.js → RunDataTable-BUXF-nH1.js} +144 -35
- package/dist/assets/{RunDataTable-ZwoYenSI.css → RunDataTable-enskmmU4.css} +41 -35
- package/dist/assets/{SamlOnboarding-BCn53xtf.js → SamlOnboarding-DI1aQpmq.js} +2 -2
- package/dist/assets/{SettingsApiView-DumvK072.js → SettingsApiView-DfdFSKxW.js} +1 -1
- package/dist/assets/{SettingsCommunityNodesView-Db787Jar.js → SettingsCommunityNodesView-CFGZW601.js} +3 -3
- package/dist/assets/{SettingsExternalSecrets-DKB2o2Dq.js → SettingsExternalSecrets-CzMuyldc.js} +1 -1
- package/dist/assets/{SettingsLdapView-BoKoCT5V.js → SettingsLdapView-B_aMpNa8.js} +1 -1
- package/dist/assets/{SettingsLogStreamingView-BGX39Unz.js → SettingsLogStreamingView-ByHGVzc1.js} +1 -1
- package/dist/assets/{SettingsPersonalView-fTCeSJfu.js → SettingsPersonalView-BpmD5Kqd.js} +1 -1
- package/dist/assets/{SettingsSourceControl-_G83P363.js → SettingsSourceControl-DeYPQUBX.js} +1 -1
- package/dist/assets/{SettingsSso-Bn48qAiX.js → SettingsSso-1JSXMGCZ.js} +1 -1
- package/dist/assets/{SettingsUsageAndPlan-DZkS0RP4.js → SettingsUsageAndPlan-CsUyzTgS.js} +1 -1
- package/dist/assets/{SettingsUsersView-BUh2iKEW.js → SettingsUsersView-iOvCX1d1.js} +1 -1
- package/dist/assets/{SettingsView-D_S4x7XG.js → SettingsView-WL2khukL.js} +1 -1
- package/dist/assets/{SetupView-BenKVU0l.js → SetupView-CeWIEjRa.js} +2 -2
- package/dist/assets/{SetupWorkflowCredentialsButton-DKr9ZPLE.js → SetupWorkflowCredentialsButton-CqzxyhWQ.js} +1 -1
- package/dist/assets/{SetupWorkflowFromTemplateView-Ce1R_CDh.js → SetupWorkflowFromTemplateView-HpPUcyfA.js} +3 -3
- package/dist/assets/{SigninView-xl5aJqka.js → SigninView-DuDYUyp-.js} +2 -2
- package/dist/assets/{SignoutView-Bscz6u1Y.js → SignoutView-4gm8WRHv.js} +1 -1
- package/dist/assets/{SignupView-CZN8EhJV.js → SignupView-DjY8EclM.js} +2 -2
- package/dist/assets/{TemplateDetails-BAQ3vBNJ.js → TemplateDetails-CbfdJ3Zu.js} +2 -2
- package/dist/assets/{TemplateList-DD7sqnpI.js → TemplateList-Cc_F6A58.js} +3 -2
- package/dist/assets/{TemplatesCollectionView-CG3ZoY8i.js → TemplatesCollectionView-BcZLoIe4.js} +5 -5
- package/dist/assets/{TemplatesSearchView-22jrqI8X.js → TemplatesSearchView-BMfAKWhL.js} +3 -3
- package/dist/assets/{TemplatesView-BZFc4hZ1.js → TemplatesView-BP0ATqW_.js} +3 -2
- package/dist/assets/{TemplatesWorkflowView-DkXtdhUJ.js → TemplatesWorkflowView-CPkYdvfj.js} +5 -5
- package/dist/assets/{VariablesView-DHu4ZoMN.js → VariablesView-Bxnz2qAN.js} +12 -12
- package/dist/assets/{VariablesView-BPKo50HJ.css → VariablesView-meR15bnW.css} +18 -18
- package/dist/assets/{WorkerView-BfxdQiAc.js → WorkerView-DReO6N8w.js} +11 -10
- package/dist/assets/{WorkflowActivator-CvdQVEtW.js → WorkflowActivator-B0RYBWDC.js} +2 -2
- package/dist/assets/{WorkflowExecutionsInfoAccordion-D2GFnpq1.js → WorkflowExecutionsInfoAccordion-DQl3QT6U.js} +7 -6
- package/dist/assets/{WorkflowExecutionsLandingPage-D2bvAsxg.js → WorkflowExecutionsLandingPage-B47g0omt.js} +2 -2
- package/dist/assets/{WorkflowExecutionsPreview-D6WBsbAG.js → WorkflowExecutionsPreview-3ZPhGB00.js} +12 -11
- package/dist/assets/{WorkflowExecutionsView-DI6r5OvZ.js → WorkflowExecutionsView-C2F5tFjz.js} +18 -9
- package/dist/assets/{WorkflowExecutionsView-CZKkPKqJ.css → WorkflowExecutionsView-CepgQyRt.css} +2 -2
- package/dist/assets/{WorkflowHistory-Dc1f2Tsn.js → WorkflowHistory-tThywxbZ.js} +3 -3
- package/dist/assets/{WorkflowOnboardingView-DyxvWfZ7.js → WorkflowOnboardingView-DJv_JU2k.js} +32 -1
- package/dist/assets/{WorkflowPreview-hC6wSe-Y.js → WorkflowPreview-DawY1Fi4.js} +1 -1
- package/dist/assets/{WorkflowsView-SIDgO47b.js → WorkflowsView-DA1gqPuM.js} +15 -56
- package/dist/assets/{index-40I5DMGP.js → index-BcRlEQdt.js} +1312 -1195
- package/dist/assets/{index-Dr3zFZlC.css → index-CSJeF569.css} +213 -203
- package/dist/assets/{pushConnection.store-w_WxpOeH.js → pushConnection.store-C9cp1cmF.js} +1 -1
- package/dist/assets/{templateActions-D4EHdA9n.js → templateActions-BM1BlED1.js} +1 -1
- package/dist/assets/{useBugReporting-CFOQlQpP.js → useBugReporting-D4ibEI2f.js} +1 -1
- package/dist/assets/{useExecutionDebugging-LQQWXhPj.js → useExecutionDebugging-B9k8m7iG.js} +1 -1
- package/dist/assets/useExecutionHelpers-DYE5_K78.js +113 -0
- package/dist/assets/useGlobalEntityCreation-DtWHHZf8.js +168 -0
- package/dist/assets/{useNodeViewVersionSwitcher-BLo5Qp-N.js → useNodeViewVersionSwitcher-CSLoLUvW.js} +1 -1
- package/dist/assets/{usePushConnection-B5ija5f5.js → usePushConnection-BLi9GBVo.js} +63 -111
- package/dist/assets/{useRunWorkflow-MrEKURG4.js → useRunWorkflow-DOJBXbbW.js} +68 -147
- package/dist/assets/{useWorkflowActivate-CKedJlgZ.js → useWorkflowActivate-DmBELETa.js} +1 -1
- package/dist/index.html +2 -2
- package/package.json +1 -1
- package/dist/assets/CollectionParameter-DNJAimAt.js +0 -4
- package/dist/assets/dateFormatter-BRi2wSZ-.js +0 -21
- package/dist/assets/useExecutionHelpers-CXGl_HIp.js +0 -115
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { hN as baseSlice, hO as toString, ef as getDefaultExportFromCjs, d as defineComponent, a$ as useClipboard, a as useToast, hP as useAIAssistantHelpers, bh as useNodeTypesStore, at as useNDVStore, Z as useRootStore, hQ as useAssistantStore, K as useUIStore, q as computed, c as openBlock, h as createElementBlock, j as createBaseVNode, t as toDisplayString, ax as withDirectives, f as createCommentVNode, i as createVNode, l as unref, hR as InlineAskAssistantButton, w as withCtx, k as createTextVNode, F as Fragment, A as renderList, g as useI18n, eq as MAX_DISPLAY_DATA_SIZE, dv as isCommunityPackageName, hS as NEW_ASSISTANT_SESSION_MODAL, m as resolveComponent, cF as resolveDirective, hD as sanitizeHtml, ba as NodeConnectionType, hT as isObjectEmpty, r as ref, o as onMounted, n as normalizeClass, e as createBlock, aW as VueMarkdown, _ as _export_sfc, T as useWorkflowsStore, du as _sfc_main$4, I as withModifiers, H as watch, B as normalizeStyle, hU as ElTree, hq as isSubNodeType, hV as PIN_DATA_NODE_TYPES_DENYLIST, b9 as getNodeOutputs, hW as jsonStringify, hX as toMegaBytes, hY as stringSizeInBytes, ei as jsonParse, ak as useTelemetry, aM as useExternalHooks, hr as useDataSchema, hZ as MAX_PINNED_DATA_SIZE, h_ as MAX_WORKFLOW_SIZE, h$ as MAX_EXPECTED_REQUEST_SIZE, bi as useNodeHelpers, a4 as useWorkflowHelpers, au as useExecutionsStore, b0 as CHAT_TRIGGER_NODE_TYPE, bb as get, i0 as SINGLE_WEBHOOK_TRIGGERS, hL as useLocalStorage, i1 as displayForm, eG as isEmpty } from "./index-BcRlEQdt.js";
|
|
2
|
+
import { u as useExecutionHelpers } from "./useExecutionHelpers-DYE5_K78.js";
|
|
2
3
|
function castSlice(array, start, end) {
|
|
3
4
|
var length = array.length;
|
|
4
5
|
end = end === void 0 ? length : end;
|
|
@@ -1570,11 +1571,11 @@ highlight.default = highlight;
|
|
|
1570
1571
|
const HighlightJS = /* @__PURE__ */ getDefaultExportFromCjs(core);
|
|
1571
1572
|
const _hoisted_1$3 = { class: "node-error-view" };
|
|
1572
1573
|
const _hoisted_2$3 = { class: "node-error-view__header" };
|
|
1573
|
-
const _hoisted_3$
|
|
1574
|
+
const _hoisted_3$2 = {
|
|
1574
1575
|
class: "node-error-view__header-message",
|
|
1575
1576
|
"data-test-id": "node-error-message"
|
|
1576
1577
|
};
|
|
1577
|
-
const _hoisted_4 = {
|
|
1578
|
+
const _hoisted_4$1 = {
|
|
1578
1579
|
key: 0,
|
|
1579
1580
|
"data-test-id": "node-error-description",
|
|
1580
1581
|
class: "node-error-view__header-description"
|
|
@@ -2004,10 +2005,10 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
2004
2005
|
const _directive_n8n_html = resolveDirective("n8n-html");
|
|
2005
2006
|
return openBlock(), createElementBlock("div", _hoisted_1$3, [
|
|
2006
2007
|
createBaseVNode("div", _hoisted_2$3, [
|
|
2007
|
-
createBaseVNode("div", _hoisted_3$
|
|
2008
|
+
createBaseVNode("div", _hoisted_3$2, [
|
|
2008
2009
|
createBaseVNode("div", null, toDisplayString(getErrorMessage()), 1)
|
|
2009
2010
|
]),
|
|
2010
|
-
(_ctx.error.description || ((_a = _ctx.error.context) == null ? void 0 : _a.descriptionKey)) && !isSubNodeError.value ? withDirectives((openBlock(), createElementBlock("div", _hoisted_4, null, 512)), [
|
|
2011
|
+
(_ctx.error.description || ((_a = _ctx.error.context) == null ? void 0 : _a.descriptionKey)) && !isSubNodeError.value ? withDirectives((openBlock(), createElementBlock("div", _hoisted_4$1, null, 512)), [
|
|
2011
2012
|
[_directive_n8n_html, getErrorDescription()]
|
|
2012
2013
|
]) : createCommentVNode("", true),
|
|
2013
2014
|
isSubNodeError.value ? (openBlock(), createElementBlock("div", _hoisted_5, [
|
|
@@ -2532,7 +2533,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
2532
2533
|
size: "small",
|
|
2533
2534
|
class: normalizeClass(_ctx.$style.copyToClipboard),
|
|
2534
2535
|
type: "secondary",
|
|
2535
|
-
title:
|
|
2536
|
+
title: unref(i18n).baseText("nodeErrorView.copyToClipboard"),
|
|
2536
2537
|
icon: "copy",
|
|
2537
2538
|
onClick: ($event) => onCopyToClipboard(raw)
|
|
2538
2539
|
}, null, 8, ["class", "title", "onClick"]),
|
|
@@ -2582,6 +2583,8 @@ const cssModules$2 = {
|
|
|
2582
2583
|
const AiRunContentBlock = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__cssModules", cssModules$2]]);
|
|
2583
2584
|
const _hoisted_1$1 = { key: 0 };
|
|
2584
2585
|
const _hoisted_2$1 = { key: 1 };
|
|
2586
|
+
const _hoisted_3$1 = { key: 2 };
|
|
2587
|
+
const _hoisted_4 = ["href"];
|
|
2585
2588
|
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
2586
2589
|
__name: "RunDataAiContent",
|
|
2587
2590
|
props: {
|
|
@@ -2592,6 +2595,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
2592
2595
|
const props = __props;
|
|
2593
2596
|
const nodeTypesStore = useNodeTypesStore();
|
|
2594
2597
|
const workflowsStore = useWorkflowsStore();
|
|
2598
|
+
const { trackOpeningRelatedExecution, resolveRelatedExecutionUrl } = useExecutionHelpers();
|
|
2599
|
+
const i18n = useI18n();
|
|
2595
2600
|
const consumedTokensSum = computed(() => {
|
|
2596
2601
|
var _a, _b;
|
|
2597
2602
|
const tokenUsage = (_b = (_a = outputRun.value) == null ? void 0 : _a.data) == null ? void 0 : _b.reduce(
|
|
@@ -2624,6 +2629,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
2624
2629
|
return usingTokensEstimates.value ? `~${count}` : count.toString();
|
|
2625
2630
|
}
|
|
2626
2631
|
function extractRunMeta(run) {
|
|
2632
|
+
var _a;
|
|
2627
2633
|
const uiNode = workflowsStore.getNodeByName(props.inputData.node);
|
|
2628
2634
|
const nodeType = nodeTypesStore.getNodeType((uiNode == null ? void 0 : uiNode.type) ?? "");
|
|
2629
2635
|
const runMeta2 = {
|
|
@@ -2631,7 +2637,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
2631
2637
|
executionTimeMs: run.metadata.executionTime,
|
|
2632
2638
|
node: nodeType,
|
|
2633
2639
|
type: run.inOut,
|
|
2634
|
-
connectionType: run.type
|
|
2640
|
+
connectionType: run.type,
|
|
2641
|
+
subExecution: (_a = run.metadata) == null ? void 0 : _a.subExecution
|
|
2635
2642
|
};
|
|
2636
2643
|
return runMeta2;
|
|
2637
2644
|
}
|
|
@@ -2653,8 +2660,9 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
2653
2660
|
return (_c = (_b = (_a = executionRunData.value) == null ? void 0 : _a[props.inputData.node]) == null ? void 0 : _b[props.inputData.runIndex]) == null ? void 0 : _c.error;
|
|
2654
2661
|
});
|
|
2655
2662
|
return (_ctx, _cache) => {
|
|
2656
|
-
var _a, _b, _c, _d, _e, _f;
|
|
2663
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
2657
2664
|
const _component_n8n_tooltip = resolveComponent("n8n-tooltip");
|
|
2665
|
+
const _component_N8nIcon = resolveComponent("N8nIcon");
|
|
2658
2666
|
const _component_n8n_text = resolveComponent("n8n-text");
|
|
2659
2667
|
const _component_n8n_info_tip = resolveComponent("n8n-info-tip");
|
|
2660
2668
|
return openBlock(), createElementBlock("div", {
|
|
@@ -2690,7 +2698,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
2690
2698
|
default: withCtx(() => {
|
|
2691
2699
|
var _a2;
|
|
2692
2700
|
return [
|
|
2693
|
-
createTextVNode(" " + toDisplayString(
|
|
2701
|
+
createTextVNode(" " + toDisplayString(unref(i18n).baseText("runData.aiContentBlock.startedAt", {
|
|
2694
2702
|
interpolate: {
|
|
2695
2703
|
startTime: new Date((_a2 = runMeta.value) == null ? void 0 : _a2.startTimeMs).toLocaleTimeString()
|
|
2696
2704
|
}
|
|
@@ -2700,13 +2708,30 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
2700
2708
|
_: 1
|
|
2701
2709
|
})
|
|
2702
2710
|
])) : createCommentVNode("", true),
|
|
2703
|
-
((
|
|
2704
|
-
|
|
2711
|
+
((_e = runMeta.value) == null ? void 0 : _e.subExecution) ? (openBlock(), createElementBlock("li", _hoisted_3$1, [
|
|
2712
|
+
createBaseVNode("a", {
|
|
2713
|
+
href: unref(resolveRelatedExecutionUrl)(runMeta.value),
|
|
2714
|
+
target: "_blank",
|
|
2715
|
+
onClick: _cache[0] || (_cache[0] = withModifiers(($event) => unref(trackOpeningRelatedExecution)(runMeta.value, "ai"), ["stop"]))
|
|
2716
|
+
}, [
|
|
2717
|
+
createVNode(_component_N8nIcon, {
|
|
2718
|
+
icon: "external-link-alt",
|
|
2719
|
+
size: "xsmall"
|
|
2720
|
+
}),
|
|
2721
|
+
createTextVNode(" " + toDisplayString(unref(i18n).baseText("runData.openSubExecution", {
|
|
2722
|
+
interpolate: {
|
|
2723
|
+
id: (_f = runMeta.value.subExecution) == null ? void 0 : _f.executionId
|
|
2724
|
+
}
|
|
2725
|
+
})), 1)
|
|
2726
|
+
], 8, _hoisted_4)
|
|
2727
|
+
])) : createCommentVNode("", true),
|
|
2728
|
+
(((_g = consumedTokensSum.value) == null ? void 0 : _g.totalTokens) ?? 0) > 0 ? (openBlock(), createElementBlock("li", {
|
|
2729
|
+
key: 3,
|
|
2705
2730
|
class: normalizeClass(_ctx.$style.tokensUsage)
|
|
2706
2731
|
}, [
|
|
2707
|
-
createTextVNode(toDisplayString(
|
|
2732
|
+
createTextVNode(toDisplayString(unref(i18n).baseText("runData.aiContentBlock.tokens", {
|
|
2708
2733
|
interpolate: {
|
|
2709
|
-
count: formatTokenUsageCount(((
|
|
2734
|
+
count: formatTokenUsageCount(((_h = consumedTokensSum.value) == null ? void 0 : _h.totalTokens) ?? 0)
|
|
2710
2735
|
}
|
|
2711
2736
|
})) + " ", 1),
|
|
2712
2737
|
createVNode(_component_n8n_info_tip, {
|
|
@@ -2723,7 +2748,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
2723
2748
|
default: withCtx(() => {
|
|
2724
2749
|
var _a2;
|
|
2725
2750
|
return [
|
|
2726
|
-
createTextVNode(toDisplayString(
|
|
2751
|
+
createTextVNode(toDisplayString(unref(i18n).baseText("runData.aiContentBlock.tokens.prompt")) + " " + toDisplayString(unref(i18n).baseText("runData.aiContentBlock.tokens", {
|
|
2727
2752
|
interpolate: {
|
|
2728
2753
|
count: formatTokenUsageCount(((_a2 = consumedTokensSum.value) == null ? void 0 : _a2.promptTokens) ?? 0)
|
|
2729
2754
|
}
|
|
@@ -2732,7 +2757,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
2732
2757
|
}),
|
|
2733
2758
|
_: 1
|
|
2734
2759
|
}),
|
|
2735
|
-
_cache[
|
|
2760
|
+
_cache[1] || (_cache[1] = createBaseVNode("br", null, null, -1)),
|
|
2736
2761
|
createVNode(_component_n8n_text, {
|
|
2737
2762
|
bold: true,
|
|
2738
2763
|
size: "small"
|
|
@@ -2740,7 +2765,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
2740
2765
|
default: withCtx(() => {
|
|
2741
2766
|
var _a2;
|
|
2742
2767
|
return [
|
|
2743
|
-
createTextVNode(toDisplayString(
|
|
2768
|
+
createTextVNode(toDisplayString(unref(i18n).baseText("runData.aiContentBlock.tokens.completion")) + " " + toDisplayString(unref(i18n).baseText("runData.aiContentBlock.tokens", {
|
|
2744
2769
|
interpolate: {
|
|
2745
2770
|
count: formatTokenUsageCount(((_a2 = consumedTokensSum.value) == null ? void 0 : _a2.completionTokens) ?? 0)
|
|
2746
2771
|
}
|
|
@@ -2808,6 +2833,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2808
2833
|
const workflowsStore = useWorkflowsStore();
|
|
2809
2834
|
const nodeTypesStore = useNodeTypesStore();
|
|
2810
2835
|
const selectedRun = ref([]);
|
|
2836
|
+
const i18n = useI18n();
|
|
2811
2837
|
function isTreeNodeSelected(node) {
|
|
2812
2838
|
return selectedRun.value.some((run) => run.node === node.node && run.runIndex === node.runIndex);
|
|
2813
2839
|
}
|
|
@@ -2821,13 +2847,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2821
2847
|
return;
|
|
2822
2848
|
}
|
|
2823
2849
|
Object.keys(data).map((type) => {
|
|
2850
|
+
var _a;
|
|
2824
2851
|
returnData.push({
|
|
2825
2852
|
data: data[type][0],
|
|
2826
2853
|
inOut,
|
|
2827
2854
|
type,
|
|
2828
2855
|
metadata: {
|
|
2829
2856
|
executionTime: taskData.executionTime,
|
|
2830
|
-
startTime: taskData.startTime
|
|
2857
|
+
startTime: taskData.startTime,
|
|
2858
|
+
subExecution: (_a = taskData.metadata) == null ? void 0 : _a.subExecution
|
|
2831
2859
|
}
|
|
2832
2860
|
});
|
|
2833
2861
|
});
|
|
@@ -3019,7 +3047,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
3019
3047
|
}, [
|
|
3020
3048
|
createVNode(_component_n8n_text, { size: "large" }, {
|
|
3021
3049
|
default: withCtx(() => [
|
|
3022
|
-
createTextVNode(toDisplayString(
|
|
3050
|
+
createTextVNode(toDisplayString(unref(i18n).baseText("ndv.output.ai.empty", {
|
|
3023
3051
|
interpolate: {
|
|
3024
3052
|
node: props.node.name
|
|
3025
3053
|
}
|
|
@@ -3043,7 +3071,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
3043
3071
|
], 64)) : (openBlock(), createElementBlock("div", {
|
|
3044
3072
|
key: 1,
|
|
3045
3073
|
class: normalizeClass(_ctx.$style.noData)
|
|
3046
|
-
}, toDisplayString(
|
|
3074
|
+
}, toDisplayString(unref(i18n).baseText("ndv.output.ai.waiting")), 3))
|
|
3047
3075
|
], 2);
|
|
3048
3076
|
};
|
|
3049
3077
|
}
|
|
@@ -3309,7 +3337,6 @@ function usePinnedData(node, options = {}) {
|
|
|
3309
3337
|
isValidSize
|
|
3310
3338
|
};
|
|
3311
3339
|
}
|
|
3312
|
-
const FORM_RELOAD = "n8n_redirect_to_next_form_test_page";
|
|
3313
3340
|
function useRunWorkflow(useRunWorkflowOpts) {
|
|
3314
3341
|
const nodeHelpers = useNodeHelpers();
|
|
3315
3342
|
const workflowHelpers = useWorkflowHelpers({ router: useRunWorkflowOpts.router });
|
|
@@ -3350,7 +3377,6 @@ function useRunWorkflow(useRunWorkflowOpts) {
|
|
|
3350
3377
|
if (uiStore.isActionActive["workflowRunning"]) {
|
|
3351
3378
|
return;
|
|
3352
3379
|
}
|
|
3353
|
-
workflowHelpers.setDocumentTitle(workflow.name, "EXECUTING");
|
|
3354
3380
|
toast.clearAllStickyNotifications();
|
|
3355
3381
|
try {
|
|
3356
3382
|
let directParentNodes = [];
|
|
@@ -3399,10 +3425,11 @@ function useRunWorkflow(useRunWorkflowOpts) {
|
|
|
3399
3425
|
}
|
|
3400
3426
|
}
|
|
3401
3427
|
}
|
|
3428
|
+
const triggers = workflowData.nodes.filter(
|
|
3429
|
+
(node) => node.type.toLowerCase().includes("trigger") && !node.disabled
|
|
3430
|
+
);
|
|
3402
3431
|
if (!options.destinationNode && options.source !== "RunData.ManualChatMessage" && workflowData.nodes.some((node) => node.type === CHAT_TRIGGER_NODE_TYPE)) {
|
|
3403
|
-
const otherTriggers =
|
|
3404
|
-
(node) => node.type !== CHAT_TRIGGER_NODE_TYPE && node.type.toLowerCase().includes("trigger") && !node.disabled
|
|
3405
|
-
);
|
|
3432
|
+
const otherTriggers = triggers.filter((node) => node.type !== CHAT_TRIGGER_NODE_TYPE);
|
|
3406
3433
|
if (otherTriggers.length) {
|
|
3407
3434
|
const chatTriggerNode = workflowData.nodes.find(
|
|
3408
3435
|
(node) => node.type === CHAT_TRIGGER_NODE_TYPE
|
|
@@ -3429,6 +3456,19 @@ function useRunWorkflow(useRunWorkflowOpts) {
|
|
|
3429
3456
|
sourceData
|
|
3430
3457
|
};
|
|
3431
3458
|
});
|
|
3459
|
+
const singleWebhookTrigger = triggers.find(
|
|
3460
|
+
(node) => SINGLE_WEBHOOK_TRIGGERS.includes(node.type)
|
|
3461
|
+
);
|
|
3462
|
+
if (singleWebhookTrigger && workflowsStore.isWorkflowActive) {
|
|
3463
|
+
toast.showMessage({
|
|
3464
|
+
title: i18n.baseText("workflowRun.showError.deactivate"),
|
|
3465
|
+
message: i18n.baseText("workflowRun.showError.productionActive", {
|
|
3466
|
+
interpolate: { nodeName: singleWebhookTrigger.name }
|
|
3467
|
+
}),
|
|
3468
|
+
type: "error"
|
|
3469
|
+
});
|
|
3470
|
+
return void 0;
|
|
3471
|
+
}
|
|
3432
3472
|
const partialExecutionVersion = useLocalStorage("PartialExecution.version", -1);
|
|
3433
3473
|
const startRunData = {
|
|
3434
3474
|
workflowData,
|
|
@@ -3445,6 +3485,7 @@ function useRunWorkflow(useRunWorkflowOpts) {
|
|
|
3445
3485
|
finished: false,
|
|
3446
3486
|
mode: "manual",
|
|
3447
3487
|
status: "running",
|
|
3488
|
+
createdAt: /* @__PURE__ */ new Date(),
|
|
3448
3489
|
startedAt: /* @__PURE__ */ new Date(),
|
|
3449
3490
|
stoppedAt: void 0,
|
|
3450
3491
|
workflowId: workflow.id,
|
|
@@ -3467,6 +3508,7 @@ function useRunWorkflow(useRunWorkflowOpts) {
|
|
|
3467
3508
|
};
|
|
3468
3509
|
workflowsStore.setWorkflowExecutionData(executionData);
|
|
3469
3510
|
nodeHelpers.updateNodesExecutionIssues();
|
|
3511
|
+
workflowHelpers.setDocumentTitle(workflow.name, "EXECUTING");
|
|
3470
3512
|
const runWorkflowApiResponse = await runWorkflowApi(startRunData);
|
|
3471
3513
|
const pinData = workflowData.pinData ?? {};
|
|
3472
3514
|
const getTestUrl = /* @__PURE__ */ (() => {
|
|
@@ -3499,112 +3541,6 @@ function useRunWorkflow(useRunWorkflowOpts) {
|
|
|
3499
3541
|
return void 0;
|
|
3500
3542
|
}
|
|
3501
3543
|
}
|
|
3502
|
-
function getFormResumeUrl(node, executionId) {
|
|
3503
|
-
const { webhookSuffix } = node.parameters.options ?? {};
|
|
3504
|
-
const suffix = webhookSuffix && typeof webhookSuffix !== "object" ? `/${webhookSuffix}` : "";
|
|
3505
|
-
const testUrl = `${rootStore.formWaitingUrl}/${executionId}${suffix}`;
|
|
3506
|
-
return testUrl;
|
|
3507
|
-
}
|
|
3508
|
-
async function runWorkflowResolvePending(options) {
|
|
3509
|
-
let runWorkflowApiResponse = await runWorkflow(options);
|
|
3510
|
-
let { executionId } = runWorkflowApiResponse || {};
|
|
3511
|
-
const MAX_DELAY = 3e3;
|
|
3512
|
-
const waitForWebhook = async () => {
|
|
3513
|
-
return await new Promise((resolve) => {
|
|
3514
|
-
let delay = 300;
|
|
3515
|
-
let timeoutId = null;
|
|
3516
|
-
const checkWebhook = async () => {
|
|
3517
|
-
await useExternalHooks().run("workflowRun.runWorkflow", {
|
|
3518
|
-
nodeName: options.destinationNode,
|
|
3519
|
-
source: options.source
|
|
3520
|
-
});
|
|
3521
|
-
if (workflowsStore.activeExecutionId) {
|
|
3522
|
-
executionId = workflowsStore.activeExecutionId;
|
|
3523
|
-
runWorkflowApiResponse = { executionId };
|
|
3524
|
-
if (timeoutId) clearTimeout(timeoutId);
|
|
3525
|
-
resolve(executionId);
|
|
3526
|
-
}
|
|
3527
|
-
delay = Math.min(delay * 1.1, MAX_DELAY);
|
|
3528
|
-
timeoutId = setTimeout(checkWebhook, delay);
|
|
3529
|
-
};
|
|
3530
|
-
timeoutId = setTimeout(checkWebhook, delay);
|
|
3531
|
-
});
|
|
3532
|
-
};
|
|
3533
|
-
if (!executionId) executionId = await waitForWebhook();
|
|
3534
|
-
let isFormShown = !options.destinationNode && workflowsStore.allNodes.some(
|
|
3535
|
-
(node) => {
|
|
3536
|
-
var _a;
|
|
3537
|
-
return node.type === FORM_TRIGGER_NODE_TYPE && !((_a = workflowsStore == null ? void 0 : workflowsStore.pinnedWorkflowData) == null ? void 0 : _a[node.name]);
|
|
3538
|
-
}
|
|
3539
|
-
);
|
|
3540
|
-
const resolveWaitingNodesData = async () => {
|
|
3541
|
-
return await new Promise((resolve) => {
|
|
3542
|
-
let delay = 300;
|
|
3543
|
-
let timeoutId = null;
|
|
3544
|
-
const processExecution = async () => {
|
|
3545
|
-
var _a, _b, _c, _d;
|
|
3546
|
-
await useExternalHooks().run("workflowRun.runWorkflow", {
|
|
3547
|
-
nodeName: options.destinationNode,
|
|
3548
|
-
source: options.source
|
|
3549
|
-
});
|
|
3550
|
-
const execution = await workflowsStore.getExecution(executionId || "");
|
|
3551
|
-
localStorage.removeItem(FORM_RELOAD);
|
|
3552
|
-
if (!execution || workflowsStore.workflowExecutionData === null) {
|
|
3553
|
-
uiStore.removeActiveAction("workflowRunning");
|
|
3554
|
-
if (timeoutId) clearTimeout(timeoutId);
|
|
3555
|
-
resolve();
|
|
3556
|
-
return;
|
|
3557
|
-
}
|
|
3558
|
-
const { lastNodeExecuted } = ((_a = execution.data) == null ? void 0 : _a.resultData) || {};
|
|
3559
|
-
const lastNode = execution.workflowData.nodes.find((node) => {
|
|
3560
|
-
return node.name === lastNodeExecuted;
|
|
3561
|
-
});
|
|
3562
|
-
if (execution.finished || ["error", "canceled", "crashed", "success"].includes(execution.status)) {
|
|
3563
|
-
workflowsStore.setWorkflowExecutionData(execution);
|
|
3564
|
-
uiStore.removeActiveAction("workflowRunning");
|
|
3565
|
-
workflowsStore.activeExecutionId = null;
|
|
3566
|
-
if (timeoutId) clearTimeout(timeoutId);
|
|
3567
|
-
resolve();
|
|
3568
|
-
return;
|
|
3569
|
-
}
|
|
3570
|
-
if (execution.status === "waiting" && ((_b = execution.data) == null ? void 0 : _b.waitTill)) {
|
|
3571
|
-
delete execution.data.resultData.runData[execution.data.resultData.lastNodeExecuted];
|
|
3572
|
-
workflowsStore.setWorkflowExecutionRunData(execution.data);
|
|
3573
|
-
if (lastNode && (lastNode.type === FORM_NODE_TYPE || lastNode.type === WAIT_NODE_TYPE && lastNode.parameters.resume === "form")) {
|
|
3574
|
-
let testUrl = getFormResumeUrl(lastNode, executionId);
|
|
3575
|
-
if (isFormShown) {
|
|
3576
|
-
localStorage.setItem(FORM_RELOAD, testUrl);
|
|
3577
|
-
} else {
|
|
3578
|
-
if (options.destinationNode) {
|
|
3579
|
-
const formTrigger = execution == null ? void 0 : execution.workflowData.nodes.find((node) => {
|
|
3580
|
-
return node.type === FORM_TRIGGER_NODE_TYPE;
|
|
3581
|
-
});
|
|
3582
|
-
const runNodeFilter = ((_d = (_c = execution == null ? void 0 : execution.data) == null ? void 0 : _c.startData) == null ? void 0 : _d.runNodeFilter) || [];
|
|
3583
|
-
if (formTrigger && !runNodeFilter.includes(formTrigger.name)) {
|
|
3584
|
-
isFormShown = true;
|
|
3585
|
-
}
|
|
3586
|
-
}
|
|
3587
|
-
if (!isFormShown) {
|
|
3588
|
-
if (lastNode.type === FORM_NODE_TYPE) {
|
|
3589
|
-
testUrl = `${rootStore.formWaitingUrl}/${executionId}`;
|
|
3590
|
-
} else {
|
|
3591
|
-
testUrl = getFormResumeUrl(lastNode, executionId);
|
|
3592
|
-
}
|
|
3593
|
-
isFormShown = true;
|
|
3594
|
-
if (testUrl) openPopUpWindow(testUrl);
|
|
3595
|
-
}
|
|
3596
|
-
}
|
|
3597
|
-
}
|
|
3598
|
-
}
|
|
3599
|
-
delay = Math.min(delay * 1.1, MAX_DELAY);
|
|
3600
|
-
timeoutId = setTimeout(processExecution, delay);
|
|
3601
|
-
};
|
|
3602
|
-
timeoutId = setTimeout(processExecution, delay);
|
|
3603
|
-
});
|
|
3604
|
-
};
|
|
3605
|
-
await resolveWaitingNodesData();
|
|
3606
|
-
return runWorkflowApiResponse;
|
|
3607
|
-
}
|
|
3608
3544
|
function consolidateRunDataAndStartNodes(directParentNodes, runData2, pinData, workflow) {
|
|
3609
3545
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
3610
3546
|
const startNodeNames = /* @__PURE__ */ new Set();
|
|
@@ -3641,13 +3577,6 @@ function useRunWorkflow(useRunWorkflowOpts) {
|
|
|
3641
3577
|
} catch (error2) {
|
|
3642
3578
|
const execution = await workflowsStore.getExecution(executionId);
|
|
3643
3579
|
if (execution === void 0) {
|
|
3644
|
-
workflowsStore.finishActiveExecution({
|
|
3645
|
-
executionId,
|
|
3646
|
-
data: { finished: true, stoppedAt: /* @__PURE__ */ new Date() }
|
|
3647
|
-
});
|
|
3648
|
-
workflowsStore.executingNode.length = 0;
|
|
3649
|
-
uiStore.removeActiveAction("workflowRunning");
|
|
3650
|
-
workflowHelpers.setDocumentTitle(workflowsStore.workflowName, "IDLE");
|
|
3651
3580
|
toast.showMessage({
|
|
3652
3581
|
title: i18n.baseText("nodeView.showMessage.stopExecutionCatch.unsaved.title"),
|
|
3653
3582
|
message: i18n.baseText("nodeView.showMessage.stopExecutionCatch.unsaved.message"),
|
|
@@ -3661,16 +3590,7 @@ function useRunWorkflow(useRunWorkflowOpts) {
|
|
|
3661
3590
|
startedAt: execution.startedAt,
|
|
3662
3591
|
stoppedAt: execution.stoppedAt
|
|
3663
3592
|
};
|
|
3664
|
-
const pushData = {
|
|
3665
|
-
data: executedData,
|
|
3666
|
-
executionId,
|
|
3667
|
-
retryOf: execution.retryOf
|
|
3668
|
-
};
|
|
3669
|
-
workflowsStore.finishActiveExecution(pushData);
|
|
3670
|
-
workflowHelpers.setDocumentTitle(execution.workflowData.name, "IDLE");
|
|
3671
|
-
workflowsStore.executingNode.length = 0;
|
|
3672
3593
|
workflowsStore.setWorkflowExecutionData(executedData);
|
|
3673
|
-
uiStore.removeActiveAction("workflowRunning");
|
|
3674
3594
|
toast.showMessage({
|
|
3675
3595
|
title: i18n.baseText("nodeView.showMessage.stopExecutionCatch.title"),
|
|
3676
3596
|
message: i18n.baseText("nodeView.showMessage.stopExecutionCatch.message"),
|
|
@@ -3679,6 +3599,8 @@ function useRunWorkflow(useRunWorkflowOpts) {
|
|
|
3679
3599
|
} else {
|
|
3680
3600
|
toast.showError(error2, i18n.baseText("nodeView.showError.stopExecution.title"));
|
|
3681
3601
|
}
|
|
3602
|
+
} finally {
|
|
3603
|
+
workflowsStore.markExecutionAsStopped();
|
|
3682
3604
|
}
|
|
3683
3605
|
}
|
|
3684
3606
|
async function stopWaitingForWebhook() {
|
|
@@ -3692,7 +3614,6 @@ function useRunWorkflow(useRunWorkflowOpts) {
|
|
|
3692
3614
|
return {
|
|
3693
3615
|
consolidateRunDataAndStartNodes,
|
|
3694
3616
|
runWorkflow,
|
|
3695
|
-
runWorkflowResolvePending,
|
|
3696
3617
|
runWorkflowApi,
|
|
3697
3618
|
stopCurrentExecution,
|
|
3698
3619
|
stopWaitingForWebhook
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as ref, b as useRouter, a4 as useWorkflowHelpers, T as useWorkflowsStore, K as useUIStore, a as useToast, a2 as useNpsSurveyStore, X as PLACEHOLDER_EMPTY_WORKFLOW_ID,
|
|
1
|
+
import { r as ref, b as useRouter, a4 as useWorkflowHelpers, T as useWorkflowsStore, K as useUIStore, a as useToast, a2 as useNpsSurveyStore, X as PLACEHOLDER_EMPTY_WORKFLOW_ID, aM as useExternalHooks, aF as useStorage, j0 as LOCAL_STORAGE_ACTIVATION_FLAG, j1 as WORKFLOW_ACTIVE_MODAL_KEY, ak as useTelemetry, g as useI18n } from "./index-BcRlEQdt.js";
|
|
2
2
|
function useWorkflowActivate() {
|
|
3
3
|
const updatingWorkflowActivation = ref(false);
|
|
4
4
|
const router = useRouter();
|
package/dist/index.html
CHANGED
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
<script>!function(t,e){var o,n,p,r;e.__SV||(window.posthog=e,e._i=[],e.init=function(i,s,a){function g(t,e){var o=e.split(".");2==o.length&&(t=t[o[0]],e=o[1]),t[e]=function(){t.push([e].concat(Array.prototype.slice.call(arguments,0)))}}(p=t.createElement("script")).type="text/javascript",p.async=!0,p.src=s.api_host+"/static/array.js",(r=t.getElementsByTagName("script")[0]).parentNode.insertBefore(p,r);var u=e;for(void 0!==a?u=e[a]=[]:a="posthog",u.people=u.people||[],u.toString=function(t){var e="posthog";return"posthog"!==a&&(e+="."+a),t||(e+=" (stub)"),e},u.people.toString=function(){return u.toString(1)+".people (stub)"},o="capture identify alias people.set people.set_once set_config register register_once unregister opt_out_capturing has_opted_out_capturing opt_in_capturing reset isFeatureEnabled getFeatureFlag onFeatureFlags reloadFeatureFlags".split(" "),n=0;n<o.length;n++)g(u,o[n]);e._i.push([i,s,a])},e.__SV=1)}(document,window.posthog||[])</script>
|
|
15
15
|
|
|
16
16
|
<title>n8n.io - Workflow Automation</title>
|
|
17
|
-
<script type="module" crossorigin src="/{{BASE_PATH}}/assets/index-
|
|
18
|
-
<link rel="stylesheet" crossorigin href="/{{BASE_PATH}}/assets/index-
|
|
17
|
+
<script type="module" crossorigin src="/{{BASE_PATH}}/assets/index-BcRlEQdt.js"></script>
|
|
18
|
+
<link rel="stylesheet" crossorigin href="/{{BASE_PATH}}/assets/index-CSJeF569.css">
|
|
19
19
|
</head>
|
|
20
20
|
<body>
|
|
21
21
|
<noscript>
|
package/package.json
CHANGED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { j2 as dateformat } from "./index-40I5DMGP.js";
|
|
2
|
-
const convertToDisplayDateComponents = (fullDate) => {
|
|
3
|
-
const mask = `d mmm${new Date(fullDate).getFullYear() === (/* @__PURE__ */ new Date()).getFullYear() ? "" : ", yyyy"}#HH:MM:ss`;
|
|
4
|
-
const formattedDate = dateformat(fullDate, mask);
|
|
5
|
-
const [date, time] = formattedDate.split("#");
|
|
6
|
-
return { date, time };
|
|
7
|
-
};
|
|
8
|
-
function convertToDisplayDate(fullDate) {
|
|
9
|
-
const mask = `d mmm${new Date(fullDate).getFullYear() === (/* @__PURE__ */ new Date()).getFullYear() ? "" : ", yyyy"}#HH:MM:ss`;
|
|
10
|
-
const formattedDate = dateformat(fullDate, mask);
|
|
11
|
-
const [date, time] = formattedDate.split("#");
|
|
12
|
-
return { date, time };
|
|
13
|
-
}
|
|
14
|
-
const toDayMonth = (fullDate) => dateformat(fullDate, "d mmm");
|
|
15
|
-
const toTime = (fullDate) => dateformat(fullDate, "HH:MM:ss");
|
|
16
|
-
export {
|
|
17
|
-
toTime as a,
|
|
18
|
-
convertToDisplayDate as b,
|
|
19
|
-
convertToDisplayDateComponents as c,
|
|
20
|
-
toDayMonth as t
|
|
21
|
-
};
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import { d as defineComponent, j4 as useAnnotationTagsStore, K as useUIStore, p as computed, c as openBlock, e as createBlock, j5 as ANNOTATION_TAGS_MANAGER_MODAL_KEY, j6 as _sfc_main$1, g as useI18n } from "./index-40I5DMGP.js";
|
|
2
|
-
import { b as convertToDisplayDate } from "./dateFormatter-BRi2wSZ-.js";
|
|
3
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
4
|
-
__name: "AnnotationTagsDropdown.ee",
|
|
5
|
-
props: {
|
|
6
|
-
placeholder: { default: "" },
|
|
7
|
-
modelValue: { default: () => [] },
|
|
8
|
-
createEnabled: { type: Boolean, default: false },
|
|
9
|
-
eventBus: { default: null }
|
|
10
|
-
},
|
|
11
|
-
emits: ["update:modelValue", "esc", "blur"],
|
|
12
|
-
setup(__props, { emit: __emit }) {
|
|
13
|
-
const props = __props;
|
|
14
|
-
const emit = __emit;
|
|
15
|
-
const tagsStore = useAnnotationTagsStore();
|
|
16
|
-
const uiStore = useUIStore();
|
|
17
|
-
const selectedTags = computed({
|
|
18
|
-
get: () => props.modelValue,
|
|
19
|
-
set: (value) => emit("update:modelValue", value)
|
|
20
|
-
});
|
|
21
|
-
const allTags = computed(() => tagsStore.allTags);
|
|
22
|
-
const isLoading = computed(() => tagsStore.isLoading);
|
|
23
|
-
const tagsById = computed(() => tagsStore.tagsById);
|
|
24
|
-
async function createTag(name) {
|
|
25
|
-
return await tagsStore.create(name);
|
|
26
|
-
}
|
|
27
|
-
function handleManageTags() {
|
|
28
|
-
uiStore.openModal(ANNOTATION_TAGS_MANAGER_MODAL_KEY);
|
|
29
|
-
}
|
|
30
|
-
function handleEsc() {
|
|
31
|
-
emit("esc");
|
|
32
|
-
}
|
|
33
|
-
function handleBlur() {
|
|
34
|
-
emit("blur");
|
|
35
|
-
}
|
|
36
|
-
void tagsStore.fetchAll();
|
|
37
|
-
return (_ctx, _cache) => {
|
|
38
|
-
const _component_TagsDropdown = _sfc_main$1;
|
|
39
|
-
return openBlock(), createBlock(_component_TagsDropdown, {
|
|
40
|
-
modelValue: selectedTags.value,
|
|
41
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => selectedTags.value = $event),
|
|
42
|
-
placeholder: _ctx.placeholder,
|
|
43
|
-
"create-enabled": _ctx.createEnabled,
|
|
44
|
-
"event-bus": _ctx.eventBus,
|
|
45
|
-
"all-tags": allTags.value,
|
|
46
|
-
"is-loading": isLoading.value,
|
|
47
|
-
"tags-by-id": tagsById.value,
|
|
48
|
-
"create-tag": createTag,
|
|
49
|
-
onManageTags: handleManageTags,
|
|
50
|
-
onEsc: handleEsc,
|
|
51
|
-
onBlur: handleBlur
|
|
52
|
-
}, null, 8, ["modelValue", "placeholder", "create-enabled", "event-bus", "all-tags", "is-loading", "tags-by-id"]);
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
function useExecutionHelpers() {
|
|
57
|
-
const i18n = useI18n();
|
|
58
|
-
function getUIDetails(execution) {
|
|
59
|
-
var _a, _b;
|
|
60
|
-
const status = {
|
|
61
|
-
name: "unknown",
|
|
62
|
-
createdAt: ((_a = execution.createdAt) == null ? void 0 : _a.toString()) ?? "",
|
|
63
|
-
startTime: formatDate(execution.startedAt),
|
|
64
|
-
label: "Status unknown",
|
|
65
|
-
runningTime: "",
|
|
66
|
-
showTimestamp: true,
|
|
67
|
-
tags: ((_b = execution.annotation) == null ? void 0 : _b.tags) ?? []
|
|
68
|
-
};
|
|
69
|
-
if (execution.status === "new") {
|
|
70
|
-
status.name = "new";
|
|
71
|
-
status.label = i18n.baseText("executionsList.new");
|
|
72
|
-
status.showTimestamp = false;
|
|
73
|
-
} else if (execution.status === "waiting") {
|
|
74
|
-
status.name = "waiting";
|
|
75
|
-
status.label = i18n.baseText("executionsList.waiting");
|
|
76
|
-
status.showTimestamp = false;
|
|
77
|
-
} else if (execution.status === "canceled") {
|
|
78
|
-
status.label = i18n.baseText("executionsList.canceled");
|
|
79
|
-
} else if (execution.status === "running") {
|
|
80
|
-
status.name = "running";
|
|
81
|
-
status.label = i18n.baseText("executionsList.running");
|
|
82
|
-
} else if (execution.status === "success") {
|
|
83
|
-
status.name = "success";
|
|
84
|
-
status.label = i18n.baseText("executionsList.succeeded");
|
|
85
|
-
} else if (execution.status === "error" || execution.status === "crashed") {
|
|
86
|
-
status.name = "error";
|
|
87
|
-
status.label = i18n.baseText("executionsList.error");
|
|
88
|
-
}
|
|
89
|
-
if (!execution.status) execution.status = "unknown";
|
|
90
|
-
if (execution.startedAt && execution.stoppedAt) {
|
|
91
|
-
const stoppedAt = execution.stoppedAt ? new Date(execution.stoppedAt).getTime() : Date.now();
|
|
92
|
-
status.runningTime = i18n.displayTimer(
|
|
93
|
-
stoppedAt - new Date(execution.startedAt).getTime(),
|
|
94
|
-
true
|
|
95
|
-
);
|
|
96
|
-
}
|
|
97
|
-
return status;
|
|
98
|
-
}
|
|
99
|
-
function formatDate(fullDate) {
|
|
100
|
-
const { date, time } = convertToDisplayDate(fullDate);
|
|
101
|
-
return i18n.baseText("executionsList.started", { interpolate: { time, date } });
|
|
102
|
-
}
|
|
103
|
-
function isExecutionRetriable(execution) {
|
|
104
|
-
return ["crashed", "error"].includes(execution.status) && !execution.retrySuccessId;
|
|
105
|
-
}
|
|
106
|
-
return {
|
|
107
|
-
getUIDetails,
|
|
108
|
-
formatDate,
|
|
109
|
-
isExecutionRetriable
|
|
110
|
-
};
|
|
111
|
-
}
|
|
112
|
-
export {
|
|
113
|
-
_sfc_main as _,
|
|
114
|
-
useExecutionHelpers as u
|
|
115
|
-
};
|