1import{a as e,c as t,d as n,g as r,l as i,m as a,n as o,o as s,p as c,r as l,s as u,u as d,v as f}from"./index-C32yDzkE.js";var p=Object.freeze({firing:`firing`,pending:`pending`,inactive:`inactive`}),m={name:`Prometheus`,mixins:[o],props:{item:Object},data:()=>({api:{status:``,count:0,alerts:{firing:0,inactive:0,pending:0}}}),computed:{count:function(){return this.countFiring()||this.countPending()||this.countInactive()||0},level:function(){return this.countFiring()?p.firing:this.countPending()?p.pending:p.inactive}},created(){this.autoUpdateMethod=this.fetchStatus,this.fetchStatus()},methods:{fetchStatus:async function(){this.api=await this.fetch(`api/v1/alerts`).catch(e=>console.log(e))},countFiring:function(){return this.api?this.api.data?.alerts?.filter(e=>e.state===p.firing).length:0},countPending:function(){return this.api?this.api.data?.alerts?.filter(e=>e.state===p.pending).length:0},countInactive:function(){return this.api?this.api.data?.alerts?.filter(e=>e.state===p.pending).length:0}}},h={class:`title is-4`},g={class:`subtitle is-6`};function _(o,l,p,m,_,v){let y=c(`Generic`);return n(),u(y,{item:p.item},{content:a(()=>[s(`p`,h,f(p.item.name),1),s(`p`,g,[p.item.subtitle?(n(),i(e,{key:0},[d(f(p.item.subtitle),1)],64)):o.api?(n(),i(e,{key:1},[d(f(v.count)+` `+f(v.level)+` alerts `,1)],64)):t(``,!0)])]),indicator:a(()=>[o.api?(n(),i(`div`,{key:0,class:r([`status`,v.level])},f(v.count),3)):t(``,!0)]),_:1},8,[`item`])}var v=l(m,[[`render`,_],[`__scopeId`,`data-v-207f575c`]]);export{v 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.