UNPKG

n8n-editor-ui

Version:

Workflow Editor UI for n8n

2 lines 1.77 kB
(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]=`b4dbda38-8279-420c-961d-c340e2f3d39f`,e._sentryDebugIdIdentifier=`sentry-dbid-b4dbda38-8279-420c-961d-c340e2f3d39f`)})()}catch{}import{$ as e,N as t,S as n,Wt as r,w as i}from"./vue.runtime.esm-bundler-C3C09Zii.js";import{at as a}from"./core-Bz5WjPxS.js";import{a as o,t as s}from"./insights.constants-G43L9nIf.js";import{o as c}from"./insights.utils-YrW9I9r0.js";import{l}from"./chart-WZvcQ3IV.js";import{t as u}from"./smartDecimal-DntD9qTh.js";import{r as d}from"./dist-DHUGszlM.js";import{n as f,r as p}from"./chartjs.utils-Bw-74clp.js";var m=t({__name:`InsightsChartAverageRuntime`,props:{data:{},type:{},granularity:{},startDate:{},endDate:{}},setup(t){let m=t,h=a(),g=n(()=>f({plugins:{tooltip:{callbacks:{label:e=>`${e.dataset.label??``} ${u(e.parsed.y)}${o[m.type](e.parsed.y)}`}}}})),_=n(()=>{let e=[],t=[];for(let n of m.data){e.push(s[m.granularity](n.date));let r=c(n.values.averageRunTime);t.push(r)}return{labels:e,datasets:[{label:h.baseText(`insights.banner.title.averageRunTime`),data:t,cubicInterpolationMode:`monotone`,fill:`origin`,backgroundColor:e=>p(e.chart.ctx,292),borderColor:`rgba(255, 64, 39, 1)`}]}});return(t,n)=>(e(),i(r(d),{"data-test-id":`insights-chart-average-runtime`,data:_.value,options:g.value,plugins:[r(l)]},null,8,[`data`,`options`,`plugins`]))}});export{m as default}; //# sourceMappingURL=InsightsChartAverageRuntime-y2Emf95h.js.map