n8n-editor-ui
Version:
Workflow Editor UI for n8n
3 lines • 13.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.13.4`}}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]=`55126d68-1a72-4d83-9d24-197d84d2ffb7`,e._sentryDebugIdIdentifier=`sentry-dbid-55126d68-1a72-4d83-9d24-197d84d2ffb7`)})()}catch{}import{o as e}from"./chunk-DxpFCn6T.js";import{$ as t,A as n,C as r,E as i,Ft as a,K as o,N as s,Nt as c,O as l,S as u,Sn as d,T as f,Wt as p,X as m,_ as h,_n as g,gt as ee,h as _,j as v,q as y,rt as b,w as x,yt as S}from"./vue.runtime.esm-bundler-D9KLAxvJ.js";import{_t as C,bt as w,xt as T}from"./_MapCache-CUJwh2qp.js";import{$i as E,Et as D,Fi as O,Mi as k,Qi as A,Tt as j,Ut as M,W as te,Zi as N,lt as P,yt as ne}from"./src-wni2AGA3.js";import{t as F}from"./_plugin-vue_export-helper-Dm3nT7Ps.js";import{t as I}from"./date-picker-_u2qOcgh.js";import{As as re,en as L,r as R,va as z}from"./users.store-BHWXXawf.js";import{Bs as B,pl as ie}from"./constants-CIP7tKq1.js";import{t as ae}from"./useDebounce-CTeIt-cH.js";import{t as oe}from"./usePageRedirectionHelper-Dxb_B6-R.js";import{t as se}from"./WorkflowTagsDropdown-BqoujWpp.js";import{t as ce}from"./AnnotationTagsDropdown.ee-Dib88PNH.js";var V=F(s({__name:`ConcurrentExecutionsHeader`,props:{runningExecutionsCount:{},concurrencyCap:{},isCloudDeployment:{type:Boolean}},emits:[`goToUpgrade`],setup(e,{emit:a}){let o=e,s=a,c=w(),l=u(()=>{let e=c.baseText(`executionsList.activeExecutions.tooltip`,{interpolate:{running:o.runningExecutionsCount,cap:o.concurrencyCap}});return e+=`
`+c.baseText(`executionsList.activeExecutions.evaluationNote`),e}),f=u(()=>o.runningExecutionsCount===0?c.baseText(`executionsList.activeExecutions.none`):c.baseText(`executionsList.activeExecutions.header`,{interpolate:{running:o.runningExecutionsCount,cap:o.concurrencyCap}}));return(e,a)=>(t(),i(`div`,{"data-test-id":`concurrent-executions-header`,class:g(e.$style.concurrentExecutionHeader)},[v(p(N),null,{default:S(()=>[n(d(f.value),1)]),_:1}),v(p(k),null,{content:S(()=>[r(`div`,{class:g(e.$style.tooltip)},[n(d(l.value)+` `,1),o.isCloudDeployment?(t(),x(p(P),{key:0,bold:``,size:`small`,class:g(e.$style.link),onClick:a[0]||=e=>s(`goToUpgrade`)},{default:S(()=>[n(d(p(c).baseText(`generic.upgradeNow`)),1)]),_:1},8,[`class`])):(t(),x(p(P),{key:1,class:g(e.$style.link),href:p(c).baseText(`executions.concurrency.docsLink`),target:`_blank`},{default:S(()=>[n(d(p(c).baseText(`generic.viewDocs`)),1)]),_:1},8,[`class`,`href`]))],2)]),default:S(()=>[v(p(E),{icon:`info`,class:`ml-2xs`})]),_:1})],2))}}),[[`__cssModules`,{$style:{tooltip:`_tooltip_1c31h_125`,link:`_link_1c31h_130`,concurrentExecutionHeader:`_concurrentExecutionHeader_1c31h_134`}}]]),H={"data-test-id":`execution-filter-form`},U={for:`execution-filter-workflows`},W={for:`execution-filter-tags`},le={for:`execution-filter-status`},ue={for:`execution-filter-start-date`},de={for:`execution-filter-annotation-tags`},fe={for:`execution-filter-annotation-vote`},pe={for:`execution-filter-saved-data-key`},me={for:`execution-filter-saved-data-value`},G=`YYYY-MM-DD HH:mm`,K=F(s({__name:`ExecutionsFilter`,props:{workflows:{default:()=>[]},popoverSide:{default:`bottom`},popoverAlign:{default:`center`},teleported:{type:Boolean,default:!0}},emits:[`filterChanged`],setup(e,{emit:s}){let m=re(),{debounce:y}=ae(),w=L(),N=oe(),P=e,F=s,R=y(F,{debounceTime:500}),B=a(!1),V=u(()=>m.isEnterpriseFeatureEnabled[ie.AdvancedExecutionFilters]),K=u(()=>V.value),q=u(()=>!1),J=()=>({status:`all`,workflowId:`all`,tags:[],annotationTags:[],startDate:``,endDate:``,metadata:[{key:``,value:``,exactMatch:!1}],vote:`all`}),Y=c(J());ee(Y,e=>{e.startDate||e.endDate?R(`filterChanged`,e):F(`filterChanged`,e)},{deep:!0,immediate:!1});let he=u(()=>[{id:`all`,name:C.baseText(`executionsList.anyStatus`)},{id:`error`,name:C.baseText(`executionsList.error`)},{id:`canceled`,name:C.baseText(`executionsList.canceled`)},{id:`new`,name:C.baseText(`executionsList.new`)},{id:`running`,name:C.baseText(`executionsList.running`)},{id:`success`,name:C.baseText(`executionsList.success`)},{id:`waiting`,name:C.baseText(`executionsList.waiting`)}]),ge=u(()=>[{id:`all`,name:C.baseText(`executionsFilter.annotation.rating.all`)},{id:`up`,name:C.baseText(`executionsFilter.annotation.rating.good`)},{id:`down`,name:C.baseText(`executionsFilter.annotation.rating.bad`)}]),X=u(()=>[Y.status!==`all`,Y.workflowId!==`all`&&P.workflows.length,!z(Y.tags),!z(Y.annotationTags),Y.vote!==`all`,!z(Y.metadata),!!Y.startDate,!!Y.endDate].filter(Boolean).length),Z=(e,t,n)=>{Y.metadata[e]||(Y.metadata[e]={key:``,value:``,exactMatch:!1}),Y.metadata[e][t]=n,B.value||=(w.track(`User filtered executions with custom data`),!0),R(`filterChanged`,Y)},Q=()=>{F(`filterChanged`,Y)},_e=()=>{F(`filterChanged`,Y)},ve=()=>{Object.assign(Y,J())},$=()=>{N.goToUpgrade(`custom-data-filter`,`upgrade-custom-data-filter`)},ye=e=>{typeof e==`boolean`&&Z(0,`exactMatch`,e)};return o(()=>{B.value=!1}),(a,o)=>(t(),x(p(te),{side:P.popoverSide,align:P.popoverAlign,"position-strategy":`absolute`,width:`440px`,"content-class":a.$style[`popover-content`],"show-arrow":``},{trigger:S(()=>[v(p(A),{variant:`subtle`,iconOnly:``,icon:`funnel`,size:`medium`,"aria-label":p(C).baseText(`forms.resourceFiltersDropdown.filters`),active:!!X.value,"data-test-id":`executions-filter-button`,class:g(a.$style.filterButton)},l({_:2},[X.value?{name:`default`,fn:S(()=>[v(p(M),{theme:`primary`,class:g([`mr-4xs`,a.$style.filterBadge]),"data-test-id":`execution-filter-badge`},{default:S(()=>[n(d(X.value),1)]),_:1},8,[`class`])]),key:`0`}:void 0]),1032,[`aria-label`,`active`,`class`])]),content:S(()=>[r(`div`,H,[e.workflows&&e.workflows.length>0?(t(),i(`div`,{key:0,class:g(a.$style.group)},[r(`label`,U,d(p(C).baseText(`workflows.heading`)),1),v(p(j),{id:`execution-filter-workflows`,modelValue:Y.workflowId,"onUpdate:modelValue":o[0]||=e=>Y.workflowId=e,placeholder:p(C).baseText(`executionsFilter.selectWorkflow`),filterable:``,"data-test-id":`executions-filter-workflows-select`,teleported:e.teleported},{default:S(()=>[r(`div`,null,[(t(!0),i(h,null,b(P.workflows,(e,n)=>(t(),x(p(D),{key:n,label:e.name,value:e.id},null,8,[`label`,`value`]))),128))])]),_:1},8,[`modelValue`,`placeholder`,`teleported`])],2)):f(``,!0),q.value?(t(),i(`div`,{key:1,class:g(a.$style.group)},[r(`label`,W,d(p(C).baseText(`workflows.filters.tags`)),1),v(se,{id:`execution-filter-tags`,modelValue:Y.tags,"onUpdate:modelValue":[o[1]||=e=>Y.tags=e,Q],placeholder:p(C).baseText(`workflowOpen.filterWorkflows`),"create-enabled":!1,"data-test-id":`executions-filter-tags-select`},null,8,[`modelValue`,`placeholder`])],2)):f(``,!0),r(`div`,{class:g(a.$style.group)},[r(`label`,le,d(p(C).baseText(`executionsList.status`)),1),v(p(j),{id:`execution-filter-status`,modelValue:Y.status,"onUpdate:modelValue":o[2]||=e=>Y.status=e,placeholder:p(C).baseText(`executionsFilter.selectStatus`),filterable:``,"data-test-id":`executions-filter-status-select`,teleported:e.teleported},{default:S(()=>[(t(!0),i(h,null,b(he.value,(e,n)=>(t(),x(p(D),{key:n,label:e.name,value:e.id},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`,`teleported`])],2),r(`div`,{class:g(a.$style.group)},[r(`label`,ue,d(p(C).baseText(`executionsFilter.start`)),1),r(`div`,{class:g(a.$style.dates)},[v(p(I),{id:`execution-filter-start-date`,modelValue:Y.startDate,"onUpdate:modelValue":o[3]||=e=>Y.startDate=e,type:`datetime`,teleported:e.teleported,format:G,placeholder:p(C).baseText(`executionsFilter.startDate`),"data-test-id":`executions-filter-start-date-picker`},null,8,[`modelValue`,`teleported`,`placeholder`]),r(`span`,{class:g(a.$style.divider)},`to`,2),v(p(I),{id:`execution-filter-end-date`,modelValue:Y.endDate,"onUpdate:modelValue":o[4]||=e=>Y.endDate=e,type:`datetime`,teleported:e.teleported,format:G,placeholder:p(C).baseText(`executionsFilter.endDate`),"data-test-id":`executions-filter-end-date-picker`},null,8,[`modelValue`,`teleported`,`placeholder`])],2)],2),K.value?(t(),i(`div`,{key:2,class:g(a.$style.group)},[r(`label`,de,d(p(C).baseText(`executionsFilter.annotation.tags`)),1),v(ce,{id:`execution-filter-annotation-tags`,modelValue:Y.annotationTags,"onUpdate:modelValue":[o[5]||=e=>Y.annotationTags=e,_e],placeholder:p(C).baseText(`workflowOpen.filterWorkflows`),"create-enabled":!1,"data-test-id":`executions-filter-annotation-tags-select`},null,8,[`modelValue`,`placeholder`])],2)):f(``,!0),K.value?(t(),i(`div`,{key:3,class:g(a.$style.group)},[r(`label`,fe,d(p(C).baseText(`executionsFilter.annotation.rating`)),1),v(p(j),{id:`execution-filter-annotation-vote`,modelValue:Y.vote,"onUpdate:modelValue":o[6]||=e=>Y.vote=e,placeholder:p(C).baseText(`executionsFilter.annotation.selectVoteFilter`),filterable:``,"data-test-id":`executions-filter-annotation-vote-select`,teleported:e.teleported},{default:S(()=>[(t(!0),i(h,null,b(ge.value,(e,n)=>(t(),x(p(D),{key:n,label:e.name,value:e.id},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`,`teleported`])],2)):f(``,!0),r(`div`,{class:g(a.$style.group)},[v(p(k),{placement:`right`},{content:S(()=>[v(p(T),{tag:`span`,keypath:`executionsFilter.customData.docsTooltip`,scope:`global`})]),default:S(()=>[r(`span`,{class:g([a.$style.label,a.$style.savedDataLabel])},[r(`span`,null,d(p(C).baseText(`executionsFilter.savedData`)),1),v(p(E),{class:g(a.$style.tooltipIcon),icon:`circle-help`,size:`medium`},null,8,[`class`])],2)]),_:1}),r(`div`,{class:g(a.$style.subGroup)},[r(`label`,pe,d(p(C).baseText(`executionsFilter.savedDataKey`)),1),v(p(k),{disabled:V.value,placement:`top`},{content:S(()=>[v(p(T),{tag:`span`,keypath:`executionsFilter.customData.inputTooltip`,scope:`global`},{link:S(()=>[r(`a`,{href:`#`,"data-test-id":`executions-filter-view-plans-link`,onClick:_($,[`prevent`])},d(p(C).baseText(`executionsFilter.customData.inputTooltip.link`)),1)]),_:1})]),default:S(()=>[v(p(O),{id:`execution-filter-saved-data-key`,name:`execution-filter-saved-data-key`,type:`text`,disabled:!V.value,placeholder:p(C).baseText(`executionsFilter.savedDataKeyPlaceholder`),"model-value":Y.metadata[0]?.key,"data-test-id":`execution-filter-saved-data-key-input`,"onUpdate:modelValue":o[7]||=e=>Z(0,`key`,e)},null,8,[`disabled`,`placeholder`,`model-value`])]),_:1},8,[`disabled`]),r(`div`,{class:g(a.$style.checkboxWrapper)},[v(p(k),{disabled:V.value,placement:`top`},{content:S(()=>[v(p(T),{tag:`span`,keypath:`executionsFilter.customData.inputTooltip`,scope:`global`},{link:S(()=>[r(`a`,{href:`#`,onClick:_($,[`prevent`])},d(p(C).baseText(`executionsFilter.customData.inputTooltip.link`)),1)]),_:1})]),default:S(()=>[v(p(ne),{label:p(C).baseText(`executionsFilter.savedDataExactMatch`),"model-value":Y.metadata[0]?.exactMatch,disabled:!V.value,"data-test-id":`execution-filter-saved-data-exact-match-checkbox`,"onUpdate:modelValue":ye},null,8,[`label`,`model-value`,`disabled`])]),_:1},8,[`disabled`])],2),r(`label`,me,d(p(C).baseText(`executionsFilter.savedDataValue`)),1),v(p(k),{disabled:V.value,placement:`top`},{content:S(()=>[v(p(T),{tag:`span`,keypath:`executionsFilter.customData.inputTooltip`,scope:`global`},{link:S(()=>[r(`a`,{href:`#`,onClick:_($,[`prevent`])},d(p(C).baseText(`executionsFilter.customData.inputTooltip.link`)),1)]),_:1})]),default:S(()=>[v(p(O),{id:`execution-filter-saved-data-value`,name:`execution-filter-saved-data-value`,type:`text`,disabled:!V.value,placeholder:p(C).baseText(`executionsFilter.savedDataValuePlaceholder`),"model-value":Y.metadata[0]?.value,"data-test-id":`execution-filter-saved-data-value-input`,"onUpdate:modelValue":o[8]||=e=>Z(0,`value`,e)},null,8,[`disabled`,`placeholder`,`model-value`])]),_:1},8,[`disabled`])],2)],2),X.value?(t(),x(p(A),{key:4,variant:`ghost`,class:g(a.$style.resetBtn),size:`large`,"data-test-id":`executions-filter-reset-button`,onClick:ve},{default:S(()=>[n(d(p(C).baseText(`executionsFilter.reset`)),1)]),_:1},8,[`class`])):f(``,!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-39fa2d8f`]]),q=F(s({__name:`ExecutionStopAllText`,props:{executions:{}},setup(e){let r=e,i=R(),a=w(),o=u(()=>r.executions.find(e=>[`new`,`running`,`waiting`].includes(e.status))),s=L();function c(){s.track(`User initiated stop many executions`),i.openModal(B)}return(e,r)=>o.value?(t(),x(p(N),{key:0,class:g(e.$style.stopAll),size:`small`,color:`text-base`,onClick:c},{default:S(()=>[n(d(p(a).baseText(`generic.stopAll`)),1)]),_:1},8,[`class`])):f(``,!0)}}),[[`__cssModules`,{$style:{stopAll:`_stopAll_jkvxp_125`}}]]),J=s({__name:`ExecutionsTime`,props:{startTime:{}},setup(e){let n=e,r=w(),o=a(-1),s=a(null),c=u(()=>{if(!n.startTime)return`...`;let e=o.value-new Date(n.startTime).getTime();return r.displayTimer(e)});m(()=>{l(),s.value=setInterval(()=>{l()},1e3)}),y(()=>{s.value!==null&&clearInterval(s.value)});function l(){o.value=new Date().getTime()}return(e,n)=>(t(),i(`span`,null,d(c.value),1))}});export{V as i,q as n,K as r,J as t};
//# sourceMappingURL=ExecutionsTime-CnDmC4T3.js.map