n8n-editor-ui
Version:
Workflow Editor UI for n8n
3 lines • 15.6 kB
JavaScript
(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`n8n@2.16.1`}}catch{}})();try{(function(){var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`74ea8be8-9279-4da0-9da1-e5ab07031add`,e._sentryDebugIdIdentifier=`sentry-dbid-74ea8be8-9279-4da0-9da1-e5ab07031add`)})()}catch{}import"./chunk-CACdhNlC.js";import{$ as e,A as t,C as n,E as r,Ft as i,K as a,N as o,Nt as s,O as c,S as l,Sn as u,T as d,Wt as f,X as p,_ as m,_n as h,gt as g,h as _,j as v,q as y,rt as b,w as x,yt as S}from"./vue.runtime.esm-bundler-C3C09Zii.js";import{at as C,nt as w,ot as T}from"./core-Bz5WjPxS.js";import{Di as E,F as ee,Ft as te,Qi as D,Xi as O,Zi as k,_t as A,dt as ne,ji as j,tt as M,vt as N}from"./src-XqE2yCpG.js";import{t as P}from"./_plugin-vue_export-helper-CIL7EULb.js";import{t as F}from"./date-picker-Dz_0wrPG.js";import{fr as I,r as L,ya as R}from"./users.store-xP93bV7X.js";import{Qc as re,Ts as z}from"./constants-DuQbSl-q.js";import{c as ie,t as ae}from"./useRootStore-XEREVjMN.js";import{t as oe}from"./settings.store-CAFiYCMH.js";import{t as se}from"./useDebounce-DyDXl6eh.js";import{t as ce}from"./usePageRedirectionHelper-CC6sh9o0.js";import{t as le}from"./dateFormatter-uA6jMwOH.js";import{t as ue}from"./WorkflowTagsDropdown-C2Xept2r.js";import{t as de}from"./AnnotationTagsDropdown.ee-CEasowxO.js";var B=P(o({__name:`ConcurrentExecutionsHeader`,props:{runningExecutionsCount:{},concurrencyCap:{},isCloudDeployment:{type:Boolean}},emits:[`goToUpgrade`],setup(i,{emit:a}){let o=i,s=a,c=C(),d=l(()=>{let e=c.baseText(`executionsList.activeExecutions.tooltip`,{interpolate:{running:o.runningExecutionsCount,cap:o.concurrencyCap}});return e+=`
`+c.baseText(`executionsList.activeExecutions.evaluationNote`),e}),p=l(()=>o.runningExecutionsCount===0?c.baseText(`executionsList.activeExecutions.none`):c.baseText(`executionsList.activeExecutions.header`,{interpolate:{running:o.runningExecutionsCount,cap:o.concurrencyCap}}));return(i,a)=>(e(),r(`div`,{"data-test-id":`concurrent-executions-header`,class:h(i.$style.concurrentExecutionHeader)},[v(f(O),null,{default:S(()=>[t(u(p.value),1)]),_:1}),v(f(E),null,{content:S(()=>[n(`div`,{class:h(i.$style.tooltip)},[t(u(d.value)+` `,1),o.isCloudDeployment?(e(),x(f(M),{key:0,bold:``,size:`small`,class:h(i.$style.link),onClick:a[0]||=e=>s(`goToUpgrade`)},{default:S(()=>[t(u(f(c).baseText(`generic.upgradeNow`)),1)]),_:1},8,[`class`])):(e(),x(f(M),{key:1,class:h(i.$style.link),href:f(c).baseText(`executions.concurrency.docsLink`),target:`_blank`},{default:S(()=>[t(u(f(c).baseText(`generic.viewDocs`)),1)]),_:1},8,[`class`,`href`]))],2)]),default:S(()=>[v(f(D),{icon:`info`,class:`ml-2xs`})]),_:1})],2))}}),[[`__cssModules`,{$style:{tooltip:`_tooltip_1c31h_125`,link:`_link_1c31h_130`,concurrentExecutionHeader:`_concurrentExecutionHeader_1c31h_134`}}]]),fe={"data-test-id":`execution-filter-form`},pe={for:`execution-filter-workflows`},me={for:`execution-filter-tags`},he={for:`execution-filter-status`},ge={for:`execution-filter-start-date`},_e={for:`execution-filter-annotation-tags`},ve={for:`execution-filter-annotation-vote`},ye={for:`execution-filter-saved-data-key`},be={for:`execution-filter-saved-data-value`},V=`YYYY-MM-DD HH:mm`,H=P(o({__name:`ExecutionsFilter`,props:{workflows:{default:()=>[]},workflowId:{},popoverSide:{default:`bottom`},popoverAlign:{default:`center`},teleported:{type:Boolean,default:!0}},emits:[`filterChanged`],setup(o,{emit:p}){let y=oe(),C=ae(),{debounce:O}=se(),M=I(),P=ce(),L=o,z=p,B=O(z,{debounceTime:500}),H=i(!1),U=l(()=>y.isEnterpriseFeatureEnabled[re.AdvancedExecutionFilters]),W=l(()=>U.value),xe=l(()=>!1),G=()=>({status:`all`,workflowId:`all`,tags:[],annotationTags:[],startDate:``,endDate:``,metadata:[{key:``,value:``,exactMatch:!1}],vote:`all`,workflowVersionId:`all`}),K=s(G()),q=i([]),J=i(!1),Y=i(!1),X=l(()=>{let e=[{id:`all`,name:w.baseText(`executionsFilter.version.all`)}];for(let t of q.value){let n=t.name??w.baseText(`executionDetails.versionAutosave`),{date:r,time:i}=le(t.createdAt);e.push({id:t.versionId,name:w.baseText(`executionsFilter.version.label`,{interpolate:{name:n,date:`${r} ${i}`}})})}return e});function Se(){let e=L.workflowId;!e||Y.value||J.value||(J.value=!0,ie(C.restApiContext,`GET`,`/executions/versions/${e}`).then(e=>{q.value=e,Y.value=!0}).catch(()=>{}).finally(()=>{J.value=!1}))}g(K,e=>{e.startDate||e.endDate?B(`filterChanged`,e):z(`filterChanged`,e)},{deep:!0,immediate:!1});let Ce=l(()=>[{id:`all`,name:w.baseText(`executionsList.anyStatus`)},{id:`error`,name:w.baseText(`executionsList.error`)},{id:`canceled`,name:w.baseText(`executionsList.canceled`)},{id:`new`,name:w.baseText(`executionsList.new`)},{id:`running`,name:w.baseText(`executionsList.running`)},{id:`success`,name:w.baseText(`executionsList.success`)},{id:`waiting`,name:w.baseText(`executionsList.waiting`)}]),we=l(()=>[{id:`all`,name:w.baseText(`executionsFilter.annotation.rating.all`)},{id:`up`,name:w.baseText(`executionsFilter.annotation.rating.good`)},{id:`down`,name:w.baseText(`executionsFilter.annotation.rating.bad`)}]),Z=l(()=>[K.status!==`all`,K.workflowId!==`all`&&L.workflows.length,!R(K.tags),!R(K.annotationTags),K.vote!==`all`,K.workflowVersionId!==`all`,!R(K.metadata),!!K.startDate,!!K.endDate].filter(Boolean).length),Q=(e,t,n)=>{K.metadata[e]||(K.metadata[e]={key:``,value:``,exactMatch:!1}),K.metadata[e][t]=n,H.value||=(M.track(`User filtered executions with custom data`),!0),B(`filterChanged`,K)},Te=()=>{z(`filterChanged`,K)},Ee=()=>{z(`filterChanged`,K)},De=()=>{Object.assign(K,G())},$=()=>{P.goToUpgrade(`custom-data-filter`,`upgrade-custom-data-filter`)},Oe=e=>{typeof e==`boolean`&&Q(0,`exactMatch`,e)};return a(()=>{H.value=!1}),(i,a)=>(e(),x(f(ee),{side:L.popoverSide,align:L.popoverAlign,"position-strategy":`absolute`,width:`440px`,"content-class":i.$style[`popover-content`],"show-arrow":``,"onUpdate:open":a[10]||=e=>e&&Se()},{trigger:S(()=>[v(f(k),{variant:`subtle`,iconOnly:``,icon:`funnel`,size:`medium`,"aria-label":f(w).baseText(`forms.resourceFiltersDropdown.filters`),active:!!Z.value,"data-test-id":`executions-filter-button`,class:h(i.$style.filterButton)},c({_:2},[Z.value?{name:`default`,fn:S(()=>[v(f(te),{theme:`primary`,class:h([`mr-4xs`,i.$style.filterBadge]),"data-test-id":`execution-filter-badge`},{default:S(()=>[t(u(Z.value),1)]),_:1},8,[`class`])]),key:`0`}:void 0]),1032,[`aria-label`,`active`,`class`])]),content:S(()=>[n(`div`,fe,[o.workflows&&o.workflows.length>0?(e(),r(`div`,{key:0,class:h(i.$style.group)},[n(`label`,pe,u(f(w).baseText(`workflows.heading`)),1),v(f(A),{id:`execution-filter-workflows`,modelValue:K.workflowId,"onUpdate:modelValue":a[0]||=e=>K.workflowId=e,placeholder:f(w).baseText(`executionsFilter.selectWorkflow`),filterable:``,"data-test-id":`executions-filter-workflows-select`,teleported:o.teleported},{default:S(()=>[n(`div`,null,[(e(!0),r(m,null,b(L.workflows,(t,n)=>(e(),x(f(N),{key:n,label:t.name,value:t.id},null,8,[`label`,`value`]))),128))])]),_:1},8,[`modelValue`,`placeholder`,`teleported`])],2)):d(``,!0),xe.value?(e(),r(`div`,{key:1,class:h(i.$style.group)},[n(`label`,me,u(f(w).baseText(`workflows.filters.tags`)),1),v(ue,{id:`execution-filter-tags`,modelValue:K.tags,"onUpdate:modelValue":[a[1]||=e=>K.tags=e,Te],placeholder:f(w).baseText(`workflowOpen.filterWorkflows`),"create-enabled":!1,"data-test-id":`executions-filter-tags-select`},null,8,[`modelValue`,`placeholder`])],2)):d(``,!0),n(`div`,{class:h(i.$style.group)},[n(`label`,he,u(f(w).baseText(`executionsList.status`)),1),v(f(A),{id:`execution-filter-status`,modelValue:K.status,"onUpdate:modelValue":a[2]||=e=>K.status=e,placeholder:f(w).baseText(`executionsFilter.selectStatus`),filterable:``,"data-test-id":`executions-filter-status-select`,teleported:o.teleported},{default:S(()=>[(e(!0),r(m,null,b(Ce.value,(t,n)=>(e(),x(f(N),{key:n,label:t.name,value:t.id},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`,`teleported`])],2),n(`div`,{class:h(i.$style.group)},[n(`label`,ge,u(f(w).baseText(`executionsFilter.start`)),1),n(`div`,{class:h(i.$style.dates)},[v(f(F),{id:`execution-filter-start-date`,modelValue:K.startDate,"onUpdate:modelValue":a[3]||=e=>K.startDate=e,type:`datetime`,teleported:o.teleported,format:V,placeholder:f(w).baseText(`executionsFilter.startDate`),"data-test-id":`executions-filter-start-date-picker`},null,8,[`modelValue`,`teleported`,`placeholder`]),n(`span`,{class:h(i.$style.divider)},`to`,2),v(f(F),{id:`execution-filter-end-date`,modelValue:K.endDate,"onUpdate:modelValue":a[4]||=e=>K.endDate=e,type:`datetime`,teleported:o.teleported,format:V,placeholder:f(w).baseText(`executionsFilter.endDate`),"data-test-id":`executions-filter-end-date-picker`},null,8,[`modelValue`,`teleported`,`placeholder`])],2)],2),W.value?(e(),r(`div`,{key:2,class:h(i.$style.group)},[n(`label`,_e,u(f(w).baseText(`executionsFilter.annotation.tags`)),1),v(de,{id:`execution-filter-annotation-tags`,modelValue:K.annotationTags,"onUpdate:modelValue":[a[5]||=e=>K.annotationTags=e,Ee],placeholder:f(w).baseText(`workflowOpen.filterWorkflows`),"create-enabled":!1,"data-test-id":`executions-filter-annotation-tags-select`},null,8,[`modelValue`,`placeholder`])],2)):d(``,!0),L.workflowId?(e(),r(`div`,{key:3,class:h(i.$style.group)},[v(f(E),{placement:`right`},{content:S(()=>[t(u(f(w).baseText(`executionsFilter.version.hint`)),1)]),default:S(()=>[n(`span`,{class:h([i.$style.label,i.$style.savedDataLabel])},[n(`span`,null,u(f(w).baseText(`executionsFilter.version`)),1),v(f(D),{class:h(i.$style.tooltipIcon),icon:`circle-help`,size:`medium`},null,8,[`class`])],2)]),_:1}),v(f(E),{disabled:J.value||X.value.length>1,placement:`top`},{content:S(()=>[t(u(f(w).baseText(`executionsFilter.version.noVersions`)),1)]),default:S(()=>[v(f(A),{id:`execution-filter-version`,modelValue:K.workflowVersionId,"onUpdate:modelValue":a[6]||=e=>K.workflowVersionId=e,placeholder:f(w).baseText(`executionsFilter.version.select`),filterable:``,disabled:J.value||X.value.length<=1,"data-test-id":`executions-filter-version-select`,teleported:o.teleported},c({default:S(()=>[(e(!0),r(m,null,b(X.value,(t,n)=>(e(),x(f(N),{key:n,label:t.name,value:t.id},null,8,[`label`,`value`]))),128))]),_:2},[J.value?{name:`prefix`,fn:S(()=>[v(f(D),{icon:`spinner`,spin:``})]),key:`0`}:void 0]),1032,[`modelValue`,`placeholder`,`disabled`,`teleported`])]),_:1},8,[`disabled`])],2)):d(``,!0),W.value?(e(),r(`div`,{key:4,class:h(i.$style.group)},[n(`label`,ve,u(f(w).baseText(`executionsFilter.annotation.rating`)),1),v(f(A),{id:`execution-filter-annotation-vote`,modelValue:K.vote,"onUpdate:modelValue":a[7]||=e=>K.vote=e,placeholder:f(w).baseText(`executionsFilter.annotation.selectVoteFilter`),filterable:``,"data-test-id":`executions-filter-annotation-vote-select`,teleported:o.teleported},{default:S(()=>[(e(!0),r(m,null,b(we.value,(t,n)=>(e(),x(f(N),{key:n,label:t.name,value:t.id},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`,`teleported`])],2)):d(``,!0),n(`div`,{class:h(i.$style.group)},[v(f(E),{placement:`right`},{content:S(()=>[v(f(T),{tag:`span`,keypath:`executionsFilter.customData.docsTooltip`,scope:`global`})]),default:S(()=>[n(`span`,{class:h([i.$style.label,i.$style.savedDataLabel])},[n(`span`,null,u(f(w).baseText(`executionsFilter.savedData`)),1),v(f(D),{class:h(i.$style.tooltipIcon),icon:`circle-help`,size:`medium`},null,8,[`class`])],2)]),_:1}),n(`div`,{class:h(i.$style.subGroup)},[n(`label`,ye,u(f(w).baseText(`executionsFilter.savedDataKey`)),1),v(f(E),{disabled:U.value,placement:`top`},{content:S(()=>[v(f(T),{tag:`span`,keypath:`executionsFilter.customData.inputTooltip`,scope:`global`},{link:S(()=>[n(`a`,{href:`#`,"data-test-id":`executions-filter-view-plans-link`,onClick:_($,[`prevent`])},u(f(w).baseText(`executionsFilter.customData.inputTooltip.link`)),1)]),_:1})]),default:S(()=>[v(f(j),{id:`execution-filter-saved-data-key`,name:`execution-filter-saved-data-key`,type:`text`,disabled:!U.value,placeholder:f(w).baseText(`executionsFilter.savedDataKeyPlaceholder`),"model-value":K.metadata[0]?.key,"data-test-id":`execution-filter-saved-data-key-input`,"onUpdate:modelValue":a[8]||=e=>Q(0,`key`,e)},null,8,[`disabled`,`placeholder`,`model-value`])]),_:1},8,[`disabled`]),n(`div`,{class:h(i.$style.checkboxWrapper)},[v(f(E),{disabled:U.value,placement:`top`},{content:S(()=>[v(f(T),{tag:`span`,keypath:`executionsFilter.customData.inputTooltip`,scope:`global`},{link:S(()=>[n(`a`,{href:`#`,onClick:_($,[`prevent`])},u(f(w).baseText(`executionsFilter.customData.inputTooltip.link`)),1)]),_:1})]),default:S(()=>[v(f(ne),{label:f(w).baseText(`executionsFilter.savedDataExactMatch`),"model-value":K.metadata[0]?.exactMatch,disabled:!U.value,"data-test-id":`execution-filter-saved-data-exact-match-checkbox`,"onUpdate:modelValue":Oe},null,8,[`label`,`model-value`,`disabled`])]),_:1},8,[`disabled`])],2),n(`label`,be,u(f(w).baseText(`executionsFilter.savedDataValue`)),1),v(f(E),{disabled:U.value,placement:`top`},{content:S(()=>[v(f(T),{tag:`span`,keypath:`executionsFilter.customData.inputTooltip`,scope:`global`},{link:S(()=>[n(`a`,{href:`#`,onClick:_($,[`prevent`])},u(f(w).baseText(`executionsFilter.customData.inputTooltip.link`)),1)]),_:1})]),default:S(()=>[v(f(j),{id:`execution-filter-saved-data-value`,name:`execution-filter-saved-data-value`,type:`text`,disabled:!U.value,placeholder:f(w).baseText(`executionsFilter.savedDataValuePlaceholder`),"model-value":K.metadata[0]?.value,"data-test-id":`execution-filter-saved-data-value-input`,"onUpdate:modelValue":a[9]||=e=>Q(0,`value`,e)},null,8,[`disabled`,`placeholder`,`model-value`])]),_:1},8,[`disabled`])],2)],2),Z.value?(e(),x(f(k),{key:5,variant:`ghost`,class:h(i.$style.resetBtn),size:`large`,"data-test-id":`executions-filter-reset-button`,onClick:De},{default:S(()=>[t(u(f(w).baseText(`executionsFilter.reset`)),1)]),_:1},8,[`class`])):d(``,!0)])]),_:1},8,[`side`,`align`,`content-class`]))}}),[[`__cssModules`,{$style:{group:`_group_1yvvq_125`,label:`_label_1yvvq_126`,savedDataLabel:`_savedDataLabel_1yvvq_133`,subGroup:`_subGroup_1yvvq_141`,checkboxWrapper:`_checkboxWrapper_1yvvq_149`,dates:`_dates_1yvvq_157`,divider:`_divider_1yvvq_165`,resetBtn:`_resetBtn_1yvvq_170`,tooltipIcon:`_tooltipIcon_1yvvq_175`,filterButton:`_filterButton_1yvvq_179`,filterBadge:`_filterBadge_1yvvq_182`,"popover-content":`_popover-content_1yvvq_189`}}],[`__scopeId`,`data-v-0c6b43c6`]]),U=P(o({__name:`ExecutionStopAllText`,props:{executions:{}},setup(n){let r=n,i=L(),a=C(),o=l(()=>r.executions.find(e=>[`new`,`running`,`waiting`].includes(e.status))),s=I();function c(){s.track(`User initiated stop many executions`),i.openModal(z)}return(n,r)=>o.value?(e(),x(f(O),{key:0,class:h(n.$style.stopAll),size:`small`,color:`text-base`,onClick:c},{default:S(()=>[t(u(f(a).baseText(`generic.stopAll`)),1)]),_:1},8,[`class`])):d(``,!0)}}),[[`__cssModules`,{$style:{stopAll:`_stopAll_jkvxp_125`}}]]),W=o({__name:`ExecutionsTime`,props:{startTime:{}},setup(t){let n=t,a=C(),o=i(-1),s=i(null),c=l(()=>{if(!n.startTime)return`...`;let e=o.value-new Date(n.startTime).getTime();return a.displayTimer(e)});p(()=>{d(),s.value=setInterval(()=>{d()},1e3)}),y(()=>{s.value!==null&&clearInterval(s.value)});function d(){o.value=new Date().getTime()}return(t,n)=>(e(),r(`span`,null,u(c.value),1))}});export{B as i,U as n,H as r,W as t};
//# sourceMappingURL=ExecutionsTime-VvdTfRMo.js.map