Press h to came back to Glances.
',5))])):Ru("v-if",!0)}]]),tm={id:"alerts",class:"plugin"},em={key:0,class:"title"},rm={key:1,class:"title"},nm={class:"table table-sm table-borderless"},im={scope:"row"},om={scope:"row"},sm={scope:"row"};var am=r(2543);const lm={props:{data:{type:Object}},computed:{stats(){return this.data.stats.alert},alerts(){return(this.stats||[]).map((t=>{const e={};if(e.state=t.state,e.type=t.type,e.begin=1e3*t.begin,e.end=1e3*t.end,e.ongoing=-1==t.end,e.min=t.min,e.avg=t.avg,e.max=t.max,t.top.length>0&&(e.top=": "+t.top.join(", ")),!e.ongoing){const t=e.end-e.begin,r=parseInt(t/1e3%60),n=parseInt(t/6e4%60),i=parseInt(t/36e5%24);e.duration=(0,am.padStart)(i,2,"0")+":"+(0,am.padStart)(n,2,"0")+":"+(0,am.padStart)(r,2,"0")}return e}))},hasAlerts(){return this.countAlerts>0},countAlerts(){return this.alerts.length},hasOngoingAlerts(){return this.countOngoingAlerts>0},countOngoingAlerts(){return this.alerts.filter((({ongoing:t})=>t)).length}},watch:{countOngoingAlerts(){this.countOngoingAlerts?zd.badge(this.countOngoingAlerts):zd.reset()}},methods:{formatDate(t){const e=(new Date).getTimezoneOffset(),r=Math.trunc(Math.abs(e)/60),n=Math.abs(e%60);let i=e<=0?"+":"-";i+=String(r).padStart(2,"0")+String(n).padStart(2,"0");const o=new Date(t);return String(o.getFullYear())+"-"+String(o.getMonth()+1).padStart(2,"0")+"-"+String(o.getDate()).padStart(2,"0")+" "+String(o.getHours()).padStart(2,"0")+":"+String(o.getMinutes()).padStart(2,"0")+":"+String(o.getSeconds()).padStart(2,"0")+"("+i+")"},clear(){fetch("api/4/events/clear/all",{method:"POST",headers:{"Content-Type":"application/json"}}).then((t=>t.json())).then((t=>product.value=t))}}},cm=(0,Yd.A)(lm,[["render",function(t,e,r,n,i,o){return xu(),Au("section",tm,[o.hasAlerts?(xu(),Au("span",em,[Lu(" Warning or critical alerts (last "+As(o.countAlerts)+" entries) ",1),Iu("span",null,[Iu("button",{class:"button",onClick:e[0]||(e[0]=t=>o.clear())},"Clear alerts")])])):(xu(),Au("span",rm,"No warning or critical alert detected")),Iu("table",nm,[Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.alerts,((e,r)=>(xu(),Au("tr",{key:r},[Iu("td",im,[Iu("span",null,As(o.formatDate(e.begin)),1)]),Iu("td",om,[Iu("span",null,"("+As(e.ongoing?"ongoing":e.duration)+")",1)]),Iu("td",sm,[Al(Iu("span",null,As(e.state)+" on ",513),[[xp,!e.ongoing]]),Iu("span",{class:xs(e.state.toLowerCase())},As(e.type),3),Iu("span",null,"("+As(t.$filters.number(e.max,1))+")",1),Iu("span",null,As(e.top),1)])])))),128))])])])}]]),um={key:0,id:"cloud",class:"plugin"},pm={class:"title"};const dm={props:{data:{type:Object}},computed:{stats(){return this.data.stats.cloud},provider(){return void 0!==this.stats.id?`${stats.platform}`:null},instance(){const{stats:t}=this;return void 0!==this.stats.id?`${t.type} instance ${t.name} (${t.region})`:null}}},mm=(0,Yd.A)(dm,[["render",function(t,e,r,n,i,o){return o.instance||o.provider?(xu(),Au("section",um,[Iu("span",pm,As(o.provider),1),Lu(" "+As(o.instance),1)])):Ru("v-if",!0)}]]),fm={id:"connections",class:"plugin"},hm={class:"table table-sm table-borderless margin-bottom"},gm={class:"text-end"},bm={class:"text-end"},ym={class:"text-end"},vm={class:"text-end"};const xm={props:{data:{type:Object}},computed:{stats(){return this.data.stats.connections},view(){return this.data.views.connections},listen(){return this.stats.LISTEN},initiated(){return this.stats.initiated},established(){return this.stats.ESTABLISHED},terminated(){return this.stats.terminated},tracked(){return{count:this.stats.nf_conntrack_count,max:this.stats.nf_conntrack_max}}},methods:{getDecoration(t){if(void 0!==this.view[t])return this.view[t].decoration.toLowerCase()}}},wm=(0,Yd.A)(xm,[["render",function(t,e,r,n,i,o){return xu(),Au("section",fm,[Iu("table",hm,[e[5]||(e[5]=Iu("thead",null,[Iu("tr",null,[Iu("th",{scope:"col"},"TCP CONNECTIONS"),Iu("th",{scope:"col",class:"text-end"})])],-1)),Iu("tbody",null,[Iu("tr",null,[e[0]||(e[0]=Iu("td",{scope:"row"},"Listen",-1)),Iu("td",gm,As(o.listen),1)]),Iu("tr",null,[e[1]||(e[1]=Iu("td",{scope:"row"},"Initiated",-1)),Iu("td",bm,As(o.initiated),1)]),Iu("tr",null,[e[2]||(e[2]=Iu("td",{scope:"row"},"Established",-1)),Iu("td",ym,As(o.established),1)]),Iu("tr",null,[e[3]||(e[3]=Iu("td",{scope:"row"},"Terminated",-1)),Iu("td",vm,As(o.terminated),1)]),Iu("tr",null,[e[4]||(e[4]=Iu("td",{scope:"row"},"Tracked",-1)),Iu("td",{class:xs(["text-end",o.getDecoration("nf_conntrack_percent")])},As(o.tracked.count)+"/"+As(o.tracked.max),3)])])])])}]]),_m={id:"cpu",class:"plugin"},km={class:"table-responsive"},Sm={class:"table-sm table-borderless"},Am={class:"justify-content-between"},Em={scope:"col"},Cm={class:"table table-sm table-borderless"},Tm={key:0,scope:"col"},Om={class:"d-none d-xl-block d-xxl-block"},Dm={class:"table table-sm table-borderless"},Im={scope:"col"},Pm={scope:"col",class:"text-end"},jm={scope:"col"},Nm={scope:"col",class:"text-end"},Lm={scope:"col"},Mm={scope:"col",class:"text-end"},Rm={key:0,scope:"col"},qm={scope:"col"},Bm={class:"d-none d-xxl-block"},$m={class:"table table-sm table-borderless"},Um={key:0,scope:"col"},Fm={scope:"col"},zm={scope:"col",class:"text-end"},Hm={key:0,scope:"col"},Vm={key:1,scope:"col",class:"text-end"},Gm={key:0,scope:"col"},Wm={key:1,scope:"col",class:"text-end"};const Km={props:{data:{type:Object}},computed:{stats(){return this.data.stats.cpu},view(){return this.data.views.cpu},isLinux(){return this.data.isLinux},isSunOS(){return this.data.isSunOS},isWindows(){return this.data.isWindows},total(){return this.stats.total},user(){return this.stats.user},system(){return this.stats.system},idle(){return this.stats.idle},nice(){return this.stats.nice},irq(){return this.stats.irq},iowait(){return this.stats.iowait},dpc(){return this.stats.dpc},steal(){return this.stats.steal},guest(){return this.stats.guest},ctx_switches(){const{stats:t}=this;return t.ctx_switches?Math.floor(t.ctx_switches/t.time_since_update):null},interrupts(){const{stats:t}=this;return t.interrupts?Math.floor(t.interrupts/t.time_since_update):null},soft_interrupts(){const{stats:t}=this;return t.soft_interrupts?Math.floor(t.soft_interrupts/t.time_since_update):null},syscalls(){const{stats:t}=this;return t.syscalls?Math.floor(t.syscalls/t.time_since_update):null}},methods:{getDecoration(t){if(void 0!==this.view[t])return this.view[t].decoration.toLowerCase()}}},Xm=(0,Yd.A)(Km,[["render",function(t,e,r,n,i,o){return xu(),Au("section",_m,[Ru(" d-none d-xxl-block "),Iu("div",km,[Iu("table",Sm,[Iu("tbody",null,[Iu("tr",Am,[Iu("td",Em,[Iu("table",Cm,[Iu("tbody",null,[Iu("tr",null,[e[0]||(e[0]=Iu("th",{scope:"col"},"CPU",-1)),Iu("td",{scope:"col",class:xs(["text-end",o.getDecoration("total")])},[Iu("span",null,As(o.total)+"%",1)],2)]),Iu("tr",null,[e[1]||(e[1]=Iu("td",{scope:"col"},"user:",-1)),Iu("td",{scope:"col",class:xs(["text-end",o.getDecoration("user")])},[Iu("span",null,As(o.user)+"%",1)],2)]),Iu("tr",null,[e[2]||(e[2]=Iu("td",{scope:"col"},"system:",-1)),Iu("td",{scope:"col",class:xs(["text-end",o.getDecoration("system")])},[Iu("span",null,As(o.system)+"%",1)],2)]),Iu("tr",null,[null!=o.iowait?(xu(),Au("td",Tm,"iowait:")):Ru("v-if",!0),null!=o.iowait?(xu(),Au("td",{key:1,scope:"col",class:xs(["text-end",o.getDecoration("iowait")])},[Iu("span",null,As(o.iowait)+"%",1)],2)):Ru("v-if",!0)])])])]),Iu("td",null,[Iu("template",Om,[Iu("table",Dm,[Iu("tbody",null,[Iu("tr",null,[Al(Iu("td",Im,"idle:",512),[[xp,null!=o.idle]]),Al(Iu("td",Pm,[Iu("span",null,As(o.idle)+"%",1)],512),[[xp,null!=o.idle]])]),Iu("tr",null,[Al(Iu("td",jm,"irq:",512),[[xp,null!=o.irq]]),Al(Iu("td",Nm,[Iu("span",null,As(o.irq)+"%",1)],512),[[xp,null!=o.irq]])]),Iu("tr",null,[Al(Iu("td",Lm,"nice:",512),[[xp,null!=o.nice]]),Al(Iu("td",Mm,[Iu("span",null,As(o.nice)+"%",1)],512),[[xp,null!=o.nice]])]),Iu("tr",null,[null==o.iowait&&null!=o.dpc?(xu(),Au("td",Rm,"dpc:")):Ru("v-if",!0),null==o.iowait&&null!=o.dpc?(xu(),Au("td",{key:1,scope:"col",class:xs(["text-end",o.getDecoration("dpc")])},[Iu("span",null,As(o.dpc)+"%",1)],2)):Ru("v-if",!0),Al(Iu("td",qm,"steal:",512),[[xp,null!=o.steal]]),Al(Iu("td",{scope:"col",class:xs(["text-end",o.getDecoration("steal")])},[Iu("span",null,As(o.steal)+"%",1)],2),[[xp,null!=o.steal]])])])])])]),Iu("td",null,[Iu("template",Bm,[Iu("table",$m,[Iu("tbody",null,[Iu("tr",null,[null!=o.nice&&null!=o.ctx_switches?(xu(),Au("td",Um," ctx_sw:")):Ru("v-if",!0),null!=o.nice&&null!=o.ctx_switches?(xu(),Au("td",{key:1,scope:"col",class:xs(["text-end",o.getDecoration("ctx_switches")])},[Iu("span",null,As(o.ctx_switches),1)],2)):Ru("v-if",!0)]),Iu("tr",null,[Al(Iu("td",Fm,"inter:",512),[[xp,null!=o.interrupts]]),Al(Iu("td",zm,[Iu("span",null,As(o.interrupts),1)],512),[[xp,null!=o.interrupts]])]),Iu("tr",null,[o.isWindows||o.isSunOS||null==o.soft_interrupts?Ru("v-if",!0):(xu(),Au("td",Hm,"sw_int: ")),o.isWindows||o.isSunOS||null==o.soft_interrupts?Ru("v-if",!0):(xu(),Au("td",Vm,[Iu("span",null,As(o.soft_interrupts),1)]))]),Iu("tr",null,[o.isLinux&&null!=o.guest?(xu(),Au("td",Gm,"guest:")):Ru("v-if",!0),o.isLinux&&null!=o.guest?(xu(),Au("td",Wm,[Iu("span",null,As(o.guest)+"%",1)])):Ru("v-if",!0)])])])])])])])])])])}]]),Qm={key:0,id:"diskio",class:"plugin"},Zm={class:"table table-sm table-borderless margin-bottom"},Ym={scope:"col",class:"text-end w-25"},Jm={scope:"col",class:"text-end w-25"},tf={scope:"col",class:"text-end w-25"},ef={scope:"col",class:"text-end w-25"},rf={scope:"row",class:"text-truncate"};var nf=r(4728),of=r.n(nf);function sf(t,e){return af(t=8*Math.round(t),e)+"b"}function af(t,e){if(e=e||!1,isNaN(parseFloat(t))||!isFinite(t)||0==t)return t;const r=["Y","Z","E","P","T","G","M","K"],n={Y:12089258196146292e8,Z:11805916207174113e5,E:0x1000000000000000,P:0x4000000000000,T:1099511627776,G:1073741824,M:1048576,K:1024};for(var i=0;i