n8n-editor-ui
Version:
Workflow Editor UI for n8n
2 lines • 6.31 kB
JavaScript
!function(){try{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"n8n@2.13.4"}}catch(e){}}(),System.register(["./vue.runtime.esm-bundler-legacy-IafOlCW8.js","./_MapCache-legacy-DwgdC8YO.js","./src-legacy-Dwzr7bD0.js","./_plugin-vue_export-helper-legacy-DEZAmQqp.js","./sanitize-html-legacy-ChR3ikxn.js","./users.store-legacy-OKuN0qAC.js","./constants-legacy-DNCca_FT.js","./merge-legacy-uu1aGqHK.js","./_baseOrderBy-legacy-PsQY_Pvh.js","./dateformat-legacy-BxdD_OP7.js","./useDebounce-legacy-CT3oYGrC.js","./insights.constants-legacy-CEIQi13p.js","./insights.utils-legacy-uA0D6qm5.js","./smartDecimal-legacy-B7pUJK8p.js"],(function(e,t){var a,i,l,o,n,s,r,d,u,c,f,m,b,h,y,g,p,v,_,w,k,j,S,T,x,E,M,D,R,I,N,$,C,B,U,P,z,L;return{setters:[function(e){a=e.$,i=e.A,l=e.C,o=e.E,n=e.F,s=e.Ft,r=e.H,d=e.M,u=e.N,c=e.O,f=e.S,m=e.Sn,b=e.Wt,h=e._,y=e._n,g=e.dt,p=e.gt,v=e.j,_=e.st,w=e.vn,k=e.w,j=e.yt},function(e){S=e.bt},function(e){T=e.Mi,x=e.Yi,E=e._,M=e.na,D=e.ut},function(e){R=e.t},function(e){},function(e){I=e.en},function(e){N=e.ms},function(e){},function(e){},function(e){},function(e){},function(e){$=e.a},function(e){C=e.l,B=e.o,U=e.s},function(e){P=e.t}],execute:function(){(z=document.createElement("style")).textContent='._ellipsis_14mui_125{white-space:nowrap;text-overflow:ellipsis;width:fit-content;max-width:100%;line-height:1.2;overflow:hidden}._link_14mui_134{height:100%;color:var(--color--text);align-items:center;max-width:100%;text-decoration:underline;display:inline-flex}._link_14mui_134:hover{color:var(--color--text--shade-1)}._blurryCover_14mui_146{z-index:1;backdrop-filter:blur(10px);justify-content:center;align-items:center;width:100%;height:100%;display:flex;position:absolute;top:0;left:0}._blurryCover_14mui_146:before{content:"";background:var(--color--foreground--tint-2);opacity:.5;z-index:-1;width:100%;height:100%;position:absolute;top:0;left:0}\n/*$vite$:1*/',document.head.appendChild(z);try{O="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},(W=(new O.Error).stack)&&(O._sentryDebugIds=O._sentryDebugIds||{},O._sentryDebugIds[W]="3ead5724-7a2a-4729-9e62-b10a1b1039e5",O._sentryDebugIdIdentifier="sentry-dbid-3ead5724-7a2a-4729-9e62-b10a1b1039e5")}catch(O){}var O,W;L=u({__name:"InsightsTableWorkflows",props:r({data:{},loading:{type:Boolean},isDashboardEnabled:{type:Boolean}},{sortBy:{},sortByModifiers:{}}),emits:r(["update:options"],["update:sortBy"]),setup(e,{emit:r}){const u=d((async()=>await M((()=>t.import("./InsightsPaywall-legacy-CK4gtv-x.js")),void 0))),R=e,z=S(),L=I(),O=Array.from({length:10},((e,t)=>({workflowId:`sample-workflow-${t+1}`,workflowName:`Sample Workflow ${t+1}`,total:Math.floor(2e3*Math.random())+500,failed:Math.floor(100*Math.random())+20,failureRate:100*Math.random(),timeSaved:Math.floor(3e5*Math.random())+6e4,averageRunTime:Math.floor(6e4*Math.random())+15e3,projectName:`Sample Project ${t+1}`,projectId:`sample-project-${t+1}`,succeeded:Math.floor(2e3*Math.random())+500,runTime:Math.floor(6e4*Math.random())+15e3}))),W={data:O,count:O.length},A=f((()=>R.isDashboardEnabled?R.data:W)),F=f((()=>A.value.data)),H=s([{title:"Name",key:"workflowName",width:400,disableSort:!R.isDashboardEnabled},{title:z.baseText("insights.banner.title.total"),key:"total",value:e=>e.total.toLocaleString("en-US"),disableSort:!R.isDashboardEnabled},{title:z.baseText("insights.banner.title.failed"),key:"failed",value:e=>e.failed.toLocaleString("en-US"),disableSort:!R.isDashboardEnabled},{title:z.baseText("insights.banner.title.failureRate"),key:"failureRate",value:e=>P(U(e.failureRate))+$.failureRate(e.failureRate),disableSort:!R.isDashboardEnabled},{title:z.baseText("insights.banner.title.timeSaved"),key:"timeSaved",value:e=>P(C(e.timeSaved))+$.timeSaved(e.timeSaved),disableSort:!R.isDashboardEnabled},{title:z.baseText("insights.banner.title.averageRunTime"),key:"averageRunTime",value:e=>P(B(e.averageRunTime))+$.averageRunTime(e.averageRunTime),disableSort:!R.isDashboardEnabled},{title:z.baseText("insights.dashboard.table.projectName"),key:"projectName",disableSort:!0}]),V=g(e,"sortBy"),Y=s(0),q=s(25),J=r,K=(e,t)=>({name:N.WORKFLOW,params:{name:e.workflowId},query:t});return p(V,(e=>{L.track("User sorted insights table",{sorted_by:(e??[]).map((e=>({...e,label:H.value.find((t=>t.key===e.id))?.title})))})})),(t,s)=>(a(),o("div",null,[v(b(x),{bold:"",tag:"h3",size:"medium",class:"mb-s"},{default:j((()=>[i(m(b(z).baseText("insights.dashboard.table.title")),1)])),_:1}),v(b(E),{"sort-by":V.value,"onUpdate:sortBy":s[0]||(s[0]=e=>V.value=e),page:Y.value,"onUpdate:page":s[1]||(s[1]=e=>Y.value=e),"items-per-page":q.value,"onUpdate:itemsPerPage":s[2]||(s[2]=e=>q.value=e),items:F.value,headers:H.value,"items-length":A.value.count,"onUpdate:options":s[3]||(s[3]=e=>J("update:options",e))},c({"item.workflowName":j((({item:e})=>[(a(),k(_(e.workflowId?b(D):"div"),w(n(e.workflowId?{to:K(e),class:t.$style.link,onClick:()=>(e=>{L.track("User clicked on workflow from insights table",{workflow_id:e.workflowId})})(e)}:{})),{default:j((()=>[v(b(T),{content:e.workflowName,placement:"top"},{default:j((()=>[l("div",{class:y(t.$style.ellipsis)},m(e.workflowName),3)])),_:2},1032,["content"])])),_:2},1040))])),"item.timeSaved":j((({item:e,value:l})=>[!e.timeSaved&&e.workflowId?(a(),k(b(D),{key:0,to:K(e,{settings:"true"}),class:y(t.$style.link)},{default:j((()=>[i(m(b(z).baseText("insights.dashboard.table.estimate")),1)])),_:1},8,["to","class"])):(a(),o(h,{key:1},[i(m(l),1)],64))])),"item.projectName":j((({item:e})=>[e.projectName?(a(),k(b(T),{key:0,content:e.projectName,placement:"top"},{default:j((()=>[l("div",{class:y(t.$style.ellipsis)},m(e.projectName),3)])),_:2},1032,["content"])):(a(),o(h,{key:1},[i(" - ")],64))])),_:2},[e.isDashboardEnabled?void 0:{name:"cover",fn:j((()=>[l("div",{class:y(t.$style.blurryCover)},[v(b(u))],2)])),key:"0"}]),1032,["sort-by","page","items-per-page","items","headers","items-length"])]))}}),e("default",R(L,[["__cssModules",{$style:{ellipsis:"_ellipsis_14mui_125",link:"_link_14mui_134",blurryCover:"_blurryCover_14mui_146"}}]]))}}}));
//# sourceMappingURL=InsightsTableWorkflows-legacy-BfMGBaXm.js.map