PageSourceSearch

https://report.ostorlab.co/_nuxt/CjjE-TgC.js

js ostorlab.co collected 2026-10-02 17:38:41 UTC 5,117 bytes, 1 lines download raw bytes

1import{E as S,d4 as _,d5 as k,d6 as p,_ as v,r as g,o as c,a as M,d as a,ab as m,g as r,e as s,bj as y,h,f as d,t as i,c as l,V as x}from"./Cwz_WouP.js";import{c as n}from"./Kg3O6Ei-.js";import{H as w}from"./DKX3_0TM.js";import{M as D}from"./CIyQ28KQ.js";import{V as T}from"./CTdVocTC.js";import{V as $}from"./DFGCUIv2.js";import"./CRBiUrO-.js";import"./DW2lbNFA.js";import"./U5qy42Yi.js";const V={data:[]},C=S({name:"OutOfSloMetrics",components:{HorizontalSkeletonLoader:w},data(){return{metricsService:new D(this.$axios),loading:!0,metrics:[],metricTypes:[k.CountOutOfSlo],series:[{name:this.$t("components.dashboard.metrics.remediation.OutOfSloMetrics.series_name"),data:[]}],chartOptions:{chart:{animations:{enabled:!1},height:320,type:"area",fontFamily:n.fontFamily,toolbar:{show:!1},zoom:{enabled:!1}},colors:[n.colors.accent,n.colors.success],dataLabels:{enabled:!1},stroke:{width:2,curve:"smooth"},fill:{type:"gradient",gradient:{shadeIntensity:1,opacityFrom:.28,opacityTo:.04,stops:[0,90,100]}},grid:{borderColor:"rgba(0, 0, 0, 0.05)",strokeDashArray:4},xaxis:{type:"datetime",labels:{format:n.labelsDatetimeFormat.xaxis},categories:[]},tooltip:{enabled:!0,x:{format:n.labelsDatetimeFormat.tooltip,formatter(e,t){return typeof e=="number"?new Date(e).toLocaleDateString():p(e)}},y:{formatter:(e,t)=>p(e)}}}}},computed:{outOfSlo(){return this.metrics.find(e=>e?.timeType===_.CountOutOfSlo)?.values||[]},hasData(){return!this.series||this.series.length===0?!1:this.series.some(e=>e.data&&e.data.length>0&&e.data.some(t=>t>0))},totalBreachesCalculated(){return this.series?this.series.reduce((e,t)=>{const o=(t.data||[]).reduce((u,f)=>u+(f||0),0);return e+o},0):0}},async beforeMount(){await this.getTicketStatusMetrics()},methods:{async getTicketStatusMetrics(){this.loading=!0;try{this.metrics=await this.metricsService.getDashboardMetrics({metricTypes:this.metricTypes,dates:{after:n.startDate,before:n.endDate}}),this.updateSeries()}catch(e){await this.$store.dispatch("contextui/reportError",e?.message||this.$t("components.dashboard.metrics.remediation.OutOfSloMetrics.errors.fetch_failed"))}finally{this.loading=!1}},updateSeries(){const e=[],t={outOfSlo:this.series.find(o=>o?.name===this.$t("components.dashboard.metrics.remediation.OutOfSloMetrics.series_name"))||V};(this.outOfSlo||[]).forEach(o=>{t.outOfSlo.data.push(o?.value||0),e.push(o?.time)}),(this.chartOptions?.xaxis).categories=e}}}),z={class:"d-flex align-center justify-space-between mb-3"},B={class:"d-flex align-center ga-2"},E={class:"text-subtitle-2 font-weight-bold text-grey-darken-4"},L={class:"text-caption text-grey-darken-1 font-weight-medium"},A={key:0,class:"d-flex align-center ga-1"},F={key:0,class:"py-4"},H={key:1,class:"chart-wrapper"},N={key:2,class:"empty-chart-state pa-6 text-center d-flex flex-column align-center justify-center"},j={class:"text-subtitle-2 font-weight-bold text-grey-darken-3 mb-1"},I={class:"text-caption text-grey-darken-1 mb-3 max-w-360"};function R(e,t,o,u,f,P){const b=g("HorizontalSkeletonLoader"),O=g("apexchart");return c(),M($,{class:"remediation-metric-card pa-4",variant:"outlined"},{default:a(()=>[m(" Header "),r("div",z,[r("div",B,[s(y,{size:"32",color:"grey-lighten-4",class:"rounded"},{default:a(()=>[s(h,{color:"grey-darken-2",size:"20"},{default:a(()=>[...t[0]||(t[0]=[d("mdi-timer-alert-outline",-1)])]),_:1})]),_:1}),r("div",null,[r("div",E,i(e.$t("components.dashboard.metrics.remediation.OutOfSloMetrics.title")),1),r("div",L,i(e.$t("components.dashboard.metrics.remediation.OutOfSloMetrics.subtitle","Breaches against configured remediation SLO thresholds over time")),1)])]),e.hasData?(c(),l("div",A,[s(T,{size:"x-small",color:"grey-darken-1",variant:"tonal",label:"",class:"font-weight-bold"},{default:a(()=>[d(i(e.totalBreachesCalculated)+" "+i(e.$t("components.dashboard.metrics.remediation.OutOfSloMetrics.breaches_count","Breaches")),1)]),_:1})])):m("",!0)]),m(" Chart or Empty State "),e.loading?(c(),l("div",F,[s(b)])):e.hasData?(c(),l("div",H,[s(O,{ref:"outOfSloMetrics",height:"320",options:e.chartOptions,series:e.series},null,8,["options","series"])])):(c(),l("div",N,[s(y,{size:"44",color:"grey-lighten-4",class:"mb-2"},{default:a(()=>[s(h,{color:"grey-darken-2",size:"24"},{default:a(()=>[...t[1]||(t[1]=[d("mdi-shield-check-outline",-1)])]),_:1})]),_:1}),r("div",j,i(e.$t("components.dashboard.metrics.remediation.OutOfSloMetrics.empty_state_title","No SLO Breaches")),1),r("div",I,i(e.$t("components.dashboard.metrics.remediation.OutOfSloMetrics.empty_state_subtitle","All remediation activities are currently within agreed SLO targets.")),1),s(x,{to:e.$orgPath("/remediation/tickets"),size:"small",variant:"outlined",color:"grey-darken-3",class:"text-none font-weight-bold"},{default:a(()=>[s(h,{start:"",size:"16"},{default:a(()=>[...t[2]||(t[2]=[d("mdi-plus",-1)])]),_:1}),d(" "+i(e.$t("components.dashboard.metrics.remediation.OutOfSloMetrics.view_tickets","View Tickets")),1)]),_:1},8,["to"])]))]),_:1})}const Z=Object.assign(v(C,[["render",R],["__scopeId","data-v-1dd5f871"]]),{__name:"DashboardMetricsRemediationOutOfSloMetrics"});export{Z as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.