UNPKG

n8n-editor-ui

Version:

Workflow Editor UI for n8n

2 lines 1.83 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.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]=`137abe45-700a-4a9f-850c-f8acc9725c3a`,e._sentryDebugIdIdentifier=`sentry-dbid-137abe45-700a-4a9f-850c-f8acc9725c3a`)})()}catch{}import{$ as e,N as t,S as n,Wt as r,w as i}from"./vue.runtime.esm-bundler-D9KLAxvJ.js";import{bt as a}from"./_MapCache-CUJwh2qp.js";import"./merge-BqvKZ38d.js";import"./dateformat-CYfyw486.js";import{a as o,t as s}from"./insights.constants-BWd0PYhd.js";import{o as c}from"./insights.utils-BGXnT8rV.js";import{l}from"./chart-y0goNHjN.js";import{t as u}from"./smartDecimal-CsR7Dvbd.js";import{r as d}from"./dist-DCXTMsxp.js";import{n as f,r as p}from"./chartjs.utils-CB90P002.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-D1KNfRDY.js.map