n8n-editor-ui 1.34.1 → 1.34.2
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/.turbo/turbo-build.log +63 -63
- package/dist/assets/{AuthView-94aQ7z4H.js → AuthView-TLL7d7nz.js} +2 -2
- package/dist/assets/{AuthView-94aQ7z4H.js.map → AuthView-TLL7d7nz.js.map} +1 -1
- package/dist/assets/{CanvasControls-A5WBrohY.js → CanvasControls-QMz-txwk.js} +2 -2
- package/dist/assets/{CanvasControls-A5WBrohY.js.map → CanvasControls-QMz-txwk.js.map} +1 -1
- package/dist/assets/{ChangePasswordView-wsEhj8cy.js → ChangePasswordView-BpG2Rx4d.js} +2 -2
- package/dist/assets/{ChangePasswordView-wsEhj8cy.js.map → ChangePasswordView-BpG2Rx4d.js.map} +1 -1
- package/dist/assets/{CollectionParameter-XvPjL77I.js → CollectionParameter-jdGzYeqj.js} +2 -2
- package/dist/assets/CollectionParameter-jdGzYeqj.js.map +1 -0
- package/dist/assets/{CredentialsView-0XJMAGhU.js → CredentialsView-kiuFxEVH.js} +2 -2
- package/dist/assets/{CredentialsView-0XJMAGhU.js.map → CredentialsView-kiuFxEVH.js.map} +1 -1
- package/dist/assets/{ExecutionFilter-bhanFEvf.js → ExecutionFilter-V1l-9ps5.js} +2 -2
- package/dist/assets/{ExecutionFilter-bhanFEvf.js.map → ExecutionFilter-V1l-9ps5.js.map} +1 -1
- package/dist/assets/{ExecutionPreview-OlIAVmt8.js → ExecutionPreview-MPwJjWY4.js} +2 -2
- package/dist/assets/{ExecutionPreview-OlIAVmt8.js.map → ExecutionPreview-MPwJjWY4.js.map} +1 -1
- package/dist/assets/{ExecutionsInfoAccordion-8y0XuFEi.js → ExecutionsInfoAccordion-H3fj26pu.js} +2 -2
- package/dist/assets/{ExecutionsInfoAccordion-8y0XuFEi.js.map → ExecutionsInfoAccordion-H3fj26pu.js.map} +1 -1
- package/dist/assets/{ExecutionsLandingPage-S5UN8vIw.js → ExecutionsLandingPage-7qAKHfBe.js} +2 -2
- package/dist/assets/{ExecutionsLandingPage-S5UN8vIw.js.map → ExecutionsLandingPage-7qAKHfBe.js.map} +1 -1
- package/dist/assets/{ExecutionsList-BU7_tq5x.js → ExecutionsList-Y9rsGvqE.js} +2 -2
- package/dist/assets/{ExecutionsList-BU7_tq5x.js.map → ExecutionsList-Y9rsGvqE.js.map} +1 -1
- package/dist/assets/{ExecutionsView-aBSDNhOw.js → ExecutionsView-hi5NLYKp.js} +2 -2
- package/dist/assets/{ExecutionsView-aBSDNhOw.js.map → ExecutionsView-hi5NLYKp.js.map} +1 -1
- package/dist/assets/{ForgotMyPasswordView-y5xFculD.js → ForgotMyPasswordView-ho6gQT6y.js} +2 -2
- package/dist/assets/{ForgotMyPasswordView-y5xFculD.js.map → ForgotMyPasswordView-ho6gQT6y.js.map} +1 -1
- package/dist/assets/{MainHeader-dPdeQhkH.js → MainHeader-JVxjOJwJ.js} +2 -2
- package/dist/assets/{MainHeader-dPdeQhkH.js.map → MainHeader-JVxjOJwJ.js.map} +1 -1
- package/dist/assets/{MainSidebar-5wv4Ntz3.js → MainSidebar-h-btynOF.js} +2 -2
- package/dist/assets/{MainSidebar-5wv4Ntz3.js.map → MainSidebar-h-btynOF.js.map} +1 -1
- package/dist/assets/{NodeCreation-vCHQm0aM.js → NodeCreation--SFXDuf-.js} +3 -3
- package/dist/assets/{NodeCreation-vCHQm0aM.js.map → NodeCreation--SFXDuf-.js.map} +1 -1
- package/dist/assets/{NodeCreator-Qi3ajhnf.js → NodeCreator-ns8j677p.js} +2 -2
- package/dist/assets/{NodeCreator-Qi3ajhnf.js.map → NodeCreator-ns8j677p.js.map} +1 -1
- package/dist/assets/{NodeList-bi4nWtpD.js → NodeList-f2AyrOck.js} +2 -2
- package/dist/assets/{NodeList-bi4nWtpD.js.map → NodeList-f2AyrOck.js.map} +1 -1
- package/dist/assets/{NodeView-oDPyzajr.js → NodeView-7yZJ9OMj.js} +4 -4
- package/dist/assets/NodeView-7yZJ9OMj.js.map +1 -0
- package/dist/assets/NodeView-pdKhF5kg.css +1 -0
- package/dist/assets/{RunDataAi-DJiuZFJ2.js → RunDataAi-PNu5uqz6.js} +2 -2
- package/dist/assets/{RunDataAi-DJiuZFJ2.js.map → RunDataAi-PNu5uqz6.js.map} +1 -1
- package/dist/assets/{RunDataJson-9PUFQ2iv.js → RunDataJson-s5yVk7VC.js} +3 -3
- package/dist/assets/{RunDataJson-9PUFQ2iv.js.map → RunDataJson-s5yVk7VC.js.map} +1 -1
- package/dist/assets/{RunDataJsonActions-4HpuK2F9.js → RunDataJsonActions-VSs2XNyt.js} +2 -2
- package/dist/assets/{RunDataJsonActions-4HpuK2F9.js.map → RunDataJsonActions-VSs2XNyt.js.map} +1 -1
- package/dist/assets/{RunDataSchema-ezXA1IRJ.js → RunDataSchema-WeaaXm2i.js} +2 -2
- package/dist/assets/{RunDataSchema-ezXA1IRJ.js.map → RunDataSchema-WeaaXm2i.js.map} +1 -1
- package/dist/assets/{RunDataTable-fjkHn30C.js → RunDataTable-2YR4xl8i.js} +2 -2
- package/dist/assets/{RunDataTable-fjkHn30C.js.map → RunDataTable-2YR4xl8i.js.map} +1 -1
- package/dist/assets/{SamlOnboarding-yIx-rRda.js → SamlOnboarding-0ds_5hgl.js} +2 -2
- package/dist/assets/{SamlOnboarding-yIx-rRda.js.map → SamlOnboarding-0ds_5hgl.js.map} +1 -1
- package/dist/assets/{SettingsApiView-EZ0nAdDr.js → SettingsApiView-ZNTmBDeh.js} +2 -2
- package/dist/assets/{SettingsApiView-EZ0nAdDr.js.map → SettingsApiView-ZNTmBDeh.js.map} +1 -1
- package/dist/assets/{SettingsCommunityNodesView-GY7HDfXP.js → SettingsCommunityNodesView-YGybEb0Q.js} +2 -2
- package/dist/assets/{SettingsCommunityNodesView-GY7HDfXP.js.map → SettingsCommunityNodesView-YGybEb0Q.js.map} +1 -1
- package/dist/assets/{SettingsExternalSecrets-XjmxCmxV.js → SettingsExternalSecrets-V6XKdflH.js} +2 -2
- package/dist/assets/{SettingsExternalSecrets-XjmxCmxV.js.map → SettingsExternalSecrets-V6XKdflH.js.map} +1 -1
- package/dist/assets/{SettingsFakeDoorView-pVOCkUpk.js → SettingsFakeDoorView-RT3jHFTZ.js} +2 -2
- package/dist/assets/{SettingsFakeDoorView-pVOCkUpk.js.map → SettingsFakeDoorView-RT3jHFTZ.js.map} +1 -1
- package/dist/assets/{SettingsLdapView-447rSrxc.js → SettingsLdapView-lVhJpXDn.js} +2 -2
- package/dist/assets/{SettingsLdapView-447rSrxc.js.map → SettingsLdapView-lVhJpXDn.js.map} +1 -1
- package/dist/assets/{SettingsLogStreamingView-bUhYaLuP.js → SettingsLogStreamingView-hWjeVuyC.js} +2 -2
- package/dist/assets/{SettingsLogStreamingView-bUhYaLuP.js.map → SettingsLogStreamingView-hWjeVuyC.js.map} +1 -1
- package/dist/assets/{SettingsSourceControl-QbgpyFeh.js → SettingsSourceControl-XOku0dYa.js} +2 -2
- package/dist/assets/{SettingsSourceControl-QbgpyFeh.js.map → SettingsSourceControl-XOku0dYa.js.map} +1 -1
- package/dist/assets/{SettingsSso-1YVWObhc.js → SettingsSso-FfUWpkMk.js} +2 -2
- package/dist/assets/{SettingsSso-1YVWObhc.js.map → SettingsSso-FfUWpkMk.js.map} +1 -1
- package/dist/assets/{SettingsUsageAndPlan-RXRRDXy4.js → SettingsUsageAndPlan-bhK5h4Fc.js} +2 -2
- package/dist/assets/{SettingsUsageAndPlan-RXRRDXy4.js.map → SettingsUsageAndPlan-bhK5h4Fc.js.map} +1 -1
- package/dist/assets/{SettingsUsersView-eHaVB_6L.js → SettingsUsersView-wSBhrK4z.js} +2 -2
- package/dist/assets/{SettingsUsersView-eHaVB_6L.js.map → SettingsUsersView-wSBhrK4z.js.map} +1 -1
- package/dist/assets/{SettingsView-JVUkQw0d.js → SettingsView-k7YCmGxR.js} +2 -2
- package/dist/assets/{SettingsView-JVUkQw0d.js.map → SettingsView-k7YCmGxR.js.map} +1 -1
- package/dist/assets/{SetupView-fQzty7Gp.js → SetupView-q1H9bzQn.js} +2 -2
- package/dist/assets/{SetupView-fQzty7Gp.js.map → SetupView-q1H9bzQn.js.map} +1 -1
- package/dist/assets/{SetupWorkflowCredentialsButton-OiOkf-hI.js → SetupWorkflowCredentialsButton-MXDnpOlJ.js} +2 -2
- package/dist/assets/{SetupWorkflowCredentialsButton-OiOkf-hI.js.map → SetupWorkflowCredentialsButton-MXDnpOlJ.js.map} +1 -1
- package/dist/assets/{SetupWorkflowFromTemplateView-ckehDOej.js → SetupWorkflowFromTemplateView-0HgnF8Wk.js} +2 -2
- package/dist/assets/{SetupWorkflowFromTemplateView-ckehDOej.js.map → SetupWorkflowFromTemplateView-0HgnF8Wk.js.map} +1 -1
- package/dist/assets/{SigninView-6kvI5K04.js → SigninView-ZtC3HJKC.js} +2 -2
- package/dist/assets/{SigninView-6kvI5K04.js.map → SigninView-ZtC3HJKC.js.map} +1 -1
- package/dist/assets/{SignupView-USh4Ng3q.js → SignupView-9jLlb4-m.js} +2 -2
- package/dist/assets/{SignupView-USh4Ng3q.js.map → SignupView-9jLlb4-m.js.map} +1 -1
- package/dist/assets/{TemplateDetails-tXvyDDVg.js → TemplateDetails-w7x_Vgw_.js} +2 -2
- package/dist/assets/{TemplateDetails-tXvyDDVg.js.map → TemplateDetails-w7x_Vgw_.js.map} +1 -1
- package/dist/assets/{TemplateList-rsNRt0qZ.js → TemplateList-0nuqWVBy.js} +2 -2
- package/dist/assets/{TemplateList-rsNRt0qZ.js.map → TemplateList-0nuqWVBy.js.map} +1 -1
- package/dist/assets/{TemplatesCollectionView-lXJ9U359.js → TemplatesCollectionView-Z9UtKR-g.js} +2 -2
- package/dist/assets/{TemplatesCollectionView-lXJ9U359.js.map → TemplatesCollectionView-Z9UtKR-g.js.map} +1 -1
- package/dist/assets/{TemplatesInfoCarousel-P2HZ4dOz.js → TemplatesInfoCarousel-N3l1eTTG.js} +2 -2
- package/dist/assets/{TemplatesInfoCarousel-P2HZ4dOz.js.map → TemplatesInfoCarousel-N3l1eTTG.js.map} +1 -1
- package/dist/assets/{TemplatesSearchView-FN7reyfg.js → TemplatesSearchView-wkSt7PFf.js} +2 -2
- package/dist/assets/{TemplatesSearchView-FN7reyfg.js.map → TemplatesSearchView-wkSt7PFf.js.map} +1 -1
- package/dist/assets/{TemplatesWorkflowView-iRU7xCpM.js → TemplatesWorkflowView-epjsTDT4.js} +2 -2
- package/dist/assets/{TemplatesWorkflowView-iRU7xCpM.js.map → TemplatesWorkflowView-epjsTDT4.js.map} +1 -1
- package/dist/assets/{VariablesView-pWnSAbjy.js → VariablesView-mj7tvP3Z.js} +2 -2
- package/dist/assets/{VariablesView-pWnSAbjy.js.map → VariablesView-mj7tvP3Z.js.map} +1 -1
- package/dist/assets/{WorkerView-8rB6MB_M.js → WorkerView-urDpqCfL.js} +2 -2
- package/dist/assets/{WorkerView-8rB6MB_M.js.map → WorkerView-urDpqCfL.js.map} +1 -1
- package/dist/assets/{WorkflowActivator-hF9F5zIs.js → WorkflowActivator-2LVSrBU4.js} +2 -2
- package/dist/assets/{WorkflowActivator-hF9F5zIs.js.map → WorkflowActivator-2LVSrBU4.js.map} +1 -1
- package/dist/assets/{WorkflowHistory-gHQbqUXH.js → WorkflowHistory-4SEsxR0t.js} +2 -2
- package/dist/assets/{WorkflowHistory-gHQbqUXH.js.map → WorkflowHistory-4SEsxR0t.js.map} +1 -1
- package/dist/assets/{WorkflowOnboardingView-VpQ3P8b_.js → WorkflowOnboardingView-27zExcdN.js} +2 -2
- package/dist/assets/{WorkflowOnboardingView-VpQ3P8b_.js.map → WorkflowOnboardingView-27zExcdN.js.map} +1 -1
- package/dist/assets/{WorkflowsView-bfxfJsmW.js → WorkflowsView-rICV14FU.js} +2 -2
- package/dist/assets/{WorkflowsView-bfxfJsmW.js.map → WorkflowsView-rICV14FU.js.map} +1 -1
- package/dist/assets/{cloud-f74z4VKj.js → cloud-8u4ixH3T.js} +2 -2
- package/dist/assets/{cloud-f74z4VKj.js.map → cloud-8u4ixH3T.js.map} +1 -1
- package/dist/assets/{index-vdh5hVg3.js → index-4C1AxeXk.js} +4 -4
- package/dist/assets/{index-vdh5hVg3.js.map → index-4C1AxeXk.js.map} +1 -1
- package/dist/assets/index-PmN852am.css +1 -0
- package/dist/assets/{pushConnection-j2REJYmc.js → pushConnection-kCBulx2c.js} +2 -2
- package/dist/assets/{pushConnection-j2REJYmc.js.map → pushConnection-kCBulx2c.js.map} +1 -1
- package/dist/assets/{templateActions-iSfFOAhF.js → templateActions-tZeqnIph.js} +2 -2
- package/dist/assets/{templateActions-iSfFOAhF.js.map → templateActions-tZeqnIph.js.map} +1 -1
- package/dist/assets/{useExecutionDebugging-s7lAeIqB.js → useExecutionDebugging-eQjp4txV.js} +2 -2
- package/dist/assets/{useExecutionDebugging-s7lAeIqB.js.map → useExecutionDebugging-eQjp4txV.js.map} +1 -1
- package/dist/assets/{workflowActivate-SIKKLz8V.js → workflowActivate-6jCh92f_.js} +2 -2
- package/dist/assets/{workflowActivate-SIKKLz8V.js.map → workflowActivate-6jCh92f_.js.map} +1 -1
- package/dist/index.html +2 -2
- package/package.json +1 -1
- package/dist/assets/CollectionParameter-XvPjL77I.js.map +0 -1
- package/dist/assets/NodeView-FjGatqri.css +0 -1
- package/dist/assets/NodeView-oDPyzajr.js.map +0 -1
- package/dist/assets/index-suVg9RiN.css +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{v as q,f as p,h as T,I as d,r as se,e as _,P as G,q as oe,D as g,E as i,K as r,J as y,H as h,u as o,i as n,F as O,_ as Y,y as u,V as z,a6 as c}from"./vendor-VXT4wwt2.js";import{_ as R,l as le,u as ne,aB as ie,t as re,fU as de,b as t,cR as H,O as ue}from"./n8n-G5ZIZCy5.js";import{T as ce}from"./index-
|
|
2
|
-
//# sourceMappingURL=ExecutionFilter-
|
|
1
|
+
import{v as q,f as p,h as T,I as d,r as se,e as _,P as G,q as oe,D as g,E as i,K as r,J as y,H as h,u as o,i as n,F as O,_ as Y,y as u,V as z,a6 as c}from"./vendor-VXT4wwt2.js";import{_ as R,l as le,u as ne,aB as ie,t as re,fU as de,b as t,cR as H,O as ue}from"./n8n-G5ZIZCy5.js";import{T as ce}from"./index-4C1AxeXk.js";const pe=q({name:"ExecutionTime",props:["startTime"],data(){return{nowTime:-1,intervalTimer:null}},computed:{time(){if(!this.startTime)return"...";const b=this.nowTime-new Date(this.startTime).getTime();return this.$locale.displayTimer(b)}},mounted(){this.setNow(),this.intervalTimer=setInterval(()=>{this.setNow()},1e3)},beforeUnmount(){this.intervalTimer!==null&&clearInterval(this.intervalTimer)},methods:{setNow(){this.nowTime=new Date().getTime()}}});function me(b,E,$,C,I,U){return p(),T("span",null,d(b.time),1)}const Se=R(pe,[["render",me]]),fe={"data-test-id":"execution-filter-form"},be={for:"execution-filter-workflows"},ve={for:"execution-filter-tags"},xe={for:"execution-filter-status"},_e={for:"execution-filter-start-date"},ge={target:"_blank",href:"https://docs.n8n.io/workflows/executions/custom-executions-data/"},Te={for:"execution-filter-saved-data-key"},we={for:"execution-filter-saved-data-value"},j="YYYY-MM-DD HH:mm",ke=q({__name:"ExecutionFilter",props:{workflows:{},popoverPlacement:{default:"bottom"},teleported:{type:Boolean,default:!0}},emits:["filterChanged"],setup(b,{emit:E}){const $=le(),C=ne(),{debounce:I}=ie(),U=ue(),W=b,v=E,J=I(v,{debounceTime:500}),D=se(!1),w=_(()=>$.isEnterpriseFeatureEnabled(re.AdvancedExecutionFilters)),Q=_(()=>!1),B=()=>({status:"all",workflowId:"all",tags:[],startDate:"",endDate:"",metadata:[{key:"",value:""}]}),a=G(B()),m=G(de(a).reduce((e,l)=>(e[l]=_({get(){return a[l]},set(x){a[l]=x,v("filterChanged",a)}}),e),{})),X=_(()=>[{id:"all",name:t.baseText("executionsList.anyStatus")},{id:"error",name:t.baseText("executionsList.error")},{id:"canceled",name:t.baseText("executionsList.canceled")},{id:"running",name:t.baseText("executionsList.running")},{id:"success",name:t.baseText("executionsList.success")},{id:"waiting",name:t.baseText("executionsList.waiting")}]),k=_(()=>{let e=0;return a.status!=="all"&&e++,a.workflowId!=="all"&&e++,H(a.tags)||e++,H(a.metadata)||e++,a.startDate&&e++,a.endDate&&e++,e}),M=(e,l,x)=>{a.metadata[e]||(a.metadata[e]={key:"",value:""}),a.metadata[e][l]=x,D.value||(U.track("User filtered executions with custom data"),D.value=!0),J("filterChanged",a)},Z=e=>{a.tags=e,v("filterChanged",a)},ee=()=>{Object.assign(a,B()),v("filterChanged",a)},S=()=>{C.goToUpgrade("custom-data-filter","upgrade-custom-data-filter")};return oe(()=>{D.value=!1,v("filterChanged",a)}),(e,l)=>{const x=c("n8n-badge"),L=c("n8n-button"),N=c("n8n-option"),P=c("n8n-select"),K=c("el-date-picker"),F=c("i18n-t"),te=c("n8n-icon"),V=c("n8n-tooltip"),A=c("n8n-input"),ae=c("n8n-popover");return p(),g(ae,{trigger:"click",placement:e.popoverPlacement,width:"440"},{reference:i(()=>[r(L,{icon:"filter",type:"tertiary",active:!!k.value,"data-test-id":"executions-filter-button"},{default:i(()=>[k.value?(p(),g(x,{key:0,theme:"primary",class:"mr-4xs","data-test-id":"execution-filter-badge"},{default:i(()=>[y(d(k.value),1)]),_:1})):h("",!0),y(" "+d(o(t).baseText("executionsList.filters")),1)]),_:1},8,["active"])]),default:i(()=>[n("div",fe,[e.workflows&&e.workflows.length>0?(p(),T("div",{key:0,class:u(e.$style.group)},[n("label",be,d(o(t).baseText("workflows.heading")),1),r(P,{id:"execution-filter-workflows",modelValue:m.workflowId,"onUpdate:modelValue":l[0]||(l[0]=s=>m.workflowId=s),placeholder:o(t).baseText("executionsFilter.selectWorkflow"),filterable:"","data-test-id":"executions-filter-workflows-select",teleported:e.teleported},{default:i(()=>[n("div",null,[(p(!0),T(O,null,Y(W.workflows,(s,f)=>(p(),g(N,{key:f,label:s.name,value:s.id},null,8,["label","value"]))),128))])]),_:1},8,["modelValue","placeholder","teleported"])],2)):h("",!0),Q.value?(p(),T("div",{key:1,class:u(e.$style.group)},[n("label",ve,d(o(t).baseText("workflows.filters.tags")),1),r(ce,{id:"execution-filter-tags",placeholder:o(t).baseText("workflowOpen.filterWorkflows"),"model-value":a.tags,"create-enabled":!1,"data-test-id":"executions-filter-tags-select","onUpdate:modelValue":Z},null,8,["placeholder","model-value"])],2)):h("",!0),n("div",{class:u(e.$style.group)},[n("label",xe,d(o(t).baseText("executionsList.status")),1),r(P,{id:"execution-filter-status",modelValue:m.status,"onUpdate:modelValue":l[1]||(l[1]=s=>m.status=s),placeholder:o(t).baseText("executionsFilter.selectStatus"),filterable:"","data-test-id":"executions-filter-status-select",teleported:e.teleported},{default:i(()=>[(p(!0),T(O,null,Y(X.value,(s,f)=>(p(),g(N,{key:f,label:s.name,value:s.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder","teleported"])],2),n("div",{class:u(e.$style.group)},[n("label",_e,d(o(t).baseText("executionsFilter.start")),1),n("div",{class:u(e.$style.dates)},[r(K,{id:"execution-filter-start-date",modelValue:m.startDate,"onUpdate:modelValue":l[2]||(l[2]=s=>m.startDate=s),type:"datetime",teleported:!1,format:j,placeholder:o(t).baseText("executionsFilter.startDate"),"data-test-id":"executions-filter-start-date-picker"},null,8,["modelValue","placeholder"]),n("span",{class:u(e.$style.divider)},"to",2),r(K,{id:"execution-filter-end-date",modelValue:m.endDate,"onUpdate:modelValue":l[3]||(l[3]=s=>m.endDate=s),type:"datetime",teleported:!1,format:j,placeholder:o(t).baseText("executionsFilter.endDate"),"data-test-id":"executions-filter-end-date-picker"},null,8,["modelValue","placeholder"])],2)],2),n("div",{class:u(e.$style.group)},[r(V,{placement:"right"},{content:i(()=>[r(F,{tag:"span",keypath:"executionsFilter.customData.docsTooltip"},{link:i(()=>[n("a",ge,d(o(t).baseText("executionsFilter.customData.docsTooltip.link")),1)]),_:1})]),default:i(()=>[n("span",{class:u(e.$style.label)},[y(d(o(t).baseText("executionsFilter.savedData"))+" ",1),r(te,{class:u(e.$style.tooltipIcon),icon:"question-circle",size:"small"},null,8,["class"])],2)]),_:1}),n("div",{class:u(e.$style.subGroup)},[n("label",Te,d(o(t).baseText("executionsFilter.savedDataKey")),1),r(V,{disabled:w.value,placement:"top"},{content:i(()=>[r(F,{tag:"span",keypath:"executionsFilter.customData.inputTooltip"},{link:i(()=>[n("a",{href:"#","data-test-id":"executions-filter-view-plans-link",onClick:z(S,["prevent"])},d(o(t).baseText("executionsFilter.customData.inputTooltip.link")),1)]),_:1})]),default:i(()=>{var s;return[r(A,{id:"execution-filter-saved-data-key",name:"execution-filter-saved-data-key",type:"text",disabled:!w.value,placeholder:o(t).baseText("executionsFilter.savedDataKeyPlaceholder"),"model-value":(s=a.metadata[0])==null?void 0:s.key,"data-test-id":"execution-filter-saved-data-key-input","onUpdate:modelValue":l[4]||(l[4]=f=>M(0,"key",f))},null,8,["disabled","placeholder","model-value"])]}),_:1},8,["disabled"]),n("label",we,d(o(t).baseText("executionsFilter.savedDataValue")),1),r(V,{disabled:w.value,placement:"top"},{content:i(()=>[r(F,{tag:"span",keypath:"executionsFilter.customData.inputTooltip"},{link:i(()=>[n("a",{href:"#",onClick:z(S,["prevent"])},d(o(t).baseText("executionsFilter.customData.inputTooltip.link")),1)]),_:1})]),default:i(()=>{var s;return[r(A,{id:"execution-filter-saved-data-value",name:"execution-filter-saved-data-value",type:"text",disabled:!w.value,placeholder:o(t).baseText("executionsFilter.savedDataValuePlaceholder"),"model-value":(s=a.metadata[0])==null?void 0:s.value,"data-test-id":"execution-filter-saved-data-value-input","onUpdate:modelValue":l[5]||(l[5]=f=>M(0,"value",f))},null,8,["disabled","placeholder","model-value"])]}),_:1},8,["disabled"])],2)],2),k.value?(p(),g(L,{key:2,class:u(e.$style.resetBtn),size:"large",text:"","data-test-id":"executions-filter-reset-button",onClick:ee},{default:i(()=>[y(d(o(t).baseText("executionsFilter.reset")),1)]),_:1},8,["class"])):h("",!0)])]),_:1},8,["placement"])}}}),ye="_group_1lywb_1",he="_label_1lywb_2",De="_subGroup_1lywb_8",Fe="_dates_1lywb_17",Ve="_divider_1lywb_25",Ee="_resetBtn_1lywb_30",$e="_tooltipIcon_1lywb_35",Ce={group:ye,label:he,subGroup:De,dates:Fe,divider:Ve,resetBtn:Ee,tooltipIcon:$e},Ie={$style:Ce},Le=R(ke,[["__cssModules",Ie],["__scopeId","data-v-88754156"]]);export{Se as E,Le as a};
|
|
2
|
+
//# sourceMappingURL=ExecutionFilter-V1l-9ps5.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExecutionFilter-bhanFEvf.js","sources":["../../src/components/ExecutionTime.vue","../../src/components/ExecutionFilter.vue"],"sourcesContent":["<template>\n\t<span>\n\t\t{{ time }}\n\t</span>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent } from 'vue';\n\nexport default defineComponent({\n\tname: 'ExecutionTime',\n\tprops: ['startTime'],\n\tdata() {\n\t\treturn {\n\t\t\tnowTime: -1,\n\t\t\tintervalTimer: null as null | NodeJS.Timeout,\n\t\t};\n\t},\n\tcomputed: {\n\t\ttime(): string {\n\t\t\tif (!this.startTime) {\n\t\t\t\treturn '...';\n\t\t\t}\n\t\t\tconst msPassed = this.nowTime - new Date(this.startTime).getTime();\n\t\t\treturn this.$locale.displayTimer(msPassed);\n\t\t},\n\t},\n\tmounted() {\n\t\tthis.setNow();\n\t\tthis.intervalTimer = setInterval(() => {\n\t\t\tthis.setNow();\n\t\t}, 1000);\n\t},\n\tbeforeUnmount() {\n\t\t// Make sure that the timer gets destroyed once no longer needed\n\t\tif (this.intervalTimer !== null) {\n\t\t\tclearInterval(this.intervalTimer);\n\t\t}\n\t},\n\tmethods: {\n\t\tsetNow() {\n\t\t\tthis.nowTime = new Date().getTime();\n\t\t},\n\t},\n});\n</script>\n","<script lang=\"ts\" setup>\nimport { computed, reactive, onBeforeMount, ref } from 'vue';\nimport type {\n\tExecutionFilterType,\n\tExecutionFilterMetadata,\n\tIWorkflowShortResponse,\n} from '@/Interface';\nimport { i18n as locale } from '@/plugins/i18n';\nimport TagsDropdown from '@/components/TagsDropdown.vue';\nimport { getObjectKeys, isEmpty } from '@/utils/typesUtils';\nimport { EnterpriseEditionFeature } from '@/constants';\nimport { useSettingsStore } from '@/stores/settings.store';\nimport { useUIStore } from '@/stores/ui.store';\nimport { useTelemetry } from '@/composables/useTelemetry';\nimport type { Placement } from '@floating-ui/core';\nimport { useDebounce } from '@/composables/useDebounce';\n\nexport type ExecutionFilterProps = {\n\tworkflows?: IWorkflowShortResponse[];\n\tpopoverPlacement?: Placement;\n\tteleported?: boolean;\n};\n\nconst DATE_TIME_MASK = 'YYYY-MM-DD HH:mm';\n\nconst settingsStore = useSettingsStore();\nconst uiStore = useUIStore();\nconst { debounce } = useDebounce();\n\nconst telemetry = useTelemetry();\n\nconst props = withDefaults(defineProps<ExecutionFilterProps>(), {\n\tpopoverPlacement: 'bottom' as Placement,\n\tteleported: true,\n});\nconst emit = defineEmits<{\n\t(event: 'filterChanged', value: ExecutionFilterType): void;\n}>();\nconst debouncedEmit = debounce(emit, {\n\tdebounceTime: 500,\n});\n\nconst isCustomDataFilterTracked = ref(false);\nconst isAdvancedExecutionFilterEnabled = computed(() =>\n\tsettingsStore.isEnterpriseFeatureEnabled(EnterpriseEditionFeature.AdvancedExecutionFilters),\n);\nconst showTags = computed(() => false);\n\nconst getDefaultFilter = (): ExecutionFilterType => ({\n\tstatus: 'all',\n\tworkflowId: 'all',\n\ttags: [],\n\tstartDate: '',\n\tendDate: '',\n\tmetadata: [{ key: '', value: '' }],\n});\nconst filter = reactive(getDefaultFilter());\n\n// Automatically set up v-models based on filter properties\nconst vModel = reactive(\n\tgetObjectKeys(filter).reduce(\n\t\t(acc, key) => {\n\t\t\tacc[key] = computed({\n\t\t\t\tget() {\n\t\t\t\t\treturn filter[key];\n\t\t\t\t},\n\t\t\t\tset(value) {\n\t\t\t\t\t// TODO: find out what exactly is typechecker complaining about\n\n\t\t\t\t\t// @ts-ignore\n\t\t\t\t\tfilter[key] = value;\n\t\t\t\t\temit('filterChanged', filter);\n\t\t\t\t},\n\t\t\t});\n\t\t\treturn acc;\n\t\t},\n\t\t{} as Record<keyof ExecutionFilterType, ReturnType<typeof computed>>,\n\t),\n);\n\nconst statuses = computed(() => [\n\t{ id: 'all', name: locale.baseText('executionsList.anyStatus') },\n\t{ id: 'error', name: locale.baseText('executionsList.error') },\n\t{ id: 'canceled', name: locale.baseText('executionsList.canceled') },\n\t{ id: 'running', name: locale.baseText('executionsList.running') },\n\t{ id: 'success', name: locale.baseText('executionsList.success') },\n\t{ id: 'waiting', name: locale.baseText('executionsList.waiting') },\n]);\n\nconst countSelectedFilterProps = computed(() => {\n\tlet count = 0;\n\tif (filter.status !== 'all') {\n\t\tcount++;\n\t}\n\tif (filter.workflowId !== 'all') {\n\t\tcount++;\n\t}\n\tif (!isEmpty(filter.tags)) {\n\t\tcount++;\n\t}\n\tif (!isEmpty(filter.metadata)) {\n\t\tcount++;\n\t}\n\tif (!!filter.startDate) {\n\t\tcount++;\n\t}\n\tif (!!filter.endDate) {\n\t\tcount++;\n\t}\n\treturn count;\n});\n\n// vModel.metadata is a text input and needs a debounced emit to avoid too many requests\n// We use the :value and @input combo instead of v-model with this event listener\nconst onFilterMetaChange = (index: number, prop: keyof ExecutionFilterMetadata, value: string) => {\n\tif (!filter.metadata[index]) {\n\t\tfilter.metadata[index] = {\n\t\t\tkey: '',\n\t\t\tvalue: '',\n\t\t};\n\t}\n\tfilter.metadata[index][prop] = value;\n\n\tif (!isCustomDataFilterTracked.value) {\n\t\ttelemetry.track('User filtered executions with custom data');\n\t\tisCustomDataFilterTracked.value = true;\n\t}\n\n\tdebouncedEmit('filterChanged', filter);\n};\n\n// Can't use v-model on TagsDropdown component and thus vModel.tags is useless\n// We just emit the updated filter\nconst onTagsChange = (tags: string[]) => {\n\tfilter.tags = tags;\n\temit('filterChanged', filter);\n};\n\nconst onFilterReset = () => {\n\tObject.assign(filter, getDefaultFilter());\n\temit('filterChanged', filter);\n};\n\nconst goToUpgrade = () => {\n\tvoid uiStore.goToUpgrade('custom-data-filter', 'upgrade-custom-data-filter');\n};\n\nonBeforeMount(() => {\n\tisCustomDataFilterTracked.value = false;\n\temit('filterChanged', filter);\n});\n</script>\n<template>\n\t<n8n-popover trigger=\"click\" :placement=\"popoverPlacement\" width=\"440\">\n\t\t<template #reference>\n\t\t\t<n8n-button\n\t\t\t\ticon=\"filter\"\n\t\t\t\ttype=\"tertiary\"\n\t\t\t\t:active=\"!!countSelectedFilterProps\"\n\t\t\t\tdata-test-id=\"executions-filter-button\"\n\t\t\t>\n\t\t\t\t<n8n-badge\n\t\t\t\t\tv-if=\"!!countSelectedFilterProps\"\n\t\t\t\t\ttheme=\"primary\"\n\t\t\t\t\tclass=\"mr-4xs\"\n\t\t\t\t\tdata-test-id=\"execution-filter-badge\"\n\t\t\t\t\t>{{ countSelectedFilterProps }}</n8n-badge\n\t\t\t\t>\n\t\t\t\t{{ locale.baseText('executionsList.filters') }}\n\t\t\t</n8n-button>\n\t\t</template>\n\t\t<div data-test-id=\"execution-filter-form\">\n\t\t\t<div v-if=\"workflows && workflows.length > 0\" :class=\"$style.group\">\n\t\t\t\t<label for=\"execution-filter-workflows\">{{ locale.baseText('workflows.heading') }}</label>\n\t\t\t\t<n8n-select\n\t\t\t\t\tid=\"execution-filter-workflows\"\n\t\t\t\t\tv-model=\"vModel.workflowId\"\n\t\t\t\t\t:placeholder=\"locale.baseText('executionsFilter.selectWorkflow')\"\n\t\t\t\t\tfilterable\n\t\t\t\t\tdata-test-id=\"executions-filter-workflows-select\"\n\t\t\t\t\t:teleported=\"teleported\"\n\t\t\t\t>\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<n8n-option\n\t\t\t\t\t\t\tv-for=\"(item, idx) in props.workflows\"\n\t\t\t\t\t\t\t:key=\"idx\"\n\t\t\t\t\t\t\t:label=\"item.name\"\n\t\t\t\t\t\t\t:value=\"item.id\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</n8n-select>\n\t\t\t</div>\n\t\t\t<div v-if=\"showTags\" :class=\"$style.group\">\n\t\t\t\t<label for=\"execution-filter-tags\">{{ locale.baseText('workflows.filters.tags') }}</label>\n\t\t\t\t<TagsDropdown\n\t\t\t\t\tid=\"execution-filter-tags\"\n\t\t\t\t\t:placeholder=\"locale.baseText('workflowOpen.filterWorkflows')\"\n\t\t\t\t\t:model-value=\"filter.tags\"\n\t\t\t\t\t:create-enabled=\"false\"\n\t\t\t\t\tdata-test-id=\"executions-filter-tags-select\"\n\t\t\t\t\t@update:modelValue=\"onTagsChange\"\n\t\t\t\t/>\n\t\t\t</div>\n\t\t\t<div :class=\"$style.group\">\n\t\t\t\t<label for=\"execution-filter-status\">{{ locale.baseText('executionsList.status') }}</label>\n\t\t\t\t<n8n-select\n\t\t\t\t\tid=\"execution-filter-status\"\n\t\t\t\t\tv-model=\"vModel.status\"\n\t\t\t\t\t:placeholder=\"locale.baseText('executionsFilter.selectStatus')\"\n\t\t\t\t\tfilterable\n\t\t\t\t\tdata-test-id=\"executions-filter-status-select\"\n\t\t\t\t\t:teleported=\"teleported\"\n\t\t\t\t>\n\t\t\t\t\t<n8n-option\n\t\t\t\t\t\tv-for=\"(item, idx) in statuses\"\n\t\t\t\t\t\t:key=\"idx\"\n\t\t\t\t\t\t:label=\"item.name\"\n\t\t\t\t\t\t:value=\"item.id\"\n\t\t\t\t\t/>\n\t\t\t\t</n8n-select>\n\t\t\t</div>\n\t\t\t<div :class=\"$style.group\">\n\t\t\t\t<label for=\"execution-filter-start-date\">{{\n\t\t\t\t\tlocale.baseText('executionsFilter.start')\n\t\t\t\t}}</label>\n\t\t\t\t<div :class=\"$style.dates\">\n\t\t\t\t\t<el-date-picker\n\t\t\t\t\t\tid=\"execution-filter-start-date\"\n\t\t\t\t\t\tv-model=\"vModel.startDate\"\n\t\t\t\t\t\ttype=\"datetime\"\n\t\t\t\t\t\t:teleported=\"false\"\n\t\t\t\t\t\t:format=\"DATE_TIME_MASK\"\n\t\t\t\t\t\t:placeholder=\"locale.baseText('executionsFilter.startDate')\"\n\t\t\t\t\t\tdata-test-id=\"executions-filter-start-date-picker\"\n\t\t\t\t\t/>\n\t\t\t\t\t<span :class=\"$style.divider\">to</span>\n\t\t\t\t\t<el-date-picker\n\t\t\t\t\t\tid=\"execution-filter-end-date\"\n\t\t\t\t\t\tv-model=\"vModel.endDate\"\n\t\t\t\t\t\ttype=\"datetime\"\n\t\t\t\t\t\t:teleported=\"false\"\n\t\t\t\t\t\t:format=\"DATE_TIME_MASK\"\n\t\t\t\t\t\t:placeholder=\"locale.baseText('executionsFilter.endDate')\"\n\t\t\t\t\t\tdata-test-id=\"executions-filter-end-date-picker\"\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div :class=\"$style.group\">\n\t\t\t\t<n8n-tooltip placement=\"right\">\n\t\t\t\t\t<template #content>\n\t\t\t\t\t\t<i18n-t tag=\"span\" keypath=\"executionsFilter.customData.docsTooltip\">\n\t\t\t\t\t\t\t<template #link>\n\t\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\thref=\"https://docs.n8n.io/workflows/executions/custom-executions-data/\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{{ locale.baseText('executionsFilter.customData.docsTooltip.link') }}\n\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t</i18n-t>\n\t\t\t\t\t</template>\n\t\t\t\t\t<span :class=\"$style.label\">\n\t\t\t\t\t\t{{ locale.baseText('executionsFilter.savedData') }}\n\t\t\t\t\t\t<n8n-icon :class=\"$style.tooltipIcon\" icon=\"question-circle\" size=\"small\" />\n\t\t\t\t\t</span>\n\t\t\t\t</n8n-tooltip>\n\t\t\t\t<div :class=\"$style.subGroup\">\n\t\t\t\t\t<label for=\"execution-filter-saved-data-key\">{{\n\t\t\t\t\t\tlocale.baseText('executionsFilter.savedDataKey')\n\t\t\t\t\t}}</label>\n\t\t\t\t\t<n8n-tooltip :disabled=\"isAdvancedExecutionFilterEnabled\" placement=\"top\">\n\t\t\t\t\t\t<template #content>\n\t\t\t\t\t\t\t<i18n-t tag=\"span\" keypath=\"executionsFilter.customData.inputTooltip\">\n\t\t\t\t\t\t\t\t<template #link>\n\t\t\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\t\t\thref=\"#\"\n\t\t\t\t\t\t\t\t\t\tdata-test-id=\"executions-filter-view-plans-link\"\n\t\t\t\t\t\t\t\t\t\t@click.prevent=\"goToUpgrade\"\n\t\t\t\t\t\t\t\t\t\t>{{ locale.baseText('executionsFilter.customData.inputTooltip.link') }}</a\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t</i18n-t>\n\t\t\t\t\t\t</template>\n\t\t\t\t\t\t<n8n-input\n\t\t\t\t\t\t\tid=\"execution-filter-saved-data-key\"\n\t\t\t\t\t\t\tname=\"execution-filter-saved-data-key\"\n\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\t:disabled=\"!isAdvancedExecutionFilterEnabled\"\n\t\t\t\t\t\t\t:placeholder=\"locale.baseText('executionsFilter.savedDataKeyPlaceholder')\"\n\t\t\t\t\t\t\t:model-value=\"filter.metadata[0]?.key\"\n\t\t\t\t\t\t\tdata-test-id=\"execution-filter-saved-data-key-input\"\n\t\t\t\t\t\t\t@update:modelValue=\"onFilterMetaChange(0, 'key', $event)\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</n8n-tooltip>\n\t\t\t\t\t<label for=\"execution-filter-saved-data-value\">{{\n\t\t\t\t\t\tlocale.baseText('executionsFilter.savedDataValue')\n\t\t\t\t\t}}</label>\n\t\t\t\t\t<n8n-tooltip :disabled=\"isAdvancedExecutionFilterEnabled\" placement=\"top\">\n\t\t\t\t\t\t<template #content>\n\t\t\t\t\t\t\t<i18n-t tag=\"span\" keypath=\"executionsFilter.customData.inputTooltip\">\n\t\t\t\t\t\t\t\t<template #link>\n\t\t\t\t\t\t\t\t\t<a href=\"#\" @click.prevent=\"goToUpgrade\">{{\n\t\t\t\t\t\t\t\t\t\tlocale.baseText('executionsFilter.customData.inputTooltip.link')\n\t\t\t\t\t\t\t\t\t}}</a>\n\t\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t</i18n-t>\n\t\t\t\t\t\t</template>\n\t\t\t\t\t\t<n8n-input\n\t\t\t\t\t\t\tid=\"execution-filter-saved-data-value\"\n\t\t\t\t\t\t\tname=\"execution-filter-saved-data-value\"\n\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\t:disabled=\"!isAdvancedExecutionFilterEnabled\"\n\t\t\t\t\t\t\t:placeholder=\"locale.baseText('executionsFilter.savedDataValuePlaceholder')\"\n\t\t\t\t\t\t\t:model-value=\"filter.metadata[0]?.value\"\n\t\t\t\t\t\t\tdata-test-id=\"execution-filter-saved-data-value-input\"\n\t\t\t\t\t\t\t@update:modelValue=\"onFilterMetaChange(0, 'value', $event)\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</n8n-tooltip>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<n8n-button\n\t\t\t\tv-if=\"!!countSelectedFilterProps\"\n\t\t\t\t:class=\"$style.resetBtn\"\n\t\t\t\tsize=\"large\"\n\t\t\t\ttext\n\t\t\t\tdata-test-id=\"executions-filter-reset-button\"\n\t\t\t\t@click=\"onFilterReset\"\n\t\t\t>\n\t\t\t\t{{ locale.baseText('executionsFilter.reset') }}\n\t\t\t</n8n-button>\n\t\t</div>\n\t</n8n-popover>\n</template>\n<style lang=\"scss\" module>\n.group {\n\tlabel,\n\t.label {\n\t\tdisplay: inline-block;\n\t\tfont-size: var(--font-size-2xs);\n\t\tmargin: var(--spacing-s) 0 var(--spacing-3xs);\n\t}\n}\n\n.subGroup {\n\tpadding: 0 0 var(--spacing-xs) var(--spacing-s);\n\n\tlabel,\n\t.label {\n\t\tfont-size: var(--font-size-3xs);\n\t\tmargin: var(--spacing-4xs) 0 var(--spacing-4xs);\n\t}\n}\n\n.dates {\n\tdisplay: flex;\n\tborder: 1px solid var(--color-foreground-base);\n\tborder-radius: var(--border-radius-base);\n\twhite-space: nowrap;\n\talign-items: center;\n}\n\n.divider {\n\tpadding: 0 var(--spacing-m);\n\tline-height: 100%;\n}\n\n.resetBtn {\n\tpadding: 0;\n\tmargin: var(--spacing-xs) 0 0;\n}\n\n.tooltipIcon {\n\tcolor: var(--color-text-light);\n}\n</style>\n\n<style lang=\"scss\" scoped>\n:deep(.el-date-editor) {\n\tinput {\n\t\theight: 36px;\n\t\tborder: 0;\n\t\tpadding-right: 0;\n\t}\n\n\t.el-input__prefix {\n\t\tcolor: var(--color-foreground-dark);\n\t}\n\n\t&:last-of-type {\n\t\tinput {\n\t\t\tpadding-left: 0;\n\t\t}\n\n\t\t.el-input__prefix {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n}\n\n:deep(.el-select-dropdown.el-popper[data-popper-placement^='bottom']) {\n\t> .popper__arrow {\n\t\ttop: -6px;\n\t\tleft: 50%;\n\t\tright: unset;\n\t\tmargin-bottom: 0;\n\t\tmargin-right: 3px;\n\t\tborder-left-width: 6px;\n\t\tborder-top-width: 0;\n\t\tborder-bottom-color: var(--border-color-light);\n\t\tborder-right-color: transparent;\n\n\t\t&::after {\n\t\t\ttop: 1px;\n\t\t\tleft: unset;\n\t\t\tbottom: unset;\n\t\t\tmargin-left: -6px;\n\t\t\tborder-left-width: 6px;\n\t\t\tborder-top-width: 0;\n\t\t\tborder-bottom-color: var(--color-foreground-xlight);\n\t\t\tborder-right-color: transparent;\n\t\t}\n\t}\n}\n</style>\n"],"names":["_sfc_main$1","defineComponent","msPassed","DATE_TIME_MASK","settingsStore","useSettingsStore","uiStore","useUIStore","debounce","useDebounce","telemetry","useTelemetry","props","__props","emit","__emit","debouncedEmit","isCustomDataFilterTracked","ref","isAdvancedExecutionFilterEnabled","computed","EnterpriseEditionFeature","showTags","getDefaultFilter","filter","reactive","vModel","getObjectKeys","acc","key","value","statuses","locale","countSelectedFilterProps","count","isEmpty","onFilterMetaChange","index","prop","onTagsChange","tags","onFilterReset","goToUpgrade","onBeforeMount"],"mappings":"iUASA,MAAAA,GAAeC,EAAgB,CAC9B,KAAM,gBACN,MAAO,CAAC,WAAW,EACnB,MAAO,CACC,MAAA,CACN,QAAS,GACT,cAAe,IAAA,CAEjB,EACA,SAAU,CACT,MAAe,CACV,GAAA,CAAC,KAAK,UACF,MAAA,MAEF,MAAAC,EAAW,KAAK,QAAU,IAAI,KAAK,KAAK,SAAS,EAAE,UAClD,OAAA,KAAK,QAAQ,aAAaA,CAAQ,CAC1C,CACD,EACA,SAAU,CACT,KAAK,OAAO,EACP,KAAA,cAAgB,YAAY,IAAM,CACtC,KAAK,OAAO,GACV,GAAI,CACR,EACA,eAAgB,CAEX,KAAK,gBAAkB,MAC1B,cAAc,KAAK,aAAa,CAElC,EACA,QAAS,CACR,QAAS,CACR,KAAK,QAAU,IAAI,KAAK,EAAE,QAAQ,CACnC,CACD,CACD,CAAC,kdCrBKC,EAAiB,0LAEvB,MAAMC,EAAgBC,KAChBC,EAAUC,KACV,CAAE,SAAAC,GAAaC,KAEfC,EAAYC,KAEZC,EAAQC,EAIRC,EAAOC,EAGPC,EAAgBR,EAASM,EAAM,CACpC,aAAc,GAAA,CACd,EAEKG,EAA4BC,GAAI,EAAK,EACrCC,EAAmCC,EAAS,IACjDhB,EAAc,2BAA2BiB,GAAyB,wBAAwB,CAAA,EAErFC,EAAWF,EAAS,IAAM,EAAK,EAE/BG,EAAmB,KAA4B,CACpD,OAAQ,MACR,WAAY,MACZ,KAAM,CAAC,EACP,UAAW,GACX,QAAS,GACT,SAAU,CAAC,CAAE,IAAK,GAAI,MAAO,GAAI,CAAA,GAE5BC,EAASC,EAASF,EAAA,CAAkB,EAGpCG,EAASD,EACdE,GAAcH,CAAM,EAAE,OACrB,CAAC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B,EAAQD,EAAkB,CAAA,EACxCT,EAAK,gBAAiBU,CAAM,CAAA,EAGvBkB,EAAc,IAAM,CACpBpC,EAAQ,YAAY,qBAAsB,4BAA4B,CAAA,EAG5E,OAAAqC,GAAc,IAAM,CACnB1B,EAA0B,MAAQ,GAClCH,EAAK,gBAAiBU,CAAM,CAAA,CAC5B"}
|
|
1
|
+
{"version":3,"file":"ExecutionFilter-V1l-9ps5.js","sources":["../../src/components/ExecutionTime.vue","../../src/components/ExecutionFilter.vue"],"sourcesContent":["<template>\n\t<span>\n\t\t{{ time }}\n\t</span>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent } from 'vue';\n\nexport default defineComponent({\n\tname: 'ExecutionTime',\n\tprops: ['startTime'],\n\tdata() {\n\t\treturn {\n\t\t\tnowTime: -1,\n\t\t\tintervalTimer: null as null | NodeJS.Timeout,\n\t\t};\n\t},\n\tcomputed: {\n\t\ttime(): string {\n\t\t\tif (!this.startTime) {\n\t\t\t\treturn '...';\n\t\t\t}\n\t\t\tconst msPassed = this.nowTime - new Date(this.startTime).getTime();\n\t\t\treturn this.$locale.displayTimer(msPassed);\n\t\t},\n\t},\n\tmounted() {\n\t\tthis.setNow();\n\t\tthis.intervalTimer = setInterval(() => {\n\t\t\tthis.setNow();\n\t\t}, 1000);\n\t},\n\tbeforeUnmount() {\n\t\t// Make sure that the timer gets destroyed once no longer needed\n\t\tif (this.intervalTimer !== null) {\n\t\t\tclearInterval(this.intervalTimer);\n\t\t}\n\t},\n\tmethods: {\n\t\tsetNow() {\n\t\t\tthis.nowTime = new Date().getTime();\n\t\t},\n\t},\n});\n</script>\n","<script lang=\"ts\" setup>\nimport { computed, reactive, onBeforeMount, ref } from 'vue';\nimport type {\n\tExecutionFilterType,\n\tExecutionFilterMetadata,\n\tIWorkflowShortResponse,\n} from '@/Interface';\nimport { i18n as locale } from '@/plugins/i18n';\nimport TagsDropdown from '@/components/TagsDropdown.vue';\nimport { getObjectKeys, isEmpty } from '@/utils/typesUtils';\nimport { EnterpriseEditionFeature } from '@/constants';\nimport { useSettingsStore } from '@/stores/settings.store';\nimport { useUIStore } from '@/stores/ui.store';\nimport { useTelemetry } from '@/composables/useTelemetry';\nimport type { Placement } from '@floating-ui/core';\nimport { useDebounce } from '@/composables/useDebounce';\n\nexport type ExecutionFilterProps = {\n\tworkflows?: IWorkflowShortResponse[];\n\tpopoverPlacement?: Placement;\n\tteleported?: boolean;\n};\n\nconst DATE_TIME_MASK = 'YYYY-MM-DD HH:mm';\n\nconst settingsStore = useSettingsStore();\nconst uiStore = useUIStore();\nconst { debounce } = useDebounce();\n\nconst telemetry = useTelemetry();\n\nconst props = withDefaults(defineProps<ExecutionFilterProps>(), {\n\tpopoverPlacement: 'bottom' as Placement,\n\tteleported: true,\n});\nconst emit = defineEmits<{\n\t(event: 'filterChanged', value: ExecutionFilterType): void;\n}>();\nconst debouncedEmit = debounce(emit, {\n\tdebounceTime: 500,\n});\n\nconst isCustomDataFilterTracked = ref(false);\nconst isAdvancedExecutionFilterEnabled = computed(() =>\n\tsettingsStore.isEnterpriseFeatureEnabled(EnterpriseEditionFeature.AdvancedExecutionFilters),\n);\nconst showTags = computed(() => false);\n\nconst getDefaultFilter = (): ExecutionFilterType => ({\n\tstatus: 'all',\n\tworkflowId: 'all',\n\ttags: [],\n\tstartDate: '',\n\tendDate: '',\n\tmetadata: [{ key: '', value: '' }],\n});\nconst filter = reactive(getDefaultFilter());\n\n// Automatically set up v-models based on filter properties\nconst vModel = reactive(\n\tgetObjectKeys(filter).reduce(\n\t\t(acc, key) => {\n\t\t\tacc[key] = computed({\n\t\t\t\tget() {\n\t\t\t\t\treturn filter[key];\n\t\t\t\t},\n\t\t\t\tset(value) {\n\t\t\t\t\t// TODO: find out what exactly is typechecker complaining about\n\n\t\t\t\t\t// @ts-ignore\n\t\t\t\t\tfilter[key] = value;\n\t\t\t\t\temit('filterChanged', filter);\n\t\t\t\t},\n\t\t\t});\n\t\t\treturn acc;\n\t\t},\n\t\t{} as Record<keyof ExecutionFilterType, ReturnType<typeof computed>>,\n\t),\n);\n\nconst statuses = computed(() => [\n\t{ id: 'all', name: locale.baseText('executionsList.anyStatus') },\n\t{ id: 'error', name: locale.baseText('executionsList.error') },\n\t{ id: 'canceled', name: locale.baseText('executionsList.canceled') },\n\t{ id: 'running', name: locale.baseText('executionsList.running') },\n\t{ id: 'success', name: locale.baseText('executionsList.success') },\n\t{ id: 'waiting', name: locale.baseText('executionsList.waiting') },\n]);\n\nconst countSelectedFilterProps = computed(() => {\n\tlet count = 0;\n\tif (filter.status !== 'all') {\n\t\tcount++;\n\t}\n\tif (filter.workflowId !== 'all') {\n\t\tcount++;\n\t}\n\tif (!isEmpty(filter.tags)) {\n\t\tcount++;\n\t}\n\tif (!isEmpty(filter.metadata)) {\n\t\tcount++;\n\t}\n\tif (!!filter.startDate) {\n\t\tcount++;\n\t}\n\tif (!!filter.endDate) {\n\t\tcount++;\n\t}\n\treturn count;\n});\n\n// vModel.metadata is a text input and needs a debounced emit to avoid too many requests\n// We use the :value and @input combo instead of v-model with this event listener\nconst onFilterMetaChange = (index: number, prop: keyof ExecutionFilterMetadata, value: string) => {\n\tif (!filter.metadata[index]) {\n\t\tfilter.metadata[index] = {\n\t\t\tkey: '',\n\t\t\tvalue: '',\n\t\t};\n\t}\n\tfilter.metadata[index][prop] = value;\n\n\tif (!isCustomDataFilterTracked.value) {\n\t\ttelemetry.track('User filtered executions with custom data');\n\t\tisCustomDataFilterTracked.value = true;\n\t}\n\n\tdebouncedEmit('filterChanged', filter);\n};\n\n// Can't use v-model on TagsDropdown component and thus vModel.tags is useless\n// We just emit the updated filter\nconst onTagsChange = (tags: string[]) => {\n\tfilter.tags = tags;\n\temit('filterChanged', filter);\n};\n\nconst onFilterReset = () => {\n\tObject.assign(filter, getDefaultFilter());\n\temit('filterChanged', filter);\n};\n\nconst goToUpgrade = () => {\n\tvoid uiStore.goToUpgrade('custom-data-filter', 'upgrade-custom-data-filter');\n};\n\nonBeforeMount(() => {\n\tisCustomDataFilterTracked.value = false;\n\temit('filterChanged', filter);\n});\n</script>\n<template>\n\t<n8n-popover trigger=\"click\" :placement=\"popoverPlacement\" width=\"440\">\n\t\t<template #reference>\n\t\t\t<n8n-button\n\t\t\t\ticon=\"filter\"\n\t\t\t\ttype=\"tertiary\"\n\t\t\t\t:active=\"!!countSelectedFilterProps\"\n\t\t\t\tdata-test-id=\"executions-filter-button\"\n\t\t\t>\n\t\t\t\t<n8n-badge\n\t\t\t\t\tv-if=\"!!countSelectedFilterProps\"\n\t\t\t\t\ttheme=\"primary\"\n\t\t\t\t\tclass=\"mr-4xs\"\n\t\t\t\t\tdata-test-id=\"execution-filter-badge\"\n\t\t\t\t\t>{{ countSelectedFilterProps }}</n8n-badge\n\t\t\t\t>\n\t\t\t\t{{ locale.baseText('executionsList.filters') }}\n\t\t\t</n8n-button>\n\t\t</template>\n\t\t<div data-test-id=\"execution-filter-form\">\n\t\t\t<div v-if=\"workflows && workflows.length > 0\" :class=\"$style.group\">\n\t\t\t\t<label for=\"execution-filter-workflows\">{{ locale.baseText('workflows.heading') }}</label>\n\t\t\t\t<n8n-select\n\t\t\t\t\tid=\"execution-filter-workflows\"\n\t\t\t\t\tv-model=\"vModel.workflowId\"\n\t\t\t\t\t:placeholder=\"locale.baseText('executionsFilter.selectWorkflow')\"\n\t\t\t\t\tfilterable\n\t\t\t\t\tdata-test-id=\"executions-filter-workflows-select\"\n\t\t\t\t\t:teleported=\"teleported\"\n\t\t\t\t>\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<n8n-option\n\t\t\t\t\t\t\tv-for=\"(item, idx) in props.workflows\"\n\t\t\t\t\t\t\t:key=\"idx\"\n\t\t\t\t\t\t\t:label=\"item.name\"\n\t\t\t\t\t\t\t:value=\"item.id\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</n8n-select>\n\t\t\t</div>\n\t\t\t<div v-if=\"showTags\" :class=\"$style.group\">\n\t\t\t\t<label for=\"execution-filter-tags\">{{ locale.baseText('workflows.filters.tags') }}</label>\n\t\t\t\t<TagsDropdown\n\t\t\t\t\tid=\"execution-filter-tags\"\n\t\t\t\t\t:placeholder=\"locale.baseText('workflowOpen.filterWorkflows')\"\n\t\t\t\t\t:model-value=\"filter.tags\"\n\t\t\t\t\t:create-enabled=\"false\"\n\t\t\t\t\tdata-test-id=\"executions-filter-tags-select\"\n\t\t\t\t\t@update:modelValue=\"onTagsChange\"\n\t\t\t\t/>\n\t\t\t</div>\n\t\t\t<div :class=\"$style.group\">\n\t\t\t\t<label for=\"execution-filter-status\">{{ locale.baseText('executionsList.status') }}</label>\n\t\t\t\t<n8n-select\n\t\t\t\t\tid=\"execution-filter-status\"\n\t\t\t\t\tv-model=\"vModel.status\"\n\t\t\t\t\t:placeholder=\"locale.baseText('executionsFilter.selectStatus')\"\n\t\t\t\t\tfilterable\n\t\t\t\t\tdata-test-id=\"executions-filter-status-select\"\n\t\t\t\t\t:teleported=\"teleported\"\n\t\t\t\t>\n\t\t\t\t\t<n8n-option\n\t\t\t\t\t\tv-for=\"(item, idx) in statuses\"\n\t\t\t\t\t\t:key=\"idx\"\n\t\t\t\t\t\t:label=\"item.name\"\n\t\t\t\t\t\t:value=\"item.id\"\n\t\t\t\t\t/>\n\t\t\t\t</n8n-select>\n\t\t\t</div>\n\t\t\t<div :class=\"$style.group\">\n\t\t\t\t<label for=\"execution-filter-start-date\">{{\n\t\t\t\t\tlocale.baseText('executionsFilter.start')\n\t\t\t\t}}</label>\n\t\t\t\t<div :class=\"$style.dates\">\n\t\t\t\t\t<el-date-picker\n\t\t\t\t\t\tid=\"execution-filter-start-date\"\n\t\t\t\t\t\tv-model=\"vModel.startDate\"\n\t\t\t\t\t\ttype=\"datetime\"\n\t\t\t\t\t\t:teleported=\"false\"\n\t\t\t\t\t\t:format=\"DATE_TIME_MASK\"\n\t\t\t\t\t\t:placeholder=\"locale.baseText('executionsFilter.startDate')\"\n\t\t\t\t\t\tdata-test-id=\"executions-filter-start-date-picker\"\n\t\t\t\t\t/>\n\t\t\t\t\t<span :class=\"$style.divider\">to</span>\n\t\t\t\t\t<el-date-picker\n\t\t\t\t\t\tid=\"execution-filter-end-date\"\n\t\t\t\t\t\tv-model=\"vModel.endDate\"\n\t\t\t\t\t\ttype=\"datetime\"\n\t\t\t\t\t\t:teleported=\"false\"\n\t\t\t\t\t\t:format=\"DATE_TIME_MASK\"\n\t\t\t\t\t\t:placeholder=\"locale.baseText('executionsFilter.endDate')\"\n\t\t\t\t\t\tdata-test-id=\"executions-filter-end-date-picker\"\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div :class=\"$style.group\">\n\t\t\t\t<n8n-tooltip placement=\"right\">\n\t\t\t\t\t<template #content>\n\t\t\t\t\t\t<i18n-t tag=\"span\" keypath=\"executionsFilter.customData.docsTooltip\">\n\t\t\t\t\t\t\t<template #link>\n\t\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\thref=\"https://docs.n8n.io/workflows/executions/custom-executions-data/\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{{ locale.baseText('executionsFilter.customData.docsTooltip.link') }}\n\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t</i18n-t>\n\t\t\t\t\t</template>\n\t\t\t\t\t<span :class=\"$style.label\">\n\t\t\t\t\t\t{{ locale.baseText('executionsFilter.savedData') }}\n\t\t\t\t\t\t<n8n-icon :class=\"$style.tooltipIcon\" icon=\"question-circle\" size=\"small\" />\n\t\t\t\t\t</span>\n\t\t\t\t</n8n-tooltip>\n\t\t\t\t<div :class=\"$style.subGroup\">\n\t\t\t\t\t<label for=\"execution-filter-saved-data-key\">{{\n\t\t\t\t\t\tlocale.baseText('executionsFilter.savedDataKey')\n\t\t\t\t\t}}</label>\n\t\t\t\t\t<n8n-tooltip :disabled=\"isAdvancedExecutionFilterEnabled\" placement=\"top\">\n\t\t\t\t\t\t<template #content>\n\t\t\t\t\t\t\t<i18n-t tag=\"span\" keypath=\"executionsFilter.customData.inputTooltip\">\n\t\t\t\t\t\t\t\t<template #link>\n\t\t\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\t\t\thref=\"#\"\n\t\t\t\t\t\t\t\t\t\tdata-test-id=\"executions-filter-view-plans-link\"\n\t\t\t\t\t\t\t\t\t\t@click.prevent=\"goToUpgrade\"\n\t\t\t\t\t\t\t\t\t\t>{{ locale.baseText('executionsFilter.customData.inputTooltip.link') }}</a\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t</i18n-t>\n\t\t\t\t\t\t</template>\n\t\t\t\t\t\t<n8n-input\n\t\t\t\t\t\t\tid=\"execution-filter-saved-data-key\"\n\t\t\t\t\t\t\tname=\"execution-filter-saved-data-key\"\n\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\t:disabled=\"!isAdvancedExecutionFilterEnabled\"\n\t\t\t\t\t\t\t:placeholder=\"locale.baseText('executionsFilter.savedDataKeyPlaceholder')\"\n\t\t\t\t\t\t\t:model-value=\"filter.metadata[0]?.key\"\n\t\t\t\t\t\t\tdata-test-id=\"execution-filter-saved-data-key-input\"\n\t\t\t\t\t\t\t@update:modelValue=\"onFilterMetaChange(0, 'key', $event)\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</n8n-tooltip>\n\t\t\t\t\t<label for=\"execution-filter-saved-data-value\">{{\n\t\t\t\t\t\tlocale.baseText('executionsFilter.savedDataValue')\n\t\t\t\t\t}}</label>\n\t\t\t\t\t<n8n-tooltip :disabled=\"isAdvancedExecutionFilterEnabled\" placement=\"top\">\n\t\t\t\t\t\t<template #content>\n\t\t\t\t\t\t\t<i18n-t tag=\"span\" keypath=\"executionsFilter.customData.inputTooltip\">\n\t\t\t\t\t\t\t\t<template #link>\n\t\t\t\t\t\t\t\t\t<a href=\"#\" @click.prevent=\"goToUpgrade\">{{\n\t\t\t\t\t\t\t\t\t\tlocale.baseText('executionsFilter.customData.inputTooltip.link')\n\t\t\t\t\t\t\t\t\t}}</a>\n\t\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t</i18n-t>\n\t\t\t\t\t\t</template>\n\t\t\t\t\t\t<n8n-input\n\t\t\t\t\t\t\tid=\"execution-filter-saved-data-value\"\n\t\t\t\t\t\t\tname=\"execution-filter-saved-data-value\"\n\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\t:disabled=\"!isAdvancedExecutionFilterEnabled\"\n\t\t\t\t\t\t\t:placeholder=\"locale.baseText('executionsFilter.savedDataValuePlaceholder')\"\n\t\t\t\t\t\t\t:model-value=\"filter.metadata[0]?.value\"\n\t\t\t\t\t\t\tdata-test-id=\"execution-filter-saved-data-value-input\"\n\t\t\t\t\t\t\t@update:modelValue=\"onFilterMetaChange(0, 'value', $event)\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</n8n-tooltip>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<n8n-button\n\t\t\t\tv-if=\"!!countSelectedFilterProps\"\n\t\t\t\t:class=\"$style.resetBtn\"\n\t\t\t\tsize=\"large\"\n\t\t\t\ttext\n\t\t\t\tdata-test-id=\"executions-filter-reset-button\"\n\t\t\t\t@click=\"onFilterReset\"\n\t\t\t>\n\t\t\t\t{{ locale.baseText('executionsFilter.reset') }}\n\t\t\t</n8n-button>\n\t\t</div>\n\t</n8n-popover>\n</template>\n<style lang=\"scss\" module>\n.group {\n\tlabel,\n\t.label {\n\t\tdisplay: inline-block;\n\t\tfont-size: var(--font-size-2xs);\n\t\tmargin: var(--spacing-s) 0 var(--spacing-3xs);\n\t}\n}\n\n.subGroup {\n\tpadding: 0 0 var(--spacing-xs) var(--spacing-s);\n\n\tlabel,\n\t.label {\n\t\tfont-size: var(--font-size-3xs);\n\t\tmargin: var(--spacing-4xs) 0 var(--spacing-4xs);\n\t}\n}\n\n.dates {\n\tdisplay: flex;\n\tborder: 1px solid var(--color-foreground-base);\n\tborder-radius: var(--border-radius-base);\n\twhite-space: nowrap;\n\talign-items: center;\n}\n\n.divider {\n\tpadding: 0 var(--spacing-m);\n\tline-height: 100%;\n}\n\n.resetBtn {\n\tpadding: 0;\n\tmargin: var(--spacing-xs) 0 0;\n}\n\n.tooltipIcon {\n\tcolor: var(--color-text-light);\n}\n</style>\n\n<style lang=\"scss\" scoped>\n:deep(.el-date-editor) {\n\tinput {\n\t\theight: 36px;\n\t\tborder: 0;\n\t\tpadding-right: 0;\n\t}\n\n\t.el-input__prefix {\n\t\tcolor: var(--color-foreground-dark);\n\t}\n\n\t&:last-of-type {\n\t\tinput {\n\t\t\tpadding-left: 0;\n\t\t}\n\n\t\t.el-input__prefix {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n}\n\n:deep(.el-select-dropdown.el-popper[data-popper-placement^='bottom']) {\n\t> .popper__arrow {\n\t\ttop: -6px;\n\t\tleft: 50%;\n\t\tright: unset;\n\t\tmargin-bottom: 0;\n\t\tmargin-right: 3px;\n\t\tborder-left-width: 6px;\n\t\tborder-top-width: 0;\n\t\tborder-bottom-color: var(--border-color-light);\n\t\tborder-right-color: transparent;\n\n\t\t&::after {\n\t\t\ttop: 1px;\n\t\t\tleft: unset;\n\t\t\tbottom: unset;\n\t\t\tmargin-left: -6px;\n\t\t\tborder-left-width: 6px;\n\t\t\tborder-top-width: 0;\n\t\t\tborder-bottom-color: var(--color-foreground-xlight);\n\t\t\tborder-right-color: transparent;\n\t\t}\n\t}\n}\n</style>\n"],"names":["_sfc_main$1","defineComponent","msPassed","DATE_TIME_MASK","settingsStore","useSettingsStore","uiStore","useUIStore","debounce","useDebounce","telemetry","useTelemetry","props","__props","emit","__emit","debouncedEmit","isCustomDataFilterTracked","ref","isAdvancedExecutionFilterEnabled","computed","EnterpriseEditionFeature","showTags","getDefaultFilter","filter","reactive","vModel","getObjectKeys","acc","key","value","statuses","locale","countSelectedFilterProps","count","isEmpty","onFilterMetaChange","index","prop","onTagsChange","tags","onFilterReset","goToUpgrade","onBeforeMount"],"mappings":"iUASA,MAAAA,GAAeC,EAAgB,CAC9B,KAAM,gBACN,MAAO,CAAC,WAAW,EACnB,MAAO,CACC,MAAA,CACN,QAAS,GACT,cAAe,IAAA,CAEjB,EACA,SAAU,CACT,MAAe,CACV,GAAA,CAAC,KAAK,UACF,MAAA,MAEF,MAAAC,EAAW,KAAK,QAAU,IAAI,KAAK,KAAK,SAAS,EAAE,UAClD,OAAA,KAAK,QAAQ,aAAaA,CAAQ,CAC1C,CACD,EACA,SAAU,CACT,KAAK,OAAO,EACP,KAAA,cAAgB,YAAY,IAAM,CACtC,KAAK,OAAO,GACV,GAAI,CACR,EACA,eAAgB,CAEX,KAAK,gBAAkB,MAC1B,cAAc,KAAK,aAAa,CAElC,EACA,QAAS,CACR,QAAS,CACR,KAAK,QAAU,IAAI,KAAK,EAAE,QAAQ,CACnC,CACD,CACD,CAAC,kdCrBKC,EAAiB,0LAEvB,MAAMC,EAAgBC,KAChBC,EAAUC,KACV,CAAE,SAAAC,GAAaC,KAEfC,EAAYC,KAEZC,EAAQC,EAIRC,EAAOC,EAGPC,EAAgBR,EAASM,EAAM,CACpC,aAAc,GAAA,CACd,EAEKG,EAA4BC,GAAI,EAAK,EACrCC,EAAmCC,EAAS,IACjDhB,EAAc,2BAA2BiB,GAAyB,wBAAwB,CAAA,EAErFC,EAAWF,EAAS,IAAM,EAAK,EAE/BG,EAAmB,KAA4B,CACpD,OAAQ,MACR,WAAY,MACZ,KAAM,CAAC,EACP,UAAW,GACX,QAAS,GACT,SAAU,CAAC,CAAE,IAAK,GAAI,MAAO,GAAI,CAAA,GAE5BC,EAASC,EAASF,EAAA,CAAkB,EAGpCG,EAASD,EACdE,GAAcH,CAAM,EAAE,OACrB,CAACI,EAAKC,KACDD,EAAAC,CAAG,EAAIT,EAAS,CACnB,KAAM,CACL,OAAOI,EAAOK,CAAG,CAClB,EACA,IAAIC,EAA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qBAAsB,4BAA4B,CAAA,EAG5E,OAAAqC,GAAc,IAAM,CACnB1B,EAA0B,MAAQ,GAClCH,EAAK,gBAAiBU,CAAM,CAAA,CAC5B"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{u as $}from"./useExecutionDebugging-
|
|
2
|
-
//# sourceMappingURL=ExecutionPreview-
|
|
1
|
+
import{u as $}from"./useExecutionDebugging-eQjp4txV.js";import{az as C,b as T}from"./index-4C1AxeXk.js";import{e as B}from"./executionsHelpers-7_cXd8a_.js";import{fD as U,V as M,a9 as L,_ as z}from"./n8n-G5ZIZCy5.js";import{v as W,f as r,h as g,i as c,K as i,y as a,E as t,J as o,I as n,D as d,H as p,a6 as u}from"./vendor-VXT4wwt2.js";import"./pinia-UPmhnKmF.js";import"./@n8n/codemirror-lang-sql-A8tNeQAo.js";import"./@lezer/common-1hBQ1gIF.js";import"./prettier-s3fE3Qyr.js";import"./@jsplumb/util-DR0SB56A.js";import"./@jsplumb/core-MKwKlGip.js";import"./@jsplumb/common-Q5_tv_GT.js";import"./@jsplumb/connector-bezier-3dWY17R5.js";import"./lodash-es-xYzII6mS.js";import"./@jsplumb/browser-ui-AlqFM-P6.js";import"./uuid-McvpxQtQ.js";import"./codemirror-lang-html-n8n-aqAgigXU.js";import"./luxon-ZRIU05qF.js";import"./codemirror-lang-n8n-expression-7tlJbTJw.js";import"./@vueuse/core-4MtarU7n.js";import"./fast-json-stable-stringify-4gflVid-.js";import"./esprima-next-ulPLCZ1Z.js";import"./timeago.js--Bumj2r9.js";import"./qrcode.vue-t9lCVWTj.js";import"./vue3-touch-events-_RfbPMOD.js";import"./chart.js-JtqvIvkt.js";import"./axios-s2RMMPhA.js";import"./flatted-jPn12Tq4.js";import"./vue-i18n-ZIlZf-IE.js";import"./@n8n/permissions-8yMqUF1Y.js";import"./dateFormatter-7nt2saFg.js";const V=W({name:"ExecutionPreview",components:{ElDropdown:U,WorkflowPreview:C},mixins:[B],setup(){return{...T(),...$()}},data(){return{VIEWS:M}},computed:{executionUIDetails(){return this.activeExecution?this.getExecutionUIDetails(this.activeExecution):null},executionMode(){var e;return((e=this.activeExecution)==null?void 0:e.mode)||""},debugButtonData(){var e;return((e=this.activeExecution)==null?void 0:e.status)==="success"?{text:this.$locale.baseText("executionsList.debug.button.copyToEditor"),type:"secondary"}:{text:this.$locale.baseText("executionsList.debug.button.debugInEditor"),type:"primary"}}},methods:{async onDeleteExecution(){await this.confirm(this.$locale.baseText("executionDetails.confirmMessage.message"),this.$locale.baseText("executionDetails.confirmMessage.headline"),{type:"warning",confirmButtonText:this.$locale.baseText("executionDetails.confirmMessage.confirmButtonText"),cancelButtonText:""})===L&&this.$emit("deleteCurrentExecution")},handleRetryClick(e){this.$emit("retryExecution",{execution:this.activeExecution,command:e})},handleStopClick(){this.$emit("stopExecution")},onRetryButtonBlur(e){const m=this.$refs.retryDropdown;m&&e.relatedTarget===null&&m.handleClose()}}}),R="_previewContainer_hu7su_1",N="_executionDetails_hu7su_7",O="_spinner_hu7su_26",S="_running_hu7su_32",P="_waiting_hu7su_37",F="_success_hu7su_41",H="_error_hu7su_45",X="_runningInfo_hu7su_49",A="_runningMessage_hu7su_56",G="_debugLink_hu7su_62",J={previewContainer:R,executionDetails:N,spinner:O,running:S,waiting:P,success:F,error:H,runningInfo:X,runningMessage:A,debugLink:G},K=["data-test-id"],j=c("br",null,null,-1),q=c("br",null,null,-1),Q={class:"retry-button"};function Y(e,m,ee,te,ne,ie){var D,h,k,E;const y=u("n8n-spinner"),l=u("n8n-text"),x=u("n8n-button"),f=u("router-link"),b=u("n8n-icon-button"),w=u("el-dropdown-item"),v=u("el-dropdown-menu"),_=u("ElDropdown"),I=u("WorkflowPreview");return((D=e.executionUIDetails)==null?void 0:D.name)==="running"?(r(),g("div",{key:0,class:a(e.$style.runningInfo)},[c("div",{class:a(e.$style.spinner)},[i(y,{type:"ring"})],2),i(l,{class:a(e.$style.runningMessage),color:"text-light"},{default:t(()=>[o(n(e.$locale.baseText("executionDetails.runningMessage")),1)]),_:1},8,["class"]),i(x,{class:"mt-l",type:"tertiary",onClick:e.handleStopClick},{default:t(()=>[o(n(e.$locale.baseText("executionsList.stopExecution")),1)]),_:1},8,["onClick"])],2)):(r(),g("div",{key:1,class:a(e.$style.previewContainer)},[e.activeExecution?(r(),g("div",{key:0,class:a(e.$style.executionDetails),"data-test-id":`execution-preview-details-${e.executionId}`},[c("div",null,[i(l,{size:"large",color:"text-base",bold:!0,"data-test-id":"execution-time"},{default:t(()=>{var s;return[o(n((s=e.executionUIDetails)==null?void 0:s.startTime),1)]}),_:1}),j,((h=e.executionUIDetails)==null?void 0:h.name)==="running"?(r(),d(y,{key:0,size:"small",class:a([e.$style.spinner,"mr-4xs"])},null,8,["class"])):p("",!0),i(l,{size:"medium",class:a([e.$style.status,e.$style[e.executionUIDetails.name]]),"data-test-id":"execution-preview-label"},{default:t(()=>[o(n(e.executionUIDetails.label),1)]),_:1},8,["class"]),o(" "+n(" ")+" "),e.executionUIDetails.name==="running"?(r(),d(l,{key:1,color:"text-base",size:"medium"},{default:t(()=>{var s;return[o(n(e.$locale.baseText("executionDetails.runningTimeRunning",{interpolate:{time:(s=e.executionUIDetails)==null?void 0:s.runningTime}}))+" | ID#"+n(e.activeExecution.id),1)]}),_:1})):e.executionUIDetails.name!=="waiting"?(r(),d(l,{key:2,color:"text-base",size:"medium","data-test-id":"execution-preview-id"},{default:t(()=>{var s;return[o(n(e.$locale.baseText("executionDetails.runningTimeFinished",{interpolate:{time:((s=e.executionUIDetails)==null?void 0:s.runningTime)??"unknown"}}))+" | ID#"+n(e.activeExecution.id),1)]}),_:1})):((k=e.executionUIDetails)==null?void 0:k.name)==="waiting"?(r(),d(l,{key:3,color:"text-base",size:"medium"},{default:t(()=>[o(" | ID#"+n(e.activeExecution.id),1)]),_:1})):p("",!0),q,e.activeExecution.mode==="retry"?(r(),d(l,{key:4,color:"text-base",size:"medium"},{default:t(()=>[o(n(e.$locale.baseText("executionDetails.retry"))+" ",1),i(f,{class:a(e.$style.executionLink),to:{name:e.VIEWS.EXECUTION_PREVIEW,params:{workflowId:e.activeExecution.workflowId,executionId:e.activeExecution.retryOf}}},{default:t(()=>[o(" #"+n(e.activeExecution.retryOf),1)]),_:1},8,["class","to"])]),_:1})):p("",!0)]),c("div",null,[i(x,{size:"medium",type:e.debugButtonData.type,class:a({[e.$style.debugLink]:!0,[e.$style.secondary]:e.debugButtonData.type==="secondary"})},{default:t(()=>[i(f,{to:{name:e.VIEWS.EXECUTION_DEBUG,params:{name:e.activeExecution.workflowId,executionId:e.activeExecution.id}}},{default:t(()=>[c("span",{"data-test-id":"execution-debug-button",onClick:m[0]||(m[0]=(...s)=>e.handleDebugLinkClick&&e.handleDebugLinkClick(...s))},n(e.debugButtonData.text),1)]),_:1},8,["to"])]),_:1},8,["type","class"]),((E=e.executionUIDetails)==null?void 0:E.name)==="error"?(r(),d(_,{key:0,ref:"retryDropdown",trigger:"click",class:"mr-xs",onCommand:e.handleRetryClick},{dropdown:t(()=>[i(v,null,{default:t(()=>[i(w,{command:"current-workflow"},{default:t(()=>[o(n(e.$locale.baseText("executionsList.retryWithCurrentlySavedWorkflow")),1)]),_:1}),i(w,{command:"original-workflow"},{default:t(()=>[o(n(e.$locale.baseText("executionsList.retryWithOriginalWorkflow")),1)]),_:1})]),_:1})]),default:t(()=>[c("span",Q,[i(b,{size:"medium",type:"tertiary",title:e.$locale.baseText("executionsList.retryExecution"),icon:"redo","data-test-id":"execution-preview-retry-button",onBlur:e.onRetryButtonBlur},null,8,["title","onBlur"])])]),_:1},8,["onCommand"])):p("",!0),i(b,{title:e.$locale.baseText("executionDetails.deleteExecution"),icon:"trash",size:"medium",type:"tertiary","data-test-id":"execution-preview-delete-button",onClick:e.onDeleteExecution},null,8,["title","onClick"])])],10,K)):p("",!0),i(I,{mode:"execution","loader-type":"spinner","execution-id":e.executionId,"execution-mode":e.executionMode},null,8,["execution-id","execution-mode"])],2))}const Z={$style:J},We=z(V,[["render",Y],["__cssModules",Z]]);export{We as default};
|
|
2
|
+
//# sourceMappingURL=ExecutionPreview-MPwJjWY4.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExecutionPreview-OlIAVmt8.js","sources":["../../src/components/ExecutionsView/ExecutionPreview.vue"],"sourcesContent":["<template>\n\t<div v-if=\"executionUIDetails?.name === 'running'\" :class=\"$style.runningInfo\">\n\t\t<div :class=\"$style.spinner\">\n\t\t\t<n8n-spinner type=\"ring\" />\n\t\t</div>\n\t\t<n8n-text :class=\"$style.runningMessage\" color=\"text-light\">\n\t\t\t{{ $locale.baseText('executionDetails.runningMessage') }}\n\t\t</n8n-text>\n\t\t<n8n-button class=\"mt-l\" type=\"tertiary\" @click=\"handleStopClick\">\n\t\t\t{{ $locale.baseText('executionsList.stopExecution') }}\n\t\t</n8n-button>\n\t</div>\n\t<div v-else :class=\"$style.previewContainer\">\n\t\t<div\n\t\t\tv-if=\"activeExecution\"\n\t\t\t:class=\"$style.executionDetails\"\n\t\t\t:data-test-id=\"`execution-preview-details-${executionId}`\"\n\t\t>\n\t\t\t<div>\n\t\t\t\t<n8n-text size=\"large\" color=\"text-base\" :bold=\"true\" data-test-id=\"execution-time\">{{\n\t\t\t\t\texecutionUIDetails?.startTime\n\t\t\t\t}}</n8n-text\n\t\t\t\t><br />\n\t\t\t\t<n8n-spinner\n\t\t\t\t\tv-if=\"executionUIDetails?.name === 'running'\"\n\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t:class=\"[$style.spinner, 'mr-4xs']\"\n\t\t\t\t/>\n\t\t\t\t<n8n-text\n\t\t\t\t\tsize=\"medium\"\n\t\t\t\t\t:class=\"[$style.status, $style[executionUIDetails.name]]\"\n\t\t\t\t\tdata-test-id=\"execution-preview-label\"\n\t\t\t\t>\n\t\t\t\t\t{{ executionUIDetails.label }}\n\t\t\t\t</n8n-text>\n\t\t\t\t{{ ' ' }}\n\t\t\t\t<n8n-text v-if=\"executionUIDetails.name === 'running'\" color=\"text-base\" size=\"medium\">\n\t\t\t\t\t{{\n\t\t\t\t\t\t$locale.baseText('executionDetails.runningTimeRunning', {\n\t\t\t\t\t\t\tinterpolate: { time: executionUIDetails?.runningTime },\n\t\t\t\t\t\t})\n\t\t\t\t\t}}\n\t\t\t\t\t| ID#{{ activeExecution.id }}\n\t\t\t\t</n8n-text>\n\t\t\t\t<n8n-text\n\t\t\t\t\tv-else-if=\"executionUIDetails.name !== 'waiting'\"\n\t\t\t\t\tcolor=\"text-base\"\n\t\t\t\t\tsize=\"medium\"\n\t\t\t\t\tdata-test-id=\"execution-preview-id\"\n\t\t\t\t>\n\t\t\t\t\t{{\n\t\t\t\t\t\t$locale.baseText('executionDetails.runningTimeFinished', {\n\t\t\t\t\t\t\tinterpolate: { time: executionUIDetails?.runningTime ?? 'unknown' },\n\t\t\t\t\t\t})\n\t\t\t\t\t}}\n\t\t\t\t\t| ID#{{ activeExecution.id }}\n\t\t\t\t</n8n-text>\n\t\t\t\t<n8n-text\n\t\t\t\t\tv-else-if=\"executionUIDetails?.name === 'waiting'\"\n\t\t\t\t\tcolor=\"text-base\"\n\t\t\t\t\tsize=\"medium\"\n\t\t\t\t>\n\t\t\t\t\t| ID#{{ activeExecution.id }}\n\t\t\t\t</n8n-text>\n\t\t\t\t<br /><n8n-text v-if=\"activeExecution.mode === 'retry'\" color=\"text-base\" size=\"medium\">\n\t\t\t\t\t{{ $locale.baseText('executionDetails.retry') }}\n\t\t\t\t\t<router-link\n\t\t\t\t\t\t:class=\"$style.executionLink\"\n\t\t\t\t\t\t:to=\"{\n\t\t\t\t\t\t\tname: VIEWS.EXECUTION_PREVIEW,\n\t\t\t\t\t\t\tparams: {\n\t\t\t\t\t\t\t\tworkflowId: activeExecution.workflowId,\n\t\t\t\t\t\t\t\texecutionId: activeExecution.retryOf,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t}\"\n\t\t\t\t\t>\n\t\t\t\t\t\t#{{ activeExecution.retryOf }}\n\t\t\t\t\t</router-link>\n\t\t\t\t</n8n-text>\n\t\t\t</div>\n\t\t\t<div>\n\t\t\t\t<n8n-button\n\t\t\t\t\tsize=\"medium\"\n\t\t\t\t\t:type=\"debugButtonData.type\"\n\t\t\t\t\t:class=\"{\n\t\t\t\t\t\t[$style.debugLink]: true,\n\t\t\t\t\t\t[$style.secondary]: debugButtonData.type === 'secondary',\n\t\t\t\t\t}\"\n\t\t\t\t>\n\t\t\t\t\t<router-link\n\t\t\t\t\t\t:to=\"{\n\t\t\t\t\t\t\tname: VIEWS.EXECUTION_DEBUG,\n\t\t\t\t\t\t\tparams: {\n\t\t\t\t\t\t\t\tname: activeExecution.workflowId,\n\t\t\t\t\t\t\t\texecutionId: activeExecution.id,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t}\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span data-test-id=\"execution-debug-button\" @click=\"handleDebugLinkClick\">{{\n\t\t\t\t\t\t\tdebugButtonData.text\n\t\t\t\t\t\t}}</span>\n\t\t\t\t\t</router-link>\n\t\t\t\t</n8n-button>\n\n\t\t\t\t<ElDropdown\n\t\t\t\t\tv-if=\"executionUIDetails?.name === 'error'\"\n\t\t\t\t\tref=\"retryDropdown\"\n\t\t\t\t\ttrigger=\"click\"\n\t\t\t\t\tclass=\"mr-xs\"\n\t\t\t\t\t@command=\"handleRetryClick\"\n\t\t\t\t>\n\t\t\t\t\t<span class=\"retry-button\">\n\t\t\t\t\t\t<n8n-icon-button\n\t\t\t\t\t\t\tsize=\"medium\"\n\t\t\t\t\t\t\ttype=\"tertiary\"\n\t\t\t\t\t\t\t:title=\"$locale.baseText('executionsList.retryExecution')\"\n\t\t\t\t\t\t\ticon=\"redo\"\n\t\t\t\t\t\t\tdata-test-id=\"execution-preview-retry-button\"\n\t\t\t\t\t\t\t@blur=\"onRetryButtonBlur\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</span>\n\t\t\t\t\t<template #dropdown>\n\t\t\t\t\t\t<el-dropdown-menu>\n\t\t\t\t\t\t\t<el-dropdown-item command=\"current-workflow\">\n\t\t\t\t\t\t\t\t{{ $locale.baseText('executionsList.retryWithCurrentlySavedWorkflow') }}\n\t\t\t\t\t\t\t</el-dropdown-item>\n\t\t\t\t\t\t\t<el-dropdown-item command=\"original-workflow\">\n\t\t\t\t\t\t\t\t{{ $locale.baseText('executionsList.retryWithOriginalWorkflow') }}\n\t\t\t\t\t\t\t</el-dropdown-item>\n\t\t\t\t\t\t</el-dropdown-menu>\n\t\t\t\t\t</template>\n\t\t\t\t</ElDropdown>\n\t\t\t\t<n8n-icon-button\n\t\t\t\t\t:title=\"$locale.baseText('executionDetails.deleteExecution')\"\n\t\t\t\t\ticon=\"trash\"\n\t\t\t\t\tsize=\"medium\"\n\t\t\t\t\ttype=\"tertiary\"\n\t\t\t\t\tdata-test-id=\"execution-preview-delete-button\"\n\t\t\t\t\t@click=\"onDeleteExecution\"\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</div>\n\t\t<WorkflowPreview\n\t\t\tmode=\"execution\"\n\t\t\tloader-type=\"spinner\"\n\t\t\t:execution-id=\"executionId\"\n\t\t\t:execution-mode=\"executionMode\"\n\t\t/>\n\t</div>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent } from 'vue';\nimport { ElDropdown } from 'element-plus';\nimport { useExecutionDebugging } from '@/composables/useExecutionDebugging';\nimport { useMessage } from '@/composables/useMessage';\nimport WorkflowPreview from '@/components/WorkflowPreview.vue';\nimport type { IExecutionUIData } from '@/mixins/executionsHelpers';\nimport { executionHelpers } from '@/mixins/executionsHelpers';\nimport { MODAL_CONFIRM, VIEWS } from '@/constants';\n\ntype RetryDropdownRef = InstanceType<typeof ElDropdown> & { hide: () => void };\n\nexport default defineComponent({\n\tname: 'ExecutionPreview',\n\tcomponents: {\n\t\tElDropdown,\n\t\tWorkflowPreview,\n\t},\n\tmixins: [executionHelpers],\n\tsetup() {\n\t\treturn {\n\t\t\t...useMessage(),\n\t\t\t...useExecutionDebugging(),\n\t\t};\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tVIEWS,\n\t\t};\n\t},\n\tcomputed: {\n\t\texecutionUIDetails(): IExecutionUIData | null {\n\t\t\treturn this.activeExecution ? this.getExecutionUIDetails(this.activeExecution) : null;\n\t\t},\n\t\texecutionMode(): string {\n\t\t\treturn this.activeExecution?.mode || '';\n\t\t},\n\t\tdebugButtonData(): Record<string, string> {\n\t\t\treturn this.activeExecution?.status === 'success'\n\t\t\t\t? {\n\t\t\t\t\t\ttext: this.$locale.baseText('executionsList.debug.button.copyToEditor'),\n\t\t\t\t\t\ttype: 'secondary',\n\t\t\t\t }\n\t\t\t\t: {\n\t\t\t\t\t\ttext: this.$locale.baseText('executionsList.debug.button.debugInEditor'),\n\t\t\t\t\t\ttype: 'primary',\n\t\t\t\t };\n\t\t},\n\t},\n\tmethods: {\n\t\tasync onDeleteExecution(): Promise<void> {\n\t\t\tconst deleteConfirmed = await this.confirm(\n\t\t\t\tthis.$locale.baseText('executionDetails.confirmMessage.message'),\n\t\t\t\tthis.$locale.baseText('executionDetails.confirmMessage.headline'),\n\t\t\t\t{\n\t\t\t\t\ttype: 'warning',\n\t\t\t\t\tconfirmButtonText: this.$locale.baseText(\n\t\t\t\t\t\t'executionDetails.confirmMessage.confirmButtonText',\n\t\t\t\t\t),\n\t\t\t\t\tcancelButtonText: '',\n\t\t\t\t},\n\t\t\t);\n\t\t\tif (deleteConfirmed !== MODAL_CONFIRM) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.$emit('deleteCurrentExecution');\n\t\t},\n\t\thandleRetryClick(command: string): void {\n\t\t\tthis.$emit('retryExecution', { execution: this.activeExecution, command });\n\t\t},\n\t\thandleStopClick(): void {\n\t\t\tthis.$emit('stopExecution');\n\t\t},\n\t\tonRetryButtonBlur(event: FocusEvent): void {\n\t\t\t// Hide dropdown when clicking outside of current document\n\t\t\tconst retryDropdownRef = this.$refs.retryDropdown as RetryDropdownRef | undefined;\n\t\t\tif (retryDropdownRef && event.relatedTarget === null) {\n\t\t\t\tretryDropdownRef.handleClose();\n\t\t\t}\n\t\t},\n\t},\n});\n</script>\n\n<style module lang=\"scss\">\n.previewContainer {\n\tposition: relative;\n\theight: 100%;\n\toverflow: hidden;\n}\n\n.executionDetails {\n\tposition: absolute;\n\tpadding: var(--spacing-m);\n\tpadding-right: var(--spacing-xl);\n\twidth: 100%;\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n\ttransition: all 150ms ease-in-out;\n\tpointer-events: none;\n\n\t> div:last-child {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t}\n\n\t& * {\n\t\tpointer-events: all;\n\t}\n}\n\n.spinner {\n\tdiv div {\n\t\twidth: 30px;\n\t\theight: 30px;\n\t\tborder-width: 2px;\n\t}\n}\n\n.running,\n.spinner {\n\tcolor: var(--color-warning);\n}\n.waiting {\n\tcolor: var(--color-secondary);\n}\n.success {\n\tcolor: var(--color-success);\n}\n.error {\n\tcolor: var(--color-danger);\n}\n\n.runningInfo {\n\tdisplay: flex;\n\tflex-direction: column;\n\talign-items: center;\n\tmargin-top: var(--spacing-4xl);\n}\n\n.runningMessage {\n\twidth: 200px;\n\tmargin-top: var(--spacing-l);\n\ttext-align: center;\n}\n\n.debugLink {\n\theight: 42px;\n\tmargin-right: var(--spacing-xs);\n}\n</style>\n"],"names":["_sfc_main","defineComponent","ElDropdown","WorkflowPreview","executionHelpers","useMessage","useExecutionDebugging","VIEWS","_a","MODAL_CONFIRM","command","event","retryDropdownRef","_hoisted_1","_createElementVNode","_resolveComponent","_ctx","_openBlock","_createElementBlock","$style","_normalizeClass","_createVNode","_component_n8n_spinner","_component_n8n_text","_createTextVNode","_toDisplayString","_component_n8n_button","activeExecution","executionUIDetails","_b","_createBlock","_createCommentVNode","_hoisted_3","_withCtx","_component_router_link","debugButtonData","_d","_component_ElDropdown","_component_el_dropdown_menu","_component_el_dropdown_item","$locale","_hoisted_4","_component_n8n_icon_button","_component_WorkflowPreview"],"mappings":"qwCAmKA,MA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O,EAAA,CACnB,IAAA,EACA,IAAK,gBACJ,QAAO,QAAA,MAAA,QAYG,UAAQrB,EAAA,gBAAA,EAAA,UAzHxBiB,EA6H0B,IAAA,CAAAZ,EAFnBiB,EAEmB,KAFD,CAAA,QA3HzBL,EA4HgF,IAAA,CA5HhFZ,EAAAkB,EA4HWC,SAAQ,kBAAQ,EAAA,CAAA,QAAAP,EAAA,IAAA,CA5H3BT,EAAAC,EAAAT,EAAA,QAAA,SAAA,gDAAA,CAAA,EAAA,CAAA,CAAA,CAAA,EA8HO,EAAA,CAAA,CAAA,EA9HPK,EAAAkB,EA+HWC,SAAQ,mBAAQ,EAAA,CAAA,QAAAP,EAAA,IAAA,CA/H3BT,EAAAC,EAAAT,EAAA,QAAA,SAAA,0CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,KAAA,CAAA,CAAA,CAAA,KAAA,CAAA,CAAA,CAAA,UAgHMiB,EAOE,IAAA,CANYnB,EAAA,OAAA2B,EAAA,CAAApB,EACRqB,EAAU,CACd,KAAK,SACN,KAAK,WACL,gBAAa,SAAgC,+BAAA,EAC5C,KAAI,OAAA,eAAA,uFAtHZ,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,EAoII,EAAA,CAAA,WAOE,CANA,GAAAX,EAAe,GAAQ,EAAA,EAAAV,EACnBqB,EAAO,CACZ,MAAK1B,EAAQ,QAAA,SAAA,kCAAA,EACb,KAAK,QACL,KAAA,SACC,KAAA,WAAA,eAAA,6DA1IN,EAAA,KAAA,EAAA,CAAA,QAAA,SAAA,CAAA,CAAA,CAAA,CA8IE,EAAA,GAAAH,CAKE,GAJDkB,EAAgB,GAAA,EAAA,EAAAV,EAChBsB,EAAqB,CACpB,KAAA,YACA,cAAA,UAAA,eAAA3B,EAAA"}
|
|
1
|
+
{"version":3,"file":"ExecutionPreview-MPwJjWY4.js","sources":["../../src/components/ExecutionsView/ExecutionPreview.vue"],"sourcesContent":["<template>\n\t<div v-if=\"executionUIDetails?.name === 'running'\" :class=\"$style.runningInfo\">\n\t\t<div :class=\"$style.spinner\">\n\t\t\t<n8n-spinner type=\"ring\" />\n\t\t</div>\n\t\t<n8n-text :class=\"$style.runningMessage\" color=\"text-light\">\n\t\t\t{{ $locale.baseText('executionDetails.runningMessage') }}\n\t\t</n8n-text>\n\t\t<n8n-button class=\"mt-l\" type=\"tertiary\" @click=\"handleStopClick\">\n\t\t\t{{ $locale.baseText('executionsList.stopExecution') }}\n\t\t</n8n-button>\n\t</div>\n\t<div v-else :class=\"$style.previewContainer\">\n\t\t<div\n\t\t\tv-if=\"activeExecution\"\n\t\t\t:class=\"$style.executionDetails\"\n\t\t\t:data-test-id=\"`execution-preview-details-${executionId}`\"\n\t\t>\n\t\t\t<div>\n\t\t\t\t<n8n-text size=\"large\" color=\"text-base\" :bold=\"true\" data-test-id=\"execution-time\">{{\n\t\t\t\t\texecutionUIDetails?.startTime\n\t\t\t\t}}</n8n-text\n\t\t\t\t><br />\n\t\t\t\t<n8n-spinner\n\t\t\t\t\tv-if=\"executionUIDetails?.name === 'running'\"\n\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t:class=\"[$style.spinner, 'mr-4xs']\"\n\t\t\t\t/>\n\t\t\t\t<n8n-text\n\t\t\t\t\tsize=\"medium\"\n\t\t\t\t\t:class=\"[$style.status, $style[executionUIDetails.name]]\"\n\t\t\t\t\tdata-test-id=\"execution-preview-label\"\n\t\t\t\t>\n\t\t\t\t\t{{ executionUIDetails.label }}\n\t\t\t\t</n8n-text>\n\t\t\t\t{{ ' ' }}\n\t\t\t\t<n8n-text v-if=\"executionUIDetails.name === 'running'\" color=\"text-base\" size=\"medium\">\n\t\t\t\t\t{{\n\t\t\t\t\t\t$locale.baseText('executionDetails.runningTimeRunning', {\n\t\t\t\t\t\t\tinterpolate: { time: executionUIDetails?.runningTime },\n\t\t\t\t\t\t})\n\t\t\t\t\t}}\n\t\t\t\t\t| ID#{{ activeExecution.id }}\n\t\t\t\t</n8n-text>\n\t\t\t\t<n8n-text\n\t\t\t\t\tv-else-if=\"executionUIDetails.name !== 'waiting'\"\n\t\t\t\t\tcolor=\"text-base\"\n\t\t\t\t\tsize=\"medium\"\n\t\t\t\t\tdata-test-id=\"execution-preview-id\"\n\t\t\t\t>\n\t\t\t\t\t{{\n\t\t\t\t\t\t$locale.baseText('executionDetails.runningTimeFinished', {\n\t\t\t\t\t\t\tinterpolate: { time: executionUIDetails?.runningTime ?? 'unknown' },\n\t\t\t\t\t\t})\n\t\t\t\t\t}}\n\t\t\t\t\t| ID#{{ activeExecution.id }}\n\t\t\t\t</n8n-text>\n\t\t\t\t<n8n-text\n\t\t\t\t\tv-else-if=\"executionUIDetails?.name === 'waiting'\"\n\t\t\t\t\tcolor=\"text-base\"\n\t\t\t\t\tsize=\"medium\"\n\t\t\t\t>\n\t\t\t\t\t| ID#{{ activeExecution.id }}\n\t\t\t\t</n8n-text>\n\t\t\t\t<br /><n8n-text v-if=\"activeExecution.mode === 'retry'\" color=\"text-base\" size=\"medium\">\n\t\t\t\t\t{{ $locale.baseText('executionDetails.retry') }}\n\t\t\t\t\t<router-link\n\t\t\t\t\t\t:class=\"$style.executionLink\"\n\t\t\t\t\t\t:to=\"{\n\t\t\t\t\t\t\tname: VIEWS.EXECUTION_PREVIEW,\n\t\t\t\t\t\t\tparams: {\n\t\t\t\t\t\t\t\tworkflowId: activeExecution.workflowId,\n\t\t\t\t\t\t\t\texecutionId: activeExecution.retryOf,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t}\"\n\t\t\t\t\t>\n\t\t\t\t\t\t#{{ activeExecution.retryOf }}\n\t\t\t\t\t</router-link>\n\t\t\t\t</n8n-text>\n\t\t\t</div>\n\t\t\t<div>\n\t\t\t\t<n8n-button\n\t\t\t\t\tsize=\"medium\"\n\t\t\t\t\t:type=\"debugButtonData.type\"\n\t\t\t\t\t:class=\"{\n\t\t\t\t\t\t[$style.debugLink]: true,\n\t\t\t\t\t\t[$style.secondary]: debugButtonData.type === 'secondary',\n\t\t\t\t\t}\"\n\t\t\t\t>\n\t\t\t\t\t<router-link\n\t\t\t\t\t\t:to=\"{\n\t\t\t\t\t\t\tname: VIEWS.EXECUTION_DEBUG,\n\t\t\t\t\t\t\tparams: {\n\t\t\t\t\t\t\t\tname: activeExecution.workflowId,\n\t\t\t\t\t\t\t\texecutionId: activeExecution.id,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t}\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span data-test-id=\"execution-debug-button\" @click=\"handleDebugLinkClick\">{{\n\t\t\t\t\t\t\tdebugButtonData.text\n\t\t\t\t\t\t}}</span>\n\t\t\t\t\t</router-link>\n\t\t\t\t</n8n-button>\n\n\t\t\t\t<ElDropdown\n\t\t\t\t\tv-if=\"executionUIDetails?.name === 'error'\"\n\t\t\t\t\tref=\"retryDropdown\"\n\t\t\t\t\ttrigger=\"click\"\n\t\t\t\t\tclass=\"mr-xs\"\n\t\t\t\t\t@command=\"handleRetryClick\"\n\t\t\t\t>\n\t\t\t\t\t<span class=\"retry-button\">\n\t\t\t\t\t\t<n8n-icon-button\n\t\t\t\t\t\t\tsize=\"medium\"\n\t\t\t\t\t\t\ttype=\"tertiary\"\n\t\t\t\t\t\t\t:title=\"$locale.baseText('executionsList.retryExecution')\"\n\t\t\t\t\t\t\ticon=\"redo\"\n\t\t\t\t\t\t\tdata-test-id=\"execution-preview-retry-button\"\n\t\t\t\t\t\t\t@blur=\"onRetryButtonBlur\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</span>\n\t\t\t\t\t<template #dropdown>\n\t\t\t\t\t\t<el-dropdown-menu>\n\t\t\t\t\t\t\t<el-dropdown-item command=\"current-workflow\">\n\t\t\t\t\t\t\t\t{{ $locale.baseText('executionsList.retryWithCurrentlySavedWorkflow') }}\n\t\t\t\t\t\t\t</el-dropdown-item>\n\t\t\t\t\t\t\t<el-dropdown-item command=\"original-workflow\">\n\t\t\t\t\t\t\t\t{{ $locale.baseText('executionsList.retryWithOriginalWorkflow') }}\n\t\t\t\t\t\t\t</el-dropdown-item>\n\t\t\t\t\t\t</el-dropdown-menu>\n\t\t\t\t\t</template>\n\t\t\t\t</ElDropdown>\n\t\t\t\t<n8n-icon-button\n\t\t\t\t\t:title=\"$locale.baseText('executionDetails.deleteExecution')\"\n\t\t\t\t\ticon=\"trash\"\n\t\t\t\t\tsize=\"medium\"\n\t\t\t\t\ttype=\"tertiary\"\n\t\t\t\t\tdata-test-id=\"execution-preview-delete-button\"\n\t\t\t\t\t@click=\"onDeleteExecution\"\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</div>\n\t\t<WorkflowPreview\n\t\t\tmode=\"execution\"\n\t\t\tloader-type=\"spinner\"\n\t\t\t:execution-id=\"executionId\"\n\t\t\t:execution-mode=\"executionMode\"\n\t\t/>\n\t</div>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent } from 'vue';\nimport { ElDropdown } from 'element-plus';\nimport { useExecutionDebugging } from '@/composables/useExecutionDebugging';\nimport { useMessage } from '@/composables/useMessage';\nimport WorkflowPreview from '@/components/WorkflowPreview.vue';\nimport type { IExecutionUIData } from '@/mixins/executionsHelpers';\nimport { executionHelpers } from '@/mixins/executionsHelpers';\nimport { MODAL_CONFIRM, VIEWS } from '@/constants';\n\ntype RetryDropdownRef = InstanceType<typeof ElDropdown> & { hide: () => void };\n\nexport default defineComponent({\n\tname: 'ExecutionPreview',\n\tcomponents: {\n\t\tElDropdown,\n\t\tWorkflowPreview,\n\t},\n\tmixins: [executionHelpers],\n\tsetup() {\n\t\treturn {\n\t\t\t...useMessage(),\n\t\t\t...useExecutionDebugging(),\n\t\t};\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tVIEWS,\n\t\t};\n\t},\n\tcomputed: {\n\t\texecutionUIDetails(): IExecutionUIData | null {\n\t\t\treturn this.activeExecution ? this.getExecutionUIDetails(this.activeExecution) : null;\n\t\t},\n\t\texecutionMode(): string {\n\t\t\treturn this.activeExecution?.mode || '';\n\t\t},\n\t\tdebugButtonData(): Record<string, string> {\n\t\t\treturn this.activeExecution?.status === 'success'\n\t\t\t\t? {\n\t\t\t\t\t\ttext: this.$locale.baseText('executionsList.debug.button.copyToEditor'),\n\t\t\t\t\t\ttype: 'secondary',\n\t\t\t\t }\n\t\t\t\t: {\n\t\t\t\t\t\ttext: this.$locale.baseText('executionsList.debug.button.debugInEditor'),\n\t\t\t\t\t\ttype: 'primary',\n\t\t\t\t };\n\t\t},\n\t},\n\tmethods: {\n\t\tasync onDeleteExecution(): Promise<void> {\n\t\t\tconst deleteConfirmed = await this.confirm(\n\t\t\t\tthis.$locale.baseText('executionDetails.confirmMessage.message'),\n\t\t\t\tthis.$locale.baseText('executionDetails.confirmMessage.headline'),\n\t\t\t\t{\n\t\t\t\t\ttype: 'warning',\n\t\t\t\t\tconfirmButtonText: this.$locale.baseText(\n\t\t\t\t\t\t'executionDetails.confirmMessage.confirmButtonText',\n\t\t\t\t\t),\n\t\t\t\t\tcancelButtonText: '',\n\t\t\t\t},\n\t\t\t);\n\t\t\tif (deleteConfirmed !== MODAL_CONFIRM) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.$emit('deleteCurrentExecution');\n\t\t},\n\t\thandleRetryClick(command: string): void {\n\t\t\tthis.$emit('retryExecution', { execution: this.activeExecution, command });\n\t\t},\n\t\thandleStopClick(): void {\n\t\t\tthis.$emit('stopExecution');\n\t\t},\n\t\tonRetryButtonBlur(event: FocusEvent): void {\n\t\t\t// Hide dropdown when clicking outside of current document\n\t\t\tconst retryDropdownRef = this.$refs.retryDropdown as RetryDropdownRef | undefined;\n\t\t\tif (retryDropdownRef && event.relatedTarget === null) {\n\t\t\t\tretryDropdownRef.handleClose();\n\t\t\t}\n\t\t},\n\t},\n});\n</script>\n\n<style module lang=\"scss\">\n.previewContainer {\n\tposition: relative;\n\theight: 100%;\n\toverflow: hidden;\n}\n\n.executionDetails {\n\tposition: absolute;\n\tpadding: var(--spacing-m);\n\tpadding-right: var(--spacing-xl);\n\twidth: 100%;\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n\ttransition: all 150ms ease-in-out;\n\tpointer-events: none;\n\n\t> div:last-child {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t}\n\n\t& * {\n\t\tpointer-events: all;\n\t}\n}\n\n.spinner {\n\tdiv div {\n\t\twidth: 30px;\n\t\theight: 30px;\n\t\tborder-width: 2px;\n\t}\n}\n\n.running,\n.spinner {\n\tcolor: var(--color-warning);\n}\n.waiting {\n\tcolor: var(--color-secondary);\n}\n.success {\n\tcolor: var(--color-success);\n}\n.error {\n\tcolor: var(--color-danger);\n}\n\n.runningInfo {\n\tdisplay: flex;\n\tflex-direction: column;\n\talign-items: center;\n\tmargin-top: var(--spacing-4xl);\n}\n\n.runningMessage {\n\twidth: 200px;\n\tmargin-top: var(--spacing-l);\n\ttext-align: center;\n}\n\n.debugLink {\n\theight: 42px;\n\tmargin-right: var(--spacing-xs);\n}\n</style>\n"],"names":["_sfc_main","defineComponent","ElDropdown","WorkflowPreview","executionHelpers","useMessage","useExecutionDebugging","VIEWS","_a","MODAL_CONFIRM","command","event","retryDropdownRef","_hoisted_1","_createElementVNode","_resolveComponent","_ctx","_openBlock","_createElementBlock","$style","_normalizeClass","_createVNode","_component_n8n_spinner","_component_n8n_text","_createTextVNode","_toDisplayString","_component_n8n_button","activeExecution","executionUIDetails","_b","_createBlock","_createCommentVNode","_hoisted_3","_withCtx","_component_router_link","debugButtonData","_d","_component_ElDropdown","_component_el_dropdown_menu","_component_el_dropdown_item","$locale","_hoisted_4","_component_n8n_icon_button","_component_WorkflowPreview"],"mappings":"qwCAmKA,MAAAA,EAAeC,EAAgB,CAC9B,KAAM,mBACN,WAAY,CACX,WAAAC,EACA,gBAAAC,CACD,EACA,OAAQ,CAACC,CAAgB,EACzB,OAAQ,CACA,MAAA,CACN,GAAGC,EAAW,EACd,GAAGC,EAAsB,CAAA,CAE3B,EACA,MAAO,CACC,MAAA,CACN,MAAAC,CAAA,CAEF,EACA,SA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AAA,QAAAP,EAAA,IAAA,CA5H3BT,EAAAC,EAAAT,EAAA,QAAA,SAAA,gDAAA,CAAA,EAAA,CAAA,CAAA,CAAA,EA8HO,EAAA,CAAA,CAAA,EA9HPK,EAAAkB,EA+HWC,SAAQ,mBAAQ,EAAA,CAAA,QAAAP,EAAA,IAAA,CA/H3BT,EAAAC,EAAAT,EAAA,QAAA,SAAA,0CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,KAAA,CAAA,CAAA,CAAA,KAAA,CAAA,CAAA,CAAA,UAgHMiB,EAOE,IAAA,CANYnB,EAAA,OAAA2B,EAAA,CAAApB,EACRqB,EAAU,CACd,KAAK,SACN,KAAK,WACL,gBAAa,SAAgC,+BAAA,EAC5C,KAAI,OAAA,eAAA,uFAtHZ,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,EAoII,EAAA,CAAA,WAOE,CANA,GAAAX,EAAe,GAAQ,EAAA,EAAAV,EACnBqB,EAAO,CACZ,MAAK1B,EAAQ,QAAA,SAAA,kCAAA,EACb,KAAK,QACL,KAAA,SACC,KAAA,WAAA,eAAA,6DA1IN,EAAA,KAAA,EAAA,CAAA,QAAA,SAAA,CAAA,CAAA,CAAA,CA8IE,EAAA,GAAAH,CAKE,GAJDkB,EAAgB,GAAA,EAAA,EAAAV,EAChBsB,EAAqB,CACpB,KAAA,YACA,cAAA,UAAA,eAAA3B,EAAA"}
|
package/dist/assets/{ExecutionsInfoAccordion-8y0XuFEi.js → ExecutionsInfoAccordion-H3fj26pu.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{m as h}from"./pinia-UPmhnKmF.js";import{v as k,u as v,l as x,m as E,o as g,a3 as l,dd as i,_ as m}from"./n8n-G5ZIZCy5.js";import{a as T}from"./index-
|
|
2
|
-
//# sourceMappingURL=ExecutionsInfoAccordion-
|
|
1
|
+
import{m as h}from"./pinia-UPmhnKmF.js";import{v as k,u as v,l as x,m as E,o as g,a3 as l,dd as i,_ as m}from"./n8n-G5ZIZCy5.js";import{a as T}from"./index-4C1AxeXk.js";import{v as I,at as C,f as y,D as W,E as t,i as u,J as s,I as n,K as a,V as d,y as f,a6 as c}from"./vendor-VXT4wwt2.js";const _=I({name:"ExecutionsInfoAccordion",props:{initiallyExpanded:{type:Boolean,default:!1}},setup(){const e=C();return{workflowHelpers:T({router:e})}},data(){return{defaultValues:{saveFailedExecutions:"all",saveSuccessfulExecutions:"all",saveManualExecutions:!1},workflowSaveSettings:{saveFailedExecutions:!1,saveSuccessfulExecutions:!1,saveTestExecutions:!1}}},watch:{workflowSettings(e){this.updateSettings(e)}},mounted(){this.defaultValues.saveFailedExecutions=this.settingsStore.saveDataErrorExecution,this.defaultValues.saveSuccessfulExecutions=this.settingsStore.saveDataSuccessExecution,this.defaultValues.saveManualExecutions=this.settingsStore.saveManualExecutions,this.updateSettings(this.workflowSettings)},computed:{...h(E,x,v,k),accordionItems(){return[{id:"productionExecutions",label:this.$locale.baseText("executionsLandingPage.emptyState.accordion.productionExecutions"),icon:this.productionExecutionsIcon.icon,iconColor:this.productionExecutionsIcon.color,tooltip:this.productionExecutionsStatus==="unknown"?this.$locale.baseText("executionsLandingPage.emptyState.accordion.productionExecutionsWarningTooltip"):null},{id:"manualExecutions",label:this.$locale.baseText("executionsLandingPage.emptyState.accordion.testExecutions"),icon:this.workflowSaveSettings.saveTestExecutions?"check":"times",iconColor:this.workflowSaveSettings.saveTestExecutions?"success":"danger"}]},shouldExpandAccordion(){return this.initiallyExpanded?!this.workflowSaveSettings.saveFailedExecutions||!this.workflowSaveSettings.saveSuccessfulExecutions||!this.workflowSaveSettings.saveTestExecutions:!1},productionExecutionsIcon(){return this.productionExecutionsStatus==="saving"?{icon:"check",color:"success"}:this.productionExecutionsStatus==="not-saving"?{icon:"times",color:"danger"}:{icon:"exclamation-triangle",color:"warning"}},productionExecutionsStatus(){return this.workflowSaveSettings.saveSuccessfulExecutions===this.workflowSaveSettings.saveFailedExecutions?this.workflowSaveSettings.saveSuccessfulExecutions?"saving":"not-saving":"unknown"},workflowSettings(){return g(this.workflowsStore.workflowSettings)},accordionIcon(){return!this.workflowSaveSettings.saveTestExecutions||this.productionExecutionsStatus!=="saving"?{icon:"exclamation-triangle",color:"warning"}:null},currentWorkflowId(){return this.workflowsStore.workflowId},isNewWorkflow(){return!this.currentWorkflowId||this.currentWorkflowId===l||this.currentWorkflowId==="new"},workflowName(){return this.workflowsStore.workflowName},currentWorkflowTagIds(){return this.workflowsStore.workflowTags}},methods:{updateSettings(e){this.workflowSaveSettings.saveFailedExecutions=e.saveDataErrorExecution===void 0?this.defaultValues.saveFailedExecutions==="all":e.saveDataErrorExecution==="all",this.workflowSaveSettings.saveSuccessfulExecutions=e.saveDataSuccessExecution===void 0?this.defaultValues.saveSuccessfulExecutions==="all":e.saveDataSuccessExecution==="all",this.workflowSaveSettings.saveTestExecutions=e.saveManualExecutions===void 0?this.defaultValues.saveManualExecutions:e.saveManualExecutions},onAccordionClick(e){e.target instanceof HTMLAnchorElement&&(e.preventDefault(),this.uiStore.openModal(i))},onItemTooltipClick(e,o){e==="productionExecutions"&&o.target instanceof HTMLAnchorElement&&(o.preventDefault(),this.uiStore.openModal(i))},openWorkflowSettings(e){this.uiStore.openModal(i)},async onSaveWorkflowClick(e){let o;this.currentWorkflowId!==l?o=this.currentWorkflowId:this.$route.params.name&&this.$route.params.name!=="new"&&(o=this.$route.params.name),await this.workflowHelpers.saveCurrentWorkflow({id:o,name:this.workflowName,tags:this.currentWorkflowTagIds})&&await this.settingsStore.fetchPromptsData()}}}),b="_accordion_14pzb_1",$="_disabled_14pzb_27",L={accordion:b,disabled:$},M={class:"mt-2xs"};function D(e,o,w,V,A,N){const r=c("n8n-link"),p=c("n8n-tooltip"),S=c("n8n-info-accordion");return y(),W(S,{class:f([e.$style.accordion,"mt-2xl"]),title:e.$locale.baseText("executionsLandingPage.emptyState.accordion.title"),items:e.accordionItems,"initially-expanded":e.shouldExpandAccordion,"header-icon":e.accordionIcon,"onClick:body":e.onAccordionClick,onTooltipClick:e.onItemTooltipClick},{customContent:t(()=>[u("footer",M,[s(n(e.$locale.baseText("executionsLandingPage.emptyState.accordion.footer"))+" ",1),a(p,{disabled:!e.isNewWorkflow},{content:t(()=>[u("div",null,[a(r,{onClick:d(e.onSaveWorkflowClick,["prevent"])},{default:t(()=>[s(n(e.$locale.baseText("executionsLandingPage.emptyState.accordion.footer.tooltipLink")),1)]),_:1},8,["onClick"]),s(" "+n(e.$locale.baseText("executionsLandingPage.emptyState.accordion.footer.tooltipText")),1)])]),default:t(()=>[a(r,{class:f({[e.$style.disabled]:e.isNewWorkflow}),size:"small",onClick:d(e.openWorkflowSettings,["prevent"])},{default:t(()=>[s(n(e.$locale.baseText("executionsLandingPage.emptyState.accordion.footer.settingsLink")),1)]),_:1},8,["class","onClick"])]),_:1},8,["disabled"])])]),_:1},8,["class","title","items","initially-expanded","header-icon","onClick:body","onTooltipClick"])}const P={$style:L},z=m(_,[["render",D],["__cssModules",P]]);export{z as E};
|
|
2
|
+
//# sourceMappingURL=ExecutionsInfoAccordion-H3fj26pu.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExecutionsInfoAccordion-8y0XuFEi.js","sources":["../../src/components/ExecutionsView/ExecutionsInfoAccordion.vue"],"sourcesContent":["<template>\n\t<n8n-info-accordion\n\t\t:class=\"[$style.accordion, 'mt-2xl']\"\n\t\t:title=\"$locale.baseText('executionsLandingPage.emptyState.accordion.title')\"\n\t\t:items=\"accordionItems\"\n\t\t:initially-expanded=\"shouldExpandAccordion\"\n\t\t:header-icon=\"accordionIcon\"\n\t\t@click:body=\"onAccordionClick\"\n\t\t@tooltipClick=\"onItemTooltipClick\"\n\t>\n\t\t<template #customContent>\n\t\t\t<footer class=\"mt-2xs\">\n\t\t\t\t{{ $locale.baseText('executionsLandingPage.emptyState.accordion.footer') }}\n\t\t\t\t<n8n-tooltip :disabled=\"!isNewWorkflow\">\n\t\t\t\t\t<template #content>\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t<n8n-link @click.prevent=\"onSaveWorkflowClick\">{{\n\t\t\t\t\t\t\t\t$locale.baseText('executionsLandingPage.emptyState.accordion.footer.tooltipLink')\n\t\t\t\t\t\t\t}}</n8n-link>\n\t\t\t\t\t\t\t{{\n\t\t\t\t\t\t\t\t$locale.baseText('executionsLandingPage.emptyState.accordion.footer.tooltipText')\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</template>\n\t\t\t\t\t<n8n-link\n\t\t\t\t\t\t:class=\"{ [$style.disabled]: isNewWorkflow }\"\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t@click.prevent=\"openWorkflowSettings\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{{ $locale.baseText('executionsLandingPage.emptyState.accordion.footer.settingsLink') }}\n\t\t\t\t\t</n8n-link>\n\t\t\t\t</n8n-tooltip>\n\t\t\t</footer>\n\t\t</template>\n\t</n8n-info-accordion>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent } from 'vue';\nimport { mapStores } from 'pinia';\nimport { useRootStore } from '@/stores/n8nRoot.store';\nimport { useSettingsStore } from '@/stores/settings.store';\nimport { useUIStore } from '@/stores/ui.store';\nimport { useWorkflowsStore } from '@/stores/workflows.store';\nimport { PLACEHOLDER_EMPTY_WORKFLOW_ID, WORKFLOW_SETTINGS_MODAL_KEY } from '@/constants';\nimport type { IWorkflowSettings } from 'n8n-workflow';\nimport { deepCopy } from 'n8n-workflow';\nimport { useWorkflowHelpers } from '@/composables/useWorkflowHelpers';\nimport { useRouter } from 'vue-router';\n\ninterface IWorkflowSaveSettings {\n\tsaveFailedExecutions: boolean;\n\tsaveSuccessfulExecutions: boolean;\n\tsaveTestExecutions: boolean;\n}\n\nexport default defineComponent({\n\tname: 'ExecutionsInfoAccordion',\n\tprops: {\n\t\tinitiallyExpanded: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\tsetup() {\n\t\tconst router = useRouter();\n\t\tconst workflowHelpers = useWorkflowHelpers({ router });\n\n\t\treturn {\n\t\t\tworkflowHelpers,\n\t\t};\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tdefaultValues: {\n\t\t\t\tsaveFailedExecutions: 'all',\n\t\t\t\tsaveSuccessfulExecutions: 'all',\n\t\t\t\tsaveManualExecutions: false,\n\t\t\t},\n\t\t\tworkflowSaveSettings: {\n\t\t\t\tsaveFailedExecutions: false,\n\t\t\t\tsaveSuccessfulExecutions: false,\n\t\t\t\tsaveTestExecutions: false,\n\t\t\t} as IWorkflowSaveSettings,\n\t\t};\n\t},\n\twatch: {\n\t\tworkflowSettings(newSettings: IWorkflowSettings) {\n\t\t\tthis.updateSettings(newSettings);\n\t\t},\n\t},\n\tmounted() {\n\t\tthis.defaultValues.saveFailedExecutions = this.settingsStore.saveDataErrorExecution;\n\t\tthis.defaultValues.saveSuccessfulExecutions = this.settingsStore.saveDataSuccessExecution;\n\t\tthis.defaultValues.saveManualExecutions = this.settingsStore.saveManualExecutions;\n\t\tthis.updateSettings(this.workflowSettings);\n\t},\n\tcomputed: {\n\t\t...mapStores(useRootStore, useSettingsStore, useUIStore, useWorkflowsStore),\n\t\taccordionItems(): object[] {\n\t\t\treturn [\n\t\t\t\t{\n\t\t\t\t\tid: 'productionExecutions',\n\t\t\t\t\tlabel: this.$locale.baseText(\n\t\t\t\t\t\t'executionsLandingPage.emptyState.accordion.productionExecutions',\n\t\t\t\t\t),\n\t\t\t\t\ticon: this.productionExecutionsIcon.icon,\n\t\t\t\t\ticonColor: this.productionExecutionsIcon.color,\n\t\t\t\t\ttooltip:\n\t\t\t\t\t\tthis.productionExecutionsStatus === 'unknown'\n\t\t\t\t\t\t\t? this.$locale.baseText(\n\t\t\t\t\t\t\t\t\t'executionsLandingPage.emptyState.accordion.productionExecutionsWarningTooltip',\n\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t: null,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: 'manualExecutions',\n\t\t\t\t\tlabel: this.$locale.baseText('executionsLandingPage.emptyState.accordion.testExecutions'),\n\t\t\t\t\ticon: this.workflowSaveSettings.saveTestExecutions ? 'check' : 'times',\n\t\t\t\t\ticonColor: this.workflowSaveSettings.saveTestExecutions ? 'success' : 'danger',\n\t\t\t\t},\n\t\t\t];\n\t\t},\n\t\tshouldExpandAccordion(): boolean {\n\t\t\tif (!this.initiallyExpanded) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn (\n\t\t\t\t!this.workflowSaveSettings.saveFailedExecutions ||\n\t\t\t\t!this.workflowSaveSettings.saveSuccessfulExecutions ||\n\t\t\t\t!this.workflowSaveSettings.saveTestExecutions\n\t\t\t);\n\t\t},\n\t\tproductionExecutionsIcon(): { icon: string; color: string } {\n\t\t\tif (this.productionExecutionsStatus === 'saving') {\n\t\t\t\treturn { icon: 'check', color: 'success' };\n\t\t\t} else if (this.productionExecutionsStatus === 'not-saving') {\n\t\t\t\treturn { icon: 'times', color: 'danger' };\n\t\t\t}\n\t\t\treturn { icon: 'exclamation-triangle', color: 'warning' };\n\t\t},\n\t\tproductionExecutionsStatus(): string {\n\t\t\tif (\n\t\t\t\tthis.workflowSaveSettings.saveSuccessfulExecutions ===\n\t\t\t\tthis.workflowSaveSettings.saveFailedExecutions\n\t\t\t) {\n\t\t\t\tif (this.workflowSaveSettings.saveSuccessfulExecutions) {\n\t\t\t\t\treturn 'saving';\n\t\t\t\t}\n\t\t\t\treturn 'not-saving';\n\t\t\t} else {\n\t\t\t\treturn 'unknown';\n\t\t\t}\n\t\t},\n\t\tworkflowSettings(): IWorkflowSettings {\n\t\t\tconst workflowSettings = deepCopy(this.workflowsStore.workflowSettings);\n\t\t\treturn workflowSettings;\n\t\t},\n\t\taccordionIcon(): { icon: string; color: string } | null {\n\t\t\tif (\n\t\t\t\t!this.workflowSaveSettings.saveTestExecutions ||\n\t\t\t\tthis.productionExecutionsStatus !== 'saving'\n\t\t\t) {\n\t\t\t\treturn { icon: 'exclamation-triangle', color: 'warning' };\n\t\t\t}\n\t\t\treturn null;\n\t\t},\n\t\tcurrentWorkflowId(): string {\n\t\t\treturn this.workflowsStore.workflowId;\n\t\t},\n\t\tisNewWorkflow(): boolean {\n\t\t\treturn (\n\t\t\t\t!this.currentWorkflowId ||\n\t\t\t\tthis.currentWorkflowId === PLACEHOLDER_EMPTY_WORKFLOW_ID ||\n\t\t\t\tthis.currentWorkflowId === 'new'\n\t\t\t);\n\t\t},\n\t\tworkflowName(): string {\n\t\t\treturn this.workflowsStore.workflowName;\n\t\t},\n\t\tcurrentWorkflowTagIds(): string[] {\n\t\t\treturn this.workflowsStore.workflowTags;\n\t\t},\n\t},\n\tmethods: {\n\t\tupdateSettings(workflowSettings: IWorkflowSettings): void {\n\t\t\tthis.workflowSaveSettings.saveFailedExecutions =\n\t\t\t\tworkflowSettings.saveDataErrorExecution === undefined\n\t\t\t\t\t? this.defaultValues.saveFailedExecutions === 'all'\n\t\t\t\t\t: workflowSettings.saveDataErrorExecution === 'all';\n\t\t\tthis.workflowSaveSettings.saveSuccessfulExecutions =\n\t\t\t\tworkflowSettings.saveDataSuccessExecution === undefined\n\t\t\t\t\t? this.defaultValues.saveSuccessfulExecutions === 'all'\n\t\t\t\t\t: workflowSettings.saveDataSuccessExecution === 'all';\n\t\t\tthis.workflowSaveSettings.saveTestExecutions =\n\t\t\t\tworkflowSettings.saveManualExecutions === undefined\n\t\t\t\t\t? this.defaultValues.saveManualExecutions\n\t\t\t\t\t: (workflowSettings.saveManualExecutions as boolean);\n\t\t},\n\t\tonAccordionClick(event: MouseEvent): void {\n\t\t\tif (event.target instanceof HTMLAnchorElement) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tthis.uiStore.openModal(WORKFLOW_SETTINGS_MODAL_KEY);\n\t\t\t}\n\t\t},\n\t\tonItemTooltipClick(item: string, event: MouseEvent): void {\n\t\t\tif (item === 'productionExecutions' && event.target instanceof HTMLAnchorElement) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tthis.uiStore.openModal(WORKFLOW_SETTINGS_MODAL_KEY);\n\t\t\t}\n\t\t},\n\t\topenWorkflowSettings(event: MouseEvent): void {\n\t\t\tthis.uiStore.openModal(WORKFLOW_SETTINGS_MODAL_KEY);\n\t\t},\n\t\tasync onSaveWorkflowClick(event: MouseEvent): void {\n\t\t\tlet currentId = undefined;\n\t\t\tif (this.currentWorkflowId !== PLACEHOLDER_EMPTY_WORKFLOW_ID) {\n\t\t\t\tcurrentId = this.currentWorkflowId;\n\t\t\t} else if (this.$route.params.name && this.$route.params.name !== 'new') {\n\t\t\t\tcurrentId = this.$route.params.name;\n\t\t\t}\n\t\t\tconst saved = await this.workflowHelpers.saveCurrentWorkflow({\n\t\t\t\tid: currentId,\n\t\t\t\tname: this.workflowName,\n\t\t\t\ttags: this.currentWorkflowTagIds,\n\t\t\t});\n\t\t\tif (saved) await this.settingsStore.fetchPromptsData();\n\t\t},\n\t},\n});\n</script>\n\n<style module lang=\"scss\">\n.accordion {\n\tbackground: none;\n\twidth: 320px;\n\n\t// Accordion header\n\t& > div:nth-child(1) {\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\t\tpadding: var(--spacing-xs);\n\t\twidth: 100%;\n\t\tuser-select: none;\n\t\tcolor: var(--color-text-base) !important;\n\t}\n\n\t// Accordion description\n\t& > div:nth-child(2) {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\twidth: 100%;\n\t\tpadding: 0 var(--spacing-l) var(--spacing-s) !important;\n\n\t\tspan {\n\t\t\twidth: 100%;\n\t\t}\n\t}\n\n\tfooter {\n\t\ttext-align: left;\n\t\twidth: 100%;\n\t\tfont-size: var(--font-size-2xs);\n\t}\n\n\t.disabled a {\n\t\tcolor: currentColor;\n\t\tcursor: not-allowed;\n\t\topacity: 0.5;\n\t\ttext-decoration: none;\n\t}\n}\n</style>\n"],"names":["_sfc_main","defineComponent","router","useRouter","useWorkflowHelpers","newSettings","mapStores","useRootStore","useSettingsStore","useUIStore","useWorkflowsStore","deepCopy","PLACEHOLDER_EMPTY_WORKFLOW_ID","workflowSettings","event","WORKFLOW_SETTINGS_MODAL_KEY","item","currentId","_component_n8n_info_accordion","_resolveComponent","_openBlock","_createBlock","accordionItems","_ctx","shouldExpandAccordion","onAccordionClick","onItemTooltipClick","_withCtx","_createElementVNode","_hoisted_1","_createTextVNode","isNewWorkflow","_createVNode","_component_n8n_tooltip","onSaveWorkflowClick","_withModifiers","_toDisplayString","_component_n8n_link","_normalizeClass","openWorkflowSettings"],"mappings":"iSAwDA,MAAAA,EAAeC,EAAgB,CAC9B,KAAM,0BACN,MAAO,CACN,kBAAmB,CAClB,KAAM,QACN,QAAS,EACV,CACD,EACA,OAAQ,CACP,MAAMC,EAASC,IAGR,MAAA,CACN,gBAHuBC,EAAmB,CAAE,OAAAF,CAAQ,CAAA,CAGpD,CAEF,EACA,MAAO,CACC,MAAA,CACN,cAAe,CACd,qBAAsB,MACtB,yBAA0B,MAC1B,qBAAsB,EACvB,EACA,qBAAsB,CACrB,qBAAsB,GACtB,yBAA0B,GAC1B,mBAAoB,EACrB,CAAA,CAEF,EACA,MAAO,CACN,iBAAiBG,EAAgC,CAChD,KAAK,eAAeA,CAAW,CAChC,CACD,EACA,SAAU,CACJ,KAAA,cAAc,qBAAuB,KAAK,cAAc,uBACxD,KAAA,cAAc,yBAA2B,KAAK,cAAc,yBAC5D,KAAA,cAAc,qBAAuB,KAAK,cAAc,qBACxD,KAAA,eAAe,KAAK,gBAAgB,CAC1C,EACA,SAAU,CACT,GAAGC,EAAUC,EAAcC,EAAkBC,EAAYC,CAAiB,EAC1E,gBAA2B,CACnB,MAAA,CACN,CACC,GAAI,uBACJ,MAAO,KAAK,QAAQ,SACnB,iEACD,EACA,KAAM,KAAK,yBAAyB,KACpC,UAAW,KAAK,yBAAyB,MACzC,QACC,KAAK,6BAA+B,UACjC,KAAK,QAAQ,SACb,+EAAA,EAEA,IACL,EACA,CACC,GAAI,mBACJ,MAAO,KA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AA,CAAA,EAAA,gBAlBTO,EAAAM,EAAAb,EAAA,QAAA,SAAA,+DAAA,CAAA,EAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,EAAA,EAAA,CAAA,SAAA,CAAA,iGAAA,CAAA,CAAA,CAAA,UAyBYI,EAzBZ,IAAA,CAAAK,EA0BWK,EAAO,CACX,MAAKC,EA3BZ,CA2BsBC,CAAoBhB,EAAA,OAAA,QAAA,EAAAA,EAAA,cAAA,EAAA,KAAA,QA3B1C,QA6B8FY,EAAAZ,EAAA,qBAAA,CAAA,SAAA,CAAA,CAAA,EAAA,gBA7B9FO,EAAAM,EAAAb,EAAA,QAAA,SAAA,gEAAA,CAAA,EAAA,CAAA,CAAA,CAAA,KAAA,EAAA,EAAA,CAAA,QAAA,SAAA,CAAA,CAAA,CAAA,sBAAA,CAAA,CAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"ExecutionsInfoAccordion-H3fj26pu.js","sources":["../../src/components/ExecutionsView/ExecutionsInfoAccordion.vue"],"sourcesContent":["<template>\n\t<n8n-info-accordion\n\t\t:class=\"[$style.accordion, 'mt-2xl']\"\n\t\t:title=\"$locale.baseText('executionsLandingPage.emptyState.accordion.title')\"\n\t\t:items=\"accordionItems\"\n\t\t:initially-expanded=\"shouldExpandAccordion\"\n\t\t:header-icon=\"accordionIcon\"\n\t\t@click:body=\"onAccordionClick\"\n\t\t@tooltipClick=\"onItemTooltipClick\"\n\t>\n\t\t<template #customContent>\n\t\t\t<footer class=\"mt-2xs\">\n\t\t\t\t{{ $locale.baseText('executionsLandingPage.emptyState.accordion.footer') }}\n\t\t\t\t<n8n-tooltip :disabled=\"!isNewWorkflow\">\n\t\t\t\t\t<template #content>\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t<n8n-link @click.prevent=\"onSaveWorkflowClick\">{{\n\t\t\t\t\t\t\t\t$locale.baseText('executionsLandingPage.emptyState.accordion.footer.tooltipLink')\n\t\t\t\t\t\t\t}}</n8n-link>\n\t\t\t\t\t\t\t{{\n\t\t\t\t\t\t\t\t$locale.baseText('executionsLandingPage.emptyState.accordion.footer.tooltipText')\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</template>\n\t\t\t\t\t<n8n-link\n\t\t\t\t\t\t:class=\"{ [$style.disabled]: isNewWorkflow }\"\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t@click.prevent=\"openWorkflowSettings\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{{ $locale.baseText('executionsLandingPage.emptyState.accordion.footer.settingsLink') }}\n\t\t\t\t\t</n8n-link>\n\t\t\t\t</n8n-tooltip>\n\t\t\t</footer>\n\t\t</template>\n\t</n8n-info-accordion>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent } from 'vue';\nimport { mapStores } from 'pinia';\nimport { useRootStore } from '@/stores/n8nRoot.store';\nimport { useSettingsStore } from '@/stores/settings.store';\nimport { useUIStore } from '@/stores/ui.store';\nimport { useWorkflowsStore } from '@/stores/workflows.store';\nimport { PLACEHOLDER_EMPTY_WORKFLOW_ID, WORKFLOW_SETTINGS_MODAL_KEY } from '@/constants';\nimport type { IWorkflowSettings } from 'n8n-workflow';\nimport { deepCopy } from 'n8n-workflow';\nimport { useWorkflowHelpers } from '@/composables/useWorkflowHelpers';\nimport { useRouter } from 'vue-router';\n\ninterface IWorkflowSaveSettings {\n\tsaveFailedExecutions: boolean;\n\tsaveSuccessfulExecutions: boolean;\n\tsaveTestExecutions: boolean;\n}\n\nexport default defineComponent({\n\tname: 'ExecutionsInfoAccordion',\n\tprops: {\n\t\tinitiallyExpanded: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\tsetup() {\n\t\tconst router = useRouter();\n\t\tconst workflowHelpers = useWorkflowHelpers({ router });\n\n\t\treturn {\n\t\t\tworkflowHelpers,\n\t\t};\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tdefaultValues: {\n\t\t\t\tsaveFailedExecutions: 'all',\n\t\t\t\tsaveSuccessfulExecutions: 'all',\n\t\t\t\tsaveManualExecutions: false,\n\t\t\t},\n\t\t\tworkflowSaveSettings: {\n\t\t\t\tsaveFailedExecutions: false,\n\t\t\t\tsaveSuccessfulExecutions: false,\n\t\t\t\tsaveTestExecutions: false,\n\t\t\t} as IWorkflowSaveSettings,\n\t\t};\n\t},\n\twatch: {\n\t\tworkflowSettings(newSettings: IWorkflowSettings) {\n\t\t\tthis.updateSettings(newSettings);\n\t\t},\n\t},\n\tmounted() {\n\t\tthis.defaultValues.saveFailedExecutions = this.settingsStore.saveDataErrorExecution;\n\t\tthis.defaultValues.saveSuccessfulExecutions = this.settingsStore.saveDataSuccessExecution;\n\t\tthis.defaultValues.saveManualExecutions = this.settingsStore.saveManualExecutions;\n\t\tthis.updateSettings(this.workflowSettings);\n\t},\n\tcomputed: {\n\t\t...mapStores(useRootStore, useSettingsStore, useUIStore, useWorkflowsStore),\n\t\taccordionItems(): object[] {\n\t\t\treturn [\n\t\t\t\t{\n\t\t\t\t\tid: 'productionExecutions',\n\t\t\t\t\tlabel: this.$locale.baseText(\n\t\t\t\t\t\t'executionsLandingPage.emptyState.accordion.productionExecutions',\n\t\t\t\t\t),\n\t\t\t\t\ticon: this.productionExecutionsIcon.icon,\n\t\t\t\t\ticonColor: this.productionExecutionsIcon.color,\n\t\t\t\t\ttooltip:\n\t\t\t\t\t\tthis.productionExecutionsStatus === 'unknown'\n\t\t\t\t\t\t\t? this.$locale.baseText(\n\t\t\t\t\t\t\t\t\t'executionsLandingPage.emptyState.accordion.productionExecutionsWarningTooltip',\n\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t: null,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: 'manualExecutions',\n\t\t\t\t\tlabel: this.$locale.baseText('executionsLandingPage.emptyState.accordion.testExecutions'),\n\t\t\t\t\ticon: this.workflowSaveSettings.saveTestExecutions ? 'check' : 'times',\n\t\t\t\t\ticonColor: this.workflowSaveSettings.saveTestExecutions ? 'success' : 'danger',\n\t\t\t\t},\n\t\t\t];\n\t\t},\n\t\tshouldExpandAccordion(): boolean {\n\t\t\tif (!this.initiallyExpanded) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn (\n\t\t\t\t!this.workflowSaveSettings.saveFailedExecutions ||\n\t\t\t\t!this.workflowSaveSettings.saveSuccessfulExecutions ||\n\t\t\t\t!this.workflowSaveSettings.saveTestExecutions\n\t\t\t);\n\t\t},\n\t\tproductionExecutionsIcon(): { icon: string; color: string } {\n\t\t\tif (this.productionExecutionsStatus === 'saving') {\n\t\t\t\treturn { icon: 'check', color: 'success' };\n\t\t\t} else if (this.productionExecutionsStatus === 'not-saving') {\n\t\t\t\treturn { icon: 'times', color: 'danger' };\n\t\t\t}\n\t\t\treturn { icon: 'exclamation-triangle', color: 'warning' };\n\t\t},\n\t\tproductionExecutionsStatus(): string {\n\t\t\tif (\n\t\t\t\tthis.workflowSaveSettings.saveSuccessfulExecutions ===\n\t\t\t\tthis.workflowSaveSettings.saveFailedExecutions\n\t\t\t) {\n\t\t\t\tif (this.workflowSaveSettings.saveSuccessfulExecutions) {\n\t\t\t\t\treturn 'saving';\n\t\t\t\t}\n\t\t\t\treturn 'not-saving';\n\t\t\t} else {\n\t\t\t\treturn 'unknown';\n\t\t\t}\n\t\t},\n\t\tworkflowSettings(): IWorkflowSettings {\n\t\t\tconst workflowSettings = deepCopy(this.workflowsStore.workflowSettings);\n\t\t\treturn workflowSettings;\n\t\t},\n\t\taccordionIcon(): { icon: string; color: string } | null {\n\t\t\tif (\n\t\t\t\t!this.workflowSaveSettings.saveTestExecutions ||\n\t\t\t\tthis.productionExecutionsStatus !== 'saving'\n\t\t\t) {\n\t\t\t\treturn { icon: 'exclamation-triangle', color: 'warning' };\n\t\t\t}\n\t\t\treturn null;\n\t\t},\n\t\tcurrentWorkflowId(): string {\n\t\t\treturn this.workflowsStore.workflowId;\n\t\t},\n\t\tisNewWorkflow(): boolean {\n\t\t\treturn (\n\t\t\t\t!this.currentWorkflowId ||\n\t\t\t\tthis.currentWorkflowId === PLACEHOLDER_EMPTY_WORKFLOW_ID ||\n\t\t\t\tthis.currentWorkflowId === 'new'\n\t\t\t);\n\t\t},\n\t\tworkflowName(): string {\n\t\t\treturn this.workflowsStore.workflowName;\n\t\t},\n\t\tcurrentWorkflowTagIds(): string[] {\n\t\t\treturn this.workflowsStore.workflowTags;\n\t\t},\n\t},\n\tmethods: {\n\t\tupdateSettings(workflowSettings: IWorkflowSettings): void {\n\t\t\tthis.workflowSaveSettings.saveFailedExecutions =\n\t\t\t\tworkflowSettings.saveDataErrorExecution === undefined\n\t\t\t\t\t? this.defaultValues.saveFailedExecutions === 'all'\n\t\t\t\t\t: workflowSettings.saveDataErrorExecution === 'all';\n\t\t\tthis.workflowSaveSettings.saveSuccessfulExecutions =\n\t\t\t\tworkflowSettings.saveDataSuccessExecution === undefined\n\t\t\t\t\t? this.defaultValues.saveSuccessfulExecutions === 'all'\n\t\t\t\t\t: workflowSettings.saveDataSuccessExecution === 'all';\n\t\t\tthis.workflowSaveSettings.saveTestExecutions =\n\t\t\t\tworkflowSettings.saveManualExecutions === undefined\n\t\t\t\t\t? this.defaultValues.saveManualExecutions\n\t\t\t\t\t: (workflowSettings.saveManualExecutions as boolean);\n\t\t},\n\t\tonAccordionClick(event: MouseEvent): void {\n\t\t\tif (event.target instanceof HTMLAnchorElement) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tthis.uiStore.openModal(WORKFLOW_SETTINGS_MODAL_KEY);\n\t\t\t}\n\t\t},\n\t\tonItemTooltipClick(item: string, event: MouseEvent): void {\n\t\t\tif (item === 'productionExecutions' && event.target instanceof HTMLAnchorElement) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tthis.uiStore.openModal(WORKFLOW_SETTINGS_MODAL_KEY);\n\t\t\t}\n\t\t},\n\t\topenWorkflowSettings(event: MouseEvent): void {\n\t\t\tthis.uiStore.openModal(WORKFLOW_SETTINGS_MODAL_KEY);\n\t\t},\n\t\tasync onSaveWorkflowClick(event: MouseEvent): void {\n\t\t\tlet currentId = undefined;\n\t\t\tif (this.currentWorkflowId !== PLACEHOLDER_EMPTY_WORKFLOW_ID) {\n\t\t\t\tcurrentId = this.currentWorkflowId;\n\t\t\t} else if (this.$route.params.name && this.$route.params.name !== 'new') {\n\t\t\t\tcurrentId = this.$route.params.name;\n\t\t\t}\n\t\t\tconst saved = await this.workflowHelpers.saveCurrentWorkflow({\n\t\t\t\tid: currentId,\n\t\t\t\tname: this.workflowName,\n\t\t\t\ttags: this.currentWorkflowTagIds,\n\t\t\t});\n\t\t\tif (saved) await this.settingsStore.fetchPromptsData();\n\t\t},\n\t},\n});\n</script>\n\n<style module lang=\"scss\">\n.accordion {\n\tbackground: none;\n\twidth: 320px;\n\n\t// Accordion header\n\t& > div:nth-child(1) {\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\t\tpadding: var(--spacing-xs);\n\t\twidth: 100%;\n\t\tuser-select: none;\n\t\tcolor: var(--color-text-base) !important;\n\t}\n\n\t// Accordion description\n\t& > div:nth-child(2) {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\twidth: 100%;\n\t\tpadding: 0 var(--spacing-l) var(--spacing-s) !important;\n\n\t\tspan {\n\t\t\twidth: 100%;\n\t\t}\n\t}\n\n\tfooter {\n\t\ttext-align: left;\n\t\twidth: 100%;\n\t\tfont-size: var(--font-size-2xs);\n\t}\n\n\t.disabled a {\n\t\tcolor: currentColor;\n\t\tcursor: not-allowed;\n\t\topacity: 0.5;\n\t\ttext-decoration: none;\n\t}\n}\n</style>\n"],"names":["_sfc_main","defineComponent","router","useRouter","useWorkflowHelpers","newSettings","mapStores","useRootStore","useSettingsStore","useUIStore","useWorkflowsStore","deepCopy","PLACEHOLDER_EMPTY_WORKFLOW_ID","workflowSettings","event","WORKFLOW_SETTINGS_MODAL_KEY","item","currentId","_component_n8n_info_accordion","_resolveComponent","_openBlock","_createBlock","accordionItems","_ctx","shouldExpandAccordion","onAccordionClick","onItemTooltipClick","_withCtx","_createElementVNode","_hoisted_1","_createTextVNode","isNewWorkflow","_createVNode","_component_n8n_tooltip","onSaveWorkflowClick","_withModifiers","_toDisplayString","_component_n8n_link","_normalizeClass","openWorkflowSettings"],"mappings":"iSAwDA,MAAAA,EAAeC,EAAgB,CAC9B,KAAM,0BACN,MAAO,CACN,kBAAmB,CAClB,KAAM,QACN,QAAS,EACV,CACD,EACA,OAAQ,CACP,MAAMC,EAASC,IAGR,MAAA,CACN,gBAHuBC,EAAmB,CAAE,OAAAF,CAAQ,CAAA,CAGpD,CAEF,EACA,MAAO,CACC,MAAA,CACN,cAAe,CACd,qBAAsB,MACtB,yBAA0B,MAC1B,qBAAsB,EACvB,EACA,qBAAsB,CACrB,qBAAsB,GACtB,yBAA0B,GAC1B,mBAAoB,EACrB,CAAA,CAEF,EACA,MAAO,CACN,iBAAiBG,EAAgC,CAChD,KAAK,eAAeA,CAAW,CAChC,CACD,EACA,SAAU,CACJ,KAAA,cAAc,qBAAuB,KAAK,cAAc,uBACxD,KAAA,cAAc,yBAA2B,KAAK,cAAc,yBAC5D,KAAA,cAAc,qBAAuB,KAAK,cAAc,qBACxD,KAAA,eAAe,KAAK,gBAAgB,CAC1C,EACA,SAAU,CACT,GAAGC,EAAUC,EAAcC,EAAkBC,EAAYC,CAAiB,EAC1E,gBAA2B,CACnB,MAAA,CACN,CACC,GAAI,uBACJ,MAAO,KAAK,QAAQ,SACnB,iEACD,EACA,KAAM,KAAK,yBAAyB,KACpC,UAAW,KAAK,yBAAyB,MACzC,QACC,KAAK,6BAA+B,UACjC,KAAK,QAAQ,SACb,+EAAA,EAEA,IACL,EACA,CACC,GAAI,mBACJ,MAAO,KAAK,QAAQ,SAAS,2DAA2D,EACxF,KAAM,KAAK,qBAAqB,mBAAqB,QAAU,QAC/D,UAAW,KAAK,qBAAqB,mBAAqB,UAAY,QACvE,CAAA,CAEF,EACA,uBAAiC,CAC5B,OAAC,KAAK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AAA,CAAA,UAyBYI,EAzBZ,IAAA,CAAAK,EA0BWK,EAAO,CACX,MAAKC,EA3BZ,CA2BsBC,CAAoBhB,EAAA,OAAA,QAAA,EAAAA,EAAA,cAAA,EAAA,KAAA,QA3B1C,QA6B8FY,EAAAZ,EAAA,qBAAA,CAAA,SAAA,CAAA,CAAA,EAAA,gBA7B9FO,EAAAM,EAAAb,EAAA,QAAA,SAAA,gEAAA,CAAA,EAAA,CAAA,CAAA,CAAA,KAAA,EAAA,EAAA,CAAA,QAAA,SAAA,CAAA,CAAA,CAAA,sBAAA,CAAA,CAAA,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{v as _,u as f,a3 as x,V as p,_ as h}from"./n8n-G5ZIZCy5.js";import{m as k}from"./pinia-UPmhnKmF.js";import{E as w}from"./ExecutionsInfoAccordion-
|
|
2
|
-
//# sourceMappingURL=ExecutionsLandingPage-
|
|
1
|
+
import{v as _,u as f,a3 as x,V as p,_ as h}from"./n8n-G5ZIZCy5.js";import{m as k}from"./pinia-UPmhnKmF.js";import{E as w}from"./ExecutionsInfoAccordion-H3fj26pu.js";import{v as S,f as t,h as n,y as l,K as o,E as s,J as r,I as a,H as y,a6 as i}from"./vendor-VXT4wwt2.js";import"./lodash-es-xYzII6mS.js";import"./axios-s2RMMPhA.js";import"./flatted-jPn12Tq4.js";import"./esprima-next-ulPLCZ1Z.js";import"./luxon-ZRIU05qF.js";import"./@vueuse/core-4MtarU7n.js";import"./uuid-McvpxQtQ.js";import"./vue-i18n-ZIlZf-IE.js";import"./@n8n/permissions-8yMqUF1Y.js";import"./index-4C1AxeXk.js";import"./@n8n/codemirror-lang-sql-A8tNeQAo.js";import"./@lezer/common-1hBQ1gIF.js";import"./prettier-s3fE3Qyr.js";import"./@jsplumb/util-DR0SB56A.js";import"./@jsplumb/core-MKwKlGip.js";import"./@jsplumb/common-Q5_tv_GT.js";import"./@jsplumb/connector-bezier-3dWY17R5.js";import"./@jsplumb/browser-ui-AlqFM-P6.js";import"./codemirror-lang-html-n8n-aqAgigXU.js";import"./codemirror-lang-n8n-expression-7tlJbTJw.js";import"./fast-json-stable-stringify-4gflVid-.js";import"./timeago.js--Bumj2r9.js";import"./qrcode.vue-t9lCVWTj.js";import"./vue3-touch-events-_RfbPMOD.js";import"./chart.js-JtqvIvkt.js";const E=S({name:"ExecutionsLandingPage",components:{ExecutionsInfoAccordion:w},computed:{...k(f,_),executionCount(){return this.workflowsStore.currentWorkflowExecutions.length},containsTrigger(){return this.workflowsStore.workflowTriggerNodes.length>0}},methods:{onSetupFirstStep(e){this.uiStore.addFirstStepOnLoad=!0;const c=this.getWorkflowRoute();this.$router.push(c)},getWorkflowRoute(){const e=this.workflowsStore.workflowId||this.$route.params.name;return e===x?{name:p.NEW_WORKFLOW,params:{}}:{name:p.WORKFLOW,params:{name:e}}}}}),C="_container_acx6b_1",$="_messageContainer_acx6b_11",b="_icon_acx6b_22",L={container:C,messageContainer:$,icon:b},T={key:0},W={key:1};function v(e,c,O,P,R,F){const m=i("n8n-heading"),u=i("n8n-text"),d=i("n8n-button"),g=i("ExecutionsInfoAccordion");return t(),n("div",{class:l(["workflow-executions-container",e.$style.container])},[e.executionCount===0?(t(),n("div",{key:0,class:l([e.$style.messageContainer,e.$style.noExecutionsMessage])},[e.containsTrigger?(t(),n("div",W,[o(m,{tag:"h2",size:"xlarge",color:"text-dark",class:"mb-2xs"},{default:s(()=>[r(a(e.$locale.baseText("executionsLandingPage.emptyState.heading")),1)]),_:1}),o(g)])):(t(),n("div",T,[o(m,{tag:"h2",size:"xlarge",color:"text-dark",class:"mb-2xs"},{default:s(()=>[r(a(e.$locale.baseText("executionsLandingPage.emptyState.noTrigger.heading")),1)]),_:1}),o(u,{size:"medium"},{default:s(()=>[r(a(e.$locale.baseText("executionsLandingPage.emptyState.message")),1)]),_:1}),o(d,{class:"mt-l",type:"tertiary",size:"large",onClick:e.onSetupFirstStep},{default:s(()=>[r(a(e.$locale.baseText("executionsLandingPage.emptyState.noTrigger.buttonText")),1)]),_:1},8,["onClick"])]))],2)):y("",!0)],2)}const I={$style:L},le=h(E,[["render",v],["__cssModules",I]]);export{le as default};
|
|
2
|
+
//# sourceMappingURL=ExecutionsLandingPage-7qAKHfBe.js.map
|
package/dist/assets/{ExecutionsLandingPage-S5UN8vIw.js.map → ExecutionsLandingPage-7qAKHfBe.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExecutionsLandingPage-
|
|
1
|
+
{"version":3,"file":"ExecutionsLandingPage-7qAKHfBe.js","sources":["../../src/components/ExecutionsView/ExecutionsLandingPage.vue"],"sourcesContent":["<template>\n\t<div :class=\"['workflow-executions-container', $style.container]\">\n\t\t<div v-if=\"executionCount === 0\" :class=\"[$style.messageContainer, $style.noExecutionsMessage]\">\n\t\t\t<div v-if=\"!containsTrigger\">\n\t\t\t\t<n8n-heading tag=\"h2\" size=\"xlarge\" color=\"text-dark\" class=\"mb-2xs\">\n\t\t\t\t\t{{ $locale.baseText('executionsLandingPage.emptyState.noTrigger.heading') }}\n\t\t\t\t</n8n-heading>\n\t\t\t\t<n8n-text size=\"medium\">\n\t\t\t\t\t{{ $locale.baseText('executionsLandingPage.emptyState.message') }}\n\t\t\t\t</n8n-text>\n\t\t\t\t<n8n-button class=\"mt-l\" type=\"tertiary\" size=\"large\" @click=\"onSetupFirstStep\">\n\t\t\t\t\t{{ $locale.baseText('executionsLandingPage.emptyState.noTrigger.buttonText') }}\n\t\t\t\t</n8n-button>\n\t\t\t</div>\n\t\t\t<div v-else>\n\t\t\t\t<n8n-heading tag=\"h2\" size=\"xlarge\" color=\"text-dark\" class=\"mb-2xs\">\n\t\t\t\t\t{{ $locale.baseText('executionsLandingPage.emptyState.heading') }}\n\t\t\t\t</n8n-heading>\n\t\t\t\t<ExecutionsInfoAccordion />\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</template>\n\n<script lang=\"ts\">\nimport { PLACEHOLDER_EMPTY_WORKFLOW_ID, VIEWS } from '@/constants';\nimport { useUIStore } from '@/stores/ui.store';\nimport { useWorkflowsStore } from '@/stores/workflows.store';\nimport { mapStores } from 'pinia';\nimport { defineComponent } from 'vue';\nimport ExecutionsInfoAccordion from './ExecutionsInfoAccordion.vue';\n\nexport default defineComponent({\n\tname: 'ExecutionsLandingPage',\n\tcomponents: {\n\t\tExecutionsInfoAccordion,\n\t},\n\tcomputed: {\n\t\t...mapStores(useUIStore, useWorkflowsStore),\n\t\texecutionCount(): number {\n\t\t\treturn this.workflowsStore.currentWorkflowExecutions.length;\n\t\t},\n\t\tcontainsTrigger(): boolean {\n\t\t\treturn this.workflowsStore.workflowTriggerNodes.length > 0;\n\t\t},\n\t},\n\tmethods: {\n\t\tonSetupFirstStep(event: MouseEvent): void {\n\t\t\tthis.uiStore.addFirstStepOnLoad = true;\n\t\t\tconst workflowRoute = this.getWorkflowRoute();\n\t\t\tvoid this.$router.push(workflowRoute);\n\t\t},\n\t\tgetWorkflowRoute(): { name: string; params: {} } {\n\t\t\tconst workflowId = this.workflowsStore.workflowId || this.$route.params.name;\n\t\t\tif (workflowId === PLACEHOLDER_EMPTY_WORKFLOW_ID) {\n\t\t\t\treturn { name: VIEWS.NEW_WORKFLOW, params: {} };\n\t\t\t} else {\n\t\t\t\treturn { name: VIEWS.WORKFLOW, params: { name: workflowId } };\n\t\t\t}\n\t\t},\n\t},\n});\n</script>\n\n<style module lang=\"scss\">\n.container {\n\twidth: 100%;\n\theight: 100%;\n\tflex: 1;\n\tbackground-color: var(--color-background-light);\n\tdisplay: flex;\n\tflex-direction: column;\n\talign-items: center;\n}\n\n.messageContainer {\n\tmargin-top: var(--spacing-4xl);\n\tcolor: var(--color-text-base);\n\n\tdiv {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\talign-items: center;\n\t\ttext-align: center;\n\t}\n}\n\n.icon {\n\tfont-size: 24px;\n\tcolor: var(--color-foreground-dark);\n}\n</style>\n"],"names":["_sfc_main","defineComponent","ExecutionsInfoAccordion","mapStores","useUIStore","useWorkflowsStore","event","workflowRoute","workflowId","PLACEHOLDER_EMPTY_WORKFLOW_ID","VIEWS","_component_ExecutionsInfoAccordion","_resolveComponent","executionCount","_ctx","_openBlock","_createElementBlock","$style","containsTrigger","_hoisted_2","_createVNode","_component_n8n_heading","_createTextVNode","_toDisplayString","_hoisted_1","_component_n8n_text","$locale","_withCtx","_component_n8n_button","_createCommentVNode"],"mappings":"+pCAgCA,MAAAA,EAAeC,EAAgB,CAC9B,KAAM,wBACN,WAAY,CACX,wBAAAC,CACD,EACA,SAAU,CACT,GAAGC,EAAUC,EAAYC,CAAiB,EAC1C,gBAAyB,CACjB,OAAA,KAAK,eAAe,0BAA0B,MACtD,EACA,iBAA2B,CACnB,OAAA,KAAK,eAAe,qBAAqB,OAAS,CAC1D,CACD,EACA,QAAS,CACR,iBAAiBC,EAAyB,CACzC,KAAK,QAAQ,mBAAqB,GAC5B,MAAAC,EAAgB,KAAK,mBACtB,KAAK,QAAQ,KAAKA,CAAa,CACrC,EACA,kBAAiD,CAChD,MAAMC,EAAa,KAAK,eAAe,YAAc,KAAK,OAAO,OAAO,KACxE,OAAIA,IAAeC,EACX,CAAE,KAAMC,EAAM,aAAc,OAAQ,CAAG,CAAA,EAEvC,CAAE,KAAMA,EAAM,SAAU,OAAQ,CAAE,KAAMF,GAEjD,CACD,CACD,CAAC,4NAxCMG,EAAAC,EAAA,yBAAA,4BAnBMC,EAAc,CAAA,gCAAAC,EAAA,OAAA,SAAA,CAAA,CAAA,EAAA,CAF3BA,EAAA,iBAAA,GAAAC,EAAA,EAAAC,EAE4CC,MAAO,CAAA,IAAA,QACpCC,EAAe,CAAAJ,EAAA,OAAA,iBAAAA,EAAA,OAAA,mBAAA,CAAA,CAAA,EAAA,CAC1BA,EAAA,iBAUDC,EACsB,EAAAC,EAAA,MAAAG,EAAA,CAAAC,EAAMC,EAAQ,CAAC,IAAK,KAAa,KAAK,SAAA,MAAA,YAf/D,MAAA,QAAA,EAAA,gBAAAC,EAAAC,EAAAT,EAAA,QAAA,SAAA,0CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,EAkBI,EAAA,CAAA,CAAA,MAlBJ,CAAA,IAIIC,EAAqB,EAAAC,EAAA,MAAAQ,EAAA,CAAAJ,EAAMC,EAAQ,CAAC,IAAK,KAAa,KAAK,SAAA,MAAA,YAJ/D,MAAA,QAAA,EAAA,gBAAAC,EAAAC,EAAAT,EAAA,QAAA,SAAA,oDAAA,CAAA,EAAA,CAAA,CAAA,CAAA,EAOI,EAAA,CAAA,CAAA,EAPJM,EAAAK,EAAA,CAAA,KAQQC,QAAQ,EAAA,CAAA,QAAAC,EAAA,IAAA,CARhBL,EAAAC,EAAAT,EAAA,QAAA,SAAA,0CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,EAUI,EAAA,CAAA,CAAA,IAA8Bc,EAAU,CAAC,MAAK,OAAS,KAAA,WAAA,KAAA,QAV3D,QAAAd,EAAA,gBAAA,EAAA,gBAAAQ,EAAAC,EAAAT,EAAA,QAAA,SAAA,uDAAA,CAAA,EAAA,CAAA,CAAA,CAAA,KAcG,EAAA,EAAA,CAAA,SAAA,CAAA,CAAA,CAAA,EAdH,EAAA,CAAA,GAAAe,EAAA,GAAA,EAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{m as b}from"./pinia-UPmhnKmF.js";import{e as W}from"./executionsHelpers-7_cXd8a_.js";import{V as m,_ as I,v as A,u as C,aB as D,e as N,l as O,y as F,a3 as R,M as U,a9 as V,fx as P,fC as B,a6 as H,a2 as z,a8 as X}from"./n8n-G5ZIZCy5.js";import{E as q,a as G}from"./ExecutionFilter-bhanFEvf.js";import{v as T,f as u,h as v,K as d,E,i as S,J as k,I as y,y as c,D as $,H as g,a6 as h,F as j,_ as K,at as Y}from"./vendor-VXT4wwt2.js";import{E as J}from"./ExecutionsInfoAccordion-8y0XuFEi.js";import{a as Q,b as Z,u as ee,ay as te,I as oe}from"./index-vdh5hVg3.js";import{v as se}from"./uuid-McvpxQtQ.js";import{_ as ie}from"./lodash-es-xYzII6mS.js";import"./dateFormatter-7nt2saFg.js";import"./axios-s2RMMPhA.js";import"./flatted-jPn12Tq4.js";import"./esprima-next-ulPLCZ1Z.js";import"./luxon-ZRIU05qF.js";import"./@vueuse/core-4MtarU7n.js";import"./vue-i18n-ZIlZf-IE.js";import"./@n8n/permissions-8yMqUF1Y.js";import"./@n8n/codemirror-lang-sql-A8tNeQAo.js";import"./@lezer/common-1hBQ1gIF.js";import"./prettier-s3fE3Qyr.js";import"./@jsplumb/util-DR0SB56A.js";import"./@jsplumb/core-MKwKlGip.js";import"./@jsplumb/common-Q5_tv_GT.js";import"./@jsplumb/connector-bezier-3dWY17R5.js";import"./@jsplumb/browser-ui-AlqFM-P6.js";import"./codemirror-lang-html-n8n-aqAgigXU.js";import"./codemirror-lang-n8n-expression-7tlJbTJw.js";import"./fast-json-stable-stringify-4gflVid-.js";import"./timeago.js--Bumj2r9.js";import"./qrcode.vue-t9lCVWTj.js";import"./vue3-touch-events-_RfbPMOD.js";import"./chart.js-JtqvIvkt.js";const ne=T({name:"ExecutionCard",components:{ExecutionTime:q},mixins:[W],props:{execution:{type:Object,required:!0},highlight:{type:Boolean,default:!1},showGap:{type:Boolean,default:!1}},data(){return{VIEWS:m}},computed:{retryExecutionActions(){return[{id:"current-workflow",label:this.$locale.baseText("executionsList.retryWithCurrentlySavedWorkflow")},{id:"original-workflow",label:this.$locale.baseText("executionsList.retryWithOriginalWorkflow")}]},executionUIDetails(){return this.getExecutionUIDetails(this.execution)},isActive(){return this.execution.id===this.$route.params.executionId}},methods:{onRetryMenuItemSelect(e){this.$emit("retryExecution",{execution:this.execution,command:e})}}}),re="_executionCard_23l4d_1",ae="_active_23l4d_6",le="_executionStatus_23l4d_9",ce="_executionLink_23l4d_12",ue="_running_23l4d_15",he="_spinner_23l4d_15",de="_statusLabel_23l4d_22",fe="_success_23l4d_26",we="_waiting_23l4d_29",me="_error_23l4d_35",pe="_unknown_23l4d_41",xe="_icon_23l4d_57",Ee="_icons_23l4d_62",ye="_retry_23l4d_70",ge="_manual_23l4d_73",ke="_showGap_23l4d_81",ve={executionCard:re,active:ae,executionStatus:le,executionLink:ce,running:ue,spinner:he,statusLabel:de,success:fe,waiting:we,error:me,unknown:pe,icon:xe,icons:Ee,retry:ye,manual:ge,showGap:ke},$e={key:0};function Se(e,t,s,o,i,n){const a=h("n8n-text"),l=h("n8n-spinner"),r=h("ExecutionTime"),f=h("n8n-action-dropdown"),_=h("font-awesome-icon"),p=h("n8n-tooltip"),x=h("router-link");return u(),v("div",{class:c({"execution-card":!0,[e.$style.executionCard]:!0,[e.$style.active]:e.isActive,[e.$style[e.executionUIDetails.name]]:!0,[e.$style.highlight]:e.highlight,[e.$style.showGap]:e.showGap})},[d(x,{class:c(e.$style.executionLink),to:{name:e.VIEWS.EXECUTION_PREVIEW,params:{name:e.currentWorkflow,executionId:e.execution.id}},"data-test-execution-status":e.executionUIDetails.name},{default:E(()=>[S("div",{class:c(e.$style.description)},[d(a,{color:"text-dark",bold:!0,size:"medium","data-test-id":"execution-time"},{default:E(()=>[k(y(e.executionUIDetails.startTime),1)]),_:1}),S("div",{class:c(e.$style.executionStatus)},[e.executionUIDetails.name==="running"?(u(),$(l,{key:0,size:"small",class:c([e.$style.spinner,"mr-4xs"])},null,8,["class"])):g("",!0),d(a,{class:c(e.$style.statusLabel),size:"small"},{default:E(()=>[k(y(e.executionUIDetails.label),1)]),_:1},8,["class"]),k(" "+y(" ")+" "),e.executionUIDetails.name==="running"?(u(),$(a,{key:1,color:e.isActive?"text-dark":"text-base",size:"small"},{default:E(()=>[k(y(e.$locale.baseText("executionDetails.runningTimeRunning"))+" ",1),d(r,{"start-time":e.execution.startedAt},null,8,["start-time"])]),_:1},8,["color"])):e.executionUIDetails.runningTime!==""?(u(),$(a,{key:2,color:e.isActive?"text-dark":"text-base",size:"small"},{default:E(()=>{var w;return[k(y(e.$locale.baseText("executionDetails.runningTimeFinished",{interpolate:{time:(w=e.executionUIDetails)==null?void 0:w.runningTime}})),1)]}),_:1},8,["color"])):g("",!0)],2),e.execution.mode==="retry"?(u(),v("div",$e,[d(a,{color:e.isActive?"text-dark":"text-base",size:"small"},{default:E(()=>[k(y(e.$locale.baseText("executionDetails.retry"))+" #"+y(e.execution.retryOf),1)]),_:1},8,["color"])])):g("",!0)],2),S("div",{class:c(e.$style.icons)},[e.executionUIDetails.name==="error"?(u(),$(f,{key:0,class:c([e.$style.icon,e.$style.retry]),items:e.retryExecutionActions,"activator-icon":"redo","data-test-id":"retry-execution-button",onSelect:e.onRetryMenuItemSelect},null,8,["class","items","onSelect"])):g("",!0),e.execution.mode==="manual"?(u(),$(p,{key:1,placement:"top"},{content:E(()=>[S("span",null,y(e.$locale.baseText("executionsList.test")),1)]),default:E(()=>[e.execution.mode==="manual"?(u(),$(_,{key:0,class:c([e.$style.icon,e.$style.manual]),icon:"flask"},null,8,["class"])):g("",!0)]),_:1})):g("",!0)],2)]),_:1},8,["class","to","data-test-execution-status"])],2)}const _e={$style:ve},Ie=I(ne,[["render",Se],["__cssModules",_e]]),Te=T({name:"ExecutionsSidebar",components:{ExecutionCard:Ie,ExecutionsInfoAccordion:J,ExecutionFilter:G},props:{autoRefresh:{type:Boolean,default:!1},executions:{type:Array,required:!0},loading:{type:Boolean,default:!0},loadingMore:{type:Boolean,default:!1},temporaryExecution:{type:Object,default:null}},data(){return{VIEWS:m,filter:{}}},computed:{...b(C,A)},watch:{$route(e,t){t.name===m.EXECUTION_PREVIEW&&e.name===m.EXECUTION_HOME&&this.$router.go(-1)}},mounted(){this.checkListSize(),this.scrollToActiveCard()},methods:{loadMore(e=20){if(!this.loading){const t=this.$refs.executionList;if(t){const s=t.offsetHeight-(t.scrollHeight-t.scrollTop);s>-10&&s<10&&this.$emit("loadMore",e)}}},onRetryExecution(e){this.$emit("retryExecution",e)},onRefresh(){this.$emit("refresh")},onFilterChanged(e){this.$emit("filterUpdated",e)},reloadExecutions(){this.$emit("reloadExecutions")},checkListSize(){var s;const e=this.$refs.container,t=this.$refs[`execution-${(s=this.workflowsStore.activeWorkflowExecution)==null?void 0:s.id}`];if(e&&(t!=null&&t.length)){const o=t[0].$el,i=Math.ceil(e.clientHeight/o.clientHeight);i>this.executions.length&&this.$emit("loadMore",i-this.executions.length)}},scrollToActiveCard(){var s;const e=this.$refs.executionList,t=this.$refs[`execution-${(s=this.workflowsStore.activeWorkflowExecution)==null?void 0:s.id}`];if(e&&(t!=null&&t.length)&&this.workflowsStore.activeWorkflowExecution){const i=t[0].$el.getBoundingClientRect(),n=200;i.top>e.offsetHeight&&e.scrollTo({top:i.top-n})}}}}),Re="_container_qg8we_1",be="_heading_qg8we_12",We="_controls_qg8we_19",Ae="_executionList_qg8we_31",Ce="_infoAccordion_qg8we_49",Le="_noResultsContainer_qg8we_61",Me={container:Re,heading:be,controls:We,executionList:Ae,infoAccordion:Ce,noResultsContainer:Le},De={key:0,class:"mr-l"},Ne={key:3,class:"mr-m"};function Oe(e,t,s,o,i,n){const a=h("n8n-heading"),l=h("el-checkbox"),r=h("ExecutionFilter"),f=h("n8n-loading"),_=h("n8n-text"),p=h("ExecutionCard"),x=h("ExecutionsInfoAccordion");return u(),v("div",{ref:"container",class:c(["executions-sidebar",e.$style.container]),"data-test-id":"executions-sidebar"},[S("div",{class:c(e.$style.heading)},[d(a,{tag:"h2",size:"medium",color:"text-dark"},{default:E(()=>[k(y(e.$locale.baseText("generic.executions")),1)]),_:1})],2),S("div",{class:c(e.$style.controls)},[d(l,{"model-value":e.autoRefresh,"data-test-id":"auto-refresh-checkbox","onUpdate:modelValue":t[0]||(t[0]=w=>e.$emit("update:autoRefresh",w))},{default:E(()=>[k(y(e.$locale.baseText("executionsList.autoRefresh")),1)]),_:1},8,["model-value"]),d(r,{"popover-placement":"left-start",onFilterChanged:e.onFilterChanged},null,8,["onFilterChanged"])],2),S("div",{ref:"executionList",class:c(e.$style.executionList),"data-test-id":"current-executions-list",onScroll:t[1]||(t[1]=w=>e.loadMore(20))},[e.loading?(u(),v("div",De,[d(f,{variant:"rect"})])):g("",!0),!e.loading&&e.executions.length===0?(u(),v("div",{key:1,class:c(e.$style.noResultsContainer)},[d(_,{color:"text-base",size:"medium",align:"center"},{default:E(()=>[k(y(e.$locale.baseText("executionsLandingPage.noResults")),1)]),_:1})],2)):e.temporaryExecution?(u(),$(p,{key:2,ref:`execution-${e.temporaryExecution.id}`,execution:e.temporaryExecution,"data-test-id":`execution-details-${e.temporaryExecution.id}`,"show-gap":!0,onRetryExecution:e.onRetryExecution},null,8,["execution","data-test-id","onRetryExecution"])):g("",!0),(u(!0),v(j,null,K(e.executions,w=>(u(),$(p,{key:w.id,ref_for:!0,ref:`execution-${w.id}`,execution:w,"data-test-id":`execution-details-${w.id}`,onRetryExecution:e.onRetryExecution},null,8,["execution","data-test-id","onRetryExecution"]))),128)),e.loadingMore?(u(),v("div",Ne,[d(f,{variant:"p",rows:1})])):g("",!0)],34),S("div",{class:c(e.$style.infoAccordion)},[d(x,{"initially-expanded":!1})],2)],2)}const Fe={$style:Me},Ue=I(Te,[["render",Oe],["__cssModules",Fe],["__scopeId","data-v-fae93cca"]]),Ve=5,Pe=100,Be=T({name:"ExecutionsList",components:{ExecutionsSidebar:Ue},mixins:[W],setup(){const e=X(),t=Y(),s=Q({router:t}),{callDebounced:o}=D();return{externalHooks:e,workflowHelpers:s,callDebounced:o,...N(),...Z()}},data(){return{loading:!1,loadingMore:!1,filter:{},temporaryExecution:null,autoRefresh:!1,autoRefreshTimeout:void 0}},computed:{...b(ee,F,O,C,A),hidePreview(){const e=this.filterApplied&&!this.executions.find(t=>{var s;return t.id===((s=this.activeExecution)==null?void 0:s.id)});return this.loading||!this.executions.length||e},filterApplied(){return this.filter.status!=="all"},workflowDataNotLoaded(){return this.workflowsStore.workflowId===R&&this.workflowsStore.workflowName===""},loadedFinishedExecutionsCount(){return this.workflowsStore.getAllLoadedFinishedExecutions.length},totalFinishedExecutionsCount(){return this.workflowsStore.getTotalFinishedExecutionsCount},requestFilter(){return te({...this.filter,workflowId:this.currentWorkflow})}},watch:{$route(e,t){if(e.params.name){const s=t.params.name!==e.params.name;this.initView(s)}if(e.params.executionId){const s=this.workflowsStore.getExecutionDataById(e.params.executionId);s&&(this.workflowsStore.activeWorkflowExecution=s)}}},async beforeRouteLeave(e,t,s){if(oe(e)===U.WORKFLOW){s();return}if(this.uiStore.stateIsDirty){const o=await this.confirm(this.$locale.baseText("generic.unsavedWork.confirmMessage.message"),{title:this.$locale.baseText("generic.unsavedWork.confirmMessage.headline"),type:"warning",confirmButtonText:this.$locale.baseText("generic.unsavedWork.confirmMessage.confirmButtonText"),cancelButtonText:this.$locale.baseText("generic.unsavedWork.confirmMessage.cancelButtonText"),showClose:!0});o===V?(await this.workflowHelpers.saveCurrentWorkflow({},!1)&&await this.settingsStore.fetchPromptsData(),this.uiStore.stateIsDirty=!1,s()):o===P&&(this.uiStore.stateIsDirty=!1,s())}else s()},created(){this.autoRefresh=this.uiStore.executionSidebarAutoRefresh},async mounted(){this.loading=!0;const e=this.$route.params.name!==this.workflowsStore.workflowId,t=this.$route.params.name==="new"&&this.workflowsStore.workflowId===R,s=e&&!t;if(await this.initView(s),!s)if(this.workflowsStore.currentWorkflowExecutions.length>0){const o=await this.loadExecutions();this.workflowsStore.addToCurrentExecutions(o),await this.setActiveExecution()}else await this.setExecutions();this.startAutoRefreshInterval(),document.addEventListener("visibilitychange",this.onDocumentVisibilityChange),this.loading=!1},beforeUnmount(){document.removeEventListener("visibilitychange",this.onDocumentVisibilityChange),this.autoRefresh=!1,this.stopAutoRefreshInterval()},methods:{async initView(e){e&&(await this.nodeTypesStore.loadNodeTypesIfNotLoaded(),await this.openWorkflow(this.$route.params.name),this.uiStore.nodeViewInitialized=!1,this.workflowsStore.currentWorkflowExecutions.length===0&&await this.setExecutions(),this.activeExecution&&this.$router.push({name:m.EXECUTION_PREVIEW,params:{name:this.currentWorkflow,executionId:this.activeExecution.id}}).catch(()=>{}))},async onLoadMore(){this.loadingMore||await this.callDebounced(this.loadMore,{debounceTime:1e3})},async loadMore(e=20){var i;if(this.filter.status==="running"||this.loadedFinishedExecutionsCount>=this.totalFinishedExecutionsCount)return;this.loadingMore=!0;let t;this.executions.length!==0&&(t=this.executions.slice(-1)[0].id);let s;try{s=await this.workflowsStore.getPastExecutions(this.requestFilter,e,t)}catch(n){this.loadingMore=!1,this.showError(n,this.$locale.baseText("executionsList.showError.loadMore.title"));return}s.results=s.results.map(n=>({...n,mode:n.mode}));const o=[...this.executions];for(const n of s.results)o.find(a=>a.id===n.id)===void 0&&o.push(n),n.id===((i=this.temporaryExecution)==null?void 0:i.id)&&(this.temporaryExecution=null);this.workflowsStore.currentWorkflowExecutions=o,this.loadingMore=!1},async onDeleteCurrentExecution(){var e;this.loading=!0;try{const t=this.executions.findIndex(o=>o.id===this.$route.params.executionId),s=this.executions[t+1]||this.executions[t-1]||this.executions[0];await this.workflowsStore.deleteExecutions({ids:[this.$route.params.executionId]}),this.workflowsStore.deleteExecution(this.executions[t]),((e=this.temporaryExecution)==null?void 0:e.id)===this.$route.params.executionId&&(this.temporaryExecution=null),this.executions.length>0?(await this.$router.replace({name:m.EXECUTION_PREVIEW,params:{name:this.currentWorkflow,executionId:s.id}}).catch(()=>{}),this.workflowsStore.activeWorkflowExecution=s,await this.setExecutions()):(this.workflowsStore.activeWorkflowExecution=null,await this.$router.replace({name:m.EXECUTION_HOME,params:{name:this.currentWorkflow}}))}catch(t){this.loading=!1,this.showError(t,this.$locale.baseText("executionsList.showError.handleDeleteSelected.title"));return}this.loading=!1,this.showMessage({title:this.$locale.baseText("executionsList.showMessage.handleDeleteSelected.title"),type:"success"})},async onStopExecution(){const e=this.$route.params.executionId;try{await this.workflowsStore.stopCurrentExecution(e),this.showMessage({title:this.$locale.baseText("executionsList.showMessage.stopExecution.title"),message:this.$locale.baseText("executionsList.showMessage.stopExecution.message",{interpolate:{activeExecutionId:e}}),type:"success"}),await this.loadAutoRefresh()}catch(t){this.showError(t,this.$locale.baseText("executionsList.showError.stopExecution.title"))}},async onFilterUpdated(e){this.filter=e,await this.setExecutions()},async setExecutions(){this.workflowsStore.currentWorkflowExecutions=await this.loadExecutions(),await this.setActiveExecution()},async startAutoRefreshInterval(){this.autoRefresh&&(await this.loadAutoRefresh(),this.stopAutoRefreshInterval(),this.autoRefreshTimeout=setTimeout(()=>{this.startAutoRefreshInterval()},4e3))},stopAutoRefreshInterval(){clearTimeout(this.autoRefreshTimeout),this.autoRefreshTimeout=void 0},onAutoRefreshToggle(e){this.autoRefresh=e,this.uiStore.executionSidebarAutoRefresh=this.autoRefresh,this.stopAutoRefreshInterval(),this.startAutoRefreshInterval()},onDocumentVisibilityChange(){document.visibilityState==="hidden"?this.stopAutoRefreshInterval():this.startAutoRefreshInterval()},async loadAutoRefresh(){var a;const e=await this.loadExecutions();let t=[...this.executions];const s=t.map(l=>parseInt(l.id,10));let o=0;const i=[];let n=null;for(let l=e.length-1;l>=0;l--){const r=e[l],f=parseInt(r.id,10);if(o!==0&&!isNaN(f)&&f-o>1){const x=ie(o+1,f);i.push(...x)}o=parseInt(r.id,10)||0;const _=s.indexOf(f);if(_!==-1){const x=t.find(M=>M.id===r.id),w=x&&x.finished===!1||(x==null?void 0:x.stoppedAt)===void 0,L=r.finished===!0||r.stoppedAt!==void 0;w&&L&&(t[_]=r,r.id===((a=this.activeExecution)==null?void 0:a.id)&&(n=r));continue}let p;for(p=t.length-1;p>=0;p--)if(f<parseInt(t[p].id,10)){t.splice(p+1,0,r);break}p===-1&&t.unshift(r)}t=t.filter(l=>!i.includes(parseInt(l.id,10))&&o>=parseInt(l.id,10)),this.workflowsStore.currentWorkflowExecutions=t,n!==null?this.workflowsStore.activeWorkflowExecution=n:!t.some(r=>{var f;return r.id===((f=this.activeExecution)==null?void 0:f.id)})&&this.executions.length>0&&!this.temporaryExecution?this.$router.push({name:m.EXECUTION_PREVIEW,params:{name:this.currentWorkflow,executionId:this.executions[0].id}}).catch(()=>{}):this.executions.length===0&&this.$route.name===m.EXECUTION_PREVIEW&&(this.$router.push({name:m.EXECUTION_HOME,params:{name:this.currentWorkflow}}).catch(()=>{}),this.workflowsStore.activeWorkflowExecution=null)},async loadExecutions(){if(!this.currentWorkflow)return[];try{return await this.workflowsStore.loadCurrentWorkflowExecutions(this.requestFilter)}catch(e){return e.errorCode===B?this.showMessage({title:this.$locale.baseText("executionsList.showError.refreshData.title"),message:e.message,type:"error",duration:3500},!1):this.showError(e,this.$locale.baseText("executionsList.showError.refreshData.title")),[]}},async setActiveExecution(){const e=this.$route.params.executionId;if(e){const t=this.workflowsStore.getExecutionDataById(e);t?this.workflowsStore.activeWorkflowExecution=t:await this.tryToFindExecution(e)}this.workflowsStore.activeWorkflowExecution===null&&this.executions.length>0&&!this.temporaryExecution&&(this.workflowsStore.activeWorkflowExecution=this.executions[0],this.$route.name===m.EXECUTION_HOME&&this.$router.push({name:m.EXECUTION_PREVIEW,params:{name:this.currentWorkflow,executionId:this.executions[0].id}}).catch(()=>{}))},async tryToFindExecution(e,t=0){if(t===0){const o=await this.workflowsStore.fetchExecutionDataById(e);if(o)this.temporaryExecution=o;else{this.workflowsStore.activeWorkflowExecution=null,this.showError(new Error(this.$locale.baseText("executionView.notFound.message",{interpolate:{executionId:e}})),this.$locale.baseText("nodeView.showError.openExecution.title"));return}}if(t>=Ve){if(this.temporaryExecution){this.workflowsStore.activeWorkflowExecution=this.temporaryExecution;return}this.workflowsStore.activeWorkflowExecution=null;return}await this.loadMore(Pe);const s=this.workflowsStore.getExecutionDataById(e);if(!s)await this.$nextTick(),await this.tryToFindExecution(e,t+1);else{this.workflowsStore.activeWorkflowExecution=s,this.temporaryExecution=null;return}},async openWorkflow(e){await this.loadActiveWorkflows();let t;try{t=await this.workflowsStore.fetchWorkflow(e)}catch(i){this.showError(i,this.$locale.baseText("nodeView.showError.openWorkflow.title"));return}if(t===void 0)throw new Error(this.$locale.baseText("nodeView.workflowWithIdCouldNotBeFound",{interpolate:{workflowId:e}}));await this.addNodes(t.nodes,t.connections),this.workflowsStore.setActive(t.active||!1),this.workflowsStore.setWorkflowId(e),this.workflowsStore.setWorkflowName({newName:t.name,setStateDirty:!1}),this.workflowsStore.setWorkflowSettings(t.settings||{}),this.workflowsStore.setWorkflowPinData(t.pinData||{});const s=t.tags||[],o=s.map(i=>i.id);this.workflowsStore.setWorkflowTagIds(o||[]),this.workflowsStore.setWorkflowVersionId(t.versionId),this.tagsStore.upsertTags(s),this.externalHooks.run("workflow.open",{workflowId:e,workflowName:t.name}),this.uiStore.stateIsDirty=!1},async addNodes(e,t){if(!(e!=null&&e.length))return;await this.loadNodesProperties(e.map(o=>({name:o.type,version:o.typeVersion})));let s;if(e.forEach(o=>{if(o.id||(o.id=se()),s=this.nodeTypesStore.getNodeType(o.type,o.typeVersion),o.hasOwnProperty("disabled")||(o.disabled=!1),o.hasOwnProperty("parameters")||(o.parameters={}),s!==null){let i=null;try{i=H(s.properties,o.parameters,!0,!1,o)}catch(n){console.error(this.$locale.baseText("nodeView.thereWasAProblemLoadingTheNodeParametersOfNode")+`: "${o.name}"`),console.error(n)}o.parameters=i!==null?i:{},o.type===z&&o.parameters.path===""&&(o.parameters.path=o.webhookId)}this.workflowsStore.addNode(o)}),t!==void 0){let o;for(const i of Object.keys(t))for(const n of Object.keys(t[i]))for(let a=0;a<t[i][n].length;a++){const l=t[i][n][a];l&&l.forEach(r=>{o=[{node:i,type:n,index:a},{node:r.node,type:r.type,index:r.index}],this.workflowsStore.addConnection({connection:o,setStateDirty:!1})})}}},async loadNodesProperties(e){const t=this.nodeTypesStore.allNodeTypes,s=[];t.forEach(o=>{const i=Array.isArray(o.version)?o.version:[o.version];e.find(n=>n.name===o.name&&i.includes(n.version))&&!o.hasOwnProperty("properties")&&s.push({name:o.name,version:Array.isArray(o.version)?o.version.slice(-1)[0]:o.version})}),s.length>0&&await this.nodeTypesStore.getNodesInformation(s)},async loadActiveWorkflows(){await this.workflowsStore.fetchActiveWorkflows()},async onRetryExecution(e){const t=e.command==="current-workflow";this.showMessage({title:this.$locale.baseText("executionDetails.runningMessage"),type:"info",duration:2e3}),await this.retryExecution(e.execution,t),await this.loadAutoRefresh(),this.$telemetry.track("User clicked retry execution button",{workflow_id:this.workflowsStore.workflowId,execution_id:e.execution.id,retry_type:t?"current":"original"})},async retryExecution(e,t){try{await this.workflowsStore.retryExecution(e.id,t)?this.showMessage({title:this.$locale.baseText("executionsList.showMessage.retrySuccessfulTrue.title"),type:"success"}):this.showMessage({title:this.$locale.baseText("executionsList.showMessage.retrySuccessfulFalse.title"),type:"error"})}catch(s){this.showError(s,this.$locale.baseText("executionsList.showError.retryExecution.title"))}}}}),He="_container_16o1g_1",ze="_content_16o1g_7",Xe={container:He,content:ze};function qe(e,t,s,o,i,n){const a=h("ExecutionsSidebar"),l=h("router-view");return u(),v("div",{class:c(e.$style.container)},[d(a,{executions:e.executions,loading:e.loading&&!e.executions.length,"loading-more":e.loadingMore,"temporary-execution":e.temporaryExecution,"auto-refresh":e.autoRefresh,"onUpdate:autoRefresh":e.onAutoRefreshToggle,onReloadExecutions:e.setExecutions,onFilterUpdated:e.onFilterUpdated,onLoadMore:e.onLoadMore,onRetryExecution:e.onRetryExecution},null,8,["executions","loading","loading-more","temporary-execution","auto-refresh","onUpdate:autoRefresh","onReloadExecutions","onFilterUpdated","onLoadMore","onRetryExecution"]),e.hidePreview?g("",!0):(u(),v("div",{key:0,class:c(e.$style.content)},[d(l,{name:"executionPreview",onDeleteCurrentExecution:e.onDeleteCurrentExecution,onRetryExecution:e.onRetryExecution,onStopExecution:e.onStopExecution},null,8,["onDeleteCurrentExecution","onRetryExecution","onStopExecution"])],2))],2)}const Ge={$style:Xe},It=I(Be,[["render",qe],["__cssModules",Ge]]);export{It as default};
|
|
2
|
-
//# sourceMappingURL=ExecutionsList-
|
|
1
|
+
import{m as b}from"./pinia-UPmhnKmF.js";import{e as W}from"./executionsHelpers-7_cXd8a_.js";import{V as m,_ as I,v as A,u as C,aB as D,e as N,l as O,y as F,a3 as R,M as U,a9 as V,fx as P,fC as B,a6 as H,a2 as z,a8 as X}from"./n8n-G5ZIZCy5.js";import{E as q,a as G}from"./ExecutionFilter-V1l-9ps5.js";import{v as T,f as u,h as v,K as d,E,i as S,J as k,I as y,y as c,D as $,H as g,a6 as h,F as j,_ as K,at as Y}from"./vendor-VXT4wwt2.js";import{E as J}from"./ExecutionsInfoAccordion-H3fj26pu.js";import{a as Q,b as Z,u as ee,ay as te,I as oe}from"./index-4C1AxeXk.js";import{v as se}from"./uuid-McvpxQtQ.js";import{_ as ie}from"./lodash-es-xYzII6mS.js";import"./dateFormatter-7nt2saFg.js";import"./axios-s2RMMPhA.js";import"./flatted-jPn12Tq4.js";import"./esprima-next-ulPLCZ1Z.js";import"./luxon-ZRIU05qF.js";import"./@vueuse/core-4MtarU7n.js";import"./vue-i18n-ZIlZf-IE.js";import"./@n8n/permissions-8yMqUF1Y.js";import"./@n8n/codemirror-lang-sql-A8tNeQAo.js";import"./@lezer/common-1hBQ1gIF.js";import"./prettier-s3fE3Qyr.js";import"./@jsplumb/util-DR0SB56A.js";import"./@jsplumb/core-MKwKlGip.js";import"./@jsplumb/common-Q5_tv_GT.js";import"./@jsplumb/connector-bezier-3dWY17R5.js";import"./@jsplumb/browser-ui-AlqFM-P6.js";import"./codemirror-lang-html-n8n-aqAgigXU.js";import"./codemirror-lang-n8n-expression-7tlJbTJw.js";import"./fast-json-stable-stringify-4gflVid-.js";import"./timeago.js--Bumj2r9.js";import"./qrcode.vue-t9lCVWTj.js";import"./vue3-touch-events-_RfbPMOD.js";import"./chart.js-JtqvIvkt.js";const ne=T({name:"ExecutionCard",components:{ExecutionTime:q},mixins:[W],props:{execution:{type:Object,required:!0},highlight:{type:Boolean,default:!1},showGap:{type:Boolean,default:!1}},data(){return{VIEWS:m}},computed:{retryExecutionActions(){return[{id:"current-workflow",label:this.$locale.baseText("executionsList.retryWithCurrentlySavedWorkflow")},{id:"original-workflow",label:this.$locale.baseText("executionsList.retryWithOriginalWorkflow")}]},executionUIDetails(){return this.getExecutionUIDetails(this.execution)},isActive(){return this.execution.id===this.$route.params.executionId}},methods:{onRetryMenuItemSelect(e){this.$emit("retryExecution",{execution:this.execution,command:e})}}}),re="_executionCard_23l4d_1",ae="_active_23l4d_6",le="_executionStatus_23l4d_9",ce="_executionLink_23l4d_12",ue="_running_23l4d_15",he="_spinner_23l4d_15",de="_statusLabel_23l4d_22",fe="_success_23l4d_26",we="_waiting_23l4d_29",me="_error_23l4d_35",pe="_unknown_23l4d_41",xe="_icon_23l4d_57",Ee="_icons_23l4d_62",ye="_retry_23l4d_70",ge="_manual_23l4d_73",ke="_showGap_23l4d_81",ve={executionCard:re,active:ae,executionStatus:le,executionLink:ce,running:ue,spinner:he,statusLabel:de,success:fe,waiting:we,error:me,unknown:pe,icon:xe,icons:Ee,retry:ye,manual:ge,showGap:ke},$e={key:0};function Se(e,t,s,o,i,n){const a=h("n8n-text"),l=h("n8n-spinner"),r=h("ExecutionTime"),f=h("n8n-action-dropdown"),_=h("font-awesome-icon"),p=h("n8n-tooltip"),x=h("router-link");return u(),v("div",{class:c({"execution-card":!0,[e.$style.executionCard]:!0,[e.$style.active]:e.isActive,[e.$style[e.executionUIDetails.name]]:!0,[e.$style.highlight]:e.highlight,[e.$style.showGap]:e.showGap})},[d(x,{class:c(e.$style.executionLink),to:{name:e.VIEWS.EXECUTION_PREVIEW,params:{name:e.currentWorkflow,executionId:e.execution.id}},"data-test-execution-status":e.executionUIDetails.name},{default:E(()=>[S("div",{class:c(e.$style.description)},[d(a,{color:"text-dark",bold:!0,size:"medium","data-test-id":"execution-time"},{default:E(()=>[k(y(e.executionUIDetails.startTime),1)]),_:1}),S("div",{class:c(e.$style.executionStatus)},[e.executionUIDetails.name==="running"?(u(),$(l,{key:0,size:"small",class:c([e.$style.spinner,"mr-4xs"])},null,8,["class"])):g("",!0),d(a,{class:c(e.$style.statusLabel),size:"small"},{default:E(()=>[k(y(e.executionUIDetails.label),1)]),_:1},8,["class"]),k(" "+y(" ")+" "),e.executionUIDetails.name==="running"?(u(),$(a,{key:1,color:e.isActive?"text-dark":"text-base",size:"small"},{default:E(()=>[k(y(e.$locale.baseText("executionDetails.runningTimeRunning"))+" ",1),d(r,{"start-time":e.execution.startedAt},null,8,["start-time"])]),_:1},8,["color"])):e.executionUIDetails.runningTime!==""?(u(),$(a,{key:2,color:e.isActive?"text-dark":"text-base",size:"small"},{default:E(()=>{var w;return[k(y(e.$locale.baseText("executionDetails.runningTimeFinished",{interpolate:{time:(w=e.executionUIDetails)==null?void 0:w.runningTime}})),1)]}),_:1},8,["color"])):g("",!0)],2),e.execution.mode==="retry"?(u(),v("div",$e,[d(a,{color:e.isActive?"text-dark":"text-base",size:"small"},{default:E(()=>[k(y(e.$locale.baseText("executionDetails.retry"))+" #"+y(e.execution.retryOf),1)]),_:1},8,["color"])])):g("",!0)],2),S("div",{class:c(e.$style.icons)},[e.executionUIDetails.name==="error"?(u(),$(f,{key:0,class:c([e.$style.icon,e.$style.retry]),items:e.retryExecutionActions,"activator-icon":"redo","data-test-id":"retry-execution-button",onSelect:e.onRetryMenuItemSelect},null,8,["class","items","onSelect"])):g("",!0),e.execution.mode==="manual"?(u(),$(p,{key:1,placement:"top"},{content:E(()=>[S("span",null,y(e.$locale.baseText("executionsList.test")),1)]),default:E(()=>[e.execution.mode==="manual"?(u(),$(_,{key:0,class:c([e.$style.icon,e.$style.manual]),icon:"flask"},null,8,["class"])):g("",!0)]),_:1})):g("",!0)],2)]),_:1},8,["class","to","data-test-execution-status"])],2)}const _e={$style:ve},Ie=I(ne,[["render",Se],["__cssModules",_e]]),Te=T({name:"ExecutionsSidebar",components:{ExecutionCard:Ie,ExecutionsInfoAccordion:J,ExecutionFilter:G},props:{autoRefresh:{type:Boolean,default:!1},executions:{type:Array,required:!0},loading:{type:Boolean,default:!0},loadingMore:{type:Boolean,default:!1},temporaryExecution:{type:Object,default:null}},data(){return{VIEWS:m,filter:{}}},computed:{...b(C,A)},watch:{$route(e,t){t.name===m.EXECUTION_PREVIEW&&e.name===m.EXECUTION_HOME&&this.$router.go(-1)}},mounted(){this.checkListSize(),this.scrollToActiveCard()},methods:{loadMore(e=20){if(!this.loading){const t=this.$refs.executionList;if(t){const s=t.offsetHeight-(t.scrollHeight-t.scrollTop);s>-10&&s<10&&this.$emit("loadMore",e)}}},onRetryExecution(e){this.$emit("retryExecution",e)},onRefresh(){this.$emit("refresh")},onFilterChanged(e){this.$emit("filterUpdated",e)},reloadExecutions(){this.$emit("reloadExecutions")},checkListSize(){var s;const e=this.$refs.container,t=this.$refs[`execution-${(s=this.workflowsStore.activeWorkflowExecution)==null?void 0:s.id}`];if(e&&(t!=null&&t.length)){const o=t[0].$el,i=Math.ceil(e.clientHeight/o.clientHeight);i>this.executions.length&&this.$emit("loadMore",i-this.executions.length)}},scrollToActiveCard(){var s;const e=this.$refs.executionList,t=this.$refs[`execution-${(s=this.workflowsStore.activeWorkflowExecution)==null?void 0:s.id}`];if(e&&(t!=null&&t.length)&&this.workflowsStore.activeWorkflowExecution){const i=t[0].$el.getBoundingClientRect(),n=200;i.top>e.offsetHeight&&e.scrollTo({top:i.top-n})}}}}),Re="_container_qg8we_1",be="_heading_qg8we_12",We="_controls_qg8we_19",Ae="_executionList_qg8we_31",Ce="_infoAccordion_qg8we_49",Le="_noResultsContainer_qg8we_61",Me={container:Re,heading:be,controls:We,executionList:Ae,infoAccordion:Ce,noResultsContainer:Le},De={key:0,class:"mr-l"},Ne={key:3,class:"mr-m"};function Oe(e,t,s,o,i,n){const a=h("n8n-heading"),l=h("el-checkbox"),r=h("ExecutionFilter"),f=h("n8n-loading"),_=h("n8n-text"),p=h("ExecutionCard"),x=h("ExecutionsInfoAccordion");return u(),v("div",{ref:"container",class:c(["executions-sidebar",e.$style.container]),"data-test-id":"executions-sidebar"},[S("div",{class:c(e.$style.heading)},[d(a,{tag:"h2",size:"medium",color:"text-dark"},{default:E(()=>[k(y(e.$locale.baseText("generic.executions")),1)]),_:1})],2),S("div",{class:c(e.$style.controls)},[d(l,{"model-value":e.autoRefresh,"data-test-id":"auto-refresh-checkbox","onUpdate:modelValue":t[0]||(t[0]=w=>e.$emit("update:autoRefresh",w))},{default:E(()=>[k(y(e.$locale.baseText("executionsList.autoRefresh")),1)]),_:1},8,["model-value"]),d(r,{"popover-placement":"left-start",onFilterChanged:e.onFilterChanged},null,8,["onFilterChanged"])],2),S("div",{ref:"executionList",class:c(e.$style.executionList),"data-test-id":"current-executions-list",onScroll:t[1]||(t[1]=w=>e.loadMore(20))},[e.loading?(u(),v("div",De,[d(f,{variant:"rect"})])):g("",!0),!e.loading&&e.executions.length===0?(u(),v("div",{key:1,class:c(e.$style.noResultsContainer)},[d(_,{color:"text-base",size:"medium",align:"center"},{default:E(()=>[k(y(e.$locale.baseText("executionsLandingPage.noResults")),1)]),_:1})],2)):e.temporaryExecution?(u(),$(p,{key:2,ref:`execution-${e.temporaryExecution.id}`,execution:e.temporaryExecution,"data-test-id":`execution-details-${e.temporaryExecution.id}`,"show-gap":!0,onRetryExecution:e.onRetryExecution},null,8,["execution","data-test-id","onRetryExecution"])):g("",!0),(u(!0),v(j,null,K(e.executions,w=>(u(),$(p,{key:w.id,ref_for:!0,ref:`execution-${w.id}`,execution:w,"data-test-id":`execution-details-${w.id}`,onRetryExecution:e.onRetryExecution},null,8,["execution","data-test-id","onRetryExecution"]))),128)),e.loadingMore?(u(),v("div",Ne,[d(f,{variant:"p",rows:1})])):g("",!0)],34),S("div",{class:c(e.$style.infoAccordion)},[d(x,{"initially-expanded":!1})],2)],2)}const Fe={$style:Me},Ue=I(Te,[["render",Oe],["__cssModules",Fe],["__scopeId","data-v-fae93cca"]]),Ve=5,Pe=100,Be=T({name:"ExecutionsList",components:{ExecutionsSidebar:Ue},mixins:[W],setup(){const e=X(),t=Y(),s=Q({router:t}),{callDebounced:o}=D();return{externalHooks:e,workflowHelpers:s,callDebounced:o,...N(),...Z()}},data(){return{loading:!1,loadingMore:!1,filter:{},temporaryExecution:null,autoRefresh:!1,autoRefreshTimeout:void 0}},computed:{...b(ee,F,O,C,A),hidePreview(){const e=this.filterApplied&&!this.executions.find(t=>{var s;return t.id===((s=this.activeExecution)==null?void 0:s.id)});return this.loading||!this.executions.length||e},filterApplied(){return this.filter.status!=="all"},workflowDataNotLoaded(){return this.workflowsStore.workflowId===R&&this.workflowsStore.workflowName===""},loadedFinishedExecutionsCount(){return this.workflowsStore.getAllLoadedFinishedExecutions.length},totalFinishedExecutionsCount(){return this.workflowsStore.getTotalFinishedExecutionsCount},requestFilter(){return te({...this.filter,workflowId:this.currentWorkflow})}},watch:{$route(e,t){if(e.params.name){const s=t.params.name!==e.params.name;this.initView(s)}if(e.params.executionId){const s=this.workflowsStore.getExecutionDataById(e.params.executionId);s&&(this.workflowsStore.activeWorkflowExecution=s)}}},async beforeRouteLeave(e,t,s){if(oe(e)===U.WORKFLOW){s();return}if(this.uiStore.stateIsDirty){const o=await this.confirm(this.$locale.baseText("generic.unsavedWork.confirmMessage.message"),{title:this.$locale.baseText("generic.unsavedWork.confirmMessage.headline"),type:"warning",confirmButtonText:this.$locale.baseText("generic.unsavedWork.confirmMessage.confirmButtonText"),cancelButtonText:this.$locale.baseText("generic.unsavedWork.confirmMessage.cancelButtonText"),showClose:!0});o===V?(await this.workflowHelpers.saveCurrentWorkflow({},!1)&&await this.settingsStore.fetchPromptsData(),this.uiStore.stateIsDirty=!1,s()):o===P&&(this.uiStore.stateIsDirty=!1,s())}else s()},created(){this.autoRefresh=this.uiStore.executionSidebarAutoRefresh},async mounted(){this.loading=!0;const e=this.$route.params.name!==this.workflowsStore.workflowId,t=this.$route.params.name==="new"&&this.workflowsStore.workflowId===R,s=e&&!t;if(await this.initView(s),!s)if(this.workflowsStore.currentWorkflowExecutions.length>0){const o=await this.loadExecutions();this.workflowsStore.addToCurrentExecutions(o),await this.setActiveExecution()}else await this.setExecutions();this.startAutoRefreshInterval(),document.addEventListener("visibilitychange",this.onDocumentVisibilityChange),this.loading=!1},beforeUnmount(){document.removeEventListener("visibilitychange",this.onDocumentVisibilityChange),this.autoRefresh=!1,this.stopAutoRefreshInterval()},methods:{async initView(e){e&&(await this.nodeTypesStore.loadNodeTypesIfNotLoaded(),await this.openWorkflow(this.$route.params.name),this.uiStore.nodeViewInitialized=!1,this.workflowsStore.currentWorkflowExecutions.length===0&&await this.setExecutions(),this.activeExecution&&this.$router.push({name:m.EXECUTION_PREVIEW,params:{name:this.currentWorkflow,executionId:this.activeExecution.id}}).catch(()=>{}))},async onLoadMore(){this.loadingMore||await this.callDebounced(this.loadMore,{debounceTime:1e3})},async loadMore(e=20){var i;if(this.filter.status==="running"||this.loadedFinishedExecutionsCount>=this.totalFinishedExecutionsCount)return;this.loadingMore=!0;let t;this.executions.length!==0&&(t=this.executions.slice(-1)[0].id);let s;try{s=await this.workflowsStore.getPastExecutions(this.requestFilter,e,t)}catch(n){this.loadingMore=!1,this.showError(n,this.$locale.baseText("executionsList.showError.loadMore.title"));return}s.results=s.results.map(n=>({...n,mode:n.mode}));const o=[...this.executions];for(const n of s.results)o.find(a=>a.id===n.id)===void 0&&o.push(n),n.id===((i=this.temporaryExecution)==null?void 0:i.id)&&(this.temporaryExecution=null);this.workflowsStore.currentWorkflowExecutions=o,this.loadingMore=!1},async onDeleteCurrentExecution(){var e;this.loading=!0;try{const t=this.executions.findIndex(o=>o.id===this.$route.params.executionId),s=this.executions[t+1]||this.executions[t-1]||this.executions[0];await this.workflowsStore.deleteExecutions({ids:[this.$route.params.executionId]}),this.workflowsStore.deleteExecution(this.executions[t]),((e=this.temporaryExecution)==null?void 0:e.id)===this.$route.params.executionId&&(this.temporaryExecution=null),this.executions.length>0?(await this.$router.replace({name:m.EXECUTION_PREVIEW,params:{name:this.currentWorkflow,executionId:s.id}}).catch(()=>{}),this.workflowsStore.activeWorkflowExecution=s,await this.setExecutions()):(this.workflowsStore.activeWorkflowExecution=null,await this.$router.replace({name:m.EXECUTION_HOME,params:{name:this.currentWorkflow}}))}catch(t){this.loading=!1,this.showError(t,this.$locale.baseText("executionsList.showError.handleDeleteSelected.title"));return}this.loading=!1,this.showMessage({title:this.$locale.baseText("executionsList.showMessage.handleDeleteSelected.title"),type:"success"})},async onStopExecution(){const e=this.$route.params.executionId;try{await this.workflowsStore.stopCurrentExecution(e),this.showMessage({title:this.$locale.baseText("executionsList.showMessage.stopExecution.title"),message:this.$locale.baseText("executionsList.showMessage.stopExecution.message",{interpolate:{activeExecutionId:e}}),type:"success"}),await this.loadAutoRefresh()}catch(t){this.showError(t,this.$locale.baseText("executionsList.showError.stopExecution.title"))}},async onFilterUpdated(e){this.filter=e,await this.setExecutions()},async setExecutions(){this.workflowsStore.currentWorkflowExecutions=await this.loadExecutions(),await this.setActiveExecution()},async startAutoRefreshInterval(){this.autoRefresh&&(await this.loadAutoRefresh(),this.stopAutoRefreshInterval(),this.autoRefreshTimeout=setTimeout(()=>{this.startAutoRefreshInterval()},4e3))},stopAutoRefreshInterval(){clearTimeout(this.autoRefreshTimeout),this.autoRefreshTimeout=void 0},onAutoRefreshToggle(e){this.autoRefresh=e,this.uiStore.executionSidebarAutoRefresh=this.autoRefresh,this.stopAutoRefreshInterval(),this.startAutoRefreshInterval()},onDocumentVisibilityChange(){document.visibilityState==="hidden"?this.stopAutoRefreshInterval():this.startAutoRefreshInterval()},async loadAutoRefresh(){var a;const e=await this.loadExecutions();let t=[...this.executions];const s=t.map(l=>parseInt(l.id,10));let o=0;const i=[];let n=null;for(let l=e.length-1;l>=0;l--){const r=e[l],f=parseInt(r.id,10);if(o!==0&&!isNaN(f)&&f-o>1){const x=ie(o+1,f);i.push(...x)}o=parseInt(r.id,10)||0;const _=s.indexOf(f);if(_!==-1){const x=t.find(M=>M.id===r.id),w=x&&x.finished===!1||(x==null?void 0:x.stoppedAt)===void 0,L=r.finished===!0||r.stoppedAt!==void 0;w&&L&&(t[_]=r,r.id===((a=this.activeExecution)==null?void 0:a.id)&&(n=r));continue}let p;for(p=t.length-1;p>=0;p--)if(f<parseInt(t[p].id,10)){t.splice(p+1,0,r);break}p===-1&&t.unshift(r)}t=t.filter(l=>!i.includes(parseInt(l.id,10))&&o>=parseInt(l.id,10)),this.workflowsStore.currentWorkflowExecutions=t,n!==null?this.workflowsStore.activeWorkflowExecution=n:!t.some(r=>{var f;return r.id===((f=this.activeExecution)==null?void 0:f.id)})&&this.executions.length>0&&!this.temporaryExecution?this.$router.push({name:m.EXECUTION_PREVIEW,params:{name:this.currentWorkflow,executionId:this.executions[0].id}}).catch(()=>{}):this.executions.length===0&&this.$route.name===m.EXECUTION_PREVIEW&&(this.$router.push({name:m.EXECUTION_HOME,params:{name:this.currentWorkflow}}).catch(()=>{}),this.workflowsStore.activeWorkflowExecution=null)},async loadExecutions(){if(!this.currentWorkflow)return[];try{return await this.workflowsStore.loadCurrentWorkflowExecutions(this.requestFilter)}catch(e){return e.errorCode===B?this.showMessage({title:this.$locale.baseText("executionsList.showError.refreshData.title"),message:e.message,type:"error",duration:3500},!1):this.showError(e,this.$locale.baseText("executionsList.showError.refreshData.title")),[]}},async setActiveExecution(){const e=this.$route.params.executionId;if(e){const t=this.workflowsStore.getExecutionDataById(e);t?this.workflowsStore.activeWorkflowExecution=t:await this.tryToFindExecution(e)}this.workflowsStore.activeWorkflowExecution===null&&this.executions.length>0&&!this.temporaryExecution&&(this.workflowsStore.activeWorkflowExecution=this.executions[0],this.$route.name===m.EXECUTION_HOME&&this.$router.push({name:m.EXECUTION_PREVIEW,params:{name:this.currentWorkflow,executionId:this.executions[0].id}}).catch(()=>{}))},async tryToFindExecution(e,t=0){if(t===0){const o=await this.workflowsStore.fetchExecutionDataById(e);if(o)this.temporaryExecution=o;else{this.workflowsStore.activeWorkflowExecution=null,this.showError(new Error(this.$locale.baseText("executionView.notFound.message",{interpolate:{executionId:e}})),this.$locale.baseText("nodeView.showError.openExecution.title"));return}}if(t>=Ve){if(this.temporaryExecution){this.workflowsStore.activeWorkflowExecution=this.temporaryExecution;return}this.workflowsStore.activeWorkflowExecution=null;return}await this.loadMore(Pe);const s=this.workflowsStore.getExecutionDataById(e);if(!s)await this.$nextTick(),await this.tryToFindExecution(e,t+1);else{this.workflowsStore.activeWorkflowExecution=s,this.temporaryExecution=null;return}},async openWorkflow(e){await this.loadActiveWorkflows();let t;try{t=await this.workflowsStore.fetchWorkflow(e)}catch(i){this.showError(i,this.$locale.baseText("nodeView.showError.openWorkflow.title"));return}if(t===void 0)throw new Error(this.$locale.baseText("nodeView.workflowWithIdCouldNotBeFound",{interpolate:{workflowId:e}}));await this.addNodes(t.nodes,t.connections),this.workflowsStore.setActive(t.active||!1),this.workflowsStore.setWorkflowId(e),this.workflowsStore.setWorkflowName({newName:t.name,setStateDirty:!1}),this.workflowsStore.setWorkflowSettings(t.settings||{}),this.workflowsStore.setWorkflowPinData(t.pinData||{});const s=t.tags||[],o=s.map(i=>i.id);this.workflowsStore.setWorkflowTagIds(o||[]),this.workflowsStore.setWorkflowVersionId(t.versionId),this.tagsStore.upsertTags(s),this.externalHooks.run("workflow.open",{workflowId:e,workflowName:t.name}),this.uiStore.stateIsDirty=!1},async addNodes(e,t){if(!(e!=null&&e.length))return;await this.loadNodesProperties(e.map(o=>({name:o.type,version:o.typeVersion})));let s;if(e.forEach(o=>{if(o.id||(o.id=se()),s=this.nodeTypesStore.getNodeType(o.type,o.typeVersion),o.hasOwnProperty("disabled")||(o.disabled=!1),o.hasOwnProperty("parameters")||(o.parameters={}),s!==null){let i=null;try{i=H(s.properties,o.parameters,!0,!1,o)}catch(n){console.error(this.$locale.baseText("nodeView.thereWasAProblemLoadingTheNodeParametersOfNode")+`: "${o.name}"`),console.error(n)}o.parameters=i!==null?i:{},o.type===z&&o.parameters.path===""&&(o.parameters.path=o.webhookId)}this.workflowsStore.addNode(o)}),t!==void 0){let o;for(const i of Object.keys(t))for(const n of Object.keys(t[i]))for(let a=0;a<t[i][n].length;a++){const l=t[i][n][a];l&&l.forEach(r=>{o=[{node:i,type:n,index:a},{node:r.node,type:r.type,index:r.index}],this.workflowsStore.addConnection({connection:o,setStateDirty:!1})})}}},async loadNodesProperties(e){const t=this.nodeTypesStore.allNodeTypes,s=[];t.forEach(o=>{const i=Array.isArray(o.version)?o.version:[o.version];e.find(n=>n.name===o.name&&i.includes(n.version))&&!o.hasOwnProperty("properties")&&s.push({name:o.name,version:Array.isArray(o.version)?o.version.slice(-1)[0]:o.version})}),s.length>0&&await this.nodeTypesStore.getNodesInformation(s)},async loadActiveWorkflows(){await this.workflowsStore.fetchActiveWorkflows()},async onRetryExecution(e){const t=e.command==="current-workflow";this.showMessage({title:this.$locale.baseText("executionDetails.runningMessage"),type:"info",duration:2e3}),await this.retryExecution(e.execution,t),await this.loadAutoRefresh(),this.$telemetry.track("User clicked retry execution button",{workflow_id:this.workflowsStore.workflowId,execution_id:e.execution.id,retry_type:t?"current":"original"})},async retryExecution(e,t){try{await this.workflowsStore.retryExecution(e.id,t)?this.showMessage({title:this.$locale.baseText("executionsList.showMessage.retrySuccessfulTrue.title"),type:"success"}):this.showMessage({title:this.$locale.baseText("executionsList.showMessage.retrySuccessfulFalse.title"),type:"error"})}catch(s){this.showError(s,this.$locale.baseText("executionsList.showError.retryExecution.title"))}}}}),He="_container_16o1g_1",ze="_content_16o1g_7",Xe={container:He,content:ze};function qe(e,t,s,o,i,n){const a=h("ExecutionsSidebar"),l=h("router-view");return u(),v("div",{class:c(e.$style.container)},[d(a,{executions:e.executions,loading:e.loading&&!e.executions.length,"loading-more":e.loadingMore,"temporary-execution":e.temporaryExecution,"auto-refresh":e.autoRefresh,"onUpdate:autoRefresh":e.onAutoRefreshToggle,onReloadExecutions:e.setExecutions,onFilterUpdated:e.onFilterUpdated,onLoadMore:e.onLoadMore,onRetryExecution:e.onRetryExecution},null,8,["executions","loading","loading-more","temporary-execution","auto-refresh","onUpdate:autoRefresh","onReloadExecutions","onFilterUpdated","onLoadMore","onRetryExecution"]),e.hidePreview?g("",!0):(u(),v("div",{key:0,class:c(e.$style.content)},[d(l,{name:"executionPreview",onDeleteCurrentExecution:e.onDeleteCurrentExecution,onRetryExecution:e.onRetryExecution,onStopExecution:e.onStopExecution},null,8,["onDeleteCurrentExecution","onRetryExecution","onStopExecution"])],2))],2)}const Ge={$style:Xe},It=I(Be,[["render",qe],["__cssModules",Ge]]);export{It as default};
|
|
2
|
+
//# sourceMappingURL=ExecutionsList-Y9rsGvqE.js.map
|