From b6865d8cff2da96f14e75b920a97b838752dbead Mon Sep 17 00:00:00 2001 From: nicolargo Date: Wed, 25 Dec 2024 09:35:08 +0100 Subject: [PATCH] Remove now plugin in the left menu of the WebUI (in the make webui task) --- Makefile | 2 +- glances/outputs/static/js/uiconfig.json | 3 +-- glances/outputs/static/public/glances.js | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index dc44226a..18faee2d 100644 --- a/Makefile +++ b/Makefile @@ -207,7 +207,7 @@ install: ## Open a Web Browser to the installation procedure webui webui%: DIR = glances/outputs/static/ webui: ## Build the Web UI - $(PYTHON) -c 'import json; from glances.outputs.glances_curses import _GlancesCurses; print(json.dumps({ "leftMenu": _GlancesCurses._left_sidebar }, indent=4))' > ./glances/outputs/static/js/uiconfig.json + $(PYTHON) -c 'import json; from glances.outputs.glances_curses import _GlancesCurses; print(json.dumps({ "leftMenu": [p for p in _GlancesCurses._left_sidebar if p != "now"]}, indent=4))' > ./glances/outputs/static/js/uiconfig.json cd $(DIR) && npm ci && npm run build webui-audit: ## Audit the Web UI diff --git a/glances/outputs/static/js/uiconfig.json b/glances/outputs/static/js/uiconfig.json index f5a694f9..a734a0f2 100644 --- a/glances/outputs/static/js/uiconfig.json +++ b/glances/outputs/static/js/uiconfig.json @@ -10,7 +10,6 @@ "folders", "raid", "smart", - "sensors", - "now" + "sensors" ] } diff --git a/glances/outputs/static/public/glances.js b/glances/outputs/static/public/glances.js index 48275c29..056d3d14 100644 --- a/glances/outputs/static/public/glances.js +++ b/glances/outputs/static/public/glances.js @@ -34,4 +34,4 @@ const Qt=new Map,Zt={set(t,e,r){Qt.has(t)||Qt.set(t,new Map);const n=Qt.get(t);n * https://jaywcjlove.github.io/hotkeys-js * Licensed under the MIT license */ -var vd="undefined"!=typeof navigator&&navigator.userAgent.toLowerCase().indexOf("firefox")>0;function xd(t,e,r,n){t.addEventListener?t.addEventListener(e,r,n):t.attachEvent&&t.attachEvent("on".concat(e),(function(){r(window.event)}))}function wd(t,e){for(var r=e.slice(0,e.length-1),n=0;n=0;)e[r-1]+=",",e.splice(r,1),r=e.lastIndexOf("");return e}for(var kd={backspace:8,"⌫":8,tab:9,clear:12,enter:13,"↩":13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"⇪":20,",":188,".":190,"/":191,"`":192,"-":vd?173:189,"=":vd?61:187,";":vd?59:186,"'":222,"[":219,"]":221,"\\":220},Ad={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,command:91},Sd={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},Ed={16:!1,18:!1,17:!1,91:!1},Cd={},Td=1;Td<20;Td++)kd["f".concat(Td)]=111+Td;var Od=[],Dd=!1,Id="all",jd=[],Pd=function(t){return kd[t.toLowerCase()]||Ad[t.toLowerCase()]||t.toUpperCase().charCodeAt(0)};function Nd(t){Id=t||"all"}function Ld(){return Id||"all"}var Md=function(t){var e=t.key,r=t.scope,n=t.method,i=t.splitKey,o=void 0===i?"+":i;_d(e).forEach((function(t){var e=t.split(o),i=e.length,s=e[i-1],a="*"===s?"*":Pd(s);if(Cd[a]){r||(r=Ld());var l=i>1?wd(Ad,e):[];Cd[a]=Cd[a].filter((function(t){return!((!n||t.method===n)&&t.scope===r&&function(t,e){for(var r=t.length>=e.length?t:e,n=t.length>=e.length?e:t,i=!0,o=0;o0,Ed)Object.prototype.hasOwnProperty.call(Ed,o)&&(!Ed[o]&&e.mods.indexOf(+o)>-1||Ed[o]&&-1===e.mods.indexOf(+o))&&(i=!1);(0!==e.mods.length||Ed[16]||Ed[18]||Ed[17]||Ed[91])&&!i&&"*"!==e.shortcut||(e.keys=[],e.keys=e.keys.concat(Od),!1===e.method(t,e)&&(t.preventDefault?t.preventDefault():t.returnValue=!1,t.stopPropagation&&t.stopPropagation(),t.cancelBubble&&(t.cancelBubble=!0)))}}function qd(t,e){var r=Cd["*"],n=t.keyCode||t.which||t.charCode;if(Bd.filter.call(this,t)){if(93!==n&&224!==n||(n=91),-1===Od.indexOf(n)&&229!==n&&Od.push(n),["ctrlKey","altKey","shiftKey","metaKey"].forEach((function(e){var r=Sd[e];t[e]&&-1===Od.indexOf(r)?Od.push(r):!t[e]&&Od.indexOf(r)>-1?Od.splice(Od.indexOf(r),1):"metaKey"===e&&t[e]&&3===Od.length&&(t.ctrlKey||t.shiftKey||t.altKey||(Od=Od.slice(Od.indexOf(r))))})),n in Ed){for(var i in Ed[n]=!0,Ad)Ad[i]===n&&(Bd[i]=!0);if(!r)return}for(var o in Ed)Object.prototype.hasOwnProperty.call(Ed,o)&&(Ed[o]=t[Sd[o]]);t.getModifierState&&(!t.altKey||t.ctrlKey)&&t.getModifierState("AltGraph")&&(-1===Od.indexOf(17)&&Od.push(17),-1===Od.indexOf(18)&&Od.push(18),Ed[17]=!0,Ed[18]=!0);var s=Ld();if(r)for(var a=0;a1&&(i=wd(Ad,t)),(t="*"===(t=t[t.length-1])?"*":Pd(t))in Cd||(Cd[t]=[]),Cd[t].push({keyup:l,keydown:c,scope:o,mods:i,shortcut:n[a],method:r,key:n[a],splitKey:u,element:s});void 0!==s&&!function(t){return jd.indexOf(t)>-1}(s)&&window&&(jd.push(s),xd(s,"keydown",(function(t){qd(t,s)}),p),Dd||(Dd=!0,xd(window,"focus",(function(){Od=[]}),p)),xd(s,"keyup",(function(t){qd(t,s),function(t){var e=t.keyCode||t.which||t.charCode,r=Od.indexOf(e);if(r>=0&&Od.splice(r,1),t.key&&"meta"===t.key.toLowerCase()&&Od.splice(0,Od.length),93!==e&&224!==e||(e=91),e in Ed)for(var n in Ed[e]=!1,Ad)Ad[n]===e&&(Bd[n]=!1)}(t)}),p))}var $d={getPressedKeyString:function(){return Od.map((function(t){return e=t,Object.keys(kd).find((function(t){return kd[t]===e}))||function(t){return Object.keys(Ad).find((function(e){return Ad[e]===t}))}(t)||String.fromCharCode(t);var e}))},setScope:Nd,getScope:Ld,deleteScope:function(t,e){var r,n;for(var i in t||(t=Ld()),Cd)if(Object.prototype.hasOwnProperty.call(Cd,i))for(r=Cd[i],n=0;n1&&void 0!==arguments[1]?arguments[1]:"all";Object.keys(Cd).forEach((function(r){Cd[r].filter((function(r){return r.scope===e&&r.shortcut===t})).forEach((function(t){t&&t.method&&t.method()}))}))},unbind:function(t){if(void 0===t)Object.keys(Cd).forEach((function(t){return delete Cd[t]}));else if(Array.isArray(t))t.forEach((function(t){t.key&&Md(t)}));else if("object"==typeof t)t.key&&Md(t);else if("string"==typeof t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n=this.limits[t][l]){var c=l.lastIndexOf("_");return l.substring(c+1)+o}}return"ok"+o}getAlertLog(t,e,r,n){return this.getAlert(t,e,r,n,!0)}};const Wd=new class{data=void 0;init(t=60){let e;const r=()=>(zd.status="PENDING",Promise.all([fetch("api/4/all",{method:"GET"}).then((t=>t.json())),fetch("api/4/all/views",{method:"GET"}).then((t=>t.json()))]).then((t=>{const e={stats:t[0],views:t[1],isBsd:"FreeBSD"===t[0].system.os_name,isLinux:"Linux"===t[0].system.os_name,isSunOS:"SunOS"===t[0].system.os_name,isMac:"Darwin"===t[0].system.os_name,isWindows:"Windows"===t[0].system.os_name};this.data=e,zd.data=e,zd.status="SUCCESS"})).catch((t=>{console.log(t),zd.status="FAILURE"})).then((()=>{e&&clearTimeout(e),e=setTimeout(r,1e3*t)})));r(),fetch("api/4/all/limits",{method:"GET"}).then((t=>t.json())).then((t=>{Gd.setLimits(t)})),fetch("api/4/args",{method:"GET"}).then((t=>t.json())).then(((t={})=>{zd.args={...zd.args,...t}})),fetch("api/4/config",{method:"GET"}).then((t=>t.json())).then(((t={})=>{zd.config={...zd.config,...t}}))}getData(){return this.data}};const Kd=new class{constructor(){this.favico=new(Vd())({animation:"none"})}badge(t){this.favico.badge(t)}reset(){this.favico.reset()}},Xd={key:0},Qd={class:"container-fluid"},Zd={class:"row"},Yd={class:"col-sm-12 col-lg-24 title"},Jd=Pu("div",{class:"row"}," ",-1),tm={class:"row"},em={class:"col-sm-12 col-lg-24"},rm=Pu("div",{class:"row"}," ",-1),nm={class:"table table-sm table-borderless table-striped table-hover"},im=Pu("td",null," ",-1),om=Pu("td",null," ",-1),sm=Pu("td",null," ",-1),am=Pu("td",null," ",-1),lm=Pu("td",null," ",-1),cm=Pu("td",null," ",-1),um=Pu("td",null," ",-1),pm=Pu("td",null," ",-1),dm=Pu("td",null," ",-1),mm=Pu("td",null," ",-1),fm=Pu("td",null," ",-1),hm=Pu("td",null," ",-1),gm=Pu("td",null," ",-1),bm=Pu("td",null," ",-1),ym=Pu("td",null," ",-1),vm=Pu("td",null," ",-1),xm=Pu("td",null," ",-1),wm=Pu("td",null," ",-1),_m=Pu("td",null," ",-1),km=Pu("td",null," ",-1),Am=Pu("td",null," ",-1),Sm=Pu("td",null," ",-1),Em=Pu("td",null," ",-1),Cm=Pu("td",null," ",-1),Tm=Pu("td",null," ",-1),Om=Pu("td",null," ",-1),Dm=Pu("td",null," ",-1),Im=Pu("td",null," ",-1),jm=Pu("td",null," ",-1),Pm=Pu("td",null," ",-1),Nm=Pu("td",null," ",-1),Lm=Pu("td",null," ",-1),Mm=Pu("td",null," ",-1),Rm=Pu("td",null," ",-1),qm=qu('
 

For an exhaustive list of key bindings, click here.

 

Press h to came back to Glances.

',5);const Bm={data:()=>({help:void 0}),mounted(){fetch("api/4/help",{method:"GET"}).then((t=>t.json())).then((t=>this.help=t))}};var $m=r(6262);const Fm=(0,$m.A)(Bm,[["render",function(t,e,r,n,i,o){return i.help?(wu(),Eu("div",Xd,[Pu("div",Qd,[Pu("div",Zd,[Pu("div",Yd,Cs(i.help.version)+" "+Cs(i.help.psutil_version),1)]),Jd,Pu("div",tm,[Pu("div",em,Cs(i.help.configuration_file),1)]),rm]),Pu("table",nm,[Pu("thead",null,[Pu("tr",null,[Pu("th",null,Cs(i.help.header_sort.replace(":","")),1),Pu("th",null,Cs(i.help.header_show_hide.replace(":","")),1),Pu("th",null,Cs(i.help.header_toggle.replace(":","")),1),Pu("th",null,Cs(i.help.header_miscellaneous.replace(":","")),1)])]),Pu("tbody",null,[Pu("tr",null,[Pu("td",null,Cs(i.help.sort_auto),1),Pu("td",null,Cs(i.help.show_hide_application_monitoring),1),Pu("td",null,Cs(i.help.toggle_bits_bytes),1),Pu("td",null,Cs(i.help.misc_erase_process_filter),1)]),Pu("tr",null,[Pu("td",null,Cs(i.help.sort_cpu),1),Pu("td",null,Cs(i.help.show_hide_diskio),1),Pu("td",null,Cs(i.help.toggle_count_rate),1),Pu("td",null,Cs(i.help.misc_generate_history_graphs),1)]),Pu("tr",null,[Pu("td",null,Cs(i.help.sort_io_rate),1),Pu("td",null,Cs(i.help.show_hide_containers),1),Pu("td",null,Cs(i.help.toggle_used_free),1),Pu("td",null,Cs(i.help.misc_help),1)]),Pu("tr",null,[Pu("td",null,Cs(i.help.sort_mem),1),Pu("td",null,Cs(i.help.show_hide_top_extended_stats),1),Pu("td",null,Cs(i.help.toggle_bar_sparkline),1),Pu("td",null,Cs(i.help.misc_accumulate_processes_by_program),1)]),Pu("tr",null,[Pu("td",null,Cs(i.help.sort_process_name),1),Pu("td",null,Cs(i.help.show_hide_filesystem),1),Pu("td",null,Cs(i.help.toggle_separate_combined),1),im]),Pu("tr",null,[Pu("td",null,Cs(i.help.sort_cpu_times),1),Pu("td",null,Cs(i.help.show_hide_gpu),1),Pu("td",null,Cs(i.help.toggle_live_cumulative),1),Pu("td",null,Cs(i.help.misc_reset_processes_summary_min_max),1)]),Pu("tr",null,[Pu("td",null,Cs(i.help.sort_user),1),Pu("td",null,Cs(i.help.show_hide_ip),1),Pu("td",null,Cs(i.help.toggle_linux_percentage),1),Pu("td",null,Cs(i.help.misc_quit),1)]),Pu("tr",null,[om,Pu("td",null,Cs(i.help.show_hide_tcp_connection),1),Pu("td",null,Cs(i.help.toggle_cpu_individual_combined),1),Pu("td",null,Cs(i.help.misc_reset_history),1)]),Pu("tr",null,[sm,Pu("td",null,Cs(i.help.show_hide_alert),1),Pu("td",null,Cs(i.help.toggle_gpu_individual_combined),1),Pu("td",null,Cs(i.help.misc_delete_warning_alerts),1)]),Pu("tr",null,[am,Pu("td",null,Cs(i.help.show_hide_network),1),Pu("td",null,Cs(i.help.toggle_short_full),1),Pu("td",null,Cs(i.help.misc_delete_warning_and_critical_alerts),1)]),Pu("tr",null,[lm,Pu("td",null,Cs(i.help.sort_cpu_times),1),cm,um]),Pu("tr",null,[pm,Pu("td",null,Cs(i.help.show_hide_irq),1),dm,mm]),Pu("tr",null,[fm,Pu("td",null,Cs(i.help.show_hide_raid_plugin),1),hm,gm]),Pu("tr",null,[bm,Pu("td",null,Cs(i.help.show_hide_sensors),1),ym,vm]),Pu("tr",null,[xm,Pu("td",null,Cs(i.help.show_hide_wifi_module),1),wm,_m]),Pu("tr",null,[km,Pu("td",null,Cs(i.help.show_hide_processes),1),Am,Sm]),Pu("tr",null,[Em,Pu("td",null,Cs(i.help.show_hide_left_sidebar),1),Cm,Tm]),Pu("tr",null,[Om,Pu("td",null,Cs(i.help.show_hide_quick_look),1),Dm,Im]),Pu("tr",null,[jm,Pu("td",null,Cs(i.help.show_hide_cpu_mem_swap),1),Pm,Nm]),Pu("tr",null,[Lm,Pu("td",null,Cs(i.help.show_hide_all),1),Mm,Rm])])]),qm])):Bu("v-if",!0)}]]),Um={class:"plugin",id:"alerts"},zm={key:0,class:"title"},Hm={key:1,class:"title"},Vm={class:"table table-sm table-borderless"},Gm={scope:"row"},Wm={scope:"row"},Km={scope:"row"};var Xm=r(2543);const Qm={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,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,Xm.padStart)(i,2,"0")+":"+(0,Xm.padStart)(n,2,"0")+":"+(0,Xm.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?Kd.badge(this.countOngoingAlerts):Kd.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))}}},Zm=(0,$m.A)(Qm,[["render",function(t,e,r,n,i,o){return wu(),Eu("section",Um,[o.hasAlerts?(wu(),Eu("span",zm,[Ru(" Warning or critical alerts (last "+Cs(o.countAlerts)+" entries) ",1),Pu("span",null,[Pu("button",{class:"clear-button",onClick:e[0]||(e[0]=t=>o.clear())},"Clear alerts")])])):(wu(),Eu("span",Hm,"No warning or critical alert detected")),Pu("table",Vm,[Pu("tbody",null,[(wu(!0),Eu(hu,null,Ec(o.alerts,((e,r)=>(wu(),Eu("tr",{key:r},[Pu("td",Gm,[Pu("span",null,Cs(o.formatDate(e.begin)),1)]),Pu("td",Wm,[Pu("span",null,"("+Cs(e.ongoing?"ongoing":e.duration)+")",1)]),Pu("td",Km,[Ul(Pu("span",null,Cs(e.state)+" on ",513),[[Wp,!e.ongoing]]),Pu("span",{class:ks(e.state.toLowerCase())},Cs(e.type),3),Pu("span",null,"("+Cs(t.$filters.number(e.max,1))+")",1),Pu("span",null,": "+Cs(e.top),1)])])))),128))])])])}]]),Ym={key:0,class:"plugin",id:"cloud"},Jm={class:"title"};const tf={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}}},ef=(0,$m.A)(tf,[["render",function(t,e,r,n,i,o){return o.instance||o.provider?(wu(),Eu("section",Ym,[Pu("span",Jm,Cs(o.provider),1),Ru(" "+Cs(o.instance),1)])):Bu("v-if",!0)}]]),rf={class:"plugin",id:"connections"},nf={class:"table table-sm table-borderless margin-bottom"},of=Pu("thead",null,[Pu("tr",null,[Pu("th",{scope:"col"},"TCP CONNECTIONS"),Pu("th",{scope:"col",class:"text-end"})])],-1),sf=Pu("td",{scope:"row"},"Listen",-1),af={class:"text-end"},lf=Pu("td",{scope:"row"},"Initiated",-1),cf={class:"text-end"},uf=Pu("td",{scope:"row"},"Established",-1),pf={class:"text-end"},df=Pu("td",{scope:"row"},"Terminated",-1),mf={class:"text-end"},ff=Pu("td",{scope:"row"},"Tracked",-1);const hf={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()}}},gf=(0,$m.A)(hf,[["render",function(t,e,r,n,i,o){return wu(),Eu("section",rf,[Pu("table",nf,[of,Pu("tbody",null,[Pu("tr",null,[sf,Pu("td",af,Cs(o.listen),1)]),Pu("tr",null,[lf,Pu("td",cf,Cs(o.initiated),1)]),Pu("tr",null,[uf,Pu("td",pf,Cs(o.established),1)]),Pu("tr",null,[df,Pu("td",mf,Cs(o.terminated),1)]),Pu("tr",null,[ff,Pu("td",{class:ks(["text-end",o.getDecoration("nf_conntrack_percent")])},Cs(o.tracked.count)+"/"+Cs(o.tracked.max),3)])])])])}]]),bf={id:"cpu",class:"plugin"},yf={class:"table-responsive"},vf={class:"table-sm table-borderless"},xf={class:"justify-content-between"},wf={scope:"col"},_f={class:"table table-sm table-borderless"},kf=Pu("th",{scope:"col"},"CPU",-1),Af=Pu("td",{scope:"col"},"user:",-1),Sf=Pu("td",{scope:"col"},"system:",-1),Ef={key:0,scope:"col"},Cf={class:"d-none d-xl-block d-xxl-block"},Tf={class:"table table-sm table-borderless"},Of={scope:"col"},Df={scope:"col"},If={scope:"col"},jf={key:0,scope:"col"},Pf={scope:"col"},Nf={class:"d-none d-xxl-block"},Lf={class:"table table-sm table-borderless"},Mf={key:0,scope:"col"},Rf={scope:"col"},qf={key:0,scope:"col"},Bf={key:1,scope:"col",class:"text-end"},$f={key:0,scope:"col"},Ff={key:1,scope:"col",class:"text-end"};const Uf={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()}}},zf=(0,$m.A)(Uf,[["render",function(t,e,r,n,i,o){return wu(),Eu("section",bf,[Bu(" d-none d-xxl-block "),Pu("div",yf,[Pu("table",vf,[Pu("tbody",null,[Pu("tr",xf,[Pu("td",wf,[Pu("table",_f,[Pu("tbody",null,[Pu("tr",null,[kf,Pu("td",{scope:"col",class:ks(["text-end",o.getDecoration("total")])},Cs(o.total)+"%",3)]),Pu("tr",null,[Af,Pu("td",{scope:"col",class:ks(["text-end",o.getDecoration("user")])},Cs(o.user)+"%",3)]),Pu("tr",null,[Sf,Pu("td",{scope:"col",class:ks(["text-end",o.getDecoration("system")])},Cs(o.system)+"%",3)]),Pu("tr",null,[null!=o.iowait?(wu(),Eu("td",Ef,"iowait:")):Bu("v-if",!0),null!=o.iowait?(wu(),Eu("td",{key:1,scope:"col",class:ks(["text-end",o.getDecoration("iowait")])},Cs(o.iowait)+"%",3)):Bu("v-if",!0)])])])]),Pu("td",null,[Pu("template",Cf,[Pu("table",Tf,[Pu("tbody",null,[Pu("tr",null,[Ul(Pu("td",Of,"idle:",512),[[Wp,null!=o.idle]]),Ul(Pu("td",{scope:"col",class:"text-end"},Cs(o.idle)+"%",513),[[Wp,null!=o.idle]])]),Pu("tr",null,[Ul(Pu("td",Df,"irq:",512),[[Wp,null!=o.irq]]),Ul(Pu("td",{scope:"col",class:"text-end"},Cs(o.irq)+"%",513),[[Wp,null!=o.irq]])]),Pu("tr",null,[Ul(Pu("td",If,"nice:",512),[[Wp,null!=o.nice]]),Ul(Pu("td",{scope:"col",class:"text-end"},Cs(o.nice)+"%",513),[[Wp,null!=o.nice]])]),Pu("tr",null,[null==o.iowait&&null!=o.dpc?(wu(),Eu("td",jf,"dpc:")):Bu("v-if",!0),null==o.iowait&&null!=o.dpc?(wu(),Eu("td",{key:1,scope:"col",class:ks(["text-end",o.getDecoration("dpc")])},Cs(o.dpc)+"%",3)):Bu("v-if",!0),Ul(Pu("td",Pf,"steal:",512),[[Wp,null!=o.steal]]),Ul(Pu("td",{scope:"col",class:ks(["text-end",o.getDecoration("steal")])},Cs(o.steal)+"%",3),[[Wp,null!=o.steal]])])])])])]),Pu("td",null,[Pu("template",Nf,[Pu("table",Lf,[Pu("tbody",null,[Pu("tr",null,[null!=o.nice&&null!=o.ctx_switches?(wu(),Eu("td",Mf,"ctx_sw:")):Bu("v-if",!0),null!=o.nice&&null!=o.ctx_switches?(wu(),Eu("td",{key:1,scope:"col",class:ks(["text-end",o.getDecoration("ctx_switches")])},Cs(o.ctx_switches),3)):Bu("v-if",!0)]),Pu("tr",null,[Ul(Pu("td",Rf,"inter:",512),[[Wp,null!=o.interrupts]]),Ul(Pu("td",{scope:"col",class:"text-end"},Cs(o.interrupts),513),[[Wp,null!=o.interrupts]])]),Pu("tr",null,[o.isWindows||o.isSunOS||null==o.soft_interrupts?Bu("v-if",!0):(wu(),Eu("td",qf,"sw_int:")),o.isWindows||o.isSunOS||null==o.soft_interrupts?Bu("v-if",!0):(wu(),Eu("td",Bf,Cs(o.soft_interrupts),1))]),Pu("tr",null,[o.isLinux&&null!=o.guest?(wu(),Eu("td",$f,"guest:")):Bu("v-if",!0),o.isLinux&&null!=o.guest?(wu(),Eu("td",Ff,Cs(o.guest)+"%",1)):Bu("v-if",!0)])])])])])])])])])])}]]),Hf={key:0,class:"plugin",id:"diskio"},Vf={class:"table table-sm table-borderless margin-bottom"},Gf=Pu("th",{scope:"col"},"DISK I/O",-1),Wf={scope:"col",class:"text-end w-25"},Kf={scope:"col",class:"text-end w-25"},Xf={scope:"col",class:"text-end w-25"},Qf={scope:"col",class:"text-end w-25"},Zf={scope:"row"};var Yf=r(4728),Jf=r.n(Yf);function th(t,e){return eh(t=8*Math.round(t),e)+"b"}function eh(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;i1){var a=0;return s<10?a=2:s<100&&(a=1),e?a="MK"==o?0:(0,Xm.min)([1,a]):"K"==o&&(a=0),parseFloat(s).toFixed(a)+o}}return t.toFixed(0)}function rh(t){return void 0===t||""===t?"?":t}function nh(t,e,r){return e=e||0,r=r||" ",String(t).padStart(e,r)}function ih(t,e){return"function"!=typeof t.slice&&(t=String(t)),t.slice(0,e)}function oh(t,e,r=!0){return e=e||8,t.length>e?r?t.substring(0,e-1)+"_":"_"+t.substring(t.length-e+1):t}function sh(t){if(void 0===t)return t;var e=function(t){var e=document.createElement("div");return e.innerText=t,e.innerHTML}(t),r=e.replace(/\n/g,"
");return Jf()(r)}function ah(t,e){return new Intl.NumberFormat(void 0,"number"==typeof e?{maximumFractionDigits:e}:e).format(t)}function lh(t){for(var e=0,r=0;r({store:zd}),computed:{args(){return this.store.args||{}},stats(){return this.data.stats.diskio},view(){return this.data.views.diskio},disks(){const t=this.stats.map((t=>({name:t.disk_name,alias:void 0!==t.alias?t.alias:null,bitrate:{txps:eh(t.read_bytes_rate_per_sec),rxps:eh(t.write_bytes_rate_per_sec)},count:{txps:eh(t.read_count_rate_per_sec),rxps:eh(t.write_count_rate_per_sec)}}))).filter((t=>{const e=this.view[t.name].read_bytes_rate_per_sec,r=this.view[t.name].write_bytes_rate_per_sec;return!(e&&!1!==e.hidden||r&&!1!==r.hidden)}));return(0,Xm.orderBy)(t,["name"])},hasDisks(){return this.disks.length>0}},methods:{getDecoration(t,e){if(null!=this.view[t][e])return this.view[t][e].decoration.toLowerCase()}}},ph=(0,$m.A)(uh,[["render",function(t,e,r,n,i,o){return o.hasDisks?(wu(),Eu("section",Hf,[Pu("table",Vf,[Pu("thead",null,[Pu("tr",null,[Gf,Ul(Pu("th",Wf,"R/s",512),[[Wp,!o.args.diskio_iops]]),Ul(Pu("th",Kf,"W/s",512),[[Wp,!o.args.diskio_iops]]),Ul(Pu("th",Xf,"IOR/s",512),[[Wp,o.args.diskio_iops]]),Ul(Pu("th",Qf,"IOW/s",512),[[Wp,o.args.diskio_iops]])])]),Pu("tbody",null,[(wu(!0),Eu(hu,null,Ec(o.disks,((e,r)=>(wu(),Eu("tr",{key:r},[Pu("td",Zf,Cs(t.$filters.minSize(e.alias?e.alias:e.name,32)),1),Ul(Pu("td",{class:ks(["text-end w-25",o.getDecoration(e.name,"write_bytes_rate_per_sec")])},Cs(e.bitrate.txps),3),[[Wp,!o.args.diskio_iops]]),Ul(Pu("td",{class:ks(["text-end w-25",o.getDecoration(e.name,"read_bytes_rate_per_sec")])},Cs(e.bitrate.rxps),3),[[Wp,!o.args.diskio_iops]]),Ul(Pu("td",{class:"text-end w-25"},Cs(e.count.txps),513),[[Wp,o.args.diskio_iops]]),Ul(Pu("td",{class:"text-end w-25"},Cs(e.count.rxps),513),[[Wp,o.args.diskio_iops]])])))),128))])])])):Bu("v-if",!0)}]]),dh={key:0,class:"plugin",id:"containers"},mh=Pu("span",{class:"title"},"CONTAINERS",-1),fh={class:"table table-sm table-borderless table-striped table-hover"},hh={scope:"col"},gh={scope:"col"},bh={scope:"col"},yh={scope:"col"},vh={scope:"col"},xh={scope:"col"},wh={scope:"col"},_h={scope:"col"},kh={scope:"col"},Ah={scope:"col"};const Sh={props:{data:{type:Object}},data:()=>({store:zd,sorter:void 0}),computed:{args(){return this.store.args||{}},sortProcessesKey(){return this.args.sort_processes_key},stats(){return this.data.stats.containers},views(){return this.data.views.containers},containers(){const{sorter:t}=this,e=(this.stats||[]).map((t=>{let e="?";return null!=t.memory.usage&&(e=t.memory.usage,null!=t.memory.inactive_file&&(e-=t.memory.inactive_file)),{id:t.id,name:t.name,status:t.status,uptime:t.uptime,cpu_percent:t.cpu.total,memory_usage:e,limit:null!=t.memory.limit&&NaN!=t.memory.limit?t.memory.limit:"-",io_rx:null!=t.io_rx&&NaN!=t.io_rx?t.io_rx:"-",io_wx:null!=t.io_wx&&NaN!=t.io_wx?t.io_wx:"-",network_rx:null!=t.network_rx&&NaN!=t.network_rx?t.network_rx:"-",network_tx:null!=t.network_tx&&NaN!=t.network_tx?t.network_tx:"-",command:t.command,image:t.image,engine:t.engine,pod_id:t.pod_id}}));return(0,Xm.orderBy)(e,[t.column].reduce(((t,e)=>("memory_percent"===e&&(e=["memory_usage"]),t.concat(e))),[]),[t.isReverseColumn(t.column)?"desc":"asc"])},showEngine(){return this.views.show_engine_name},showPod(){return this.views.show_pod_name}},watch:{sortProcessesKey:{immediate:!0,handler(t){t&&!["cpu_percent","memory_percent","name"].includes(t)||(this.sorter={column:this.args.sort_processes_key||"cpu_percent",auto:!this.args.sort_processes_key,isReverseColumn:function(t){return!["name"].includes(t)},getColumnLabel:function(t){return{io_counters:"disk IO",cpu_percent:"CPU consumption",memory_usage:"memory consumption",cpu_times:"uptime",name:"container name",None:"None"}[t]||t}})}}},methods:{getDisableStats:()=>GlancesHelper.getLimit("containers","containers_disable_stats")||[]}},Eh=(0,$m.A)(Sh,[["render",function(t,e,r,n,i,o){return o.containers.length?(wu(),Eu("section",dh,[mh,Ul(Pu("span",null,Cs(o.containers.length)+" sorted by "+Cs(i.sorter.getColumnLabel(i.sorter.column)),513),[[Wp,o.containers.length>1]]),Pu("table",fh,[Pu("thead",null,[Pu("tr",null,[Ul(Pu("td",hh,"Engine",512),[[Wp,o.showEngine]]),Ul(Pu("td",gh,"Pod",512),[[Wp,o.showPod]]),Ul(Pu("td",{scope:"col",class:ks(["sortable","name"===i.sorter.column&&"sort"]),onClick:e[0]||(e[0]=t=>o.args.sort_processes_key="name")}," Name ",2),[[Wp,!o.getDisableStats().includes("name")]]),Ul(Pu("td",bh,"Status",512),[[Wp,!o.getDisableStats().includes("status")]]),Ul(Pu("td",yh,"Uptime",512),[[Wp,!o.getDisableStats().includes("uptime")]]),Ul(Pu("td",{scope:"col",class:ks(["sortable","cpu_percent"===i.sorter.column&&"sort"]),onClick:e[1]||(e[1]=t=>o.args.sort_processes_key="cpu_percent")}," CPU% ",2),[[Wp,!o.getDisableStats().includes("cpu")]]),Ul(Pu("td",{scope:"col",class:ks(["sortable","memory_percent"===i.sorter.column&&"sort"]),onClick:e[2]||(e[2]=t=>o.args.sort_processes_key="memory_percent")}," MEM ",2),[[Wp,!o.getDisableStats().includes("mem")]]),Ul(Pu("td",vh,"/ MAX",512),[[Wp,!o.getDisableStats().includes("mem")]]),Ul(Pu("td",xh,"IOR/s",512),[[Wp,!o.getDisableStats().includes("diskio")]]),Ul(Pu("td",wh,"IOW/s",512),[[Wp,!o.getDisableStats().includes("diskio")]]),Ul(Pu("td",_h,"RX/s",512),[[Wp,!o.getDisableStats().includes("networkio")]]),Ul(Pu("td",kh,"TX/s",512),[[Wp,!o.getDisableStats().includes("networkio")]]),Ul(Pu("td",Ah,"Command",512),[[Wp,!o.getDisableStats().includes("command")]])])]),Pu("tbody",null,[(wu(!0),Eu(hu,null,Ec(o.containers,((e,r)=>(wu(),Eu("tr",{key:r},[Ul(Pu("td",{scope:"row"},Cs(e.engine),513),[[Wp,o.showEngine]]),Ul(Pu("td",{scope:"row"},Cs(e.pod_id||"-"),513),[[Wp,o.showPod]]),Ul(Pu("td",{scope:"row"},Cs(e.name),513),[[Wp,!o.getDisableStats().includes("name")]]),Ul(Pu("td",{scope:"row",class:ks("Paused"==e.status?"careful":"ok")},Cs(e.status),3),[[Wp,!o.getDisableStats().includes("status")]]),Ul(Pu("td",{scope:"row"},Cs(e.uptime),513),[[Wp,!o.getDisableStats().includes("uptime")]]),Ul(Pu("td",{scope:"row"},Cs(t.$filters.number(e.cpu_percent,1)),513),[[Wp,!o.getDisableStats().includes("cpu")]]),Ul(Pu("td",{scope:"row"},Cs(t.$filters.bytes(e.memory_usage)),513),[[Wp,!o.getDisableStats().includes("mem")]]),Ul(Pu("td",{scope:"row"}," / "+Cs(t.$filters.bytes(e.limit)),513),[[Wp,!o.getDisableStats().includes("mem")]]),Ul(Pu("td",{scope:"row"},Cs(t.$filters.bytes(e.io_rx)),513),[[Wp,!o.getDisableStats().includes("iodisk")]]),Ul(Pu("td",{scope:"row"},Cs(t.$filters.bytes(e.io_wx)),513),[[Wp,!o.getDisableStats().includes("iodisk")]]),Ul(Pu("td",{scope:"row"},Cs(t.$filters.bits(e.network_rx)),513),[[Wp,!o.getDisableStats().includes("networkio")]]),Ul(Pu("td",{scope:"row"},Cs(t.$filters.bits(e.network_tx)),513),[[Wp,!o.getDisableStats().includes("networkio")]]),Ul(Pu("td",{scope:"row"},Cs(e.command),513),[[Wp,!o.getDisableStats().includes("command")]])])))),128))])])])):Bu("v-if",!0)}]]),Ch={key:0,class:"plugin",id:"folders"},Th={class:"table table-sm table-borderless margin-bottom"},Oh=Pu("thead",null,[Pu("tr",null,[Pu("th",{scope:"col"},"FOLDERS"),Pu("th",{scope:"col",class:"text-end"},"Size")])],-1),Dh={scope:"row"},Ih={key:0,class:"visible-lg-inline"};const jh={props:{data:{type:Object}},computed:{stats(){return this.data.stats.folders},folders(){return this.stats.map((t=>({path:t.path,size:t.size,errno:t.errno,careful:t.careful,warning:t.warning,critical:t.critical})))},hasFolders(){return this.folders.length>0}},methods:{getDecoration:t=>t.errno>0?"error":null!==t.critical&&t.size>1e6*t.critical?"critical":null!==t.warning&&t.size>1e6*t.warning?"warning":null!==t.careful&&t.size>1e6*t.careful?"careful":"ok"}},Ph=(0,$m.A)(jh,[["render",function(t,e,r,n,i,o){return o.hasFolders?(wu(),Eu("section",Ch,[Pu("table",Th,[Oh,Pu("tbody",null,[(wu(!0),Eu(hu,null,Ec(o.folders,((e,r)=>(wu(),Eu("tr",{key:r},[Pu("td",Dh,Cs(e.path),1),Pu("td",{class:ks(["text-end",o.getDecoration(e)])},[e.errno>0?(wu(),Eu("span",Ih,"?")):Bu("v-if",!0),Ru(" "+Cs(t.$filters.bytes(e.size)),1)],2)])))),128))])])])):Bu("v-if",!0)}]]),Nh={key:0,class:"plugin",id:"fs"},Lh={class:"table table-sm table-borderless margin-bottom"},Mh=Pu("th",{scope:"col"},"FILE SYSTEM",-1),Rh={key:0,scope:"col",class:"text-end w-25"},qh={key:1,scope:"col",class:"text-end w-25"},Bh=Pu("th",{scope:"col",class:"text-end w-25"},"Total",-1),$h={scope:"row"},Fh={key:0,class:"visible-lg-inline"},Uh={scope:"row",class:"text-end"};const zh={props:{data:{type:Object}},data:()=>({store:zd}),computed:{args(){return this.store.args||{}},stats(){return this.data.stats.fs},view(){return this.data.views.fs},fileSystems(){const t=this.stats.map((t=>({name:t.device_name,mountPoint:t.mnt_point,percent:t.percent,size:t.size,used:t.used,free:t.free,alias:void 0!==t.alias?t.alias:null})));return(0,Xm.orderBy)(t,["mnt_point"])},hasFs(){return this.fileSystems.length>0}},methods:{getDecoration(t,e){if(null!=this.view[t][e])return this.view[t][e].decoration.toLowerCase()}}},Hh=(0,$m.A)(zh,[["render",function(t,e,r,n,i,o){return o.hasFs?(wu(),Eu("section",Nh,[Pu("table",Lh,[Pu("thead",null,[Pu("tr",null,[Mh,o.args.fs_free_space?(wu(),Eu("th",qh,"Free")):(wu(),Eu("th",Rh,"Used")),Bh])]),Pu("tbody",null,[(wu(!0),Eu(hu,null,Ec(o.fileSystems,((e,r)=>(wu(),Eu("tr",{key:r},[Pu("td",$h,[Ru(Cs(t.$filters.minSize(e.alias?e.alias:e.mountPoint,26,t.begin=!1))+" ",1),(e.alias?e.alias:e.mountPoint).length+e.name.length<=24?(wu(),Eu("span",Fh," ("+Cs(e.name)+") ",1)):Bu("v-if",!0)]),o.args.fs_free_space?(wu(),Eu("td",{key:1,scope:"row",class:ks(["text-end",o.getDecoration(e.mountPoint,"used")])},Cs(t.$filters.bytes(e.free)),3)):(wu(),Eu("td",{key:0,scope:"row",class:ks(["text-end",o.getDecoration(e.mountPoint,"used")])},Cs(t.$filters.bytes(e.used)),3)),Pu("td",Uh,Cs(t.$filters.bytes(e.size)),1)])))),128))])])])):Bu("v-if",!0)}]]),Vh={key:0,id:"gpu",class:"plugin"},Gh={class:"title gpu-name"},Wh={key:0,class:"table-responsive"},Kh=Pu("td",{class:"col"},"proc:",-1),Xh={key:1,class:"col text-end"},Qh=Pu("td",{class:"col"},"mem:",-1),Zh={key:1,class:"col text-end"},Yh=Pu("td",{class:"col"},"temp:",-1),Jh={key:1,class:"col text-end"},tg={key:1,class:"table-responsive"},eg={class:"table table-sm table-borderless"},rg={class:"col"},ng={key:1,class:"col"},ig=Pu("td",{class:"col"},"mem:",-1),og={key:3,class:"col text-end"},sg={key:2,class:"table-responsive"},ag={class:"table table-sm table-borderless"},lg=Pu("td",{class:"col"},"proc mean:",-1),cg={key:1,class:"col"},ug=Pu("td",{class:"col"},"mem mean:",-1),pg={key:1,class:"col"},dg=Pu("td",{class:"col"},"temp mean:",-1),mg={key:1,class:"col"};const fg={props:{data:{type:Object}},data:()=>({store:zd}),computed:{args(){return this.store.args||{}},stats(){return this.data.stats.gpu},view(){return this.data.views.gpu},gpus(){return this.stats},name(){let t="GPU";const{stats:e}=this;return 1===e.length?t=e[0].name:e.length&&(t=`${e.length} GPU ${e[0].name}`),t},mean(){const t={proc:null,mem:null,temperature:null},{stats:e}=this;if(!e.length)return t;for(let r of e)t.proc+=r.proc,t.mem+=r.mem,t.temperature+=r.temperature;return t.proc=t.proc/e.length,t.mem=t.mem/e.length,t.temperature=t.temperature/e.length,t}},methods:{getDecoration(t,e){if(void 0!==this.view[t][e])return this.view[t][e].decoration.toLowerCase()},getMeanDecoration:t=>"DEFAULT"}},hg=(0,$m.A)(fg,[["render",function(t,e,r,n,i,o){return null!=o.gpus?(wu(),Eu("section",Vh,[Pu("div",Gh,Cs(o.name),1),Bu(" single gpu "),1===o.gpus.length?(wu(),Eu("div",Wh,[(wu(!0),Eu(hu,null,Ec(o.gpus,((e,r)=>(wu(),Eu("table",{key:r,class:"table table-sm table-borderless"},[Pu("tbody",null,[Pu("tr",null,[Kh,null!=e.proc?(wu(),Eu("td",{key:0,class:ks(["col text-end",o.getDecoration(e.gpu_id,"proc")])},Cs(t.$filters.number(e.proc,0))+"%",3)):Bu("v-if",!0),null==e.proc?(wu(),Eu("td",Xh,"N/A")):Bu("v-if",!0)]),Pu("tr",null,[Qh,null!=e.mem?(wu(),Eu("td",{key:0,class:ks(["col text-end",o.getDecoration(e.gpu_id,"mem")])},Cs(t.$filters.number(e.mem,0))+"%",3)):Bu("v-if",!0),null==e.mem?(wu(),Eu("td",Zh,"N/A")):Bu("v-if",!0)]),Pu("tr",null,[Yh,null!=e.temperature?(wu(),Eu("td",{key:0,class:ks(["col text-end",o.getDecoration(e.gpu_id,"temperature")])},Cs(t.$filters.number(e.temperature,0)),3)):Bu("v-if",!0),null==e.temperature?(wu(),Eu("td",Jh,"N/A")):Bu("v-if",!0)])])])))),128))])):Bu("v-if",!0),Bu(" multiple gpus - one line per gpu (no mean) "),!o.args.meangpu&&o.gpus.length>1?(wu(),Eu("div",tg,[Pu("table",eg,[Pu("tbody",null,[(wu(!0),Eu(hu,null,Ec(o.gpus,((e,r)=>(wu(),Eu("tr",{key:r},[Pu("td",rg,Cs(e.gpu_id)+":",1),null!=e.proc?(wu(),Eu("td",{key:0,class:ks(["col",o.getDecoration(e.gpu_id,"proc")])},Cs(t.$filters.number(e.proc,0))+"%",3)):Bu("v-if",!0),null==e.proc?(wu(),Eu("td",ng,"N/A")):Bu("v-if",!0),ig,null!=e.mem?(wu(),Eu("td",{key:2,class:ks(["col text-end",o.getDecoration(e.gpu_id,"mem")])},Cs(t.$filters.number(e.mem,0))+"%",3)):Bu("v-if",!0),null==e.mem?(wu(),Eu("td",og,"N/A")):Bu("v-if",!0)])))),128))])])])):Bu("v-if",!0),Bu(" multiple gpus - mean "),o.args.meangpu&&o.gpus.length>1?(wu(),Eu("div",sg,[Pu("table",ag,[Pu("tbody",null,[Pu("tr",null,[lg,null!=o.mean.proc?(wu(),Eu("td",{key:0,class:ks(["col",o.getMeanDecoration("proc")])},Cs(t.$filters.number(o.mean.proc,0))+"% ",3)):Bu("v-if",!0),null==o.mean.proc?(wu(),Eu("td",cg,"N/A")):Bu("v-if",!0)]),Pu("tr",null,[ug,null!=o.mean.mem?(wu(),Eu("td",{key:0,class:ks(["col",o.getMeanDecoration("mem")])},Cs(t.$filters.number(o.mean.mem,0))+"% ",3)):Bu("v-if",!0),null==o.mean.mem?(wu(),Eu("td",pg,"N/A")):Bu("v-if",!0)]),Pu("tr",null,[dg,null!=o.mean.temperature?(wu(),Eu("td",{key:0,class:ks(["col",o.getMeanDecoration("temperature")])},Cs(t.$filters.number(o.mean.temperature,0)),3)):Bu("v-if",!0),null==o.mean.temperature?(wu(),Eu("td",mg,"N/A")):Bu("v-if",!0)])])])])):Bu("v-if",!0)])):Bu("v-if",!0)}]]),gg={key:0,class:"plugin",id:"ip"},bg={key:0,class:"title"},yg={key:1},vg={key:2,class:"title"},xg={key:3},wg={key:4,class:"text-truncate"};const _g={props:{data:{type:Object}},computed:{ipStats(){return this.data.stats.ip},address(){return this.ipStats.address},gateway(){return this.ipStats.gateway},maskCdir(){return this.ipStats.mask_cidr},publicAddress(){return this.ipStats.public_address},publicInfo(){return this.ipStats.public_info_human}}},kg=(0,$m.A)(_g,[["render",function(t,e,r,n,i,o){return o.address?(wu(),Eu("section",gg,[o.address?(wu(),Eu("span",bg,"IP")):Bu("v-if",!0),o.address?(wu(),Eu("span",yg,Cs(o.address)+"/"+Cs(o.maskCdir),1)):Bu("v-if",!0),o.publicAddress?(wu(),Eu("span",vg,"Pub")):Bu("v-if",!0),o.publicAddress?(wu(),Eu("span",xg,Cs(o.publicAddress),1)):Bu("v-if",!0),o.publicInfo?(wu(),Eu("span",wg,Cs(o.publicInfo),1)):Bu("v-if",!0)])):Bu("v-if",!0)}]]),Ag={class:"plugin",id:"irq"},Sg={class:"table table-sm table-borderless margin-bottom"},Eg=Pu("thead",null,[Pu("tr",null,[Pu("th",{scope:"col"},"IRQ"),Pu("th",{scope:"col",class:"text-end"},"Rate/s")])],-1),Cg={scope:"row"},Tg={scope:"row",class:"text-end"};const Og={props:{data:{type:Object}},computed:{stats(){return this.data.stats.irq},irqs(){return this.stats.map((t=>({irq_line:t.irq_line,irq_rate:t.irq_rate})))}}},Dg=(0,$m.A)(Og,[["render",function(t,e,r,n,i,o){return wu(),Eu("section",Ag,[Pu("table",Sg,[Eg,Pu("tbody",null,[(wu(!0),Eu(hu,null,Ec(o.irqs,((t,e)=>(wu(),Eu("tr",{key:e},[Pu("td",Cg,Cs(t.irq_line),1),Pu("td",Tg,Cs(t.irq_rate),1)])))),128))])])])}]]),Ig={key:0,id:"load",class:"plugin"},jg={class:"table-responsive"},Pg={class:"table table-sm table-borderless"},Ng=Pu("th",{scope:"col"},"LOAD",-1),Lg={scope:"col",class:"text-end"},Mg=Pu("td",{scope:"row"},"1 min:",-1),Rg={class:"text-end"},qg=Pu("td",{scope:"row"},"5 min:",-1),Bg=Pu("td",{scope:"row"},"15 min:",-1);const $g={props:{data:{type:Object}},computed:{stats(){return this.data.stats.load},view(){return this.data.views.load},cpucore(){return this.stats.cpucore},min1(){return this.stats.min1},min5(){return this.stats.min5},min15(){return this.stats.min15}},methods:{getDecoration(t){if(void 0!==this.view[t])return this.view[t].decoration.toLowerCase()}}},Fg=(0,$m.A)($g,[["render",function(t,e,r,n,i,o){return null!=o.cpucore?(wu(),Eu("section",Ig,[Pu("div",jg,[Pu("table",Pg,[Pu("thead",null,[Pu("tr",null,[Ng,Pu("td",Lg,Cs(o.cpucore)+"-core",1)])]),Pu("tbody",null,[Pu("tr",null,[Mg,Pu("td",Rg,Cs(t.$filters.number(o.min1,2)),1)]),Pu("tr",null,[qg,Pu("td",{class:ks(["text-end",o.getDecoration("min5")])},Cs(t.$filters.number(o.min5,2)),3)]),Pu("tr",null,[Bg,Pu("td",{class:ks(["text-end",o.getDecoration("min15")])},Cs(t.$filters.number(o.min15,2)),3)])])])])])):Bu("v-if",!0)}]]),Ug={id:"mem",class:"plugin"},zg={class:"table-responsive"},Hg={class:"table-sm table-borderless"},Vg={class:"justify-content-between"},Gg={scope:"col"},Wg={class:"table table-sm table-borderless"},Kg=Pu("th",{scope:"col"},"MEM",-1),Xg=Pu("td",{scope:"row"},"total:",-1),Qg={class:"text-end"},Zg=Pu("td",{scope:"row"},"used:",-1),Yg=Pu("td",{scope:"row"},"free:",-1),Jg={class:"d-none d-xl-block d-xxl-block"},tb={class:"table table-sm table-borderless"},eb={scope:"col"},rb={scope:"col"},nb={scope:"col"},ib={scope:"col"};const ob={props:{data:{type:Object}},computed:{stats(){return this.data.stats.mem},view(){return this.data.views.mem},percent(){return this.stats.percent},total(){return this.stats.total},used(){return this.stats.used},free(){return this.stats.free},active(){return this.stats.active},inactive(){return this.stats.inactive},buffers(){return this.stats.buffers},cached(){return this.stats.cached}},methods:{getDecoration(t){if(void 0!==this.view[t])return this.view[t].decoration.toLowerCase()}}},sb=(0,$m.A)(ob,[["render",function(t,e,r,n,i,o){return wu(),Eu("section",Ug,[Bu(" d-none d-xxl-block "),Pu("div",zg,[Pu("table",Hg,[Pu("tbody",null,[Pu("tr",Vg,[Pu("td",Gg,[Pu("table",Wg,[Pu("tbody",null,[Pu("tr",null,[Kg,Pu("td",{scope:"col",class:ks(["text-end",o.getDecoration("percent")])},Cs(o.percent)+"%",3)]),Pu("tr",null,[Xg,Pu("td",Qg,Cs(t.$filters.bytes(o.total)),1)]),Pu("tr",null,[Zg,Pu("td",{class:ks(["text-end",o.getDecoration("used")])},Cs(t.$filters.bytes(o.used,2)),3)]),Pu("tr",null,[Yg,Pu("td",{class:ks(["text-end",o.getDecoration("free")])},Cs(t.$filters.bytes(o.free,2)),3)])])])]),Pu("td",null,[Pu("template",Jg,[Pu("table",tb,[Pu("tbody",null,[Pu("tr",null,[Ul(Pu("td",eb," active: ",512),[[Wp,null!=o.active]]),Ul(Pu("td",{scope:"col"},Cs(t.$filters.bytes(o.active)),513),[[Wp,null!=o.active]])]),Pu("tr",null,[Ul(Pu("td",rb," inactive: ",512),[[Wp,null!=o.inactive]]),Ul(Pu("td",{scope:"col"},Cs(t.$filters.bytes(o.inactive)),513),[[Wp,null!=o.inactive]])]),Pu("tr",null,[Ul(Pu("td",nb," buffers: ",512),[[Wp,null!=o.buffers]]),Ul(Pu("td",{scope:"col"},Cs(t.$filters.bytes(o.buffers)),513),[[Wp,null!=o.buffers]])]),Pu("tr",null,[Ul(Pu("td",ib," cached: ",512),[[Wp,null!=o.cached]]),Ul(Pu("td",{scope:"col"},Cs(t.$filters.bytes(o.cached)),513),[[Wp,null!=o.cached]])])])])])])])])])])])}]]),ab={id:"memswap",class:"plugin"},lb={class:"table-responsive"},cb={class:"table table-sm table-borderless"},ub=Pu("th",{scope:"col"},"SWAP",-1),pb=Pu("td",{scope:"row"},"total:",-1),db={class:"text-end"},mb=Pu("td",{scope:"row"},"used:",-1),fb=Pu("td",{scope:"row"},"free:",-1),hb={class:"text-end"};const gb={props:{data:{type:Object}},computed:{stats(){return this.data.stats.memswap},view(){return this.data.views.memswap},percent(){return this.stats.percent},total(){return this.stats.total},used(){return this.stats.used},free(){return this.stats.free}},methods:{getDecoration(t){if(void 0!==this.view[t])return this.view[t].decoration.toLowerCase()}}},bb=(0,$m.A)(gb,[["render",function(t,e,r,n,i,o){return wu(),Eu("section",ab,[Pu("div",lb,[Pu("table",cb,[Pu("thead",null,[Pu("tr",null,[ub,Pu("td",{scope:"col",class:ks(["text-end",o.getDecoration("percent")])},Cs(o.percent)+"%",3)])]),Pu("tbody",null,[Pu("tr",null,[pb,Pu("td",db,Cs(t.$filters.bytes(o.total)),1)]),Pu("tr",null,[mb,Pu("td",{class:ks(["text-end",o.getDecoration("used")])},Cs(t.$filters.bytes(o.used,2)),3)]),Pu("tr",null,[fb,Pu("td",hb,Cs(t.$filters.bytes(o.free,2)),1)])])])])])}]]),yb={key:0,class:"plugin",id:"network"},vb={class:"table table-sm table-borderless margin-bottom"},xb=Pu("th",{scope:"col"},"NETWORK",-1),wb={scope:"col",class:"text-end w-25"},_b={scope:"col",class:"text-end w-25"},kb={scope:"col",class:"text-end w-25"},Ab={scope:"col",class:"text-end w-25"},Sb={scope:"col",class:"text-end w-25"},Eb={scope:"col",class:"text-end w-25"},Cb={scope:"col",class:"text-end w-25"},Tb={scope:"col",class:"text-end w-25"},Ob={scope:"row",class:"visible-lg-inline"},Db={class:"text-end w-25"},Ib={class:"text-end w-25"};const jb={props:{data:{type:Object}},data:()=>({store:zd}),computed:{args(){return this.store.args||{}},stats(){return this.data.stats.network},view(){return this.data.views.network},networks(){const t=this.stats.map((t=>{const e=void 0!==t.alias?t.alias:null;return{interfaceName:t.interface_name,ifname:e||t.interface_name,bytes_recv_rate_per_sec:t.bytes_recv_rate_per_sec,bytes_sent_rate_per_sec:t.bytes_sent_rate_per_sec,bytes_all_rate_per_sec:t.bytes_all_rate_per_sec,bytes_recv:t.bytes_recv,bytes_sent:t.bytes_sent,bytes_all:t.bytes_all}})).filter((t=>{const e=this.view[t.interfaceName].bytes_recv_rate_per_sec,r=this.view[t.interfaceName].bytes_sent_rate_per_sec;return!(e&&!1!==e.hidden||r&&!1!==r.hidden)}));return(0,Xm.orderBy)(t,["interfaceName"])},hasNetworks(){return this.networks.length>0}},methods:{getDecoration(t,e){if(null!=this.view[t][e])return this.view[t][e].decoration.toLowerCase()}}},Pb=(0,$m.A)(jb,[["render",function(t,e,r,n,i,o){return o.hasNetworks?(wu(),Eu("section",yb,[Pu("table",vb,[Pu("thead",null,[Pu("tr",null,[xb,Ul(Pu("th",wb,"Rx/s",512),[[Wp,!o.args.network_cumul&&!o.args.network_sum]]),Ul(Pu("th",_b,"Tx/s",512),[[Wp,!o.args.network_cumul&&!o.args.network_sum]]),Ul(Pu("th",kb,null,512),[[Wp,!o.args.network_cumul&&o.args.network_sum]]),Ul(Pu("th",Ab,"Rx+Tx/s",512),[[Wp,!o.args.network_cumul&&o.args.network_sum]]),Ul(Pu("th",Sb,"Rx",512),[[Wp,o.args.network_cumul&&!o.args.network_sum]]),Ul(Pu("th",Eb,"Tx",512),[[Wp,o.args.network_cumul&&!o.args.network_sum]]),Ul(Pu("th",Cb,null,512),[[Wp,o.args.network_cumul&&o.args.network_sum]]),Ul(Pu("th",Tb,"Rx+Tx",512),[[Wp,o.args.network_cumul&&o.args.network_sum]])])]),Pu("tbody",null,[(wu(!0),Eu(hu,null,Ec(o.networks,((e,r)=>(wu(),Eu("tr",{key:r},[Pu("td",Ob,Cs(e.ifname),1),Ul(Pu("td",{class:ks(["text-end w-25",o.getDecoration(e.interfaceName,"bytes_recv_rate_per_sec")])},Cs(o.args.byte?t.$filters.bytes(e.bytes_recv_rate_per_sec):t.$filters.bits(e.bytes_recv_rate_per_sec)),3),[[Wp,!o.args.network_cumul&&!o.args.network_sum]]),Ul(Pu("td",{class:ks(["text-end w-25",o.getDecoration(e.interfaceName,"bytes_sent_rate_per_sec")])},Cs(o.args.byte?t.$filters.bytes(e.bytes_sent_rate_per_sec):t.$filters.bits(e.bytes_sent_rate_per_sec)),3),[[Wp,!o.args.network_cumul&&!o.args.network_sum]]),Ul(Pu("td",Db,null,512),[[Wp,!o.args.network_cumul&&o.args.network_sum]]),Ul(Pu("td",{class:"text-end w-25"},Cs(o.args.byte?t.$filters.bytes(e.bytes_all_rate_per_sec):t.$filters.bits(e.bytes_all_rate_per_sec)),513),[[Wp,!o.args.network_cumul&&o.args.network_sum]]),Ul(Pu("td",{class:"text-end w-25"},Cs(o.args.byte?t.$filters.bytes(e.bytes_recv):t.$filters.bits(e.bytes_recv)),513),[[Wp,o.args.network_cumul&&!o.args.network_sum]]),Ul(Pu("td",{class:"text-end w-25"},Cs(o.args.byte?t.$filters.bytes(e.bytes_sent):t.$filters.bits(e.bytes_sent)),513),[[Wp,o.args.network_cumul&&!o.args.network_sum]]),Ul(Pu("td",Ib,null,512),[[Wp,o.args.network_cumul&&o.args.network_sum]]),Ul(Pu("td",{class:"text-end w-25"},Cs(o.args.byte?t.$filters.bytes(e.bytes_all):t.$filters.bits(e.bytes_all)),513),[[Wp,o.args.network_cumul&&o.args.network_sum]])])))),128))])])])):Bu("v-if",!0)}]]),Nb={id:"now",class:"plugin"},Lb={class:"table-row"},Mb={class:"table-cell text-start"};const Rb={props:{data:{type:Object}},computed:{date_custom(){return this.data.stats.now.custom}}},qb=(0,$m.A)(Rb,[["render",function(t,e,r,n,i,o){return wu(),Eu("section",Nb,[Pu("div",Lb,[Pu("div",Mb,Cs(o.date_custom),1)])])}]]),Bb={id:"percpu",class:"plugin"},$b={class:"table-responsive"},Fb={class:"table table-sm table-borderless"},Ub={key:0,scope:"col"},zb={key:1,scope:"col"},Hb=Pu("td",{scope:"col"},"user",-1),Vb=Pu("td",{scope:"col"},"system",-1),Gb=Pu("td",{scope:"col"},"idle",-1),Wb=Pu("td",{scope:"col"},"iowait",-1),Kb=Pu("td",{scope:"col"},"steel",-1),Xb={key:0,scope:"col"},Qb={key:1,scope:"col"};const Zb={props:{data:{type:Object}},data:()=>({store:zd}),computed:{args(){return this.store.args||{}},config(){return this.store.config||{}},percpuStats(){return this.data.stats.percpu}},methods:{getUserAlert:t=>Gd.getAlert("percpu","percpu_user_",t.user),getSystemAlert:t=>Gd.getAlert("percpu","percpu_system_",t.system),getIOWaitAlert:t=>Gd.getAlert("percpu","percpu_iowait_",t.system)}},Yb=(0,$m.A)(Zb,[["render",function(t,e,r,n,i,o){return wu(),Eu("section",Bb,[Bu(" d-none d-xl-block d-xxl-block "),Pu("div",$b,[Pu("table",Fb,[Pu("thead",null,[Pu("tr",null,[o.args.disable_quicklook?(wu(),Eu("th",Ub,"CPU")):Bu("v-if",!0),o.args.disable_quicklook?(wu(),Eu("td",zb,"total")):Bu("v-if",!0),Hb,Vb,Gb,Wb,Kb])]),Pu("tbody",null,[(wu(!0),Eu(hu,null,Ec(o.percpuStats,((t,e)=>(wu(),Eu("tr",{key:e},[o.args.disable_quicklook?(wu(),Eu("td",Xb,"CPU"+Cs(t.cpu_number),1)):Bu("v-if",!0),o.args.disable_quicklook?(wu(),Eu("td",Qb,Cs(t.total)+"%",1)):Bu("v-if",!0),Pu("td",{scope:"col",class:ks(o.getUserAlert(t))},Cs(t.user)+"%",3),Pu("td",{scope:"col",class:ks(o.getSystemAlert(t))},Cs(t.system)+"%",3),Ul(Pu("td",{scope:"col"},Cs(t.idle)+"%",513),[[Wp,null!=t.idle]]),Ul(Pu("td",{scope:"col",class:ks(o.getIOWaitAlert(t))},Cs(t.iowait)+"%",3),[[Wp,null!=t.iowait]]),Ul(Pu("td",{scope:"col"},Cs(t.steal)+"%",513),[[Wp,null!=t.steal]])])))),128))])])])])}]]),Jb={key:0,class:"plugin",id:"ports"},ty={class:"table table-sm table-borderless margin-bottom"},ey={scope:"row"},ry={key:0},ny={key:1},iy={key:2},oy={key:3},sy={key:0},ay={key:1},ly={key:2};const cy={props:{data:{type:Object}},computed:{stats(){return this.data.stats.ports},ports(){return this.stats},hasPorts(){return this.ports.length>0}},methods:{getPortDecoration:t=>null===t.status?"careful":!1===t.status?"critical":null!==t.rtt_warning&&t.status>t.rtt_warning?"warning":"ok",getWebDecoration:t=>null===t.status?"careful":-1===[200,301,302].indexOf(t.status)?"critical":null!==t.rtt_warning&&t.elapsed>t.rtt_warning?"warning":"ok"}},uy=(0,$m.A)(cy,[["render",function(t,e,r,n,i,o){return o.hasPorts?(wu(),Eu("section",Jb,[Pu("table",ty,[Pu("tbody",null,[(wu(!0),Eu(hu,null,Ec(o.ports,((e,r)=>(wu(),Eu("tr",{key:r},[Pu("td",ey,[Bu(" prettier-ignore "),Ru(" "+Cs(t.$filters.minSize(e.description?e.description:e.host+" "+e.port,20)),1)]),e.host?(wu(),Eu("td",{key:0,scope:"row",class:ks(["text-end",o.getPortDecoration(e)])},["null"==e.status?(wu(),Eu("span",ry,"Scanning")):"false"==e.status?(wu(),Eu("span",ny,"Timeout")):"true"==e.status?(wu(),Eu("span",iy,"Open")):(wu(),Eu("span",oy,Cs(t.$filters.number(1e3*e.status,0))+"ms",1))],2)):Bu("v-if",!0),e.url?(wu(),Eu("td",{key:1,scope:"row",class:ks(["text-end",o.getPortDecoration(e)])},["null"==e.status?(wu(),Eu("span",sy,"Scanning")):"Error"==e.status?(wu(),Eu("span",ay,"Error")):(wu(),Eu("span",ly,"Code "+Cs(e.status),1))],2)):Bu("v-if",!0)])))),128))])])])):Bu("v-if",!0)}]]),py={key:0},dy={key:1},my={key:0,class:"row"},fy={class:"col-lg-18"};const hy={key:0,id:"amps",class:"plugin"},gy={class:"table table-sm table-borderless"},by={key:0},yy=["innerHTML"];const vy={props:{data:{type:Object}},computed:{stats(){return this.data.stats.amps},processes(){return this.stats.filter((t=>null!==t.result))},hasAmps(){return this.processes.length>0}},methods:{getNameDecoration(t){const e=t.count,r=t.countmin,n=t.countmax;let i="ok";return i=e>0?(null===r||e>=r)&&(null===n||e<=n)?"ok":"careful":null===r?"ok":"critical",i}}},xy=(0,$m.A)(vy,[["render",function(t,e,r,n,i,o){return o.hasAmps?(wu(),Eu("section",hy,[Pu("table",gy,[Pu("tbody",null,[(wu(!0),Eu(hu,null,Ec(o.processes,((e,r)=>(wu(),Eu("tr",{key:r},[Pu("td",{class:ks(o.getNameDecoration(e))},Cs(e.name),3),e.regex?(wu(),Eu("td",by,Cs(e.count),1)):Bu("v-if",!0),Pu("td",{class:"process-result",innerHTML:t.$filters.nl2br(e.result)},null,8,yy)])))),128))])]),Bu('
\n
\n
\n {{ process.name }}\n
\n
{{ process.count }}
\n
\n
\n ')])):Bu("v-if",!0)}]]),wy={class:"plugin",id:"processcount"},_y=Pu("span",{class:"title"},"TASKS",-1),ky={class:"title"};const Ay={props:{data:{type:Object},sorter:{type:Object}},data:()=>({store:zd}),computed:{args(){return this.store.args||{}},stats(){return this.data.stats.processcount},total(){return this.stats.total||0},running(){return this.stats.running||0},sleeping(){return this.stats.sleeping||0},stopped(){return this.stats.stopped||0},thread(){return this.stats.thread||0}}},Sy=(0,$m.A)(Ay,[["render",function(t,e,r,n,i,o){return wu(),Eu("section",wy,[_y,Pu("span",null,Cs(o.total)+" ("+Cs(o.thread)+" thr),",1),Pu("span",null,Cs(o.running)+" run,",1),Pu("span",null,Cs(o.sleeping)+" slp,",1),Pu("span",null,Cs(o.stopped)+" oth",1),Pu("span",null,Cs(o.args.programs?"Programs":"Threads"),1),Pu("span",ky,Cs(r.sorter.auto?"sorted automatically":"sorted"),1),Pu("span",null,"by "+Cs(r.sorter.getColumnLabel(r.sorter.column)),1)])}]]),Ey={key:0,class:"plugin",id:"processlist"},Cy={class:"table table-sm table-borderless table-striped table-hover"},Ty={scope:"col",class:"hidden-xs hidden-sm"},Oy={scope:"col",class:"hidden-xs hidden-sm"},Dy={scope:"col"},Iy={scope:"col"},jy={scope:"col",class:"table-cell widtd-60"},Py={key:0,scope:"row",class:"hidden-xs hidden-sm"},Ny={key:1,class:"plugin",id:"processlist"},Ly={class:"table table-sm table-borderless table-striped table-hover"},My={scope:"col",class:"hidden-xs hidden-sm"},Ry={scope:"col",class:"hidden-xs hidden-sm"},qy={scope:"col"},By={scope:"row"},$y={scope:"row",class:"table-cell widtd-60"};const Fy={props:{data:{type:Object},sorter:{type:Object}},data:()=>({store:zd}),computed:{args(){return this.store.args||{}},config(){return this.store.config||{}},stats_processlist(){return this.data.stats.processlist},processes(){const{sorter:t}=this,e=this.data.stats.isWindows,r=(this.stats_processlist||[]).map((t=>(t.memvirt="?",t.memres="?",t.memory_info&&(t.memvirt=t.memory_info.vms,t.memres=t.memory_info.rss),e&&null!==t.username&&(t.username=(0,Xm.last)(t.username.split("\\"))),t.timeforhuman="?",t.cpu_times&&(t.timeplus=ch([t.cpu_times.user,t.cpu_times.system]),t.timeforhuman=t.timeplus.hours.toString().padStart(2,"0")+":"+t.timeplus.minutes.toString().padStart(2,"0")+":"+t.timeplus.seconds.toString().padStart(2,"0")),null===t.num_threads&&(t.num_threads=-1),null===t.cpu_percent&&(t.cpu_percent=-1),null===t.memory_percent&&(t.memory_percent=-1),t.io_read=null,t.io_write=null,t.io_counters&&(t.io_read=(t.io_counters[0]-t.io_counters[2])/t.time_since_update,t.io_write=(t.io_counters[1]-t.io_counters[3])/t.time_since_update),t.isNice=void 0!==t.nice&&(e&&32!=t.nice||!e&&0!=t.nice),Array.isArray(t.cmdline)&&(t.cmdline=t.cmdline.join(" ").replace(/\n/g," ")),null!==t.cmdline&&0!==t.cmdline.length||(t.cmdline=t.name),t)));return(0,Xm.orderBy)(r,[t.column].reduce(((t,e)=>("io_counters"===e&&(e=["io_read","io_write"]),t.concat(e))),[]),[t.isReverseColumn(t.column)?"desc":"asc"]).slice(0,this.limit)},ioReadWritePresentProcesses(){return(this.stats_processlist||[]).some((({io_counters:t})=>t))},stats_programlist(){return this.data.stats.programlist},programs(){const{sorter:t}=this,e=this.data.stats.isWindows,r=(this.stats_programlist||[]).map((t=>(t.memvirt="?",t.memres="?",t.memory_info&&(t.memvirt=t.memory_info.vms,t.memres=t.memory_info.rss),e&&null!==t.username&&(t.username=(0,Xm.last)(t.username.split("\\"))),t.timeforhuman="?",t.cpu_times&&(t.timeplus=ch([t.cpu_times.user,t.cpu_times.system]),t.timeforhuman=t.timeplus.hours.toString().padStart(2,"0")+":"+t.timeplus.minutes.toString().padStart(2,"0")+":"+t.timeplus.seconds.toString().padStart(2,"0")),null===t.num_threads&&(t.num_threads=-1),null===t.cpu_percent&&(t.cpu_percent=-1),null===t.memory_percent&&(t.memory_percent=-1),t.io_read=null,t.io_write=null,t.io_counters&&(t.io_read=(t.io_counters[0]-t.io_counters[2])/t.time_since_update,t.io_write=(t.io_counters[1]-t.io_counters[3])/t.time_since_update),t.isNice=void 0!==t.nice&&(e&&32!=t.nice||!e&&0!=t.nice),Array.isArray(t.cmdline)&&(t.cmdline=t.cmdline.join(" ").replace(/\n/g," ")),null!==t.cmdline&&0!==t.cmdline.length||(t.cmdline=t.name),t)));return(0,Xm.orderBy)(r,[t.column].reduce(((t,e)=>("io_counters"===e&&(e=["io_read","io_write"]),t.concat(e))),[]),[t.isReverseColumn(t.column)?"desc":"asc"]).slice(0,this.limit)},ioReadWritePresentPrograms(){return(this.stats_programlist||[]).some((({io_counters:t})=>t))},limit(){return void 0!==this.config.outputs?this.config.outputs.max_processes_display:void 0}},methods:{getCpuPercentAlert:t=>Gd.getAlert("processlist","processlist_cpu_",t.cpu_percent),getMemoryPercentAlert:t=>Gd.getAlert("processlist","processlist_mem_",t.cpu_percent),getDisableStats:()=>Gd.getLimit("processlist","processlist_disable_stats")||[]}},Uy={components:{GlancesPluginAmps:xy,GlancesPluginProcesscount:Sy,GlancesPluginProcesslist:(0,$m.A)(Fy,[["render",function(t,e,r,n,i,o){return wu(),Eu(hu,null,[o.args.programs?Bu("v-if",!0):(wu(),Eu("section",Ey,[Bu(" Display processes "),Pu("table",Cy,[Pu("thead",null,[Pu("tr",null,[Ul(Pu("td",{scope:"col",class:ks(["sortable","cpu_percent"===r.sorter.column&&"sort"]),onClick:e[0]||(e[0]=e=>t.$emit("update:sorter","cpu_percent"))}," CPU% ",2),[[Wp,!o.getDisableStats().includes("cpu_percent")]]),Ul(Pu("td",{scope:"col",class:ks(["sortable","memory_percent"===r.sorter.column&&"sort"]),onClick:e[1]||(e[1]=e=>t.$emit("update:sorter","memory_percent"))}," MEM% ",2),[[Wp,!o.getDisableStats().includes("memory_percent")]]),Ul(Pu("td",Ty," VIRT ",512),[[Wp,!o.getDisableStats().includes("memory_info")]]),Ul(Pu("td",Oy," RES ",512),[[Wp,!o.getDisableStats().includes("memory_info")]]),Ul(Pu("td",Dy," PID ",512),[[Wp,!o.getDisableStats().includes("pid")]]),Ul(Pu("td",{scope:"col",class:ks(["sortable","username"===r.sorter.column&&"sort"]),onClick:e[2]||(e[2]=e=>t.$emit("update:sorter","username"))}," USER ",2),[[Wp,!o.getDisableStats().includes("username")]]),Ul(Pu("td",{scope:"col",class:ks(["hidden-xs hidden-sm",["sortable","timemillis"===r.sorter.column&&"sort"]]),onClick:e[3]||(e[3]=e=>t.$emit("update:sorter","timemillis"))}," TIME+ ",2),[[Wp,!o.getDisableStats().includes("cpu_times")]]),Ul(Pu("td",{scope:"col",class:ks(["hidden-xs hidden-sm",["sortable","num_threads"===r.sorter.column&&"sort"]]),onClick:e[4]||(e[4]=e=>t.$emit("update:sorter","num_threads"))}," THR ",2),[[Wp,!o.getDisableStats().includes("num_threads")]]),Ul(Pu("td",Iy,"NI",512),[[Wp,!o.getDisableStats().includes("nice")]]),Ul(Pu("td",jy,"S ",512),[[Wp,!o.getDisableStats().includes("status")]]),Ul(Pu("td",{scope:"col",class:ks(["hidden-xs hidden-sm",["sortable","io_counters"===r.sorter.column&&"sort"]]),onClick:e[5]||(e[5]=e=>t.$emit("update:sorter","io_counters"))}," IOR/s ",2),[[Wp,o.ioReadWritePresentProcesses&&!o.getDisableStats().includes("io_counters")]]),Ul(Pu("td",{scope:"col",class:ks(["text-start hidden-xs hidden-sm",["sortable","io_counters"===r.sorter.column&&"sort"]]),onClick:e[6]||(e[6]=e=>t.$emit("update:sorter","io_counters"))}," IOW/s ",2),[[Wp,o.ioReadWritePresentProcesses&&!o.getDisableStats().includes("io_counters")]]),Ul(Pu("td",{scope:"col",class:ks(["sortable","name"===r.sorter.column&&"sort"]),onClick:e[7]||(e[7]=e=>t.$emit("update:sorter","name"))}," Command ",2),[[Wp,!o.getDisableStats().includes("cmdline")]])])]),Pu("tbody",null,[(wu(!0),Eu(hu,null,Ec(o.processes,((e,r)=>(wu(),Eu("tr",{key:r},[Ul(Pu("td",{scope:"row",class:ks(o.getCpuPercentAlert(e))},Cs(-1==e.cpu_percent?"?":t.$filters.number(e.cpu_percent,1)),3),[[Wp,!o.getDisableStats().includes("cpu_percent")]]),Ul(Pu("td",{scope:"row",class:ks(o.getMemoryPercentAlert(e))},Cs(-1==e.memory_percent?"?":t.$filters.number(e.memory_percent,1)),3),[[Wp,!o.getDisableStats().includes("memory_percent")]]),Ul(Pu("td",{scope:"row"},Cs(t.$filters.bytes(e.memvirt)),513),[[Wp,!o.getDisableStats().includes("memory_info")]]),Ul(Pu("td",{scope:"row"},Cs(t.$filters.bytes(e.memres)),513),[[Wp,!o.getDisableStats().includes("memory_info")]]),Ul(Pu("td",{scope:"row"},Cs(e.pid),513),[[Wp,!o.getDisableStats().includes("pid")]]),Ul(Pu("td",{scope:"row"},Cs(e.username),513),[[Wp,!o.getDisableStats().includes("username")]]),Ul(Pu("td",{scope:"row",class:"hidden-xs hidden-sm"},Cs(e.timeforhuman),513),[[Wp,!o.getDisableStats().includes("cpu_times")]]),"?"==e.timeplus?Ul((wu(),Eu("td",Py,"?",512)),[[Wp,!o.getDisableStats().includes("cpu_times")]]):Bu("v-if",!0),Ul(Pu("td",{scope:"row",class:"hidden-xs hidden-sm"},Cs(-1==e.num_threads?"?":e.num_threads),513),[[Wp,!o.getDisableStats().includes("num_threads")]]),Ul(Pu("td",{scope:"row",class:ks({nice:e.isNice})},Cs(t.$filters.exclamation(e.nice)),3),[[Wp,!o.getDisableStats().includes("nice")]]),Ul(Pu("td",{scope:"row",class:ks({status:"R"==e.status})},Cs(e.status),3),[[Wp,!o.getDisableStats().includes("status")]]),Ul(Pu("td",{scope:"row",class:"hidden-xs hidden-sm"},Cs(t.$filters.bytes(e.io_read)),513),[[Wp,o.ioReadWritePresentProcesses&&!o.getDisableStats().includes("io_counters")]]),Ul(Pu("td",{scope:"row",class:"hidden-xs hidden-sm"},Cs(t.$filters.bytes(e.io_write)),513),[[Wp,o.ioReadWritePresentProcesses&&!o.getDisableStats().includes("io_counters")]]),Ul(Pu("td",{scope:"row",class:"text-truncate"},Cs(e.name),513),[[Wp,o.args.process_short_name&&!o.getDisableStats().includes("cmdline")]]),Ul(Pu("td",{scope:"row"},Cs(e.cmdline),513),[[Wp,!o.args.process_short_name&&!o.getDisableStats().includes("cmdline")]])])))),128))])])])),o.args.programs?(wu(),Eu("section",Ny,[Bu(" Display programs "),Pu("table",Ly,[Pu("thead",null,[Pu("tr",null,[Ul(Pu("td",{scope:"col",class:ks(["sortable","cpu_percent"===r.sorter.column&&"sort"]),onClick:e[8]||(e[8]=e=>t.$emit("update:sorter","cpu_percent"))}," CPU% ",2),[[Wp,!o.getDisableStats().includes("cpu_percent")]]),Ul(Pu("td",{scope:"col",class:ks(["sortable","memory_percent"===r.sorter.column&&"sort"]),onClick:e[9]||(e[9]=e=>t.$emit("update:sorter","memory_percent"))}," MEM% ",2),[[Wp,!o.getDisableStats().includes("memory_percent")]]),Ul(Pu("td",My," VIRT ",512),[[Wp,!o.getDisableStats().includes("memory_info")]]),Ul(Pu("td",Ry," RES ",512),[[Wp,!o.getDisableStats().includes("memory_info")]]),Ul(Pu("td",qy," NPROCS ",512),[[Wp,!o.getDisableStats().includes("nprocs")]]),Ul(Pu("td",{scope:"row",class:ks(["sortable","username"===r.sorter.column&&"sort"]),onClick:e[10]||(e[10]=e=>t.$emit("update:sorter","username"))}," USER ",2),[[Wp,!o.getDisableStats().includes("username")]]),Ul(Pu("td",{scope:"row",class:ks(["hidden-xs hidden-sm",["sortable","timemillis"===r.sorter.column&&"sort"]]),onClick:e[11]||(e[11]=e=>t.$emit("update:sorter","timemillis"))}," TIME+ ",2),[[Wp,!o.getDisableStats().includes("cpu_times")]]),Ul(Pu("td",{scope:"row",class:ks(["hidden-xs hidden-sm",["sortable","num_threads"===r.sorter.column&&"sort"]]),onClick:e[12]||(e[12]=e=>t.$emit("update:sorter","num_threads"))}," THR ",2),[[Wp,!o.getDisableStats().includes("num_threads")]]),Ul(Pu("td",By,"NI",512),[[Wp,!o.getDisableStats().includes("nice")]]),Ul(Pu("td",$y,"S ",512),[[Wp,!o.getDisableStats().includes("status")]]),Ul(Pu("td",{scope:"row",class:ks(["hidden-xs hidden-sm",["sortable","io_counters"===r.sorter.column&&"sort"]]),onClick:e[13]||(e[13]=e=>t.$emit("update:sorter","io_counters"))}," IOR/s ",2),[[Wp,o.ioReadWritePresentPrograms&&!o.getDisableStats().includes("io_counters")]]),Ul(Pu("td",{scope:"row",class:ks(["text-start hidden-xs hidden-sm",["sortable","io_counters"===r.sorter.column&&"sort"]]),onClick:e[14]||(e[14]=e=>t.$emit("update:sorter","io_counters"))}," IOW/s ",2),[[Wp,o.ioReadWritePresentPrograms&&!o.getDisableStats().includes("io_counters")]]),Ul(Pu("td",{scope:"row",class:ks(["sortable","name"===r.sorter.column&&"sort"]),onClick:e[15]||(e[15]=e=>t.$emit("update:sorter","name"))}," Command ",2),[[Wp,!o.getDisableStats().includes("cmdline")]])])]),Pu("tbody",null,[(wu(!0),Eu(hu,null,Ec(o.programs,((e,r)=>(wu(),Eu("tr",{key:r},[Ul(Pu("td",{scope:"row",class:ks(o.getCpuPercentAlert(e))},Cs(-1==e.cpu_percent?"?":t.$filters.number(e.cpu_percent,1)),3),[[Wp,!o.getDisableStats().includes("cpu_percent")]]),Ul(Pu("td",{scope:"row",class:ks(o.getMemoryPercentAlert(e))},Cs(-1==e.memory_percent?"?":t.$filters.number(e.memory_percent,1)),3),[[Wp,!o.getDisableStats().includes("memory_percent")]]),Ul(Pu("td",{scope:"row"},Cs(t.$filters.bytes(e.memvirt)),513),[[Wp,!o.getDisableStats().includes("memory_info")]]),Ul(Pu("td",{scope:"row"},Cs(t.$filters.bytes(e.memres)),513),[[Wp,!o.getDisableStats().includes("memory_info")]]),Ul(Pu("td",{scope:"row"},Cs(e.nprocs),513),[[Wp,!o.getDisableStats().includes("nprocs")]]),Ul(Pu("td",{scope:"row"},Cs(e.username),513),[[Wp,!o.getDisableStats().includes("username")]]),Ul(Pu("td",{scope:"row",class:"hidden-xs hidden-sm"},Cs(e.timeforhuman),513),[[Wp,!o.getDisableStats().includes("cpu_times")]]),Ul(Pu("td",{scope:"row",class:"hidden-xs hidden-sm"},Cs(-1==e.num_threads?"?":e.num_threads),513),[[Wp,!o.getDisableStats().includes("num_threads")]]),Ul(Pu("td",{scope:"row",class:ks({nice:e.isNice})},Cs(t.$filters.exclamation(e.nice)),3),[[Wp,!o.getDisableStats().includes("nice")]]),Ul(Pu("td",{scope:"row",class:ks({status:"R"==e.status})},Cs(e.status),3),[[Wp,!o.getDisableStats().includes("status")]]),Ul(Pu("td",{scope:"row",class:"hidden-xs hidden-sm"},Cs(t.$filters.bytes(e.io_read)),513),[[Wp,o.ioReadWritePresentPrograms&&!o.getDisableStats().includes("io_counters")]]),Ul(Pu("td",{scope:"row",class:"hidden-xs hidden-sm"},Cs(t.$filters.bytes(e.io_write)),513),[[Wp,o.ioReadWritePresentPrograms&&!o.getDisableStats().includes("io_counters")]]),Ul(Pu("td",{scope:"row",class:"text-truncate"},Cs(e.name),513),[[Wp,o.args.process_short_name&&!o.getDisableStats().includes("cmdline")]]),Ul(Pu("td",{scope:"row"},Cs(e.cmdline),513),[[Wp,!o.args.process_short_name&&!o.getDisableStats().includes("cmdline")]])])))),128))])])])):Bu("v-if",!0)],64)}]])},props:{data:{type:Object}},data:()=>({store:zd,sorter:void 0}),computed:{args(){return this.store.args||{}},sortProcessesKey(){return this.args.sort_processes_key}},watch:{sortProcessesKey:{immediate:!0,handler(t){t&&!["cpu_percent","memory_percent","username","timemillis","num_threads","io_counters","name"].includes(t)||(this.sorter={column:this.args.sort_processes_key||"cpu_percent",auto:!this.args.sort_processes_key,isReverseColumn:function(t){return!["username","name"].includes(t)},getColumnLabel:function(t){return{cpu_percent:"CPU consumption",memory_percent:"memory consumption",username:"user name",timemillis:"process time",cpu_times:"process time",io_counters:"disk IO",name:"process name",None:"None"}[t]||t}})}}}},zy=(0,$m.A)(Uy,[["render",function(t,e,r,n,i,o){const s=_c("glances-plugin-processcount"),a=_c("glances-plugin-amps"),l=_c("glances-plugin-processlist");return o.args.disable_process?(wu(),Eu("div",py,"PROCESSES DISABLED (press 'z' to display)")):(wu(),Eu("div",dy,[Nu(s,{sorter:i.sorter,data:r.data},null,8,["sorter","data"]),o.args.disable_amps?Bu("v-if",!0):(wu(),Eu("div",my,[Pu("div",fy,[Nu(a,{data:r.data},null,8,["data"])])])),Nu(l,{sorter:i.sorter,data:r.data,"onUpdate:sorter":e[0]||(e[0]=t=>o.args.sort_processes_key=t)},null,8,["sorter","data"])]))}]]),Hy={id:"quicklook",class:"plugin"},Vy={class:"d-flex justify-content-between"},Gy={class:"text-start text-truncate"},Wy={key:0,class:"text-end d-none d-xxl-block"},Ky={class:"table-responsive"},Xy={class:"table table-sm table-borderless"},Qy={key:0},Zy=Pu("td",{scope:"col"},"CPU",-1),Yy={scope:"col",class:"progress"},Jy=["aria-valuenow"],tv={scope:"col",class:"text-end"},ev={scope:"col"},rv={scope:"col",class:"progress"},nv=["aria-valuenow"],iv={scope:"col",class:"text-end"},ov={scope:"col"},sv={scope:"col",class:"progress"},av=["aria-valuenow"],lv={scope:"col",class:"text-end"};const cv={props:{data:{type:Object}},data:()=>({store:zd}),computed:{args(){return this.store.args||{}},config(){return this.store.config||{}},stats(){return this.data.stats.quicklook},view(){return this.data.views.quicklook},cpu(){return this.stats.cpu},cpu_name(){return this.stats.cpu_name},cpu_hz_current(){return(this.stats.cpu_hz_current/1e6).toFixed(0)},cpu_hz(){return(this.stats.cpu_hz/1e6).toFixed(0)},percpus(){var t=this.stats.percpu.map((({cpu_number:t,total:e})=>({number:t,total:e}))),e=parseInt(this.config.percpu.max_cpu_display);if(this.stats.percpu.length>e){var r=t.sort((function(t,e){return e.total-t.total})),n={number:"x",total:Number((r.slice(e).reduce(((t,{total:e})=>t+e),0)/(this.stats.percpu.length-e)).toFixed(1))};(r=r.slice(0,e)).push(n)}return this.stats.percpu.length<=e?t:r},stats_list_after_cpu(){return this.view.list.filter((t=>!t.includes("cpu")))}},methods:{getDecoration(t){if(void 0!==this.view[t])return this.view[t].decoration.toLowerCase()}}},uv=(0,$m.A)(cv,[["render",function(t,e,r,n,i,o){return wu(),Eu("section",Hy,[Pu("div",Vy,[Pu("span",Gy,Cs(o.cpu_name),1),o.cpu_hz_current?(wu(),Eu("span",Wy,Cs(o.cpu_hz_current)+"/"+Cs(o.cpu_hz)+"Ghz ",1)):Bu("v-if",!0)]),Pu("div",Ky,[Pu("table",Xy,[o.args.percpu?Bu("v-if",!0):(wu(),Eu("tr",Qy,[Zy,Pu("td",Yy,[Pu("div",{class:ks(`progress-bar progress-bar-${o.getDecoration("cpu")}`),role:"progressbar","aria-valuenow":o.cpu,"aria-valuemin":"0","aria-valuemax":"100",style:ys(`width: ${o.cpu}%;`)},"   ",14,Jy)]),Pu("td",tv,Cs(o.cpu)+"%",1)])),o.args.percpu?(wu(!0),Eu(hu,{key:1},Ec(o.percpus,((t,e)=>(wu(),Eu("tr",{key:e},[Pu("td",ev,"CPU"+Cs(t.number),1),Pu("td",rv,[Pu("div",{class:ks(`progress-bar progress-bar-${o.getDecoration("cpu")}`),role:"progressbar","aria-valuenow":t.total,"aria-valuemin":"0","aria-valuemax":"100",style:ys(`width: ${t.total}%;`)},"   ",14,nv)]),Pu("td",iv,Cs(t.total)+"%",1)])))),128)):Bu("v-if",!0),(wu(!0),Eu(hu,null,Ec(o.stats_list_after_cpu,(t=>(wu(),Eu("tr",null,[Pu("td",ov,Cs(t.toUpperCase()),1),Pu("td",sv,[Pu("div",{class:ks(`progress-bar progress-bar-${o.getDecoration(t)}`),role:"progressbar","aria-valuenow":o.stats[t],"aria-valuemin":"0","aria-valuemax":"100",style:ys(`width: ${o.stats[t]}%;`)},"   ",14,av)]),Pu("td",lv,Cs(o.stats[t])+"%",1)])))),256))])])])}]]),pv={key:0,class:"plugin",id:"raid"},dv={class:"table table-sm table-borderless margin-bottom"},mv={scope:"col"},fv=Pu("th",{scope:"col",class:"text-end"},"Used",-1),hv=Pu("th",{scope:"col",class:"text-end"},"Total",-1),gv={scope:"row"},bv={class:"warning"};const yv={props:{data:{type:Object}},computed:{stats(){return this.data.stats.raid},disks(){const t=Object.entries(this.stats).map((([t,e])=>{const r=Object.entries(e.components).map((([t,e])=>({number:e,name:t})));return{name:t,type:null==e.type?"UNKNOWN":e.type,used:e.used,available:e.available,status:e.status,degraded:e.used0}},methods:{getAlert:t=>t.inactive?"critical":t.degraded?"warning":"ok"}},vv=(0,$m.A)(yv,[["render",function(t,e,r,n,i,o){return o.hasDisks?(wu(),Eu("section",pv,[Pu("table",dv,[Pu("thead",null,[Pu("tr",null,[Pu("th",mv,"RAID disks "+Cs(o.disks.length),1),fv,hv])]),Pu("tbody",null,[(wu(!0),Eu(hu,null,Ec(o.disks,((t,e)=>(wu(),Eu("tr",{key:e},[Pu("td",gv,[Ru(Cs(t.type.toUpperCase())+" "+Cs(t.name)+" ",1),Ul(Pu("div",bv,"└─ Degraded mode",512),[[Wp,t.degraded]]),Ul(Pu("div",null,"   └─ "+Cs(t.config),513),[[Wp,t.degraded]]),Ul(Pu("div",{class:"critical"},"└─ Status "+Cs(t.status),513),[[Wp,t.inactive]]),t.inactive?(wu(!0),Eu(hu,{key:0},Ec(t.components,((e,r)=>(wu(),Eu("div",{key:r},"    "+Cs(r===t.components.length-1?"└─":"├─")+" disk "+Cs(e.number)+": "+Cs(e.name),1)))),128)):Bu("v-if",!0)]),Ul(Pu("td",{scope:"row",class:ks(["text-end",o.getAlert(t)])},Cs(t.used),3),[[Wp,"active"==t.status]]),Ul(Pu("td",{scope:"row",class:ks(["text-end",o.getAlert(t)])},Cs(t.available),3),[[Wp,"active"==t.status]])])))),128))])])])):Bu("v-if",!0)}]]),xv={key:0,id:"smart",class:"plugin"},wv={class:"table table-sm table-borderless margin-bottom"},_v=Pu("thead",null,[Pu("tr",null,[Pu("th",{scope:"col"},"SMART DISKS"),Pu("th",{scope:"col",class:"text-end"})])],-1),kv={scope:"row"},Av=Pu("td",{scope:"col",class:"text-end"},null,-1),Sv={scope:"row"},Ev={scope:"row",class:"text-end text-truncate"};const Cv={props:{data:{type:Object}},computed:{stats(){return this.data.stats.smart},drives(){return(Array.isArray(this.stats)?this.stats:[]).map((t=>{const e=t.DeviceName,r=Object.entries(t).filter((([t])=>"DeviceName"!==t)).sort((([,t],[,e])=>t.namee.name?1:0)).map((([t,e])=>e));return{name:e,details:r}}))},hasDrives(){return this.drives.length>0}}},Tv=(0,$m.A)(Cv,[["render",function(t,e,r,n,i,o){return o.hasDrives?(wu(),Eu("section",xv,[Pu("table",wv,[_v,Pu("tbody",null,[(wu(!0),Eu(hu,null,Ec(o.drives,((t,e)=>(wu(),Eu(hu,{key:e},[Pu("tr",null,[Pu("td",kv,Cs(t.name),1),Av]),(wu(!0),Eu(hu,null,Ec(t.details,((t,e)=>(wu(),Eu("tr",{key:e},[Pu("td",Sv,Cs(t.name),1),Pu("td",Ev,Cs(t.raw),1)])))),128))],64)))),128))])])])):Bu("v-if",!0)}]]),Ov={key:0,class:"plugin",id:"sensors"},Dv={class:"table table-sm table-borderless"},Iv=Pu("thead",null,[Pu("tr",null,[Pu("th",{scope:"col"},"SENSORS"),Pu("th",{scope:"col",class:"text-end"})])],-1),jv={scope:"row"};const Pv={props:{data:{type:Object}},data:()=>({store:zd}),computed:{args(){return this.store.args||{}},stats(){return this.data.stats.sensors},view(){return this.data.views.sensors},sensors(){return this.stats.map((t=>(this.args.fahrenheit&&"battery"!=t.type&&"fan_speed"!=t.type&&(t.value=parseFloat(1.8*t.value+32).toFixed(1),t.unit="F"),t)))},hasSensors(){return this.sensors.length>0}},methods:{getDecoration(t){if(void 0!==this.view[t].value.decoration)return this.view[t].value.decoration.toLowerCase()}}},Nv=(0,$m.A)(Pv,[["render",function(t,e,r,n,i,o){return o.hasSensors?(wu(),Eu("section",Ov,[Pu("table",Dv,[Iv,Pu("tbody",null,[(wu(!0),Eu(hu,null,Ec(o.sensors,((t,e)=>(wu(),Eu("tr",{key:e},[Pu("td",jv,Cs(t.label),1),Pu("td",{class:ks(["text-end",o.getDecoration(t.label)])},Cs(t.value)+Cs(t.unit),3)])))),128))])])])):Bu("v-if",!0)}]]),Lv={class:"plugin",id:"system"},Mv={key:0,class:"critical"},Rv={class:"title"};const qv={props:{data:{type:Object}},data:()=>({store:zd}),computed:{stats(){return this.data.stats.system},hostname(){return this.stats.hostname},humanReadableName(){return this.stats.hr_name},isDisconnected(){return"FAILURE"===this.store.status}}},Bv=(0,$m.A)(qv,[["render",function(t,e,r,n,i,o){return wu(),Eu("section",Lv,[o.isDisconnected?(wu(),Eu("span",Mv,"Disconnected from")):Bu("v-if",!0),Pu("span",Rv,Cs(o.hostname),1),Pu("span",null,Cs(o.humanReadableName),1)])}]]),$v={class:"plugin",id:"uptime"};const Fv={props:{data:{type:Object}},computed:{value(){return this.data.stats.uptime}}},Uv=(0,$m.A)(Fv,[["render",function(t,e,r,n,i,o){return wu(),Eu("section",$v,[Pu("span",null,"Uptime: "+Cs(o.value),1)])}]]),zv={key:0,class:"plugin",id:"vms"},Hv=Pu("span",{class:"title"},"VMs",-1),Vv={class:"table table-sm table-borderless table-striped table-hover"},Gv=Pu("td",null,"Status",-1),Wv=Pu("td",null,"Core",-1),Kv=Pu("td",null,"/ MAX",-1),Xv=Pu("td",null,"Release",-1);const Qv={props:{data:{type:Object}},data:()=>({store:zd,sorter:void 0}),computed:{args(){return this.store.args||{}},sortProcessesKey(){return this.args.sort_processes_key},stats(){return this.data.stats.vms},views(){return this.data.views.vms},vms(){const{sorter:t}=this,e=(this.stats||[]).map((t=>({id:t.id,name:t.name,status:null!=t.status?t.status:"?",cpu_count:null!=t.cpu_count?t.cpu_count:"?",memory_usage:null!=t.memory_usage?t.memory_usage:"?",memory_total:null!=t.memory_total?t.memory_total:"?",load_1min:null!=t.load_1min?t.load_1min:"?",load_5min:null!=t.load_5min?t.load_5min:"?",load_15min:null!=t.load_15min?t.load_15min:"?",release:t.release,image:t.image,engine:t.engine,engine_version:t.engine_version})));return(0,Xm.orderBy)(e,[t.column].reduce(((t,e)=>("memory_usage"===e&&(e=["memory_usage"]),t.concat(e))),[]),[t.isReverseColumn(t.column)?"desc":"asc"])},showEngine(){return this.views.show_engine_name}},watch:{sortProcessesKey:{immediate:!0,handler(t){t&&!["load_1min","memory_usage","name"].includes(t)||(this.sorter={column:this.args.sort_processes_key||"load_1min",auto:!this.args.sort_processes_key,isReverseColumn:function(t){return!["name"].includes(t)},getColumnLabel:function(t){return{load_1min:"load",memory_usage:"memory consumption",name:"VM name",None:"None"}[t]||t}})}}}},Zv=(0,$m.A)(Qv,[["render",function(t,e,r,n,i,o){return o.vms.length?(wu(),Eu("section",zv,[Hv,Ul(Pu("span",null,Cs(o.vms.length)+" sorted by "+Cs(i.sorter.getColumnLabel(i.sorter.column)),513),[[Wp,o.vms.length>1]]),Pu("table",Vv,[Pu("thead",null,[Pu("tr",null,[Ul(Pu("td",null,"Engine",512),[[Wp,o.showEngine]]),Pu("td",{class:ks(["sortable","name"===i.sorter.column&&"sort"]),onClick:e[0]||(e[0]=t=>o.args.sort_processes_key="name")}," Name ",2),Gv,Wv,Pu("td",{class:ks(["sortable","memory_usage"===i.sorter.column&&"sort"]),onClick:e[1]||(e[1]=t=>o.args.sort_processes_key="memory_usage")}," MEM ",2),Kv,Pu("td",{class:ks(["sortable","load_1min"===i.sorter.column&&"sort"]),onClick:e[2]||(e[2]=t=>o.args.sort_processes_key="load_1min")}," LOAD 1/5/15min ",2),Xv])]),Pu("tbody",null,[(wu(!0),Eu(hu,null,Ec(o.vms,((e,r)=>(wu(),Eu("tr",{key:r},[Ul(Pu("td",null,Cs(e.engine),513),[[Wp,o.showEngine]]),Pu("td",null,Cs(e.name),1),Pu("td",{class:ks("stopped"==e.status?"careful":"ok")},Cs(e.status),3),Pu("td",null,Cs(t.$filters.number(e.cpu_count,1)),1),Pu("td",null,Cs(t.$filters.bytes(e.memory_usage)),1),Pu("td",null," / "+Cs(t.$filters.bytes(e.memory_total)),1),Pu("td",null,Cs(t.$filters.number(e.load_1min))+"/"+Cs(t.$filters.number(e.load_5min))+"/"+Cs(t.$filters.number(e.load_15min)),1),Pu("td",null,Cs(e.release),1)])))),128))])])])):Bu("v-if",!0)}]]),Yv={key:0,class:"plugin",id:"wifi"},Jv={class:"table table-sm table-borderless margin-bottom"},tx=Pu("thead",null,[Pu("tr",null,[Pu("th",{scope:"col"},"WIFI"),Pu("th",{scope:"col",class:"text-end"},"dBm")])],-1),ex={scope:"row"};const rx={props:{data:{type:Object}},computed:{stats(){return this.data.stats.wifi},view(){return this.data.views.wifi},hotspots(){const t=this.stats.map((t=>{if(""!==t.ssid)return{ssid:t.ssid,quality_level:t.quality_level}})).filter(Boolean);return(0,Xm.orderBy)(t,["ssid"])},hasHotpots(){return this.hotspots.length>0}},methods:{getDecoration(t,e){if(void 0!==this.view[t.ssid][e])return this.view[t.ssid][e].decoration.toLowerCase()}}},nx=(0,$m.A)(rx,[["render",function(t,e,r,n,i,o){return o.hasHotpots?(wu(),Eu("section",Yv,[Pu("table",Jv,[tx,Pu("tbody",null,[(wu(!0),Eu(hu,null,Ec(o.hotspots,((e,r)=>(wu(),Eu("tr",{key:r},[Pu("td",ex,Cs(t.$filters.limitTo(e.ssid,20)),1),Pu("td",{scope:"row",class:ks(["text-end",o.getDecoration(e,"quality_level")])},Cs(e.quality_level),3)])))),128))])])])):Bu("v-if",!0)}]]),ix=JSON.parse('{"H":["network","ports","wifi","connections","diskio","fs","irq","folders","raid","smart","sensors","now"]}'),ox={components:{GlancesHelp:Fm,GlancesPluginAlert:Zm,GlancesPluginCloud:ef,GlancesPluginConnections:gf,GlancesPluginCpu:zf,GlancesPluginDiskio:ph,GlancesPluginContainers:Eh,GlancesPluginFolders:Ph,GlancesPluginFs:Hh,GlancesPluginGpu:hg,GlancesPluginIp:kg,GlancesPluginIrq:Dg,GlancesPluginLoad:Fg,GlancesPluginMem:sb,GlancesPluginMemswap:bb,GlancesPluginNetwork:Pb,GlancesPluginNow:qb,GlancesPluginPercpu:Yb,GlancesPluginPorts:uy,GlancesPluginProcess:zy,GlancesPluginQuicklook:uv,GlancesPluginRaid:vv,GlancesPluginSensors:Nv,GlancesPluginSmart:Tv,GlancesPluginSystem:Bv,GlancesPluginUptime:Uv,GlancesPluginVms:Zv,GlancesPluginWifi:nx},data:()=>({store:zd}),computed:{args(){return this.store.args||{}},config(){return this.store.config||{}},data(){return this.store.data||{}},dataLoaded(){return void 0!==this.store.data},hasGpu(){return this.store.data.stats.gpu.length>0},isLinux(){return this.store.data.isLinux},title(){const{data:t}=this,e=t.stats&&t.stats.system&&t.stats.system.hostname||"";return e?`${e} - Glances`:"Glances"},leftMenu(){return void 0!==this.config.outputs&&void 0!==this.config.outputs.left_menu?this.config.outputs.left_menu.split(","):ix.H}},watch:{title(){document&&(document.title=this.title)}},methods:{setupHotKeys(){Bd("a",(()=>{this.store.args.sort_processes_key=null})),Bd("c",(()=>{this.store.args.sort_processes_key="cpu_percent"})),Bd("m",(()=>{this.store.args.sort_processes_key="memory_percent"})),Bd("u",(()=>{this.store.args.sort_processes_key="username"})),Bd("p",(()=>{this.store.args.sort_processes_key="name"})),Bd("i",(()=>{this.store.args.sort_processes_key="io_counters"})),Bd("t",(()=>{this.store.args.sort_processes_key="timemillis"})),Bd("shift+A",(()=>{this.store.args.disable_amps=!this.store.args.disable_amps})),Bd("d",(()=>{this.store.args.disable_diskio=!this.store.args.disable_diskio})),Bd("shift+Q",(()=>{this.store.args.enable_irq=!this.store.args.enable_irq})),Bd("f",(()=>{this.store.args.disable_fs=!this.store.args.disable_fs})),Bd("j",(()=>{this.store.args.programs=!this.store.args.programs})),Bd("k",(()=>{this.store.args.disable_connections=!this.store.args.disable_connections})),Bd("n",(()=>{this.store.args.disable_network=!this.store.args.disable_network})),Bd("s",(()=>{this.store.args.disable_sensors=!this.store.args.disable_sensors})),Bd("2",(()=>{this.store.args.disable_left_sidebar=!this.store.args.disable_left_sidebar})),Bd("z",(()=>{this.store.args.disable_process=!this.store.args.disable_process})),Bd("shift+S",(()=>{this.store.args.process_short_name=!this.store.args.process_short_name})),Bd("shift+D",(()=>{this.store.args.disable_containers=!this.store.args.disable_containers})),Bd("b",(()=>{this.store.args.byte=!this.store.args.byte})),Bd("shift+B",(()=>{this.store.args.diskio_iops=!this.store.args.diskio_iops})),Bd("l",(()=>{this.store.args.disable_alert=!this.store.args.disable_alert})),Bd("1",(()=>{this.store.args.percpu=!this.store.args.percpu})),Bd("h",(()=>{this.store.args.help_tag=!this.store.args.help_tag})),Bd("shift+T",(()=>{this.store.args.network_sum=!this.store.args.network_sum})),Bd("shift+U",(()=>{this.store.args.network_cumul=!this.store.args.network_cumul})),Bd("shift+F",(()=>{this.store.args.fs_free_space=!this.store.args.fs_free_space})),Bd("3",(()=>{this.store.args.disable_quicklook=!this.store.args.disable_quicklook})),Bd("6",(()=>{this.store.args.meangpu=!this.store.args.meangpu})),Bd("shift+G",(()=>{this.store.args.disable_gpu=!this.store.args.disable_gpu})),Bd("5",(()=>{this.store.args.disable_quicklook=!this.store.args.disable_quicklook,this.store.args.disable_cpu=!this.store.args.disable_cpu,this.store.args.disable_mem=!this.store.args.disable_mem,this.store.args.disable_memswap=!this.store.args.disable_memswap,this.store.args.disable_load=!this.store.args.disable_load,this.store.args.disable_gpu=!this.store.args.disable_gpu})),Bd("shift+I",(()=>{this.store.args.disable_ip=!this.store.args.disable_ip})),Bd("shift+P",(()=>{this.store.args.disable_ports=!this.store.args.disable_ports})),Bd("shift+V",(()=>{this.store.args.disable_vms=!this.store.args.disable_vms})),Bd("shift+W",(()=>{this.store.args.disable_wifi=!this.store.args.disable_wifi}))}},mounted(){const t=window.__GLANCES__||{},e=isFinite(t["refresh-time"])?parseInt(t["refresh-time"],10):void 0;Wd.init(e),this.setupHotKeys()},beforeUnmount(){Bd.unbind()}};const sx=((...t)=>{const e=Zp().createApp(...t);const{mount:r}=e;return e.mount=t=>{const n=Yp(t);if(!n)return;const i=e._component;Wo(i)||i.render||i.template||(i.template=n.innerHTML),n.innerHTML="";const o=r(n,!1,n instanceof SVGElement);return n instanceof Element&&(n.removeAttribute("v-cloak"),n.setAttribute("data-v-app","")),o},e})((0,$m.A)(ox,[["render",function(t,e,r,n,i,o){const s=_c("glances-help"),a=_c("glances-plugin-system"),l=_c("glances-plugin-ip"),c=_c("glances-plugin-now"),u=_c("glances-plugin-uptime"),p=_c("glances-plugin-cloud"),d=_c("glances-plugin-quicklook"),m=_c("glances-plugin-cpu"),f=_c("glances-plugin-gpu"),h=_c("glances-plugin-mem"),g=_c("glances-plugin-memswap"),b=_c("glances-plugin-load"),y=_c("glances-plugin-vms"),v=_c("glances-plugin-containers"),x=_c("glances-plugin-process"),w=_c("glances-plugin-alert");return o.dataLoaded?o.args.help_tag?(wu(),Cu(s,{key:1})):(wu(),Eu("main",ed,[Pu("div",rd,[Pu("div",nd,[o.args.disable_system?Bu("v-if",!0):(wu(),Eu("div",id,[Nu(a,{data:o.data},null,8,["data"])])),o.args.disable_ip?Bu("v-if",!0):(wu(),Eu("div",od,[Nu(l,{data:o.data},null,8,["data"])])),o.args.disable_now?Bu("v-if",!0):(wu(),Eu("div",sd,[Nu(c,{data:o.data},null,8,["data"])])),o.args.disable_uptime?Bu("v-if",!0):(wu(),Eu("div",ad,[Nu(u,{data:o.data},null,8,["data"])]))]),o.args.disable_cloud?Bu("v-if",!0):(wu(),Eu("div",ld,[Pu("div",cd,[Nu(p,{data:o.data},null,8,["data"])])]))]),Pu("div",{class:ks(["container-fluid",{"top-min":!o.args.percpu,"top-max":o.args.percpu}])},[Pu("div",ud,[Bu(" Quicklook "),o.args.disable_quicklook?Bu("v-if",!0):(wu(),Eu("div",pd,[Nu(d,{data:o.data},null,8,["data"])])),Bu(" CPU "),o.args.disable_cpu&&o.args.percpu?Bu("v-if",!0):(wu(),Eu("div",dd,[Nu(m,{data:o.data},null,8,["data"])])),Bu(' TODO: percpu need to be refactor\n
\n \n
\n
\n \n
'),Bu(" GPU "),!o.args.disable_gpu&&o.hasGpu?(wu(),Eu("div",md,[Nu(f,{data:o.data},null,8,["data"])])):Bu("v-if",!0),Bu(" MEM "),o.args.disable_mem?Bu("v-if",!0):(wu(),Eu("div",fd,[Nu(h,{data:o.data},null,8,["data"])])),Bu(" SWAP "),o.args.disable_memswap?Bu("v-if",!0):(wu(),Eu("div",hd,[Nu(g,{data:o.data},null,8,["data"])])),Bu(" LOAD "),o.args.disable_load?Bu("v-if",!0):(wu(),Eu("div",gd,[Nu(b,{data:o.data},null,8,["data"])]))])],2),Pu("div",bd,[Pu("div",yd,[o.args.disable_left_sidebar?Bu("v-if",!0):(wu(),Eu("div",{key:0,class:ks(["col-3",{"sidebar-min":!o.args.percpu,"sidebar-max":o.args.percpu}])},[(wu(!0),Eu(hu,null,Ec(o.leftMenu,(t=>{return wu(),Eu(hu,null,[o.args[`disable_${t}`]?Bu("v-if",!0):(wu(),Cu((e=`glances-plugin-${t}`,Ko(e)?Ac(wc,e,!1)||e:e||kc),{key:0,id:`plugin-${t}`,data:o.data},null,8,["id","data"]))],64);var e})),256))],2)),Pu("div",{class:ks(["col",{"sidebar-min":!o.args.percpu,"sidebar-max":o.args.percpu}])},[o.args.disable_vms?Bu("v-if",!0):(wu(),Cu(y,{key:0,data:o.data},null,8,["data"])),o.args.disable_containers?Bu("v-if",!0):(wu(),Cu(v,{key:1,data:o.data},null,8,["data"])),Nu(x,{data:o.data},null,8,["data"]),o.args.disable_alert?Bu("v-if",!0):(wu(),Cu(w,{key:2,data:o.data},null,8,["data"]))],2)])])])):(wu(),Eu("div",Jp,td))}]]));sx.config.globalProperties.$filters=e,sx.mount("#app")})()})(); \ No newline at end of file +var vd="undefined"!=typeof navigator&&navigator.userAgent.toLowerCase().indexOf("firefox")>0;function xd(t,e,r,n){t.addEventListener?t.addEventListener(e,r,n):t.attachEvent&&t.attachEvent("on".concat(e),(function(){r(window.event)}))}function wd(t,e){for(var r=e.slice(0,e.length-1),n=0;n=0;)e[r-1]+=",",e.splice(r,1),r=e.lastIndexOf("");return e}for(var kd={backspace:8,"⌫":8,tab:9,clear:12,enter:13,"↩":13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"⇪":20,",":188,".":190,"/":191,"`":192,"-":vd?173:189,"=":vd?61:187,";":vd?59:186,"'":222,"[":219,"]":221,"\\":220},Ad={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,command:91},Sd={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},Ed={16:!1,18:!1,17:!1,91:!1},Cd={},Td=1;Td<20;Td++)kd["f".concat(Td)]=111+Td;var Od=[],Dd=!1,Id="all",jd=[],Pd=function(t){return kd[t.toLowerCase()]||Ad[t.toLowerCase()]||t.toUpperCase().charCodeAt(0)};function Nd(t){Id=t||"all"}function Ld(){return Id||"all"}var Md=function(t){var e=t.key,r=t.scope,n=t.method,i=t.splitKey,o=void 0===i?"+":i;_d(e).forEach((function(t){var e=t.split(o),i=e.length,s=e[i-1],a="*"===s?"*":Pd(s);if(Cd[a]){r||(r=Ld());var l=i>1?wd(Ad,e):[];Cd[a]=Cd[a].filter((function(t){return!((!n||t.method===n)&&t.scope===r&&function(t,e){for(var r=t.length>=e.length?t:e,n=t.length>=e.length?e:t,i=!0,o=0;o0,Ed)Object.prototype.hasOwnProperty.call(Ed,o)&&(!Ed[o]&&e.mods.indexOf(+o)>-1||Ed[o]&&-1===e.mods.indexOf(+o))&&(i=!1);(0!==e.mods.length||Ed[16]||Ed[18]||Ed[17]||Ed[91])&&!i&&"*"!==e.shortcut||(e.keys=[],e.keys=e.keys.concat(Od),!1===e.method(t,e)&&(t.preventDefault?t.preventDefault():t.returnValue=!1,t.stopPropagation&&t.stopPropagation(),t.cancelBubble&&(t.cancelBubble=!0)))}}function qd(t,e){var r=Cd["*"],n=t.keyCode||t.which||t.charCode;if(Bd.filter.call(this,t)){if(93!==n&&224!==n||(n=91),-1===Od.indexOf(n)&&229!==n&&Od.push(n),["ctrlKey","altKey","shiftKey","metaKey"].forEach((function(e){var r=Sd[e];t[e]&&-1===Od.indexOf(r)?Od.push(r):!t[e]&&Od.indexOf(r)>-1?Od.splice(Od.indexOf(r),1):"metaKey"===e&&t[e]&&3===Od.length&&(t.ctrlKey||t.shiftKey||t.altKey||(Od=Od.slice(Od.indexOf(r))))})),n in Ed){for(var i in Ed[n]=!0,Ad)Ad[i]===n&&(Bd[i]=!0);if(!r)return}for(var o in Ed)Object.prototype.hasOwnProperty.call(Ed,o)&&(Ed[o]=t[Sd[o]]);t.getModifierState&&(!t.altKey||t.ctrlKey)&&t.getModifierState("AltGraph")&&(-1===Od.indexOf(17)&&Od.push(17),-1===Od.indexOf(18)&&Od.push(18),Ed[17]=!0,Ed[18]=!0);var s=Ld();if(r)for(var a=0;a1&&(i=wd(Ad,t)),(t="*"===(t=t[t.length-1])?"*":Pd(t))in Cd||(Cd[t]=[]),Cd[t].push({keyup:l,keydown:c,scope:o,mods:i,shortcut:n[a],method:r,key:n[a],splitKey:u,element:s});void 0!==s&&!function(t){return jd.indexOf(t)>-1}(s)&&window&&(jd.push(s),xd(s,"keydown",(function(t){qd(t,s)}),p),Dd||(Dd=!0,xd(window,"focus",(function(){Od=[]}),p)),xd(s,"keyup",(function(t){qd(t,s),function(t){var e=t.keyCode||t.which||t.charCode,r=Od.indexOf(e);if(r>=0&&Od.splice(r,1),t.key&&"meta"===t.key.toLowerCase()&&Od.splice(0,Od.length),93!==e&&224!==e||(e=91),e in Ed)for(var n in Ed[e]=!1,Ad)Ad[n]===e&&(Bd[n]=!1)}(t)}),p))}var $d={getPressedKeyString:function(){return Od.map((function(t){return e=t,Object.keys(kd).find((function(t){return kd[t]===e}))||function(t){return Object.keys(Ad).find((function(e){return Ad[e]===t}))}(t)||String.fromCharCode(t);var e}))},setScope:Nd,getScope:Ld,deleteScope:function(t,e){var r,n;for(var i in t||(t=Ld()),Cd)if(Object.prototype.hasOwnProperty.call(Cd,i))for(r=Cd[i],n=0;n1&&void 0!==arguments[1]?arguments[1]:"all";Object.keys(Cd).forEach((function(r){Cd[r].filter((function(r){return r.scope===e&&r.shortcut===t})).forEach((function(t){t&&t.method&&t.method()}))}))},unbind:function(t){if(void 0===t)Object.keys(Cd).forEach((function(t){return delete Cd[t]}));else if(Array.isArray(t))t.forEach((function(t){t.key&&Md(t)}));else if("object"==typeof t)t.key&&Md(t);else if("string"==typeof t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n=this.limits[t][l]){var c=l.lastIndexOf("_");return l.substring(c+1)+o}}return"ok"+o}getAlertLog(t,e,r,n){return this.getAlert(t,e,r,n,!0)}};const Wd=new class{data=void 0;init(t=60){let e;const r=()=>(zd.status="PENDING",Promise.all([fetch("api/4/all",{method:"GET"}).then((t=>t.json())),fetch("api/4/all/views",{method:"GET"}).then((t=>t.json()))]).then((t=>{const e={stats:t[0],views:t[1],isBsd:"FreeBSD"===t[0].system.os_name,isLinux:"Linux"===t[0].system.os_name,isSunOS:"SunOS"===t[0].system.os_name,isMac:"Darwin"===t[0].system.os_name,isWindows:"Windows"===t[0].system.os_name};this.data=e,zd.data=e,zd.status="SUCCESS"})).catch((t=>{console.log(t),zd.status="FAILURE"})).then((()=>{e&&clearTimeout(e),e=setTimeout(r,1e3*t)})));r(),fetch("api/4/all/limits",{method:"GET"}).then((t=>t.json())).then((t=>{Gd.setLimits(t)})),fetch("api/4/args",{method:"GET"}).then((t=>t.json())).then(((t={})=>{zd.args={...zd.args,...t}})),fetch("api/4/config",{method:"GET"}).then((t=>t.json())).then(((t={})=>{zd.config={...zd.config,...t}}))}getData(){return this.data}};const Kd=new class{constructor(){this.favico=new(Vd())({animation:"none"})}badge(t){this.favico.badge(t)}reset(){this.favico.reset()}},Xd={key:0},Qd={class:"container-fluid"},Zd={class:"row"},Yd={class:"col-sm-12 col-lg-24 title"},Jd=Pu("div",{class:"row"}," ",-1),tm={class:"row"},em={class:"col-sm-12 col-lg-24"},rm=Pu("div",{class:"row"}," ",-1),nm={class:"table table-sm table-borderless table-striped table-hover"},im=Pu("td",null," ",-1),om=Pu("td",null," ",-1),sm=Pu("td",null," ",-1),am=Pu("td",null," ",-1),lm=Pu("td",null," ",-1),cm=Pu("td",null," ",-1),um=Pu("td",null," ",-1),pm=Pu("td",null," ",-1),dm=Pu("td",null," ",-1),mm=Pu("td",null," ",-1),fm=Pu("td",null," ",-1),hm=Pu("td",null," ",-1),gm=Pu("td",null," ",-1),bm=Pu("td",null," ",-1),ym=Pu("td",null," ",-1),vm=Pu("td",null," ",-1),xm=Pu("td",null," ",-1),wm=Pu("td",null," ",-1),_m=Pu("td",null," ",-1),km=Pu("td",null," ",-1),Am=Pu("td",null," ",-1),Sm=Pu("td",null," ",-1),Em=Pu("td",null," ",-1),Cm=Pu("td",null," ",-1),Tm=Pu("td",null," ",-1),Om=Pu("td",null," ",-1),Dm=Pu("td",null," ",-1),Im=Pu("td",null," ",-1),jm=Pu("td",null," ",-1),Pm=Pu("td",null," ",-1),Nm=Pu("td",null," ",-1),Lm=Pu("td",null," ",-1),Mm=Pu("td",null," ",-1),Rm=Pu("td",null," ",-1),qm=qu('
 

For an exhaustive list of key bindings, click here.

 

Press h to came back to Glances.

',5);const Bm={data:()=>({help:void 0}),mounted(){fetch("api/4/help",{method:"GET"}).then((t=>t.json())).then((t=>this.help=t))}};var $m=r(6262);const Fm=(0,$m.A)(Bm,[["render",function(t,e,r,n,i,o){return i.help?(wu(),Eu("div",Xd,[Pu("div",Qd,[Pu("div",Zd,[Pu("div",Yd,Cs(i.help.version)+" "+Cs(i.help.psutil_version),1)]),Jd,Pu("div",tm,[Pu("div",em,Cs(i.help.configuration_file),1)]),rm]),Pu("table",nm,[Pu("thead",null,[Pu("tr",null,[Pu("th",null,Cs(i.help.header_sort.replace(":","")),1),Pu("th",null,Cs(i.help.header_show_hide.replace(":","")),1),Pu("th",null,Cs(i.help.header_toggle.replace(":","")),1),Pu("th",null,Cs(i.help.header_miscellaneous.replace(":","")),1)])]),Pu("tbody",null,[Pu("tr",null,[Pu("td",null,Cs(i.help.sort_auto),1),Pu("td",null,Cs(i.help.show_hide_application_monitoring),1),Pu("td",null,Cs(i.help.toggle_bits_bytes),1),Pu("td",null,Cs(i.help.misc_erase_process_filter),1)]),Pu("tr",null,[Pu("td",null,Cs(i.help.sort_cpu),1),Pu("td",null,Cs(i.help.show_hide_diskio),1),Pu("td",null,Cs(i.help.toggle_count_rate),1),Pu("td",null,Cs(i.help.misc_generate_history_graphs),1)]),Pu("tr",null,[Pu("td",null,Cs(i.help.sort_io_rate),1),Pu("td",null,Cs(i.help.show_hide_containers),1),Pu("td",null,Cs(i.help.toggle_used_free),1),Pu("td",null,Cs(i.help.misc_help),1)]),Pu("tr",null,[Pu("td",null,Cs(i.help.sort_mem),1),Pu("td",null,Cs(i.help.show_hide_top_extended_stats),1),Pu("td",null,Cs(i.help.toggle_bar_sparkline),1),Pu("td",null,Cs(i.help.misc_accumulate_processes_by_program),1)]),Pu("tr",null,[Pu("td",null,Cs(i.help.sort_process_name),1),Pu("td",null,Cs(i.help.show_hide_filesystem),1),Pu("td",null,Cs(i.help.toggle_separate_combined),1),im]),Pu("tr",null,[Pu("td",null,Cs(i.help.sort_cpu_times),1),Pu("td",null,Cs(i.help.show_hide_gpu),1),Pu("td",null,Cs(i.help.toggle_live_cumulative),1),Pu("td",null,Cs(i.help.misc_reset_processes_summary_min_max),1)]),Pu("tr",null,[Pu("td",null,Cs(i.help.sort_user),1),Pu("td",null,Cs(i.help.show_hide_ip),1),Pu("td",null,Cs(i.help.toggle_linux_percentage),1),Pu("td",null,Cs(i.help.misc_quit),1)]),Pu("tr",null,[om,Pu("td",null,Cs(i.help.show_hide_tcp_connection),1),Pu("td",null,Cs(i.help.toggle_cpu_individual_combined),1),Pu("td",null,Cs(i.help.misc_reset_history),1)]),Pu("tr",null,[sm,Pu("td",null,Cs(i.help.show_hide_alert),1),Pu("td",null,Cs(i.help.toggle_gpu_individual_combined),1),Pu("td",null,Cs(i.help.misc_delete_warning_alerts),1)]),Pu("tr",null,[am,Pu("td",null,Cs(i.help.show_hide_network),1),Pu("td",null,Cs(i.help.toggle_short_full),1),Pu("td",null,Cs(i.help.misc_delete_warning_and_critical_alerts),1)]),Pu("tr",null,[lm,Pu("td",null,Cs(i.help.sort_cpu_times),1),cm,um]),Pu("tr",null,[pm,Pu("td",null,Cs(i.help.show_hide_irq),1),dm,mm]),Pu("tr",null,[fm,Pu("td",null,Cs(i.help.show_hide_raid_plugin),1),hm,gm]),Pu("tr",null,[bm,Pu("td",null,Cs(i.help.show_hide_sensors),1),ym,vm]),Pu("tr",null,[xm,Pu("td",null,Cs(i.help.show_hide_wifi_module),1),wm,_m]),Pu("tr",null,[km,Pu("td",null,Cs(i.help.show_hide_processes),1),Am,Sm]),Pu("tr",null,[Em,Pu("td",null,Cs(i.help.show_hide_left_sidebar),1),Cm,Tm]),Pu("tr",null,[Om,Pu("td",null,Cs(i.help.show_hide_quick_look),1),Dm,Im]),Pu("tr",null,[jm,Pu("td",null,Cs(i.help.show_hide_cpu_mem_swap),1),Pm,Nm]),Pu("tr",null,[Lm,Pu("td",null,Cs(i.help.show_hide_all),1),Mm,Rm])])]),qm])):Bu("v-if",!0)}]]),Um={class:"plugin",id:"alerts"},zm={key:0,class:"title"},Hm={key:1,class:"title"},Vm={class:"table table-sm table-borderless"},Gm={scope:"row"},Wm={scope:"row"},Km={scope:"row"};var Xm=r(2543);const Qm={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,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,Xm.padStart)(i,2,"0")+":"+(0,Xm.padStart)(n,2,"0")+":"+(0,Xm.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?Kd.badge(this.countOngoingAlerts):Kd.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))}}},Zm=(0,$m.A)(Qm,[["render",function(t,e,r,n,i,o){return wu(),Eu("section",Um,[o.hasAlerts?(wu(),Eu("span",zm,[Ru(" Warning or critical alerts (last "+Cs(o.countAlerts)+" entries) ",1),Pu("span",null,[Pu("button",{class:"clear-button",onClick:e[0]||(e[0]=t=>o.clear())},"Clear alerts")])])):(wu(),Eu("span",Hm,"No warning or critical alert detected")),Pu("table",Vm,[Pu("tbody",null,[(wu(!0),Eu(hu,null,Ec(o.alerts,((e,r)=>(wu(),Eu("tr",{key:r},[Pu("td",Gm,[Pu("span",null,Cs(o.formatDate(e.begin)),1)]),Pu("td",Wm,[Pu("span",null,"("+Cs(e.ongoing?"ongoing":e.duration)+")",1)]),Pu("td",Km,[Ul(Pu("span",null,Cs(e.state)+" on ",513),[[Wp,!e.ongoing]]),Pu("span",{class:ks(e.state.toLowerCase())},Cs(e.type),3),Pu("span",null,"("+Cs(t.$filters.number(e.max,1))+")",1),Pu("span",null,": "+Cs(e.top),1)])])))),128))])])])}]]),Ym={key:0,class:"plugin",id:"cloud"},Jm={class:"title"};const tf={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}}},ef=(0,$m.A)(tf,[["render",function(t,e,r,n,i,o){return o.instance||o.provider?(wu(),Eu("section",Ym,[Pu("span",Jm,Cs(o.provider),1),Ru(" "+Cs(o.instance),1)])):Bu("v-if",!0)}]]),rf={class:"plugin",id:"connections"},nf={class:"table table-sm table-borderless margin-bottom"},of=Pu("thead",null,[Pu("tr",null,[Pu("th",{scope:"col"},"TCP CONNECTIONS"),Pu("th",{scope:"col",class:"text-end"})])],-1),sf=Pu("td",{scope:"row"},"Listen",-1),af={class:"text-end"},lf=Pu("td",{scope:"row"},"Initiated",-1),cf={class:"text-end"},uf=Pu("td",{scope:"row"},"Established",-1),pf={class:"text-end"},df=Pu("td",{scope:"row"},"Terminated",-1),mf={class:"text-end"},ff=Pu("td",{scope:"row"},"Tracked",-1);const hf={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()}}},gf=(0,$m.A)(hf,[["render",function(t,e,r,n,i,o){return wu(),Eu("section",rf,[Pu("table",nf,[of,Pu("tbody",null,[Pu("tr",null,[sf,Pu("td",af,Cs(o.listen),1)]),Pu("tr",null,[lf,Pu("td",cf,Cs(o.initiated),1)]),Pu("tr",null,[uf,Pu("td",pf,Cs(o.established),1)]),Pu("tr",null,[df,Pu("td",mf,Cs(o.terminated),1)]),Pu("tr",null,[ff,Pu("td",{class:ks(["text-end",o.getDecoration("nf_conntrack_percent")])},Cs(o.tracked.count)+"/"+Cs(o.tracked.max),3)])])])])}]]),bf={id:"cpu",class:"plugin"},yf={class:"table-responsive"},vf={class:"table-sm table-borderless"},xf={class:"justify-content-between"},wf={scope:"col"},_f={class:"table table-sm table-borderless"},kf=Pu("th",{scope:"col"},"CPU",-1),Af=Pu("td",{scope:"col"},"user:",-1),Sf=Pu("td",{scope:"col"},"system:",-1),Ef={key:0,scope:"col"},Cf={class:"d-none d-xl-block d-xxl-block"},Tf={class:"table table-sm table-borderless"},Of={scope:"col"},Df={scope:"col"},If={scope:"col"},jf={key:0,scope:"col"},Pf={scope:"col"},Nf={class:"d-none d-xxl-block"},Lf={class:"table table-sm table-borderless"},Mf={key:0,scope:"col"},Rf={scope:"col"},qf={key:0,scope:"col"},Bf={key:1,scope:"col",class:"text-end"},$f={key:0,scope:"col"},Ff={key:1,scope:"col",class:"text-end"};const Uf={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()}}},zf=(0,$m.A)(Uf,[["render",function(t,e,r,n,i,o){return wu(),Eu("section",bf,[Bu(" d-none d-xxl-block "),Pu("div",yf,[Pu("table",vf,[Pu("tbody",null,[Pu("tr",xf,[Pu("td",wf,[Pu("table",_f,[Pu("tbody",null,[Pu("tr",null,[kf,Pu("td",{scope:"col",class:ks(["text-end",o.getDecoration("total")])},Cs(o.total)+"%",3)]),Pu("tr",null,[Af,Pu("td",{scope:"col",class:ks(["text-end",o.getDecoration("user")])},Cs(o.user)+"%",3)]),Pu("tr",null,[Sf,Pu("td",{scope:"col",class:ks(["text-end",o.getDecoration("system")])},Cs(o.system)+"%",3)]),Pu("tr",null,[null!=o.iowait?(wu(),Eu("td",Ef,"iowait:")):Bu("v-if",!0),null!=o.iowait?(wu(),Eu("td",{key:1,scope:"col",class:ks(["text-end",o.getDecoration("iowait")])},Cs(o.iowait)+"%",3)):Bu("v-if",!0)])])])]),Pu("td",null,[Pu("template",Cf,[Pu("table",Tf,[Pu("tbody",null,[Pu("tr",null,[Ul(Pu("td",Of,"idle:",512),[[Wp,null!=o.idle]]),Ul(Pu("td",{scope:"col",class:"text-end"},Cs(o.idle)+"%",513),[[Wp,null!=o.idle]])]),Pu("tr",null,[Ul(Pu("td",Df,"irq:",512),[[Wp,null!=o.irq]]),Ul(Pu("td",{scope:"col",class:"text-end"},Cs(o.irq)+"%",513),[[Wp,null!=o.irq]])]),Pu("tr",null,[Ul(Pu("td",If,"nice:",512),[[Wp,null!=o.nice]]),Ul(Pu("td",{scope:"col",class:"text-end"},Cs(o.nice)+"%",513),[[Wp,null!=o.nice]])]),Pu("tr",null,[null==o.iowait&&null!=o.dpc?(wu(),Eu("td",jf,"dpc:")):Bu("v-if",!0),null==o.iowait&&null!=o.dpc?(wu(),Eu("td",{key:1,scope:"col",class:ks(["text-end",o.getDecoration("dpc")])},Cs(o.dpc)+"%",3)):Bu("v-if",!0),Ul(Pu("td",Pf,"steal:",512),[[Wp,null!=o.steal]]),Ul(Pu("td",{scope:"col",class:ks(["text-end",o.getDecoration("steal")])},Cs(o.steal)+"%",3),[[Wp,null!=o.steal]])])])])])]),Pu("td",null,[Pu("template",Nf,[Pu("table",Lf,[Pu("tbody",null,[Pu("tr",null,[null!=o.nice&&null!=o.ctx_switches?(wu(),Eu("td",Mf,"ctx_sw:")):Bu("v-if",!0),null!=o.nice&&null!=o.ctx_switches?(wu(),Eu("td",{key:1,scope:"col",class:ks(["text-end",o.getDecoration("ctx_switches")])},Cs(o.ctx_switches),3)):Bu("v-if",!0)]),Pu("tr",null,[Ul(Pu("td",Rf,"inter:",512),[[Wp,null!=o.interrupts]]),Ul(Pu("td",{scope:"col",class:"text-end"},Cs(o.interrupts),513),[[Wp,null!=o.interrupts]])]),Pu("tr",null,[o.isWindows||o.isSunOS||null==o.soft_interrupts?Bu("v-if",!0):(wu(),Eu("td",qf,"sw_int:")),o.isWindows||o.isSunOS||null==o.soft_interrupts?Bu("v-if",!0):(wu(),Eu("td",Bf,Cs(o.soft_interrupts),1))]),Pu("tr",null,[o.isLinux&&null!=o.guest?(wu(),Eu("td",$f,"guest:")):Bu("v-if",!0),o.isLinux&&null!=o.guest?(wu(),Eu("td",Ff,Cs(o.guest)+"%",1)):Bu("v-if",!0)])])])])])])])])])])}]]),Hf={key:0,class:"plugin",id:"diskio"},Vf={class:"table table-sm table-borderless margin-bottom"},Gf=Pu("th",{scope:"col"},"DISK I/O",-1),Wf={scope:"col",class:"text-end w-25"},Kf={scope:"col",class:"text-end w-25"},Xf={scope:"col",class:"text-end w-25"},Qf={scope:"col",class:"text-end w-25"},Zf={scope:"row"};var Yf=r(4728),Jf=r.n(Yf);function th(t,e){return eh(t=8*Math.round(t),e)+"b"}function eh(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;i1){var a=0;return s<10?a=2:s<100&&(a=1),e?a="MK"==o?0:(0,Xm.min)([1,a]):"K"==o&&(a=0),parseFloat(s).toFixed(a)+o}}return t.toFixed(0)}function rh(t){return void 0===t||""===t?"?":t}function nh(t,e,r){return e=e||0,r=r||" ",String(t).padStart(e,r)}function ih(t,e){return"function"!=typeof t.slice&&(t=String(t)),t.slice(0,e)}function oh(t,e,r=!0){return e=e||8,t.length>e?r?t.substring(0,e-1)+"_":"_"+t.substring(t.length-e+1):t}function sh(t){if(void 0===t)return t;var e=function(t){var e=document.createElement("div");return e.innerText=t,e.innerHTML}(t),r=e.replace(/\n/g,"
");return Jf()(r)}function ah(t,e){return new Intl.NumberFormat(void 0,"number"==typeof e?{maximumFractionDigits:e}:e).format(t)}function lh(t){for(var e=0,r=0;r({store:zd}),computed:{args(){return this.store.args||{}},stats(){return this.data.stats.diskio},view(){return this.data.views.diskio},disks(){const t=this.stats.map((t=>({name:t.disk_name,alias:void 0!==t.alias?t.alias:null,bitrate:{txps:eh(t.read_bytes_rate_per_sec),rxps:eh(t.write_bytes_rate_per_sec)},count:{txps:eh(t.read_count_rate_per_sec),rxps:eh(t.write_count_rate_per_sec)}}))).filter((t=>{const e=this.view[t.name].read_bytes_rate_per_sec,r=this.view[t.name].write_bytes_rate_per_sec;return!(e&&!1!==e.hidden||r&&!1!==r.hidden)}));return(0,Xm.orderBy)(t,["name"])},hasDisks(){return this.disks.length>0}},methods:{getDecoration(t,e){if(null!=this.view[t][e])return this.view[t][e].decoration.toLowerCase()}}},ph=(0,$m.A)(uh,[["render",function(t,e,r,n,i,o){return o.hasDisks?(wu(),Eu("section",Hf,[Pu("table",Vf,[Pu("thead",null,[Pu("tr",null,[Gf,Ul(Pu("th",Wf,"R/s",512),[[Wp,!o.args.diskio_iops]]),Ul(Pu("th",Kf,"W/s",512),[[Wp,!o.args.diskio_iops]]),Ul(Pu("th",Xf,"IOR/s",512),[[Wp,o.args.diskio_iops]]),Ul(Pu("th",Qf,"IOW/s",512),[[Wp,o.args.diskio_iops]])])]),Pu("tbody",null,[(wu(!0),Eu(hu,null,Ec(o.disks,((e,r)=>(wu(),Eu("tr",{key:r},[Pu("td",Zf,Cs(t.$filters.minSize(e.alias?e.alias:e.name,32)),1),Ul(Pu("td",{class:ks(["text-end w-25",o.getDecoration(e.name,"write_bytes_rate_per_sec")])},Cs(e.bitrate.txps),3),[[Wp,!o.args.diskio_iops]]),Ul(Pu("td",{class:ks(["text-end w-25",o.getDecoration(e.name,"read_bytes_rate_per_sec")])},Cs(e.bitrate.rxps),3),[[Wp,!o.args.diskio_iops]]),Ul(Pu("td",{class:"text-end w-25"},Cs(e.count.txps),513),[[Wp,o.args.diskio_iops]]),Ul(Pu("td",{class:"text-end w-25"},Cs(e.count.rxps),513),[[Wp,o.args.diskio_iops]])])))),128))])])])):Bu("v-if",!0)}]]),dh={key:0,class:"plugin",id:"containers"},mh=Pu("span",{class:"title"},"CONTAINERS",-1),fh={class:"table table-sm table-borderless table-striped table-hover"},hh={scope:"col"},gh={scope:"col"},bh={scope:"col"},yh={scope:"col"},vh={scope:"col"},xh={scope:"col"},wh={scope:"col"},_h={scope:"col"},kh={scope:"col"},Ah={scope:"col"};const Sh={props:{data:{type:Object}},data:()=>({store:zd,sorter:void 0}),computed:{args(){return this.store.args||{}},sortProcessesKey(){return this.args.sort_processes_key},stats(){return this.data.stats.containers},views(){return this.data.views.containers},containers(){const{sorter:t}=this,e=(this.stats||[]).map((t=>{let e="?";return null!=t.memory.usage&&(e=t.memory.usage,null!=t.memory.inactive_file&&(e-=t.memory.inactive_file)),{id:t.id,name:t.name,status:t.status,uptime:t.uptime,cpu_percent:t.cpu.total,memory_usage:e,limit:null!=t.memory.limit&&NaN!=t.memory.limit?t.memory.limit:"-",io_rx:null!=t.io_rx&&NaN!=t.io_rx?t.io_rx:"-",io_wx:null!=t.io_wx&&NaN!=t.io_wx?t.io_wx:"-",network_rx:null!=t.network_rx&&NaN!=t.network_rx?t.network_rx:"-",network_tx:null!=t.network_tx&&NaN!=t.network_tx?t.network_tx:"-",command:t.command,image:t.image,engine:t.engine,pod_id:t.pod_id}}));return(0,Xm.orderBy)(e,[t.column].reduce(((t,e)=>("memory_percent"===e&&(e=["memory_usage"]),t.concat(e))),[]),[t.isReverseColumn(t.column)?"desc":"asc"])},showEngine(){return this.views.show_engine_name},showPod(){return this.views.show_pod_name}},watch:{sortProcessesKey:{immediate:!0,handler(t){t&&!["cpu_percent","memory_percent","name"].includes(t)||(this.sorter={column:this.args.sort_processes_key||"cpu_percent",auto:!this.args.sort_processes_key,isReverseColumn:function(t){return!["name"].includes(t)},getColumnLabel:function(t){return{io_counters:"disk IO",cpu_percent:"CPU consumption",memory_usage:"memory consumption",cpu_times:"uptime",name:"container name",None:"None"}[t]||t}})}}},methods:{getDisableStats:()=>GlancesHelper.getLimit("containers","containers_disable_stats")||[]}},Eh=(0,$m.A)(Sh,[["render",function(t,e,r,n,i,o){return o.containers.length?(wu(),Eu("section",dh,[mh,Ul(Pu("span",null,Cs(o.containers.length)+" sorted by "+Cs(i.sorter.getColumnLabel(i.sorter.column)),513),[[Wp,o.containers.length>1]]),Pu("table",fh,[Pu("thead",null,[Pu("tr",null,[Ul(Pu("td",hh,"Engine",512),[[Wp,o.showEngine]]),Ul(Pu("td",gh,"Pod",512),[[Wp,o.showPod]]),Ul(Pu("td",{scope:"col",class:ks(["sortable","name"===i.sorter.column&&"sort"]),onClick:e[0]||(e[0]=t=>o.args.sort_processes_key="name")}," Name ",2),[[Wp,!o.getDisableStats().includes("name")]]),Ul(Pu("td",bh,"Status",512),[[Wp,!o.getDisableStats().includes("status")]]),Ul(Pu("td",yh,"Uptime",512),[[Wp,!o.getDisableStats().includes("uptime")]]),Ul(Pu("td",{scope:"col",class:ks(["sortable","cpu_percent"===i.sorter.column&&"sort"]),onClick:e[1]||(e[1]=t=>o.args.sort_processes_key="cpu_percent")}," CPU% ",2),[[Wp,!o.getDisableStats().includes("cpu")]]),Ul(Pu("td",{scope:"col",class:ks(["sortable","memory_percent"===i.sorter.column&&"sort"]),onClick:e[2]||(e[2]=t=>o.args.sort_processes_key="memory_percent")}," MEM ",2),[[Wp,!o.getDisableStats().includes("mem")]]),Ul(Pu("td",vh,"/ MAX",512),[[Wp,!o.getDisableStats().includes("mem")]]),Ul(Pu("td",xh,"IOR/s",512),[[Wp,!o.getDisableStats().includes("diskio")]]),Ul(Pu("td",wh,"IOW/s",512),[[Wp,!o.getDisableStats().includes("diskio")]]),Ul(Pu("td",_h,"RX/s",512),[[Wp,!o.getDisableStats().includes("networkio")]]),Ul(Pu("td",kh,"TX/s",512),[[Wp,!o.getDisableStats().includes("networkio")]]),Ul(Pu("td",Ah,"Command",512),[[Wp,!o.getDisableStats().includes("command")]])])]),Pu("tbody",null,[(wu(!0),Eu(hu,null,Ec(o.containers,((e,r)=>(wu(),Eu("tr",{key:r},[Ul(Pu("td",{scope:"row"},Cs(e.engine),513),[[Wp,o.showEngine]]),Ul(Pu("td",{scope:"row"},Cs(e.pod_id||"-"),513),[[Wp,o.showPod]]),Ul(Pu("td",{scope:"row"},Cs(e.name),513),[[Wp,!o.getDisableStats().includes("name")]]),Ul(Pu("td",{scope:"row",class:ks("Paused"==e.status?"careful":"ok")},Cs(e.status),3),[[Wp,!o.getDisableStats().includes("status")]]),Ul(Pu("td",{scope:"row"},Cs(e.uptime),513),[[Wp,!o.getDisableStats().includes("uptime")]]),Ul(Pu("td",{scope:"row"},Cs(t.$filters.number(e.cpu_percent,1)),513),[[Wp,!o.getDisableStats().includes("cpu")]]),Ul(Pu("td",{scope:"row"},Cs(t.$filters.bytes(e.memory_usage)),513),[[Wp,!o.getDisableStats().includes("mem")]]),Ul(Pu("td",{scope:"row"}," / "+Cs(t.$filters.bytes(e.limit)),513),[[Wp,!o.getDisableStats().includes("mem")]]),Ul(Pu("td",{scope:"row"},Cs(t.$filters.bytes(e.io_rx)),513),[[Wp,!o.getDisableStats().includes("iodisk")]]),Ul(Pu("td",{scope:"row"},Cs(t.$filters.bytes(e.io_wx)),513),[[Wp,!o.getDisableStats().includes("iodisk")]]),Ul(Pu("td",{scope:"row"},Cs(t.$filters.bits(e.network_rx)),513),[[Wp,!o.getDisableStats().includes("networkio")]]),Ul(Pu("td",{scope:"row"},Cs(t.$filters.bits(e.network_tx)),513),[[Wp,!o.getDisableStats().includes("networkio")]]),Ul(Pu("td",{scope:"row"},Cs(e.command),513),[[Wp,!o.getDisableStats().includes("command")]])])))),128))])])])):Bu("v-if",!0)}]]),Ch={key:0,class:"plugin",id:"folders"},Th={class:"table table-sm table-borderless margin-bottom"},Oh=Pu("thead",null,[Pu("tr",null,[Pu("th",{scope:"col"},"FOLDERS"),Pu("th",{scope:"col",class:"text-end"},"Size")])],-1),Dh={scope:"row"},Ih={key:0,class:"visible-lg-inline"};const jh={props:{data:{type:Object}},computed:{stats(){return this.data.stats.folders},folders(){return this.stats.map((t=>({path:t.path,size:t.size,errno:t.errno,careful:t.careful,warning:t.warning,critical:t.critical})))},hasFolders(){return this.folders.length>0}},methods:{getDecoration:t=>t.errno>0?"error":null!==t.critical&&t.size>1e6*t.critical?"critical":null!==t.warning&&t.size>1e6*t.warning?"warning":null!==t.careful&&t.size>1e6*t.careful?"careful":"ok"}},Ph=(0,$m.A)(jh,[["render",function(t,e,r,n,i,o){return o.hasFolders?(wu(),Eu("section",Ch,[Pu("table",Th,[Oh,Pu("tbody",null,[(wu(!0),Eu(hu,null,Ec(o.folders,((e,r)=>(wu(),Eu("tr",{key:r},[Pu("td",Dh,Cs(e.path),1),Pu("td",{class:ks(["text-end",o.getDecoration(e)])},[e.errno>0?(wu(),Eu("span",Ih,"?")):Bu("v-if",!0),Ru(" "+Cs(t.$filters.bytes(e.size)),1)],2)])))),128))])])])):Bu("v-if",!0)}]]),Nh={key:0,class:"plugin",id:"fs"},Lh={class:"table table-sm table-borderless margin-bottom"},Mh=Pu("th",{scope:"col"},"FILE SYSTEM",-1),Rh={key:0,scope:"col",class:"text-end w-25"},qh={key:1,scope:"col",class:"text-end w-25"},Bh=Pu("th",{scope:"col",class:"text-end w-25"},"Total",-1),$h={scope:"row"},Fh={key:0,class:"visible-lg-inline"},Uh={scope:"row",class:"text-end"};const zh={props:{data:{type:Object}},data:()=>({store:zd}),computed:{args(){return this.store.args||{}},stats(){return this.data.stats.fs},view(){return this.data.views.fs},fileSystems(){const t=this.stats.map((t=>({name:t.device_name,mountPoint:t.mnt_point,percent:t.percent,size:t.size,used:t.used,free:t.free,alias:void 0!==t.alias?t.alias:null})));return(0,Xm.orderBy)(t,["mnt_point"])},hasFs(){return this.fileSystems.length>0}},methods:{getDecoration(t,e){if(null!=this.view[t][e])return this.view[t][e].decoration.toLowerCase()}}},Hh=(0,$m.A)(zh,[["render",function(t,e,r,n,i,o){return o.hasFs?(wu(),Eu("section",Nh,[Pu("table",Lh,[Pu("thead",null,[Pu("tr",null,[Mh,o.args.fs_free_space?(wu(),Eu("th",qh,"Free")):(wu(),Eu("th",Rh,"Used")),Bh])]),Pu("tbody",null,[(wu(!0),Eu(hu,null,Ec(o.fileSystems,((e,r)=>(wu(),Eu("tr",{key:r},[Pu("td",$h,[Ru(Cs(t.$filters.minSize(e.alias?e.alias:e.mountPoint,26,t.begin=!1))+" ",1),(e.alias?e.alias:e.mountPoint).length+e.name.length<=24?(wu(),Eu("span",Fh," ("+Cs(e.name)+") ",1)):Bu("v-if",!0)]),o.args.fs_free_space?(wu(),Eu("td",{key:1,scope:"row",class:ks(["text-end",o.getDecoration(e.mountPoint,"used")])},Cs(t.$filters.bytes(e.free)),3)):(wu(),Eu("td",{key:0,scope:"row",class:ks(["text-end",o.getDecoration(e.mountPoint,"used")])},Cs(t.$filters.bytes(e.used)),3)),Pu("td",Uh,Cs(t.$filters.bytes(e.size)),1)])))),128))])])])):Bu("v-if",!0)}]]),Vh={key:0,id:"gpu",class:"plugin"},Gh={class:"title gpu-name"},Wh={key:0,class:"table-responsive"},Kh=Pu("td",{class:"col"},"proc:",-1),Xh={key:1,class:"col text-end"},Qh=Pu("td",{class:"col"},"mem:",-1),Zh={key:1,class:"col text-end"},Yh=Pu("td",{class:"col"},"temp:",-1),Jh={key:1,class:"col text-end"},tg={key:1,class:"table-responsive"},eg={class:"table table-sm table-borderless"},rg={class:"col"},ng={key:1,class:"col"},ig=Pu("td",{class:"col"},"mem:",-1),og={key:3,class:"col text-end"},sg={key:2,class:"table-responsive"},ag={class:"table table-sm table-borderless"},lg=Pu("td",{class:"col"},"proc mean:",-1),cg={key:1,class:"col"},ug=Pu("td",{class:"col"},"mem mean:",-1),pg={key:1,class:"col"},dg=Pu("td",{class:"col"},"temp mean:",-1),mg={key:1,class:"col"};const fg={props:{data:{type:Object}},data:()=>({store:zd}),computed:{args(){return this.store.args||{}},stats(){return this.data.stats.gpu},view(){return this.data.views.gpu},gpus(){return this.stats},name(){let t="GPU";const{stats:e}=this;return 1===e.length?t=e[0].name:e.length&&(t=`${e.length} GPU ${e[0].name}`),t},mean(){const t={proc:null,mem:null,temperature:null},{stats:e}=this;if(!e.length)return t;for(let r of e)t.proc+=r.proc,t.mem+=r.mem,t.temperature+=r.temperature;return t.proc=t.proc/e.length,t.mem=t.mem/e.length,t.temperature=t.temperature/e.length,t}},methods:{getDecoration(t,e){if(void 0!==this.view[t][e])return this.view[t][e].decoration.toLowerCase()},getMeanDecoration:t=>"DEFAULT"}},hg=(0,$m.A)(fg,[["render",function(t,e,r,n,i,o){return null!=o.gpus?(wu(),Eu("section",Vh,[Pu("div",Gh,Cs(o.name),1),Bu(" single gpu "),1===o.gpus.length?(wu(),Eu("div",Wh,[(wu(!0),Eu(hu,null,Ec(o.gpus,((e,r)=>(wu(),Eu("table",{key:r,class:"table table-sm table-borderless"},[Pu("tbody",null,[Pu("tr",null,[Kh,null!=e.proc?(wu(),Eu("td",{key:0,class:ks(["col text-end",o.getDecoration(e.gpu_id,"proc")])},Cs(t.$filters.number(e.proc,0))+"%",3)):Bu("v-if",!0),null==e.proc?(wu(),Eu("td",Xh,"N/A")):Bu("v-if",!0)]),Pu("tr",null,[Qh,null!=e.mem?(wu(),Eu("td",{key:0,class:ks(["col text-end",o.getDecoration(e.gpu_id,"mem")])},Cs(t.$filters.number(e.mem,0))+"%",3)):Bu("v-if",!0),null==e.mem?(wu(),Eu("td",Zh,"N/A")):Bu("v-if",!0)]),Pu("tr",null,[Yh,null!=e.temperature?(wu(),Eu("td",{key:0,class:ks(["col text-end",o.getDecoration(e.gpu_id,"temperature")])},Cs(t.$filters.number(e.temperature,0)),3)):Bu("v-if",!0),null==e.temperature?(wu(),Eu("td",Jh,"N/A")):Bu("v-if",!0)])])])))),128))])):Bu("v-if",!0),Bu(" multiple gpus - one line per gpu (no mean) "),!o.args.meangpu&&o.gpus.length>1?(wu(),Eu("div",tg,[Pu("table",eg,[Pu("tbody",null,[(wu(!0),Eu(hu,null,Ec(o.gpus,((e,r)=>(wu(),Eu("tr",{key:r},[Pu("td",rg,Cs(e.gpu_id)+":",1),null!=e.proc?(wu(),Eu("td",{key:0,class:ks(["col",o.getDecoration(e.gpu_id,"proc")])},Cs(t.$filters.number(e.proc,0))+"%",3)):Bu("v-if",!0),null==e.proc?(wu(),Eu("td",ng,"N/A")):Bu("v-if",!0),ig,null!=e.mem?(wu(),Eu("td",{key:2,class:ks(["col text-end",o.getDecoration(e.gpu_id,"mem")])},Cs(t.$filters.number(e.mem,0))+"%",3)):Bu("v-if",!0),null==e.mem?(wu(),Eu("td",og,"N/A")):Bu("v-if",!0)])))),128))])])])):Bu("v-if",!0),Bu(" multiple gpus - mean "),o.args.meangpu&&o.gpus.length>1?(wu(),Eu("div",sg,[Pu("table",ag,[Pu("tbody",null,[Pu("tr",null,[lg,null!=o.mean.proc?(wu(),Eu("td",{key:0,class:ks(["col",o.getMeanDecoration("proc")])},Cs(t.$filters.number(o.mean.proc,0))+"% ",3)):Bu("v-if",!0),null==o.mean.proc?(wu(),Eu("td",cg,"N/A")):Bu("v-if",!0)]),Pu("tr",null,[ug,null!=o.mean.mem?(wu(),Eu("td",{key:0,class:ks(["col",o.getMeanDecoration("mem")])},Cs(t.$filters.number(o.mean.mem,0))+"% ",3)):Bu("v-if",!0),null==o.mean.mem?(wu(),Eu("td",pg,"N/A")):Bu("v-if",!0)]),Pu("tr",null,[dg,null!=o.mean.temperature?(wu(),Eu("td",{key:0,class:ks(["col",o.getMeanDecoration("temperature")])},Cs(t.$filters.number(o.mean.temperature,0)),3)):Bu("v-if",!0),null==o.mean.temperature?(wu(),Eu("td",mg,"N/A")):Bu("v-if",!0)])])])])):Bu("v-if",!0)])):Bu("v-if",!0)}]]),gg={key:0,class:"plugin",id:"ip"},bg={key:0,class:"title"},yg={key:1},vg={key:2,class:"title"},xg={key:3},wg={key:4,class:"text-truncate"};const _g={props:{data:{type:Object}},computed:{ipStats(){return this.data.stats.ip},address(){return this.ipStats.address},gateway(){return this.ipStats.gateway},maskCdir(){return this.ipStats.mask_cidr},publicAddress(){return this.ipStats.public_address},publicInfo(){return this.ipStats.public_info_human}}},kg=(0,$m.A)(_g,[["render",function(t,e,r,n,i,o){return o.address?(wu(),Eu("section",gg,[o.address?(wu(),Eu("span",bg,"IP")):Bu("v-if",!0),o.address?(wu(),Eu("span",yg,Cs(o.address)+"/"+Cs(o.maskCdir),1)):Bu("v-if",!0),o.publicAddress?(wu(),Eu("span",vg,"Pub")):Bu("v-if",!0),o.publicAddress?(wu(),Eu("span",xg,Cs(o.publicAddress),1)):Bu("v-if",!0),o.publicInfo?(wu(),Eu("span",wg,Cs(o.publicInfo),1)):Bu("v-if",!0)])):Bu("v-if",!0)}]]),Ag={class:"plugin",id:"irq"},Sg={class:"table table-sm table-borderless margin-bottom"},Eg=Pu("thead",null,[Pu("tr",null,[Pu("th",{scope:"col"},"IRQ"),Pu("th",{scope:"col",class:"text-end"},"Rate/s")])],-1),Cg={scope:"row"},Tg={scope:"row",class:"text-end"};const Og={props:{data:{type:Object}},computed:{stats(){return this.data.stats.irq},irqs(){return this.stats.map((t=>({irq_line:t.irq_line,irq_rate:t.irq_rate})))}}},Dg=(0,$m.A)(Og,[["render",function(t,e,r,n,i,o){return wu(),Eu("section",Ag,[Pu("table",Sg,[Eg,Pu("tbody",null,[(wu(!0),Eu(hu,null,Ec(o.irqs,((t,e)=>(wu(),Eu("tr",{key:e},[Pu("td",Cg,Cs(t.irq_line),1),Pu("td",Tg,Cs(t.irq_rate),1)])))),128))])])])}]]),Ig={key:0,id:"load",class:"plugin"},jg={class:"table-responsive"},Pg={class:"table table-sm table-borderless"},Ng=Pu("th",{scope:"col"},"LOAD",-1),Lg={scope:"col",class:"text-end"},Mg=Pu("td",{scope:"row"},"1 min:",-1),Rg={class:"text-end"},qg=Pu("td",{scope:"row"},"5 min:",-1),Bg=Pu("td",{scope:"row"},"15 min:",-1);const $g={props:{data:{type:Object}},computed:{stats(){return this.data.stats.load},view(){return this.data.views.load},cpucore(){return this.stats.cpucore},min1(){return this.stats.min1},min5(){return this.stats.min5},min15(){return this.stats.min15}},methods:{getDecoration(t){if(void 0!==this.view[t])return this.view[t].decoration.toLowerCase()}}},Fg=(0,$m.A)($g,[["render",function(t,e,r,n,i,o){return null!=o.cpucore?(wu(),Eu("section",Ig,[Pu("div",jg,[Pu("table",Pg,[Pu("thead",null,[Pu("tr",null,[Ng,Pu("td",Lg,Cs(o.cpucore)+"-core",1)])]),Pu("tbody",null,[Pu("tr",null,[Mg,Pu("td",Rg,Cs(t.$filters.number(o.min1,2)),1)]),Pu("tr",null,[qg,Pu("td",{class:ks(["text-end",o.getDecoration("min5")])},Cs(t.$filters.number(o.min5,2)),3)]),Pu("tr",null,[Bg,Pu("td",{class:ks(["text-end",o.getDecoration("min15")])},Cs(t.$filters.number(o.min15,2)),3)])])])])])):Bu("v-if",!0)}]]),Ug={id:"mem",class:"plugin"},zg={class:"table-responsive"},Hg={class:"table-sm table-borderless"},Vg={class:"justify-content-between"},Gg={scope:"col"},Wg={class:"table table-sm table-borderless"},Kg=Pu("th",{scope:"col"},"MEM",-1),Xg=Pu("td",{scope:"row"},"total:",-1),Qg={class:"text-end"},Zg=Pu("td",{scope:"row"},"used:",-1),Yg=Pu("td",{scope:"row"},"free:",-1),Jg={class:"d-none d-xl-block d-xxl-block"},tb={class:"table table-sm table-borderless"},eb={scope:"col"},rb={scope:"col"},nb={scope:"col"},ib={scope:"col"};const ob={props:{data:{type:Object}},computed:{stats(){return this.data.stats.mem},view(){return this.data.views.mem},percent(){return this.stats.percent},total(){return this.stats.total},used(){return this.stats.used},free(){return this.stats.free},active(){return this.stats.active},inactive(){return this.stats.inactive},buffers(){return this.stats.buffers},cached(){return this.stats.cached}},methods:{getDecoration(t){if(void 0!==this.view[t])return this.view[t].decoration.toLowerCase()}}},sb=(0,$m.A)(ob,[["render",function(t,e,r,n,i,o){return wu(),Eu("section",Ug,[Bu(" d-none d-xxl-block "),Pu("div",zg,[Pu("table",Hg,[Pu("tbody",null,[Pu("tr",Vg,[Pu("td",Gg,[Pu("table",Wg,[Pu("tbody",null,[Pu("tr",null,[Kg,Pu("td",{scope:"col",class:ks(["text-end",o.getDecoration("percent")])},Cs(o.percent)+"%",3)]),Pu("tr",null,[Xg,Pu("td",Qg,Cs(t.$filters.bytes(o.total)),1)]),Pu("tr",null,[Zg,Pu("td",{class:ks(["text-end",o.getDecoration("used")])},Cs(t.$filters.bytes(o.used,2)),3)]),Pu("tr",null,[Yg,Pu("td",{class:ks(["text-end",o.getDecoration("free")])},Cs(t.$filters.bytes(o.free,2)),3)])])])]),Pu("td",null,[Pu("template",Jg,[Pu("table",tb,[Pu("tbody",null,[Pu("tr",null,[Ul(Pu("td",eb," active: ",512),[[Wp,null!=o.active]]),Ul(Pu("td",{scope:"col"},Cs(t.$filters.bytes(o.active)),513),[[Wp,null!=o.active]])]),Pu("tr",null,[Ul(Pu("td",rb," inactive: ",512),[[Wp,null!=o.inactive]]),Ul(Pu("td",{scope:"col"},Cs(t.$filters.bytes(o.inactive)),513),[[Wp,null!=o.inactive]])]),Pu("tr",null,[Ul(Pu("td",nb," buffers: ",512),[[Wp,null!=o.buffers]]),Ul(Pu("td",{scope:"col"},Cs(t.$filters.bytes(o.buffers)),513),[[Wp,null!=o.buffers]])]),Pu("tr",null,[Ul(Pu("td",ib," cached: ",512),[[Wp,null!=o.cached]]),Ul(Pu("td",{scope:"col"},Cs(t.$filters.bytes(o.cached)),513),[[Wp,null!=o.cached]])])])])])])])])])])])}]]),ab={id:"memswap",class:"plugin"},lb={class:"table-responsive"},cb={class:"table table-sm table-borderless"},ub=Pu("th",{scope:"col"},"SWAP",-1),pb=Pu("td",{scope:"row"},"total:",-1),db={class:"text-end"},mb=Pu("td",{scope:"row"},"used:",-1),fb=Pu("td",{scope:"row"},"free:",-1),hb={class:"text-end"};const gb={props:{data:{type:Object}},computed:{stats(){return this.data.stats.memswap},view(){return this.data.views.memswap},percent(){return this.stats.percent},total(){return this.stats.total},used(){return this.stats.used},free(){return this.stats.free}},methods:{getDecoration(t){if(void 0!==this.view[t])return this.view[t].decoration.toLowerCase()}}},bb=(0,$m.A)(gb,[["render",function(t,e,r,n,i,o){return wu(),Eu("section",ab,[Pu("div",lb,[Pu("table",cb,[Pu("thead",null,[Pu("tr",null,[ub,Pu("td",{scope:"col",class:ks(["text-end",o.getDecoration("percent")])},Cs(o.percent)+"%",3)])]),Pu("tbody",null,[Pu("tr",null,[pb,Pu("td",db,Cs(t.$filters.bytes(o.total)),1)]),Pu("tr",null,[mb,Pu("td",{class:ks(["text-end",o.getDecoration("used")])},Cs(t.$filters.bytes(o.used,2)),3)]),Pu("tr",null,[fb,Pu("td",hb,Cs(t.$filters.bytes(o.free,2)),1)])])])])])}]]),yb={key:0,class:"plugin",id:"network"},vb={class:"table table-sm table-borderless margin-bottom"},xb=Pu("th",{scope:"col"},"NETWORK",-1),wb={scope:"col",class:"text-end w-25"},_b={scope:"col",class:"text-end w-25"},kb={scope:"col",class:"text-end w-25"},Ab={scope:"col",class:"text-end w-25"},Sb={scope:"col",class:"text-end w-25"},Eb={scope:"col",class:"text-end w-25"},Cb={scope:"col",class:"text-end w-25"},Tb={scope:"col",class:"text-end w-25"},Ob={scope:"row",class:"visible-lg-inline"},Db={class:"text-end w-25"},Ib={class:"text-end w-25"};const jb={props:{data:{type:Object}},data:()=>({store:zd}),computed:{args(){return this.store.args||{}},stats(){return this.data.stats.network},view(){return this.data.views.network},networks(){const t=this.stats.map((t=>{const e=void 0!==t.alias?t.alias:null;return{interfaceName:t.interface_name,ifname:e||t.interface_name,bytes_recv_rate_per_sec:t.bytes_recv_rate_per_sec,bytes_sent_rate_per_sec:t.bytes_sent_rate_per_sec,bytes_all_rate_per_sec:t.bytes_all_rate_per_sec,bytes_recv:t.bytes_recv,bytes_sent:t.bytes_sent,bytes_all:t.bytes_all}})).filter((t=>{const e=this.view[t.interfaceName].bytes_recv_rate_per_sec,r=this.view[t.interfaceName].bytes_sent_rate_per_sec;return!(e&&!1!==e.hidden||r&&!1!==r.hidden)}));return(0,Xm.orderBy)(t,["interfaceName"])},hasNetworks(){return this.networks.length>0}},methods:{getDecoration(t,e){if(null!=this.view[t][e])return this.view[t][e].decoration.toLowerCase()}}},Pb=(0,$m.A)(jb,[["render",function(t,e,r,n,i,o){return o.hasNetworks?(wu(),Eu("section",yb,[Pu("table",vb,[Pu("thead",null,[Pu("tr",null,[xb,Ul(Pu("th",wb,"Rx/s",512),[[Wp,!o.args.network_cumul&&!o.args.network_sum]]),Ul(Pu("th",_b,"Tx/s",512),[[Wp,!o.args.network_cumul&&!o.args.network_sum]]),Ul(Pu("th",kb,null,512),[[Wp,!o.args.network_cumul&&o.args.network_sum]]),Ul(Pu("th",Ab,"Rx+Tx/s",512),[[Wp,!o.args.network_cumul&&o.args.network_sum]]),Ul(Pu("th",Sb,"Rx",512),[[Wp,o.args.network_cumul&&!o.args.network_sum]]),Ul(Pu("th",Eb,"Tx",512),[[Wp,o.args.network_cumul&&!o.args.network_sum]]),Ul(Pu("th",Cb,null,512),[[Wp,o.args.network_cumul&&o.args.network_sum]]),Ul(Pu("th",Tb,"Rx+Tx",512),[[Wp,o.args.network_cumul&&o.args.network_sum]])])]),Pu("tbody",null,[(wu(!0),Eu(hu,null,Ec(o.networks,((e,r)=>(wu(),Eu("tr",{key:r},[Pu("td",Ob,Cs(e.ifname),1),Ul(Pu("td",{class:ks(["text-end w-25",o.getDecoration(e.interfaceName,"bytes_recv_rate_per_sec")])},Cs(o.args.byte?t.$filters.bytes(e.bytes_recv_rate_per_sec):t.$filters.bits(e.bytes_recv_rate_per_sec)),3),[[Wp,!o.args.network_cumul&&!o.args.network_sum]]),Ul(Pu("td",{class:ks(["text-end w-25",o.getDecoration(e.interfaceName,"bytes_sent_rate_per_sec")])},Cs(o.args.byte?t.$filters.bytes(e.bytes_sent_rate_per_sec):t.$filters.bits(e.bytes_sent_rate_per_sec)),3),[[Wp,!o.args.network_cumul&&!o.args.network_sum]]),Ul(Pu("td",Db,null,512),[[Wp,!o.args.network_cumul&&o.args.network_sum]]),Ul(Pu("td",{class:"text-end w-25"},Cs(o.args.byte?t.$filters.bytes(e.bytes_all_rate_per_sec):t.$filters.bits(e.bytes_all_rate_per_sec)),513),[[Wp,!o.args.network_cumul&&o.args.network_sum]]),Ul(Pu("td",{class:"text-end w-25"},Cs(o.args.byte?t.$filters.bytes(e.bytes_recv):t.$filters.bits(e.bytes_recv)),513),[[Wp,o.args.network_cumul&&!o.args.network_sum]]),Ul(Pu("td",{class:"text-end w-25"},Cs(o.args.byte?t.$filters.bytes(e.bytes_sent):t.$filters.bits(e.bytes_sent)),513),[[Wp,o.args.network_cumul&&!o.args.network_sum]]),Ul(Pu("td",Ib,null,512),[[Wp,o.args.network_cumul&&o.args.network_sum]]),Ul(Pu("td",{class:"text-end w-25"},Cs(o.args.byte?t.$filters.bytes(e.bytes_all):t.$filters.bits(e.bytes_all)),513),[[Wp,o.args.network_cumul&&o.args.network_sum]])])))),128))])])])):Bu("v-if",!0)}]]),Nb={id:"now",class:"plugin"},Lb={class:"table-row"},Mb={class:"table-cell text-start"};const Rb={props:{data:{type:Object}},computed:{date_custom(){return this.data.stats.now.custom}}},qb=(0,$m.A)(Rb,[["render",function(t,e,r,n,i,o){return wu(),Eu("section",Nb,[Pu("div",Lb,[Pu("div",Mb,Cs(o.date_custom),1)])])}]]),Bb={id:"percpu",class:"plugin"},$b={class:"table-responsive"},Fb={class:"table table-sm table-borderless"},Ub={key:0,scope:"col"},zb={key:1,scope:"col"},Hb=Pu("td",{scope:"col"},"user",-1),Vb=Pu("td",{scope:"col"},"system",-1),Gb=Pu("td",{scope:"col"},"idle",-1),Wb=Pu("td",{scope:"col"},"iowait",-1),Kb=Pu("td",{scope:"col"},"steel",-1),Xb={key:0,scope:"col"},Qb={key:1,scope:"col"};const Zb={props:{data:{type:Object}},data:()=>({store:zd}),computed:{args(){return this.store.args||{}},config(){return this.store.config||{}},percpuStats(){return this.data.stats.percpu}},methods:{getUserAlert:t=>Gd.getAlert("percpu","percpu_user_",t.user),getSystemAlert:t=>Gd.getAlert("percpu","percpu_system_",t.system),getIOWaitAlert:t=>Gd.getAlert("percpu","percpu_iowait_",t.system)}},Yb=(0,$m.A)(Zb,[["render",function(t,e,r,n,i,o){return wu(),Eu("section",Bb,[Bu(" d-none d-xl-block d-xxl-block "),Pu("div",$b,[Pu("table",Fb,[Pu("thead",null,[Pu("tr",null,[o.args.disable_quicklook?(wu(),Eu("th",Ub,"CPU")):Bu("v-if",!0),o.args.disable_quicklook?(wu(),Eu("td",zb,"total")):Bu("v-if",!0),Hb,Vb,Gb,Wb,Kb])]),Pu("tbody",null,[(wu(!0),Eu(hu,null,Ec(o.percpuStats,((t,e)=>(wu(),Eu("tr",{key:e},[o.args.disable_quicklook?(wu(),Eu("td",Xb,"CPU"+Cs(t.cpu_number),1)):Bu("v-if",!0),o.args.disable_quicklook?(wu(),Eu("td",Qb,Cs(t.total)+"%",1)):Bu("v-if",!0),Pu("td",{scope:"col",class:ks(o.getUserAlert(t))},Cs(t.user)+"%",3),Pu("td",{scope:"col",class:ks(o.getSystemAlert(t))},Cs(t.system)+"%",3),Ul(Pu("td",{scope:"col"},Cs(t.idle)+"%",513),[[Wp,null!=t.idle]]),Ul(Pu("td",{scope:"col",class:ks(o.getIOWaitAlert(t))},Cs(t.iowait)+"%",3),[[Wp,null!=t.iowait]]),Ul(Pu("td",{scope:"col"},Cs(t.steal)+"%",513),[[Wp,null!=t.steal]])])))),128))])])])])}]]),Jb={key:0,class:"plugin",id:"ports"},ty={class:"table table-sm table-borderless margin-bottom"},ey={scope:"row"},ry={key:0},ny={key:1},iy={key:2},oy={key:3},sy={key:0},ay={key:1},ly={key:2};const cy={props:{data:{type:Object}},computed:{stats(){return this.data.stats.ports},ports(){return this.stats},hasPorts(){return this.ports.length>0}},methods:{getPortDecoration:t=>null===t.status?"careful":!1===t.status?"critical":null!==t.rtt_warning&&t.status>t.rtt_warning?"warning":"ok",getWebDecoration:t=>null===t.status?"careful":-1===[200,301,302].indexOf(t.status)?"critical":null!==t.rtt_warning&&t.elapsed>t.rtt_warning?"warning":"ok"}},uy=(0,$m.A)(cy,[["render",function(t,e,r,n,i,o){return o.hasPorts?(wu(),Eu("section",Jb,[Pu("table",ty,[Pu("tbody",null,[(wu(!0),Eu(hu,null,Ec(o.ports,((e,r)=>(wu(),Eu("tr",{key:r},[Pu("td",ey,[Bu(" prettier-ignore "),Ru(" "+Cs(t.$filters.minSize(e.description?e.description:e.host+" "+e.port,20)),1)]),e.host?(wu(),Eu("td",{key:0,scope:"row",class:ks(["text-end",o.getPortDecoration(e)])},["null"==e.status?(wu(),Eu("span",ry,"Scanning")):"false"==e.status?(wu(),Eu("span",ny,"Timeout")):"true"==e.status?(wu(),Eu("span",iy,"Open")):(wu(),Eu("span",oy,Cs(t.$filters.number(1e3*e.status,0))+"ms",1))],2)):Bu("v-if",!0),e.url?(wu(),Eu("td",{key:1,scope:"row",class:ks(["text-end",o.getPortDecoration(e)])},["null"==e.status?(wu(),Eu("span",sy,"Scanning")):"Error"==e.status?(wu(),Eu("span",ay,"Error")):(wu(),Eu("span",ly,"Code "+Cs(e.status),1))],2)):Bu("v-if",!0)])))),128))])])])):Bu("v-if",!0)}]]),py={key:0},dy={key:1},my={key:0,class:"row"},fy={class:"col-lg-18"};const hy={key:0,id:"amps",class:"plugin"},gy={class:"table table-sm table-borderless"},by={key:0},yy=["innerHTML"];const vy={props:{data:{type:Object}},computed:{stats(){return this.data.stats.amps},processes(){return this.stats.filter((t=>null!==t.result))},hasAmps(){return this.processes.length>0}},methods:{getNameDecoration(t){const e=t.count,r=t.countmin,n=t.countmax;let i="ok";return i=e>0?(null===r||e>=r)&&(null===n||e<=n)?"ok":"careful":null===r?"ok":"critical",i}}},xy=(0,$m.A)(vy,[["render",function(t,e,r,n,i,o){return o.hasAmps?(wu(),Eu("section",hy,[Pu("table",gy,[Pu("tbody",null,[(wu(!0),Eu(hu,null,Ec(o.processes,((e,r)=>(wu(),Eu("tr",{key:r},[Pu("td",{class:ks(o.getNameDecoration(e))},Cs(e.name),3),e.regex?(wu(),Eu("td",by,Cs(e.count),1)):Bu("v-if",!0),Pu("td",{class:"process-result",innerHTML:t.$filters.nl2br(e.result)},null,8,yy)])))),128))])]),Bu('
\n
\n
\n {{ process.name }}\n
\n
{{ process.count }}
\n
\n
\n ')])):Bu("v-if",!0)}]]),wy={class:"plugin",id:"processcount"},_y=Pu("span",{class:"title"},"TASKS",-1),ky={class:"title"};const Ay={props:{data:{type:Object},sorter:{type:Object}},data:()=>({store:zd}),computed:{args(){return this.store.args||{}},stats(){return this.data.stats.processcount},total(){return this.stats.total||0},running(){return this.stats.running||0},sleeping(){return this.stats.sleeping||0},stopped(){return this.stats.stopped||0},thread(){return this.stats.thread||0}}},Sy=(0,$m.A)(Ay,[["render",function(t,e,r,n,i,o){return wu(),Eu("section",wy,[_y,Pu("span",null,Cs(o.total)+" ("+Cs(o.thread)+" thr),",1),Pu("span",null,Cs(o.running)+" run,",1),Pu("span",null,Cs(o.sleeping)+" slp,",1),Pu("span",null,Cs(o.stopped)+" oth",1),Pu("span",null,Cs(o.args.programs?"Programs":"Threads"),1),Pu("span",ky,Cs(r.sorter.auto?"sorted automatically":"sorted"),1),Pu("span",null,"by "+Cs(r.sorter.getColumnLabel(r.sorter.column)),1)])}]]),Ey={key:0,class:"plugin",id:"processlist"},Cy={class:"table table-sm table-borderless table-striped table-hover"},Ty={scope:"col",class:"hidden-xs hidden-sm"},Oy={scope:"col",class:"hidden-xs hidden-sm"},Dy={scope:"col"},Iy={scope:"col"},jy={scope:"col",class:"table-cell widtd-60"},Py={key:0,scope:"row",class:"hidden-xs hidden-sm"},Ny={key:1,class:"plugin",id:"processlist"},Ly={class:"table table-sm table-borderless table-striped table-hover"},My={scope:"col",class:"hidden-xs hidden-sm"},Ry={scope:"col",class:"hidden-xs hidden-sm"},qy={scope:"col"},By={scope:"row"},$y={scope:"row",class:"table-cell widtd-60"};const Fy={props:{data:{type:Object},sorter:{type:Object}},data:()=>({store:zd}),computed:{args(){return this.store.args||{}},config(){return this.store.config||{}},stats_processlist(){return this.data.stats.processlist},processes(){const{sorter:t}=this,e=this.data.stats.isWindows,r=(this.stats_processlist||[]).map((t=>(t.memvirt="?",t.memres="?",t.memory_info&&(t.memvirt=t.memory_info.vms,t.memres=t.memory_info.rss),e&&null!==t.username&&(t.username=(0,Xm.last)(t.username.split("\\"))),t.timeforhuman="?",t.cpu_times&&(t.timeplus=ch([t.cpu_times.user,t.cpu_times.system]),t.timeforhuman=t.timeplus.hours.toString().padStart(2,"0")+":"+t.timeplus.minutes.toString().padStart(2,"0")+":"+t.timeplus.seconds.toString().padStart(2,"0")),null===t.num_threads&&(t.num_threads=-1),null===t.cpu_percent&&(t.cpu_percent=-1),null===t.memory_percent&&(t.memory_percent=-1),t.io_read=null,t.io_write=null,t.io_counters&&(t.io_read=(t.io_counters[0]-t.io_counters[2])/t.time_since_update,t.io_write=(t.io_counters[1]-t.io_counters[3])/t.time_since_update),t.isNice=void 0!==t.nice&&(e&&32!=t.nice||!e&&0!=t.nice),Array.isArray(t.cmdline)&&(t.cmdline=t.cmdline.join(" ").replace(/\n/g," ")),null!==t.cmdline&&0!==t.cmdline.length||(t.cmdline=t.name),t)));return(0,Xm.orderBy)(r,[t.column].reduce(((t,e)=>("io_counters"===e&&(e=["io_read","io_write"]),t.concat(e))),[]),[t.isReverseColumn(t.column)?"desc":"asc"]).slice(0,this.limit)},ioReadWritePresentProcesses(){return(this.stats_processlist||[]).some((({io_counters:t})=>t))},stats_programlist(){return this.data.stats.programlist},programs(){const{sorter:t}=this,e=this.data.stats.isWindows,r=(this.stats_programlist||[]).map((t=>(t.memvirt="?",t.memres="?",t.memory_info&&(t.memvirt=t.memory_info.vms,t.memres=t.memory_info.rss),e&&null!==t.username&&(t.username=(0,Xm.last)(t.username.split("\\"))),t.timeforhuman="?",t.cpu_times&&(t.timeplus=ch([t.cpu_times.user,t.cpu_times.system]),t.timeforhuman=t.timeplus.hours.toString().padStart(2,"0")+":"+t.timeplus.minutes.toString().padStart(2,"0")+":"+t.timeplus.seconds.toString().padStart(2,"0")),null===t.num_threads&&(t.num_threads=-1),null===t.cpu_percent&&(t.cpu_percent=-1),null===t.memory_percent&&(t.memory_percent=-1),t.io_read=null,t.io_write=null,t.io_counters&&(t.io_read=(t.io_counters[0]-t.io_counters[2])/t.time_since_update,t.io_write=(t.io_counters[1]-t.io_counters[3])/t.time_since_update),t.isNice=void 0!==t.nice&&(e&&32!=t.nice||!e&&0!=t.nice),Array.isArray(t.cmdline)&&(t.cmdline=t.cmdline.join(" ").replace(/\n/g," ")),null!==t.cmdline&&0!==t.cmdline.length||(t.cmdline=t.name),t)));return(0,Xm.orderBy)(r,[t.column].reduce(((t,e)=>("io_counters"===e&&(e=["io_read","io_write"]),t.concat(e))),[]),[t.isReverseColumn(t.column)?"desc":"asc"]).slice(0,this.limit)},ioReadWritePresentPrograms(){return(this.stats_programlist||[]).some((({io_counters:t})=>t))},limit(){return void 0!==this.config.outputs?this.config.outputs.max_processes_display:void 0}},methods:{getCpuPercentAlert:t=>Gd.getAlert("processlist","processlist_cpu_",t.cpu_percent),getMemoryPercentAlert:t=>Gd.getAlert("processlist","processlist_mem_",t.cpu_percent),getDisableStats:()=>Gd.getLimit("processlist","processlist_disable_stats")||[]}},Uy={components:{GlancesPluginAmps:xy,GlancesPluginProcesscount:Sy,GlancesPluginProcesslist:(0,$m.A)(Fy,[["render",function(t,e,r,n,i,o){return wu(),Eu(hu,null,[o.args.programs?Bu("v-if",!0):(wu(),Eu("section",Ey,[Bu(" Display processes "),Pu("table",Cy,[Pu("thead",null,[Pu("tr",null,[Ul(Pu("td",{scope:"col",class:ks(["sortable","cpu_percent"===r.sorter.column&&"sort"]),onClick:e[0]||(e[0]=e=>t.$emit("update:sorter","cpu_percent"))}," CPU% ",2),[[Wp,!o.getDisableStats().includes("cpu_percent")]]),Ul(Pu("td",{scope:"col",class:ks(["sortable","memory_percent"===r.sorter.column&&"sort"]),onClick:e[1]||(e[1]=e=>t.$emit("update:sorter","memory_percent"))}," MEM% ",2),[[Wp,!o.getDisableStats().includes("memory_percent")]]),Ul(Pu("td",Ty," VIRT ",512),[[Wp,!o.getDisableStats().includes("memory_info")]]),Ul(Pu("td",Oy," RES ",512),[[Wp,!o.getDisableStats().includes("memory_info")]]),Ul(Pu("td",Dy," PID ",512),[[Wp,!o.getDisableStats().includes("pid")]]),Ul(Pu("td",{scope:"col",class:ks(["sortable","username"===r.sorter.column&&"sort"]),onClick:e[2]||(e[2]=e=>t.$emit("update:sorter","username"))}," USER ",2),[[Wp,!o.getDisableStats().includes("username")]]),Ul(Pu("td",{scope:"col",class:ks(["hidden-xs hidden-sm",["sortable","timemillis"===r.sorter.column&&"sort"]]),onClick:e[3]||(e[3]=e=>t.$emit("update:sorter","timemillis"))}," TIME+ ",2),[[Wp,!o.getDisableStats().includes("cpu_times")]]),Ul(Pu("td",{scope:"col",class:ks(["hidden-xs hidden-sm",["sortable","num_threads"===r.sorter.column&&"sort"]]),onClick:e[4]||(e[4]=e=>t.$emit("update:sorter","num_threads"))}," THR ",2),[[Wp,!o.getDisableStats().includes("num_threads")]]),Ul(Pu("td",Iy,"NI",512),[[Wp,!o.getDisableStats().includes("nice")]]),Ul(Pu("td",jy,"S ",512),[[Wp,!o.getDisableStats().includes("status")]]),Ul(Pu("td",{scope:"col",class:ks(["hidden-xs hidden-sm",["sortable","io_counters"===r.sorter.column&&"sort"]]),onClick:e[5]||(e[5]=e=>t.$emit("update:sorter","io_counters"))}," IOR/s ",2),[[Wp,o.ioReadWritePresentProcesses&&!o.getDisableStats().includes("io_counters")]]),Ul(Pu("td",{scope:"col",class:ks(["text-start hidden-xs hidden-sm",["sortable","io_counters"===r.sorter.column&&"sort"]]),onClick:e[6]||(e[6]=e=>t.$emit("update:sorter","io_counters"))}," IOW/s ",2),[[Wp,o.ioReadWritePresentProcesses&&!o.getDisableStats().includes("io_counters")]]),Ul(Pu("td",{scope:"col",class:ks(["sortable","name"===r.sorter.column&&"sort"]),onClick:e[7]||(e[7]=e=>t.$emit("update:sorter","name"))}," Command ",2),[[Wp,!o.getDisableStats().includes("cmdline")]])])]),Pu("tbody",null,[(wu(!0),Eu(hu,null,Ec(o.processes,((e,r)=>(wu(),Eu("tr",{key:r},[Ul(Pu("td",{scope:"row",class:ks(o.getCpuPercentAlert(e))},Cs(-1==e.cpu_percent?"?":t.$filters.number(e.cpu_percent,1)),3),[[Wp,!o.getDisableStats().includes("cpu_percent")]]),Ul(Pu("td",{scope:"row",class:ks(o.getMemoryPercentAlert(e))},Cs(-1==e.memory_percent?"?":t.$filters.number(e.memory_percent,1)),3),[[Wp,!o.getDisableStats().includes("memory_percent")]]),Ul(Pu("td",{scope:"row"},Cs(t.$filters.bytes(e.memvirt)),513),[[Wp,!o.getDisableStats().includes("memory_info")]]),Ul(Pu("td",{scope:"row"},Cs(t.$filters.bytes(e.memres)),513),[[Wp,!o.getDisableStats().includes("memory_info")]]),Ul(Pu("td",{scope:"row"},Cs(e.pid),513),[[Wp,!o.getDisableStats().includes("pid")]]),Ul(Pu("td",{scope:"row"},Cs(e.username),513),[[Wp,!o.getDisableStats().includes("username")]]),Ul(Pu("td",{scope:"row",class:"hidden-xs hidden-sm"},Cs(e.timeforhuman),513),[[Wp,!o.getDisableStats().includes("cpu_times")]]),"?"==e.timeplus?Ul((wu(),Eu("td",Py,"?",512)),[[Wp,!o.getDisableStats().includes("cpu_times")]]):Bu("v-if",!0),Ul(Pu("td",{scope:"row",class:"hidden-xs hidden-sm"},Cs(-1==e.num_threads?"?":e.num_threads),513),[[Wp,!o.getDisableStats().includes("num_threads")]]),Ul(Pu("td",{scope:"row",class:ks({nice:e.isNice})},Cs(t.$filters.exclamation(e.nice)),3),[[Wp,!o.getDisableStats().includes("nice")]]),Ul(Pu("td",{scope:"row",class:ks({status:"R"==e.status})},Cs(e.status),3),[[Wp,!o.getDisableStats().includes("status")]]),Ul(Pu("td",{scope:"row",class:"hidden-xs hidden-sm"},Cs(t.$filters.bytes(e.io_read)),513),[[Wp,o.ioReadWritePresentProcesses&&!o.getDisableStats().includes("io_counters")]]),Ul(Pu("td",{scope:"row",class:"hidden-xs hidden-sm"},Cs(t.$filters.bytes(e.io_write)),513),[[Wp,o.ioReadWritePresentProcesses&&!o.getDisableStats().includes("io_counters")]]),Ul(Pu("td",{scope:"row",class:"text-truncate"},Cs(e.name),513),[[Wp,o.args.process_short_name&&!o.getDisableStats().includes("cmdline")]]),Ul(Pu("td",{scope:"row"},Cs(e.cmdline),513),[[Wp,!o.args.process_short_name&&!o.getDisableStats().includes("cmdline")]])])))),128))])])])),o.args.programs?(wu(),Eu("section",Ny,[Bu(" Display programs "),Pu("table",Ly,[Pu("thead",null,[Pu("tr",null,[Ul(Pu("td",{scope:"col",class:ks(["sortable","cpu_percent"===r.sorter.column&&"sort"]),onClick:e[8]||(e[8]=e=>t.$emit("update:sorter","cpu_percent"))}," CPU% ",2),[[Wp,!o.getDisableStats().includes("cpu_percent")]]),Ul(Pu("td",{scope:"col",class:ks(["sortable","memory_percent"===r.sorter.column&&"sort"]),onClick:e[9]||(e[9]=e=>t.$emit("update:sorter","memory_percent"))}," MEM% ",2),[[Wp,!o.getDisableStats().includes("memory_percent")]]),Ul(Pu("td",My," VIRT ",512),[[Wp,!o.getDisableStats().includes("memory_info")]]),Ul(Pu("td",Ry," RES ",512),[[Wp,!o.getDisableStats().includes("memory_info")]]),Ul(Pu("td",qy," NPROCS ",512),[[Wp,!o.getDisableStats().includes("nprocs")]]),Ul(Pu("td",{scope:"row",class:ks(["sortable","username"===r.sorter.column&&"sort"]),onClick:e[10]||(e[10]=e=>t.$emit("update:sorter","username"))}," USER ",2),[[Wp,!o.getDisableStats().includes("username")]]),Ul(Pu("td",{scope:"row",class:ks(["hidden-xs hidden-sm",["sortable","timemillis"===r.sorter.column&&"sort"]]),onClick:e[11]||(e[11]=e=>t.$emit("update:sorter","timemillis"))}," TIME+ ",2),[[Wp,!o.getDisableStats().includes("cpu_times")]]),Ul(Pu("td",{scope:"row",class:ks(["hidden-xs hidden-sm",["sortable","num_threads"===r.sorter.column&&"sort"]]),onClick:e[12]||(e[12]=e=>t.$emit("update:sorter","num_threads"))}," THR ",2),[[Wp,!o.getDisableStats().includes("num_threads")]]),Ul(Pu("td",By,"NI",512),[[Wp,!o.getDisableStats().includes("nice")]]),Ul(Pu("td",$y,"S ",512),[[Wp,!o.getDisableStats().includes("status")]]),Ul(Pu("td",{scope:"row",class:ks(["hidden-xs hidden-sm",["sortable","io_counters"===r.sorter.column&&"sort"]]),onClick:e[13]||(e[13]=e=>t.$emit("update:sorter","io_counters"))}," IOR/s ",2),[[Wp,o.ioReadWritePresentPrograms&&!o.getDisableStats().includes("io_counters")]]),Ul(Pu("td",{scope:"row",class:ks(["text-start hidden-xs hidden-sm",["sortable","io_counters"===r.sorter.column&&"sort"]]),onClick:e[14]||(e[14]=e=>t.$emit("update:sorter","io_counters"))}," IOW/s ",2),[[Wp,o.ioReadWritePresentPrograms&&!o.getDisableStats().includes("io_counters")]]),Ul(Pu("td",{scope:"row",class:ks(["sortable","name"===r.sorter.column&&"sort"]),onClick:e[15]||(e[15]=e=>t.$emit("update:sorter","name"))}," Command ",2),[[Wp,!o.getDisableStats().includes("cmdline")]])])]),Pu("tbody",null,[(wu(!0),Eu(hu,null,Ec(o.programs,((e,r)=>(wu(),Eu("tr",{key:r},[Ul(Pu("td",{scope:"row",class:ks(o.getCpuPercentAlert(e))},Cs(-1==e.cpu_percent?"?":t.$filters.number(e.cpu_percent,1)),3),[[Wp,!o.getDisableStats().includes("cpu_percent")]]),Ul(Pu("td",{scope:"row",class:ks(o.getMemoryPercentAlert(e))},Cs(-1==e.memory_percent?"?":t.$filters.number(e.memory_percent,1)),3),[[Wp,!o.getDisableStats().includes("memory_percent")]]),Ul(Pu("td",{scope:"row"},Cs(t.$filters.bytes(e.memvirt)),513),[[Wp,!o.getDisableStats().includes("memory_info")]]),Ul(Pu("td",{scope:"row"},Cs(t.$filters.bytes(e.memres)),513),[[Wp,!o.getDisableStats().includes("memory_info")]]),Ul(Pu("td",{scope:"row"},Cs(e.nprocs),513),[[Wp,!o.getDisableStats().includes("nprocs")]]),Ul(Pu("td",{scope:"row"},Cs(e.username),513),[[Wp,!o.getDisableStats().includes("username")]]),Ul(Pu("td",{scope:"row",class:"hidden-xs hidden-sm"},Cs(e.timeforhuman),513),[[Wp,!o.getDisableStats().includes("cpu_times")]]),Ul(Pu("td",{scope:"row",class:"hidden-xs hidden-sm"},Cs(-1==e.num_threads?"?":e.num_threads),513),[[Wp,!o.getDisableStats().includes("num_threads")]]),Ul(Pu("td",{scope:"row",class:ks({nice:e.isNice})},Cs(t.$filters.exclamation(e.nice)),3),[[Wp,!o.getDisableStats().includes("nice")]]),Ul(Pu("td",{scope:"row",class:ks({status:"R"==e.status})},Cs(e.status),3),[[Wp,!o.getDisableStats().includes("status")]]),Ul(Pu("td",{scope:"row",class:"hidden-xs hidden-sm"},Cs(t.$filters.bytes(e.io_read)),513),[[Wp,o.ioReadWritePresentPrograms&&!o.getDisableStats().includes("io_counters")]]),Ul(Pu("td",{scope:"row",class:"hidden-xs hidden-sm"},Cs(t.$filters.bytes(e.io_write)),513),[[Wp,o.ioReadWritePresentPrograms&&!o.getDisableStats().includes("io_counters")]]),Ul(Pu("td",{scope:"row",class:"text-truncate"},Cs(e.name),513),[[Wp,o.args.process_short_name&&!o.getDisableStats().includes("cmdline")]]),Ul(Pu("td",{scope:"row"},Cs(e.cmdline),513),[[Wp,!o.args.process_short_name&&!o.getDisableStats().includes("cmdline")]])])))),128))])])])):Bu("v-if",!0)],64)}]])},props:{data:{type:Object}},data:()=>({store:zd,sorter:void 0}),computed:{args(){return this.store.args||{}},sortProcessesKey(){return this.args.sort_processes_key}},watch:{sortProcessesKey:{immediate:!0,handler(t){t&&!["cpu_percent","memory_percent","username","timemillis","num_threads","io_counters","name"].includes(t)||(this.sorter={column:this.args.sort_processes_key||"cpu_percent",auto:!this.args.sort_processes_key,isReverseColumn:function(t){return!["username","name"].includes(t)},getColumnLabel:function(t){return{cpu_percent:"CPU consumption",memory_percent:"memory consumption",username:"user name",timemillis:"process time",cpu_times:"process time",io_counters:"disk IO",name:"process name",None:"None"}[t]||t}})}}}},zy=(0,$m.A)(Uy,[["render",function(t,e,r,n,i,o){const s=_c("glances-plugin-processcount"),a=_c("glances-plugin-amps"),l=_c("glances-plugin-processlist");return o.args.disable_process?(wu(),Eu("div",py,"PROCESSES DISABLED (press 'z' to display)")):(wu(),Eu("div",dy,[Nu(s,{sorter:i.sorter,data:r.data},null,8,["sorter","data"]),o.args.disable_amps?Bu("v-if",!0):(wu(),Eu("div",my,[Pu("div",fy,[Nu(a,{data:r.data},null,8,["data"])])])),Nu(l,{sorter:i.sorter,data:r.data,"onUpdate:sorter":e[0]||(e[0]=t=>o.args.sort_processes_key=t)},null,8,["sorter","data"])]))}]]),Hy={id:"quicklook",class:"plugin"},Vy={class:"d-flex justify-content-between"},Gy={class:"text-start text-truncate"},Wy={key:0,class:"text-end d-none d-xxl-block"},Ky={class:"table-responsive"},Xy={class:"table table-sm table-borderless"},Qy={key:0},Zy=Pu("td",{scope:"col"},"CPU",-1),Yy={scope:"col",class:"progress"},Jy=["aria-valuenow"],tv={scope:"col",class:"text-end"},ev={scope:"col"},rv={scope:"col",class:"progress"},nv=["aria-valuenow"],iv={scope:"col",class:"text-end"},ov={scope:"col"},sv={scope:"col",class:"progress"},av=["aria-valuenow"],lv={scope:"col",class:"text-end"};const cv={props:{data:{type:Object}},data:()=>({store:zd}),computed:{args(){return this.store.args||{}},config(){return this.store.config||{}},stats(){return this.data.stats.quicklook},view(){return this.data.views.quicklook},cpu(){return this.stats.cpu},cpu_name(){return this.stats.cpu_name},cpu_hz_current(){return(this.stats.cpu_hz_current/1e6).toFixed(0)},cpu_hz(){return(this.stats.cpu_hz/1e6).toFixed(0)},percpus(){var t=this.stats.percpu.map((({cpu_number:t,total:e})=>({number:t,total:e}))),e=parseInt(this.config.percpu.max_cpu_display);if(this.stats.percpu.length>e){var r=t.sort((function(t,e){return e.total-t.total})),n={number:"x",total:Number((r.slice(e).reduce(((t,{total:e})=>t+e),0)/(this.stats.percpu.length-e)).toFixed(1))};(r=r.slice(0,e)).push(n)}return this.stats.percpu.length<=e?t:r},stats_list_after_cpu(){return this.view.list.filter((t=>!t.includes("cpu")))}},methods:{getDecoration(t){if(void 0!==this.view[t])return this.view[t].decoration.toLowerCase()}}},uv=(0,$m.A)(cv,[["render",function(t,e,r,n,i,o){return wu(),Eu("section",Hy,[Pu("div",Vy,[Pu("span",Gy,Cs(o.cpu_name),1),o.cpu_hz_current?(wu(),Eu("span",Wy,Cs(o.cpu_hz_current)+"/"+Cs(o.cpu_hz)+"Ghz ",1)):Bu("v-if",!0)]),Pu("div",Ky,[Pu("table",Xy,[o.args.percpu?Bu("v-if",!0):(wu(),Eu("tr",Qy,[Zy,Pu("td",Yy,[Pu("div",{class:ks(`progress-bar progress-bar-${o.getDecoration("cpu")}`),role:"progressbar","aria-valuenow":o.cpu,"aria-valuemin":"0","aria-valuemax":"100",style:ys(`width: ${o.cpu}%;`)},"   ",14,Jy)]),Pu("td",tv,Cs(o.cpu)+"%",1)])),o.args.percpu?(wu(!0),Eu(hu,{key:1},Ec(o.percpus,((t,e)=>(wu(),Eu("tr",{key:e},[Pu("td",ev,"CPU"+Cs(t.number),1),Pu("td",rv,[Pu("div",{class:ks(`progress-bar progress-bar-${o.getDecoration("cpu")}`),role:"progressbar","aria-valuenow":t.total,"aria-valuemin":"0","aria-valuemax":"100",style:ys(`width: ${t.total}%;`)},"   ",14,nv)]),Pu("td",iv,Cs(t.total)+"%",1)])))),128)):Bu("v-if",!0),(wu(!0),Eu(hu,null,Ec(o.stats_list_after_cpu,(t=>(wu(),Eu("tr",null,[Pu("td",ov,Cs(t.toUpperCase()),1),Pu("td",sv,[Pu("div",{class:ks(`progress-bar progress-bar-${o.getDecoration(t)}`),role:"progressbar","aria-valuenow":o.stats[t],"aria-valuemin":"0","aria-valuemax":"100",style:ys(`width: ${o.stats[t]}%;`)},"   ",14,av)]),Pu("td",lv,Cs(o.stats[t])+"%",1)])))),256))])])])}]]),pv={key:0,class:"plugin",id:"raid"},dv={class:"table table-sm table-borderless margin-bottom"},mv={scope:"col"},fv=Pu("th",{scope:"col",class:"text-end"},"Used",-1),hv=Pu("th",{scope:"col",class:"text-end"},"Total",-1),gv={scope:"row"},bv={class:"warning"};const yv={props:{data:{type:Object}},computed:{stats(){return this.data.stats.raid},disks(){const t=Object.entries(this.stats).map((([t,e])=>{const r=Object.entries(e.components).map((([t,e])=>({number:e,name:t})));return{name:t,type:null==e.type?"UNKNOWN":e.type,used:e.used,available:e.available,status:e.status,degraded:e.used0}},methods:{getAlert:t=>t.inactive?"critical":t.degraded?"warning":"ok"}},vv=(0,$m.A)(yv,[["render",function(t,e,r,n,i,o){return o.hasDisks?(wu(),Eu("section",pv,[Pu("table",dv,[Pu("thead",null,[Pu("tr",null,[Pu("th",mv,"RAID disks "+Cs(o.disks.length),1),fv,hv])]),Pu("tbody",null,[(wu(!0),Eu(hu,null,Ec(o.disks,((t,e)=>(wu(),Eu("tr",{key:e},[Pu("td",gv,[Ru(Cs(t.type.toUpperCase())+" "+Cs(t.name)+" ",1),Ul(Pu("div",bv,"└─ Degraded mode",512),[[Wp,t.degraded]]),Ul(Pu("div",null,"   └─ "+Cs(t.config),513),[[Wp,t.degraded]]),Ul(Pu("div",{class:"critical"},"└─ Status "+Cs(t.status),513),[[Wp,t.inactive]]),t.inactive?(wu(!0),Eu(hu,{key:0},Ec(t.components,((e,r)=>(wu(),Eu("div",{key:r},"    "+Cs(r===t.components.length-1?"└─":"├─")+" disk "+Cs(e.number)+": "+Cs(e.name),1)))),128)):Bu("v-if",!0)]),Ul(Pu("td",{scope:"row",class:ks(["text-end",o.getAlert(t)])},Cs(t.used),3),[[Wp,"active"==t.status]]),Ul(Pu("td",{scope:"row",class:ks(["text-end",o.getAlert(t)])},Cs(t.available),3),[[Wp,"active"==t.status]])])))),128))])])])):Bu("v-if",!0)}]]),xv={key:0,id:"smart",class:"plugin"},wv={class:"table table-sm table-borderless margin-bottom"},_v=Pu("thead",null,[Pu("tr",null,[Pu("th",{scope:"col"},"SMART DISKS"),Pu("th",{scope:"col",class:"text-end"})])],-1),kv={scope:"row"},Av=Pu("td",{scope:"col",class:"text-end"},null,-1),Sv={scope:"row"},Ev={scope:"row",class:"text-end text-truncate"};const Cv={props:{data:{type:Object}},computed:{stats(){return this.data.stats.smart},drives(){return(Array.isArray(this.stats)?this.stats:[]).map((t=>{const e=t.DeviceName,r=Object.entries(t).filter((([t])=>"DeviceName"!==t)).sort((([,t],[,e])=>t.namee.name?1:0)).map((([t,e])=>e));return{name:e,details:r}}))},hasDrives(){return this.drives.length>0}}},Tv=(0,$m.A)(Cv,[["render",function(t,e,r,n,i,o){return o.hasDrives?(wu(),Eu("section",xv,[Pu("table",wv,[_v,Pu("tbody",null,[(wu(!0),Eu(hu,null,Ec(o.drives,((t,e)=>(wu(),Eu(hu,{key:e},[Pu("tr",null,[Pu("td",kv,Cs(t.name),1),Av]),(wu(!0),Eu(hu,null,Ec(t.details,((t,e)=>(wu(),Eu("tr",{key:e},[Pu("td",Sv,Cs(t.name),1),Pu("td",Ev,Cs(t.raw),1)])))),128))],64)))),128))])])])):Bu("v-if",!0)}]]),Ov={key:0,class:"plugin",id:"sensors"},Dv={class:"table table-sm table-borderless"},Iv=Pu("thead",null,[Pu("tr",null,[Pu("th",{scope:"col"},"SENSORS"),Pu("th",{scope:"col",class:"text-end"})])],-1),jv={scope:"row"};const Pv={props:{data:{type:Object}},data:()=>({store:zd}),computed:{args(){return this.store.args||{}},stats(){return this.data.stats.sensors},view(){return this.data.views.sensors},sensors(){return this.stats.map((t=>(this.args.fahrenheit&&"battery"!=t.type&&"fan_speed"!=t.type&&(t.value=parseFloat(1.8*t.value+32).toFixed(1),t.unit="F"),t)))},hasSensors(){return this.sensors.length>0}},methods:{getDecoration(t){if(void 0!==this.view[t].value.decoration)return this.view[t].value.decoration.toLowerCase()}}},Nv=(0,$m.A)(Pv,[["render",function(t,e,r,n,i,o){return o.hasSensors?(wu(),Eu("section",Ov,[Pu("table",Dv,[Iv,Pu("tbody",null,[(wu(!0),Eu(hu,null,Ec(o.sensors,((t,e)=>(wu(),Eu("tr",{key:e},[Pu("td",jv,Cs(t.label),1),Pu("td",{class:ks(["text-end",o.getDecoration(t.label)])},Cs(t.value)+Cs(t.unit),3)])))),128))])])])):Bu("v-if",!0)}]]),Lv={class:"plugin",id:"system"},Mv={key:0,class:"critical"},Rv={class:"title"};const qv={props:{data:{type:Object}},data:()=>({store:zd}),computed:{stats(){return this.data.stats.system},hostname(){return this.stats.hostname},humanReadableName(){return this.stats.hr_name},isDisconnected(){return"FAILURE"===this.store.status}}},Bv=(0,$m.A)(qv,[["render",function(t,e,r,n,i,o){return wu(),Eu("section",Lv,[o.isDisconnected?(wu(),Eu("span",Mv,"Disconnected from")):Bu("v-if",!0),Pu("span",Rv,Cs(o.hostname),1),Pu("span",null,Cs(o.humanReadableName),1)])}]]),$v={class:"plugin",id:"uptime"};const Fv={props:{data:{type:Object}},computed:{value(){return this.data.stats.uptime}}},Uv=(0,$m.A)(Fv,[["render",function(t,e,r,n,i,o){return wu(),Eu("section",$v,[Pu("span",null,"Uptime: "+Cs(o.value),1)])}]]),zv={key:0,class:"plugin",id:"vms"},Hv=Pu("span",{class:"title"},"VMs",-1),Vv={class:"table table-sm table-borderless table-striped table-hover"},Gv=Pu("td",null,"Status",-1),Wv=Pu("td",null,"Core",-1),Kv=Pu("td",null,"/ MAX",-1),Xv=Pu("td",null,"Release",-1);const Qv={props:{data:{type:Object}},data:()=>({store:zd,sorter:void 0}),computed:{args(){return this.store.args||{}},sortProcessesKey(){return this.args.sort_processes_key},stats(){return this.data.stats.vms},views(){return this.data.views.vms},vms(){const{sorter:t}=this,e=(this.stats||[]).map((t=>({id:t.id,name:t.name,status:null!=t.status?t.status:"?",cpu_count:null!=t.cpu_count?t.cpu_count:"?",memory_usage:null!=t.memory_usage?t.memory_usage:"?",memory_total:null!=t.memory_total?t.memory_total:"?",load_1min:null!=t.load_1min?t.load_1min:"?",load_5min:null!=t.load_5min?t.load_5min:"?",load_15min:null!=t.load_15min?t.load_15min:"?",release:t.release,image:t.image,engine:t.engine,engine_version:t.engine_version})));return(0,Xm.orderBy)(e,[t.column].reduce(((t,e)=>("memory_usage"===e&&(e=["memory_usage"]),t.concat(e))),[]),[t.isReverseColumn(t.column)?"desc":"asc"])},showEngine(){return this.views.show_engine_name}},watch:{sortProcessesKey:{immediate:!0,handler(t){t&&!["load_1min","memory_usage","name"].includes(t)||(this.sorter={column:this.args.sort_processes_key||"load_1min",auto:!this.args.sort_processes_key,isReverseColumn:function(t){return!["name"].includes(t)},getColumnLabel:function(t){return{load_1min:"load",memory_usage:"memory consumption",name:"VM name",None:"None"}[t]||t}})}}}},Zv=(0,$m.A)(Qv,[["render",function(t,e,r,n,i,o){return o.vms.length?(wu(),Eu("section",zv,[Hv,Ul(Pu("span",null,Cs(o.vms.length)+" sorted by "+Cs(i.sorter.getColumnLabel(i.sorter.column)),513),[[Wp,o.vms.length>1]]),Pu("table",Vv,[Pu("thead",null,[Pu("tr",null,[Ul(Pu("td",null,"Engine",512),[[Wp,o.showEngine]]),Pu("td",{class:ks(["sortable","name"===i.sorter.column&&"sort"]),onClick:e[0]||(e[0]=t=>o.args.sort_processes_key="name")}," Name ",2),Gv,Wv,Pu("td",{class:ks(["sortable","memory_usage"===i.sorter.column&&"sort"]),onClick:e[1]||(e[1]=t=>o.args.sort_processes_key="memory_usage")}," MEM ",2),Kv,Pu("td",{class:ks(["sortable","load_1min"===i.sorter.column&&"sort"]),onClick:e[2]||(e[2]=t=>o.args.sort_processes_key="load_1min")}," LOAD 1/5/15min ",2),Xv])]),Pu("tbody",null,[(wu(!0),Eu(hu,null,Ec(o.vms,((e,r)=>(wu(),Eu("tr",{key:r},[Ul(Pu("td",null,Cs(e.engine),513),[[Wp,o.showEngine]]),Pu("td",null,Cs(e.name),1),Pu("td",{class:ks("stopped"==e.status?"careful":"ok")},Cs(e.status),3),Pu("td",null,Cs(t.$filters.number(e.cpu_count,1)),1),Pu("td",null,Cs(t.$filters.bytes(e.memory_usage)),1),Pu("td",null," / "+Cs(t.$filters.bytes(e.memory_total)),1),Pu("td",null,Cs(t.$filters.number(e.load_1min))+"/"+Cs(t.$filters.number(e.load_5min))+"/"+Cs(t.$filters.number(e.load_15min)),1),Pu("td",null,Cs(e.release),1)])))),128))])])])):Bu("v-if",!0)}]]),Yv={key:0,class:"plugin",id:"wifi"},Jv={class:"table table-sm table-borderless margin-bottom"},tx=Pu("thead",null,[Pu("tr",null,[Pu("th",{scope:"col"},"WIFI"),Pu("th",{scope:"col",class:"text-end"},"dBm")])],-1),ex={scope:"row"};const rx={props:{data:{type:Object}},computed:{stats(){return this.data.stats.wifi},view(){return this.data.views.wifi},hotspots(){const t=this.stats.map((t=>{if(""!==t.ssid)return{ssid:t.ssid,quality_level:t.quality_level}})).filter(Boolean);return(0,Xm.orderBy)(t,["ssid"])},hasHotpots(){return this.hotspots.length>0}},methods:{getDecoration(t,e){if(void 0!==this.view[t.ssid][e])return this.view[t.ssid][e].decoration.toLowerCase()}}},nx=(0,$m.A)(rx,[["render",function(t,e,r,n,i,o){return o.hasHotpots?(wu(),Eu("section",Yv,[Pu("table",Jv,[tx,Pu("tbody",null,[(wu(!0),Eu(hu,null,Ec(o.hotspots,((e,r)=>(wu(),Eu("tr",{key:r},[Pu("td",ex,Cs(t.$filters.limitTo(e.ssid,20)),1),Pu("td",{scope:"row",class:ks(["text-end",o.getDecoration(e,"quality_level")])},Cs(e.quality_level),3)])))),128))])])])):Bu("v-if",!0)}]]),ix=JSON.parse('{"H":["network","ports","wifi","connections","diskio","fs","irq","folders","raid","smart","sensors"]}'),ox={components:{GlancesHelp:Fm,GlancesPluginAlert:Zm,GlancesPluginCloud:ef,GlancesPluginConnections:gf,GlancesPluginCpu:zf,GlancesPluginDiskio:ph,GlancesPluginContainers:Eh,GlancesPluginFolders:Ph,GlancesPluginFs:Hh,GlancesPluginGpu:hg,GlancesPluginIp:kg,GlancesPluginIrq:Dg,GlancesPluginLoad:Fg,GlancesPluginMem:sb,GlancesPluginMemswap:bb,GlancesPluginNetwork:Pb,GlancesPluginNow:qb,GlancesPluginPercpu:Yb,GlancesPluginPorts:uy,GlancesPluginProcess:zy,GlancesPluginQuicklook:uv,GlancesPluginRaid:vv,GlancesPluginSensors:Nv,GlancesPluginSmart:Tv,GlancesPluginSystem:Bv,GlancesPluginUptime:Uv,GlancesPluginVms:Zv,GlancesPluginWifi:nx},data:()=>({store:zd}),computed:{args(){return this.store.args||{}},config(){return this.store.config||{}},data(){return this.store.data||{}},dataLoaded(){return void 0!==this.store.data},hasGpu(){return this.store.data.stats.gpu.length>0},isLinux(){return this.store.data.isLinux},title(){const{data:t}=this,e=t.stats&&t.stats.system&&t.stats.system.hostname||"";return e?`${e} - Glances`:"Glances"},leftMenu(){return void 0!==this.config.outputs&&void 0!==this.config.outputs.left_menu?this.config.outputs.left_menu.split(","):ix.H}},watch:{title(){document&&(document.title=this.title)}},methods:{setupHotKeys(){Bd("a",(()=>{this.store.args.sort_processes_key=null})),Bd("c",(()=>{this.store.args.sort_processes_key="cpu_percent"})),Bd("m",(()=>{this.store.args.sort_processes_key="memory_percent"})),Bd("u",(()=>{this.store.args.sort_processes_key="username"})),Bd("p",(()=>{this.store.args.sort_processes_key="name"})),Bd("i",(()=>{this.store.args.sort_processes_key="io_counters"})),Bd("t",(()=>{this.store.args.sort_processes_key="timemillis"})),Bd("shift+A",(()=>{this.store.args.disable_amps=!this.store.args.disable_amps})),Bd("d",(()=>{this.store.args.disable_diskio=!this.store.args.disable_diskio})),Bd("shift+Q",(()=>{this.store.args.enable_irq=!this.store.args.enable_irq})),Bd("f",(()=>{this.store.args.disable_fs=!this.store.args.disable_fs})),Bd("j",(()=>{this.store.args.programs=!this.store.args.programs})),Bd("k",(()=>{this.store.args.disable_connections=!this.store.args.disable_connections})),Bd("n",(()=>{this.store.args.disable_network=!this.store.args.disable_network})),Bd("s",(()=>{this.store.args.disable_sensors=!this.store.args.disable_sensors})),Bd("2",(()=>{this.store.args.disable_left_sidebar=!this.store.args.disable_left_sidebar})),Bd("z",(()=>{this.store.args.disable_process=!this.store.args.disable_process})),Bd("shift+S",(()=>{this.store.args.process_short_name=!this.store.args.process_short_name})),Bd("shift+D",(()=>{this.store.args.disable_containers=!this.store.args.disable_containers})),Bd("b",(()=>{this.store.args.byte=!this.store.args.byte})),Bd("shift+B",(()=>{this.store.args.diskio_iops=!this.store.args.diskio_iops})),Bd("l",(()=>{this.store.args.disable_alert=!this.store.args.disable_alert})),Bd("1",(()=>{this.store.args.percpu=!this.store.args.percpu})),Bd("h",(()=>{this.store.args.help_tag=!this.store.args.help_tag})),Bd("shift+T",(()=>{this.store.args.network_sum=!this.store.args.network_sum})),Bd("shift+U",(()=>{this.store.args.network_cumul=!this.store.args.network_cumul})),Bd("shift+F",(()=>{this.store.args.fs_free_space=!this.store.args.fs_free_space})),Bd("3",(()=>{this.store.args.disable_quicklook=!this.store.args.disable_quicklook})),Bd("6",(()=>{this.store.args.meangpu=!this.store.args.meangpu})),Bd("shift+G",(()=>{this.store.args.disable_gpu=!this.store.args.disable_gpu})),Bd("5",(()=>{this.store.args.disable_quicklook=!this.store.args.disable_quicklook,this.store.args.disable_cpu=!this.store.args.disable_cpu,this.store.args.disable_mem=!this.store.args.disable_mem,this.store.args.disable_memswap=!this.store.args.disable_memswap,this.store.args.disable_load=!this.store.args.disable_load,this.store.args.disable_gpu=!this.store.args.disable_gpu})),Bd("shift+I",(()=>{this.store.args.disable_ip=!this.store.args.disable_ip})),Bd("shift+P",(()=>{this.store.args.disable_ports=!this.store.args.disable_ports})),Bd("shift+V",(()=>{this.store.args.disable_vms=!this.store.args.disable_vms})),Bd("shift+W",(()=>{this.store.args.disable_wifi=!this.store.args.disable_wifi}))}},mounted(){const t=window.__GLANCES__||{},e=isFinite(t["refresh-time"])?parseInt(t["refresh-time"],10):void 0;Wd.init(e),this.setupHotKeys()},beforeUnmount(){Bd.unbind()}};const sx=((...t)=>{const e=Zp().createApp(...t);const{mount:r}=e;return e.mount=t=>{const n=Yp(t);if(!n)return;const i=e._component;Wo(i)||i.render||i.template||(i.template=n.innerHTML),n.innerHTML="";const o=r(n,!1,n instanceof SVGElement);return n instanceof Element&&(n.removeAttribute("v-cloak"),n.setAttribute("data-v-app","")),o},e})((0,$m.A)(ox,[["render",function(t,e,r,n,i,o){const s=_c("glances-help"),a=_c("glances-plugin-system"),l=_c("glances-plugin-ip"),c=_c("glances-plugin-now"),u=_c("glances-plugin-uptime"),p=_c("glances-plugin-cloud"),d=_c("glances-plugin-quicklook"),m=_c("glances-plugin-cpu"),f=_c("glances-plugin-gpu"),h=_c("glances-plugin-mem"),g=_c("glances-plugin-memswap"),b=_c("glances-plugin-load"),y=_c("glances-plugin-vms"),v=_c("glances-plugin-containers"),x=_c("glances-plugin-process"),w=_c("glances-plugin-alert");return o.dataLoaded?o.args.help_tag?(wu(),Cu(s,{key:1})):(wu(),Eu("main",ed,[Pu("div",rd,[Pu("div",nd,[o.args.disable_system?Bu("v-if",!0):(wu(),Eu("div",id,[Nu(a,{data:o.data},null,8,["data"])])),o.args.disable_ip?Bu("v-if",!0):(wu(),Eu("div",od,[Nu(l,{data:o.data},null,8,["data"])])),o.args.disable_now?Bu("v-if",!0):(wu(),Eu("div",sd,[Nu(c,{data:o.data},null,8,["data"])])),o.args.disable_uptime?Bu("v-if",!0):(wu(),Eu("div",ad,[Nu(u,{data:o.data},null,8,["data"])]))]),o.args.disable_cloud?Bu("v-if",!0):(wu(),Eu("div",ld,[Pu("div",cd,[Nu(p,{data:o.data},null,8,["data"])])]))]),Pu("div",{class:ks(["container-fluid",{"top-min":!o.args.percpu,"top-max":o.args.percpu}])},[Pu("div",ud,[Bu(" Quicklook "),o.args.disable_quicklook?Bu("v-if",!0):(wu(),Eu("div",pd,[Nu(d,{data:o.data},null,8,["data"])])),Bu(" CPU "),o.args.disable_cpu&&o.args.percpu?Bu("v-if",!0):(wu(),Eu("div",dd,[Nu(m,{data:o.data},null,8,["data"])])),Bu(' TODO: percpu need to be refactor\n
\n \n
\n
\n \n
'),Bu(" GPU "),!o.args.disable_gpu&&o.hasGpu?(wu(),Eu("div",md,[Nu(f,{data:o.data},null,8,["data"])])):Bu("v-if",!0),Bu(" MEM "),o.args.disable_mem?Bu("v-if",!0):(wu(),Eu("div",fd,[Nu(h,{data:o.data},null,8,["data"])])),Bu(" SWAP "),o.args.disable_memswap?Bu("v-if",!0):(wu(),Eu("div",hd,[Nu(g,{data:o.data},null,8,["data"])])),Bu(" LOAD "),o.args.disable_load?Bu("v-if",!0):(wu(),Eu("div",gd,[Nu(b,{data:o.data},null,8,["data"])]))])],2),Pu("div",bd,[Pu("div",yd,[o.args.disable_left_sidebar?Bu("v-if",!0):(wu(),Eu("div",{key:0,class:ks(["col-3",{"sidebar-min":!o.args.percpu,"sidebar-max":o.args.percpu}])},[(wu(!0),Eu(hu,null,Ec(o.leftMenu,(t=>{return wu(),Eu(hu,null,[o.args[`disable_${t}`]?Bu("v-if",!0):(wu(),Cu((e=`glances-plugin-${t}`,Ko(e)?Ac(wc,e,!1)||e:e||kc),{key:0,id:`plugin-${t}`,data:o.data},null,8,["id","data"]))],64);var e})),256))],2)),Pu("div",{class:ks(["col",{"sidebar-min":!o.args.percpu,"sidebar-max":o.args.percpu}])},[o.args.disable_vms?Bu("v-if",!0):(wu(),Cu(y,{key:0,data:o.data},null,8,["data"])),o.args.disable_containers?Bu("v-if",!0):(wu(),Cu(v,{key:1,data:o.data},null,8,["data"])),Nu(x,{data:o.data},null,8,["data"]),o.args.disable_alert?Bu("v-if",!0):(wu(),Cu(w,{key:2,data:o.data},null,8,["data"]))],2)])])])):(wu(),Eu("div",Jp,td))}]]));sx.config.globalProperties.$filters=e,sx.mount("#app")})()})(); \ No newline at end of file