n8n-editor-ui
Version:
Workflow Editor UI for n8n
2 lines • 1.63 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]=`5538df5d-b187-459f-b1aa-02c1f412a074`,e._sentryDebugIdIdentifier=`sentry-dbid-5538df5d-b187-459f-b1aa-02c1f412a074`)})()}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,l as o}from"./core-Bz5WjPxS.js";import{a as s,t as c}from"./insights.constants-G43L9nIf.js";import{s as l}from"./insights.utils-YrW9I9r0.js";import{t as u}from"./smartDecimal-DntD9qTh.js";import{t as d}from"./dist-DHUGszlM.js";import{t as f}from"./chartjs.utils-Bw-74clp.js";var p=t({__name:`InsightsChartFailureRate`,props:{data:{},type:{},granularity:{},startDate:{},endDate:{}},setup(t){let p=t,m=a(),h=o(`--color--primary`,document.body),g=n(()=>f({plugins:{tooltip:{callbacks:{label:e=>`${e.dataset.label??``} ${u(e.parsed.y)}${s[p.type](e.parsed.y)}`}}}})),_=n(()=>{let e=[],t=[];for(let n of p.data)e.push(c[p.granularity](n.date)),t.push(l(n.values.failureRate));return{labels:e,datasets:[{label:m.baseText(`insights.banner.title.failureRate`),data:t,backgroundColor:h.value}]}});return(t,n)=>(e(),i(r(d),{"data-test-id":`insights-chart-failure-rate`,data:_.value,options:g.value},null,8,[`data`,`options`]))}});export{p as default};
//# sourceMappingURL=InsightsChartFailureRate-C3dsv4PL.js.map