From 1901fcad05eb3502126d65ce422618d9c9f71b30 Mon Sep 17 00:00:00 2001 From: nicolargo Date: Sun, 27 Apr 2025 14:53:02 +0200 Subject: [PATCH] [WEBUI] Irix mode (per core instead of per CPU percentage) not togglable #3158 --- docs/aoa/ps.rst | 3 ++- .../js/components/plugin-processlist.vue | 23 +++++++++++-------- glances/outputs/static/package-lock.json | 1 + glances/outputs/static/public/glances.js | 2 +- glances/plugins/processlist/__init__.py | 2 +- 5 files changed, 19 insertions(+), 12 deletions(-) diff --git a/docs/aoa/ps.rst b/docs/aoa/ps.rst index a7b603eb..4d491bed 100644 --- a/docs/aoa/ps.rst +++ b/docs/aoa/ps.rst @@ -102,7 +102,8 @@ Columns display ``CPU%`` % of CPU used by the process If Irix/Solaris mode is off ('0' key), the value - is divided by logical core number + is divided by logical core number (the column + name became CPUi) ``MEM%`` % of MEM used by the process (RES divided by the total RAM you have) ``VIRT`` Virtual Memory Size diff --git a/glances/outputs/static/js/components/plugin-processlist.vue b/glances/outputs/static/js/components/plugin-processlist.vue index 384050d7..0848a502 100644 --- a/glances/outputs/static/js/components/plugin-processlist.vue +++ b/glances/outputs/static/js/components/plugin-processlist.vue @@ -11,7 +11,7 @@
CPU Min/Max/Mean: {{ $filters.number(extended_stats.cpu_min, 1) - }}% / {{ + }}% / {{ $filters.number(extended_stats.cpu_max, 1) }}% / {{ $filters.number(extended_stats.cpu_mean, 1) }}% Affinity: @@ -64,7 +64,8 @@ @click="setExtendedStats(process)"> - {{ process.cpu_percent == -1 ? '?' : $filters.number(process.cpu_percent, 1) }} + {{ process.cpu_percent == -1 ? '?' : $filters.number(process.cpu_percent / process.irix, 1) + }} @@ -150,7 +151,8 @@ @click="setExtendedStats(process.pid)"> - {{ process.cpu_percent == -1 ? '?' : $filters.number(process.cpu_percent, 1) }} + {{ process.cpu_percent == -1 ? '?' : $filters.number(process.cpu_percent / process.irix, 1) + }} @@ -237,7 +239,8 @@ - {{ process.cpu_percent == -1 ? '?' : $filters.number(process.cpu_percent, 1) }} + {{ process.cpu_percent == -1 ? '?' : $filters.number(process.cpu_percent / process.irix, 1) + }} @@ -321,7 +324,8 @@ - {{ process.cpu_percent == -1 ? '?' : $filters.number(process.cpu_percent, 1) }} + {{ process.cpu_percent == -1 ? '?' : $filters.number(process.cpu_percent / process.irix, 1) + }} @@ -404,11 +408,11 @@ export default { stats_processlist() { return this.data.stats['processlist']; }, - stats_load() { - return this.data.stats['load']; + stats_core() { + return this.data.stats['core']; }, cpucore() { - return this.stats_load['cpucore']; + return (this.stats_core['log'] !== 0) ? this.stats_core['log'] : 1; }, extended_stats() { return this.stats_processlist.find(item => item['extended_stats'] === true) || null; @@ -543,11 +547,12 @@ export default { process.num_threads = -1; } + process.irix = 1; if (process.cpu_percent === null) { process.cpu_percent = -1; } else { if (args.disable_irix) { - process.cpu_percent = process.cpu_percent / cpucore; + process.irix = cpucore } } diff --git a/glances/outputs/static/package-lock.json b/glances/outputs/static/package-lock.json index d228498a..1454d8d9 100644 --- a/glances/outputs/static/package-lock.json +++ b/glances/outputs/static/package-lock.json @@ -4,6 +4,7 @@ "requires": true, "packages": { "": { + "name": "static", "dependencies": { "bootstrap": "^5.3.5", "favico.js": "^0.3.10", diff --git a/glances/outputs/static/public/glances.js b/glances/outputs/static/public/glances.js index acaf91c6..c0e16b1f 100644 --- a/glances/outputs/static/public/glances.js +++ b/glances/outputs/static/public/glances.js @@ -53,4 +53,4 @@ let pp;const dp="undefined"!=typeof window&&window.trustedTypes;if(dp)try{pp=dp. * Licensed under the MIT license */ -const fd="undefined"!=typeof navigator&&navigator.userAgent.toLowerCase().indexOf("firefox")>0;function hd(t,e,r,n){t.addEventListener?t.addEventListener(e,r,n):t.attachEvent&&t.attachEvent("on".concat(e),r)}function gd(t,e,r,n){t.removeEventListener?t.removeEventListener(e,r,n):t.detachEvent&&t.detachEvent("on".concat(e),r)}function bd(t,e){const r=e.slice(0,e.length-1);for(let e=0;e=0;)e[r-1]+=",",e.splice(r,1),r=e.lastIndexOf("");return e}const vd={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,"-":fd?173:189,"=":fd?61:187,";":fd?59:186,"'":222,"[":219,"]":221,"\\":220},xd={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,command:91},wd={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},_d={16:!1,18:!1,17:!1,91:!1},kd={};for(let t=1;t<20;t++)vd["f".concat(t)]=111+t;let Sd=[],Ad=null,Ed="all";const Cd=new Map,Td=t=>vd[t.toLowerCase()]||xd[t.toLowerCase()]||t.toUpperCase().charCodeAt(0);function Od(t){Ed=t||"all"}function Dd(){return Ed||"all"}function Id(t){if(void 0===t)Object.keys(kd).forEach((t=>{Array.isArray(kd[t])&&kd[t].forEach((t=>Pd(t))),delete kd[t]})),Md(null);else if(Array.isArray(t))t.forEach((t=>{t.key&&Pd(t)}));else if("object"==typeof t)t.key&&Pd(t);else if("string"==typeof t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n{let{key:e,scope:r,method:n,splitKey:i="+"}=t;yd(e).forEach((t=>{const e=t.split(i),o=e.length,s=e[o-1],a="*"===s?"*":Td(s);if(!kd[a])return;r||(r=Dd());const l=o>1?bd(xd,e):[],c=[];kd[a]=kd[a].filter((t=>{const e=(!n||t.method===n)&&t.scope===r&&function(t,e){const r=t.length>=e.length?t:e,n=t.length>=e.length?e:t;let i=!0;for(let t=0;tMd(t)))}))};function jd(t,e,r,n){if(e.element!==n)return;let i;if(e.scope===r||"all"===e.scope){i=e.mods.length>0;for(const t in _d)Object.prototype.hasOwnProperty.call(_d,t)&&(!_d[t]&&e.mods.indexOf(+t)>-1||_d[t]&&-1===e.mods.indexOf(+t))&&(i=!1);(0!==e.mods.length||_d[16]||_d[18]||_d[17]||_d[91])&&!i&&"*"!==e.shortcut||(e.keys=[],e.keys=e.keys.concat(Sd),!1===e.method(t,e)&&(t.preventDefault?t.preventDefault():t.returnValue=!1,t.stopPropagation&&t.stopPropagation(),t.cancelBubble&&(t.cancelBubble=!0)))}}function Ld(t,e){const r=kd["*"];let n=t.keyCode||t.which||t.charCode;if(!Nd.filter.call(this,t))return;if(93!==n&&224!==n||(n=91),-1===Sd.indexOf(n)&&229!==n&&Sd.push(n),["metaKey","ctrlKey","altKey","shiftKey"].forEach((e=>{const r=wd[e];t[e]&&-1===Sd.indexOf(r)?Sd.push(r):!t[e]&&Sd.indexOf(r)>-1?Sd.splice(Sd.indexOf(r),1):"metaKey"===e&&t[e]&&(Sd=Sd.filter((t=>t in wd||t===n)))})),n in _d){_d[n]=!0;for(const t in xd)xd[t]===n&&(Nd[t]=!0);if(!r)return}for(const e in _d)Object.prototype.hasOwnProperty.call(_d,e)&&(_d[e]=t[wd[e]]);t.getModifierState&&(!t.altKey||t.ctrlKey)&&t.getModifierState("AltGraph")&&(-1===Sd.indexOf(17)&&Sd.push(17),-1===Sd.indexOf(18)&&Sd.push(18),_d[17]=!0,_d[18]=!0);const i=Dd();if(r)for(let n=0;n1&&(i=bd(xd,t)),(t="*"===(t=t[t.length-1])?"*":Td(t))in kd||(kd[t]=[]),kd[t].push({keyup:l,keydown:c,scope:o,mods:i,shortcut:n[a],method:r,key:n[a],splitKey:u,element:s});if(void 0!==s&&window){if(!Cd.has(s)){const t=function(){return Ld(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.event,s)},e=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.event;Ld(t,s),function(t){let e=t.keyCode||t.which||t.charCode;const r=Sd.indexOf(e);if(r>=0&&Sd.splice(r,1),t.key&&"meta"===t.key.toLowerCase()&&Sd.splice(0,Sd.length),93!==e&&224!==e||(e=91),e in _d){_d[e]=!1;for(const t in xd)xd[t]===e&&(Nd[t]=!1)}}(t)};Cd.set(s,{keydownListener:t,keyupListenr:e,capture:p}),hd(s,"keydown",t,p),hd(s,"keyup",e,p)}if(!Ad){const t=()=>{Sd=[]};Ad={listener:t,capture:p},hd(window,"focus",t,p)}}}function Md(t){const e=Object.values(kd).flat();if(e.findIndex((e=>{let{element:r}=e;return r===t}))<0){const{keydownListener:e,keyupListenr:r,capture:n}=Cd.get(t)||{};e&&r&&(gd(t,"keyup",r,n),gd(t,"keydown",e,n),Cd.delete(t))}if(e.length<=0||Cd.size<=0){if(Object.keys(Cd).forEach((t=>{const{keydownListener:e,keyupListenr:r,capture:n}=Cd.get(t)||{};e&&r&&(gd(t,"keyup",r,n),gd(t,"keydown",e,n),Cd.delete(t))})),Cd.clear(),Object.keys(kd).forEach((t=>delete kd[t])),Ad){const{listener:t,capture:e}=Ad;gd(window,"focus",t,e),Ad=null}}}const Rd={getPressedKeyString:function(){return Sd.map((t=>{return e=t,Object.keys(vd).find((t=>vd[t]===e))||(t=>Object.keys(xd).find((e=>xd[e]===t)))(t)||String.fromCharCode(t);var e}))},setScope:Od,getScope:Dd,deleteScope:function(t,e){let r,n;t||(t=Dd());for(const e in kd)if(Object.prototype.hasOwnProperty.call(kd,e))for(r=kd[e],n=0;n{let{element:e}=t;return Md(e)}))}else n++;Dd()===t&&Od(e||"all")},getPressedKeyCodes:function(){return Sd.slice(0)},getAllKeyCodes:function(){const t=[];return Object.keys(kd).forEach((e=>{kd[e].forEach((e=>{let{key:r,scope:n,mods:i,shortcut:o}=e;t.push({scope:n,shortcut:o,mods:i,keys:r.split("+").map((t=>Td(t)))})}))})),t},isPressed:function(t){return"string"==typeof t&&(t=Td(t)),-1!==Sd.indexOf(t)},filter:function(t){const e=t.target||t.srcElement,{tagName:r}=e;let n=!0;const i="INPUT"===r&&!["checkbox","radio","range","button","file","reset","submit","color"].includes(e.type);return(e.isContentEditable||(i||"TEXTAREA"===r||"SELECT"===r)&&!e.readOnly)&&(n=!1),n},trigger:function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"all";Object.keys(kd).forEach((r=>{kd[r].filter((r=>r.scope===e&&r.shortcut===t)).forEach((t=>{t&&t.method&&t.method()}))}))},unbind:Id,keyMap:vd,modifier:xd,modifierMap:wd};for(const t in Rd)Object.prototype.hasOwnProperty.call(Rd,t)&&(Nd[t]=Rd[t]);if("undefined"!=typeof window){const t=window.hotkeys;Nd.noConflict=e=>(e&&window.hotkeys===Nd&&(window.hotkeys=t),Nd),window.hotkeys=Nd}const qd=Ra({args:void 0,config:void 0,data:void 0,status:"IDLE"});var Bd=r(4644),$d=r.n(Bd);const Ud=new class{limits={};limitSuffix=["critical","careful","warning"];setLimits(t){this.limits=t}getLimit(t,e){return null!=this.limits[t]&&null!=this.limits[t][e]?this.limits[t][e]:null}getAlert(t,e,r,n,i){var o=(i=i||!1)?"_log":"",s=100*(r=r||0)/(n=n||100);if(null!=this.limits[t])for(var a=0;a=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 Fd=new class{data=void 0;init(t=60){let e;const r=()=>(qd.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,qd.data=e,qd.status="SUCCESS"})).catch((t=>{console.log(t),qd.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=>{Ud.setLimits(t)})),fetch("api/4/args",{method:"GET"}).then((t=>t.json())).then(((t={})=>{qd.args={...qd.args,...t}})),fetch("api/4/config",{method:"GET"}).then((t=>t.json())).then(((t={})=>{qd.config={...qd.config,...t}}))}getData(){return this.data}};const zd=new class{constructor(){this.favico=new($d())({animation:"none"})}badge(t){this.favico.badge(t)}reset(){this.favico.reset()}},Hd={key:0},Vd={class:"container-fluid"},Gd={class:"row"},Wd={class:"col-sm-12 col-lg-24 title"},Kd={class:"row"},Xd={class:"col-sm-12 col-lg-24"},Qd={class:"table table-sm table-borderless table-striped table-hover"};const Zd={data:()=>({help:void 0}),mounted(){fetch("api/4/help",{method:"GET"}).then((t=>t.json())).then((t=>this.help=t))}};var Yd=r(6262);const Jd=(0,Yd.A)(Zd,[["render",function(t,e,r,n,i,o){return i.help?(xu(),Au("div",Hd,[Iu("div",Vd,[Iu("div",Gd,[Iu("div",Wd,As(i.help.version)+" "+As(i.help.psutil_version),1)]),e[0]||(e[0]=Iu("div",{class:"row"}," ",-1)),Iu("div",Kd,[Iu("div",Xd,As(i.help.configuration_file),1)]),e[1]||(e[1]=Iu("div",{class:"row"}," ",-1))]),Iu("table",Qd,[Iu("thead",null,[Iu("tr",null,[Iu("th",null,As(i.help.header_sort.replace(":","")),1),Iu("th",null,As(i.help.header_show_hide.replace(":","")),1),Iu("th",null,As(i.help.header_toggle.replace(":","")),1),Iu("th",null,As(i.help.header_miscellaneous.replace(":","")),1)])]),Iu("tbody",null,[Iu("tr",null,[Iu("td",null,As(i.help.sort_auto),1),Iu("td",null,As(i.help.show_hide_application_monitoring),1),Iu("td",null,As(i.help.toggle_bits_bytes),1),Iu("td",null,As(i.help.misc_erase_process_filter),1)]),Iu("tr",null,[Iu("td",null,As(i.help.sort_cpu),1),Iu("td",null,As(i.help.show_hide_diskio),1),Iu("td",null,As(i.help.toggle_count_rate),1),Iu("td",null,As(i.help.misc_generate_history_graphs),1)]),Iu("tr",null,[Iu("td",null,As(i.help.sort_io_rate),1),Iu("td",null,As(i.help.show_hide_containers),1),Iu("td",null,As(i.help.toggle_used_free),1),Iu("td",null,As(i.help.misc_help),1)]),Iu("tr",null,[Iu("td",null,As(i.help.sort_mem),1),Iu("td",null,As(i.help.show_hide_top_extended_stats),1),Iu("td",null,As(i.help.toggle_bar_sparkline),1),Iu("td",null,As(i.help.misc_accumulate_processes_by_program),1)]),Iu("tr",null,[Iu("td",null,As(i.help.sort_process_name),1),Iu("td",null,As(i.help.show_hide_filesystem),1),Iu("td",null,As(i.help.toggle_separate_combined),1),e[2]||(e[2]=Iu("td",null," ",-1))]),Iu("tr",null,[Iu("td",null,As(i.help.sort_cpu_times),1),Iu("td",null,As(i.help.show_hide_gpu),1),Iu("td",null,As(i.help.toggle_live_cumulative),1),Iu("td",null,As(i.help.misc_reset_processes_summary_min_max),1)]),Iu("tr",null,[Iu("td",null,As(i.help.sort_user),1),Iu("td",null,As(i.help.show_hide_ip),1),Iu("td",null,As(i.help.toggle_linux_percentage),1),Iu("td",null,As(i.help.misc_quit),1)]),Iu("tr",null,[e[3]||(e[3]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_tcp_connection),1),Iu("td",null,As(i.help.toggle_cpu_individual_combined),1),Iu("td",null,As(i.help.misc_reset_history),1)]),Iu("tr",null,[e[4]||(e[4]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_alert),1),Iu("td",null,As(i.help.toggle_gpu_individual_combined),1),Iu("td",null,As(i.help.misc_delete_warning_alerts),1)]),Iu("tr",null,[e[5]||(e[5]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_network),1),Iu("td",null,As(i.help.toggle_short_full),1),Iu("td",null,As(i.help.misc_delete_warning_and_critical_alerts),1)]),Iu("tr",null,[e[6]||(e[6]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.sort_cpu_times),1),e[7]||(e[7]=Iu("td",null," ",-1)),e[8]||(e[8]=Iu("td",null," ",-1))]),Iu("tr",null,[e[9]||(e[9]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_irq),1),e[10]||(e[10]=Iu("td",null," ",-1)),e[11]||(e[11]=Iu("td",null," ",-1))]),Iu("tr",null,[e[12]||(e[12]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_raid_plugin),1),e[13]||(e[13]=Iu("td",null," ",-1)),e[14]||(e[14]=Iu("td",null," ",-1))]),Iu("tr",null,[e[15]||(e[15]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_sensors),1),e[16]||(e[16]=Iu("td",null," ",-1)),e[17]||(e[17]=Iu("td",null," ",-1))]),Iu("tr",null,[e[18]||(e[18]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_wifi_module),1),e[19]||(e[19]=Iu("td",null," ",-1)),e[20]||(e[20]=Iu("td",null," ",-1))]),Iu("tr",null,[e[21]||(e[21]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_processes),1),e[22]||(e[22]=Iu("td",null," ",-1)),e[23]||(e[23]=Iu("td",null," ",-1))]),Iu("tr",null,[e[24]||(e[24]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_left_sidebar),1),e[25]||(e[25]=Iu("td",null," ",-1)),e[26]||(e[26]=Iu("td",null," ",-1))]),Iu("tr",null,[e[27]||(e[27]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_quick_look),1),e[28]||(e[28]=Iu("td",null," ",-1)),e[29]||(e[29]=Iu("td",null," ",-1))]),Iu("tr",null,[e[30]||(e[30]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_cpu_mem_swap),1),e[31]||(e[31]=Iu("td",null," ",-1)),e[32]||(e[32]=Iu("td",null," ",-1))]),Iu("tr",null,[e[33]||(e[33]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_all),1),e[34]||(e[34]=Iu("td",null," ",-1)),e[35]||(e[35]=Iu("td",null," ",-1))])])]),e[36]||(e[36]=Mu('
 

For an exhaustive list of key bindings, click here.

 

Press h to came back to Glances.

',5))])):Ru("v-if",!0)}]]),tm={id:"alerts",class:"plugin"},em={key:0,class:"title"},rm={key:1,class:"title"},nm={class:"table table-sm table-borderless"},im={scope:"row"},om={scope:"row"},sm={scope:"row"};var am=r(2543);const lm={props:{data:{type:Object}},computed:{stats(){return this.data.stats.alert},alerts(){return(this.stats||[]).map((t=>{const e={};if(e.state=t.state,e.type=t.type,e.begin=1e3*t.begin,e.end=1e3*t.end,e.ongoing=-1==t.end,e.min=t.min,e.avg=t.avg,e.max=t.max,t.top.length>0&&(e.top=": "+t.top.join(", ")),!e.ongoing){const t=e.end-e.begin,r=parseInt(t/1e3%60),n=parseInt(t/6e4%60),i=parseInt(t/36e5%24);e.duration=(0,am.padStart)(i,2,"0")+":"+(0,am.padStart)(n,2,"0")+":"+(0,am.padStart)(r,2,"0")}return e}))},hasAlerts(){return this.countAlerts>0},countAlerts(){return this.alerts.length},hasOngoingAlerts(){return this.countOngoingAlerts>0},countOngoingAlerts(){return this.alerts.filter((({ongoing:t})=>t)).length}},watch:{countOngoingAlerts(){this.countOngoingAlerts?zd.badge(this.countOngoingAlerts):zd.reset()}},methods:{formatDate(t){const e=(new Date).getTimezoneOffset(),r=Math.trunc(Math.abs(e)/60),n=Math.abs(e%60);let i=e<=0?"+":"-";i+=String(r).padStart(2,"0")+String(n).padStart(2,"0");const o=new Date(t);return String(o.getFullYear())+"-"+String(o.getMonth()+1).padStart(2,"0")+"-"+String(o.getDate()).padStart(2,"0")+" "+String(o.getHours()).padStart(2,"0")+":"+String(o.getMinutes()).padStart(2,"0")+":"+String(o.getSeconds()).padStart(2,"0")+"("+i+")"},clear(){fetch("api/4/events/clear/all",{method:"POST",headers:{"Content-Type":"application/json"}}).then((t=>t.json())).then((t=>product.value=t))}}},cm=(0,Yd.A)(lm,[["render",function(t,e,r,n,i,o){return xu(),Au("section",tm,[o.hasAlerts?(xu(),Au("span",em,[Nu(" Warning or critical alerts (last "+As(o.countAlerts)+" entries) ",1),Iu("span",null,[Iu("button",{class:"button",onClick:e[0]||(e[0]=t=>o.clear())},"Clear alerts")])])):(xu(),Au("span",rm,"No warning or critical alert detected")),Iu("table",nm,[Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.alerts,((e,r)=>(xu(),Au("tr",{key:r},[Iu("td",im,[Iu("span",null,As(o.formatDate(e.begin)),1)]),Iu("td",om,[Iu("span",null,"("+As(e.ongoing?"ongoing":e.duration)+")",1)]),Iu("td",sm,[Al(Iu("span",null,As(e.state)+" on ",513),[[xp,!e.ongoing]]),Iu("span",{class:xs(e.state.toLowerCase())},As(e.type),3),Iu("span",null,"("+As(t.$filters.number(e.max,1))+")",1),Iu("span",null,As(e.top),1)])])))),128))])])])}]]),um={key:0,id:"cloud",class:"plugin"},pm={class:"title"};const dm={props:{data:{type:Object}},computed:{stats(){return this.data.stats.cloud},provider(){return void 0!==this.stats.id?`${stats.platform}`:null},instance(){const{stats:t}=this;return void 0!==this.stats.id?`${t.type} instance ${t.name} (${t.region})`:null}}},mm=(0,Yd.A)(dm,[["render",function(t,e,r,n,i,o){return o.instance||o.provider?(xu(),Au("section",um,[Iu("span",pm,As(o.provider),1),Nu(" "+As(o.instance),1)])):Ru("v-if",!0)}]]),fm={id:"connections",class:"plugin"},hm={class:"table table-sm table-borderless margin-bottom"},gm={class:"text-end"},bm={class:"text-end"},ym={class:"text-end"},vm={class:"text-end"};const xm={props:{data:{type:Object}},computed:{stats(){return this.data.stats.connections},view(){return this.data.views.connections},listen(){return this.stats.LISTEN},initiated(){return this.stats.initiated},established(){return this.stats.ESTABLISHED},terminated(){return this.stats.terminated},tracked(){return{count:this.stats.nf_conntrack_count,max:this.stats.nf_conntrack_max}}},methods:{getDecoration(t){if(void 0!==this.view[t])return this.view[t].decoration.toLowerCase()}}},wm=(0,Yd.A)(xm,[["render",function(t,e,r,n,i,o){return xu(),Au("section",fm,[Iu("table",hm,[e[5]||(e[5]=Iu("thead",null,[Iu("tr",null,[Iu("th",{scope:"col"},"TCP CONNECTIONS"),Iu("th",{scope:"col",class:"text-end"})])],-1)),Iu("tbody",null,[Iu("tr",null,[e[0]||(e[0]=Iu("td",{scope:"row"},"Listen",-1)),Iu("td",gm,As(o.listen),1)]),Iu("tr",null,[e[1]||(e[1]=Iu("td",{scope:"row"},"Initiated",-1)),Iu("td",bm,As(o.initiated),1)]),Iu("tr",null,[e[2]||(e[2]=Iu("td",{scope:"row"},"Established",-1)),Iu("td",ym,As(o.established),1)]),Iu("tr",null,[e[3]||(e[3]=Iu("td",{scope:"row"},"Terminated",-1)),Iu("td",vm,As(o.terminated),1)]),Iu("tr",null,[e[4]||(e[4]=Iu("td",{scope:"row"},"Tracked",-1)),Iu("td",{class:xs(["text-end",o.getDecoration("nf_conntrack_percent")])},As(o.tracked.count)+"/"+As(o.tracked.max),3)])])])])}]]),_m={id:"cpu",class:"plugin"},km={class:"table-responsive"},Sm={class:"table-sm table-borderless"},Am={class:"justify-content-between"},Em={scope:"col"},Cm={class:"table table-sm table-borderless"},Tm={key:0,scope:"col"},Om={class:"d-none d-xl-block d-xxl-block"},Dm={class:"table table-sm table-borderless"},Im={scope:"col"},Pm={scope:"col",class:"text-end"},jm={scope:"col"},Lm={scope:"col",class:"text-end"},Nm={scope:"col"},Mm={scope:"col",class:"text-end"},Rm={key:0,scope:"col"},qm={scope:"col"},Bm={class:"d-none d-xxl-block"},$m={class:"table table-sm table-borderless"},Um={key:0,scope:"col"},Fm={scope:"col"},zm={scope:"col",class:"text-end"},Hm={key:0,scope:"col"},Vm={key:1,scope:"col",class:"text-end"},Gm={key:0,scope:"col"},Wm={key:1,scope:"col",class:"text-end"};const Km={props:{data:{type:Object}},computed:{stats(){return this.data.stats.cpu},view(){return this.data.views.cpu},isLinux(){return this.data.isLinux},isSunOS(){return this.data.isSunOS},isWindows(){return this.data.isWindows},total(){return this.stats.total},user(){return this.stats.user},system(){return this.stats.system},idle(){return this.stats.idle},nice(){return this.stats.nice},irq(){return this.stats.irq},iowait(){return this.stats.iowait},dpc(){return this.stats.dpc},steal(){return this.stats.steal},guest(){return this.stats.guest},ctx_switches(){const{stats:t}=this;return t.ctx_switches?Math.floor(t.ctx_switches/t.time_since_update):null},interrupts(){const{stats:t}=this;return t.interrupts?Math.floor(t.interrupts/t.time_since_update):null},soft_interrupts(){const{stats:t}=this;return t.soft_interrupts?Math.floor(t.soft_interrupts/t.time_since_update):null},syscalls(){const{stats:t}=this;return t.syscalls?Math.floor(t.syscalls/t.time_since_update):null}},methods:{getDecoration(t){if(void 0!==this.view[t])return this.view[t].decoration.toLowerCase()}}},Xm=(0,Yd.A)(Km,[["render",function(t,e,r,n,i,o){return xu(),Au("section",_m,[Ru(" d-none d-xxl-block "),Iu("div",km,[Iu("table",Sm,[Iu("tbody",null,[Iu("tr",Am,[Iu("td",Em,[Iu("table",Cm,[Iu("tbody",null,[Iu("tr",null,[e[0]||(e[0]=Iu("th",{scope:"col"},"CPU",-1)),Iu("td",{scope:"col",class:xs(["text-end",o.getDecoration("total")])},[Iu("span",null,As(o.total)+"%",1)],2)]),Iu("tr",null,[e[1]||(e[1]=Iu("td",{scope:"col"},"user:",-1)),Iu("td",{scope:"col",class:xs(["text-end",o.getDecoration("user")])},[Iu("span",null,As(o.user)+"%",1)],2)]),Iu("tr",null,[e[2]||(e[2]=Iu("td",{scope:"col"},"system:",-1)),Iu("td",{scope:"col",class:xs(["text-end",o.getDecoration("system")])},[Iu("span",null,As(o.system)+"%",1)],2)]),Iu("tr",null,[null!=o.iowait?(xu(),Au("td",Tm,"iowait:")):Ru("v-if",!0),null!=o.iowait?(xu(),Au("td",{key:1,scope:"col",class:xs(["text-end",o.getDecoration("iowait")])},[Iu("span",null,As(o.iowait)+"%",1)],2)):Ru("v-if",!0)])])])]),Iu("td",null,[Iu("template",Om,[Iu("table",Dm,[Iu("tbody",null,[Iu("tr",null,[Al(Iu("td",Im,"idle:",512),[[xp,null!=o.idle]]),Al(Iu("td",Pm,[Iu("span",null,As(o.idle)+"%",1)],512),[[xp,null!=o.idle]])]),Iu("tr",null,[Al(Iu("td",jm,"irq:",512),[[xp,null!=o.irq]]),Al(Iu("td",Lm,[Iu("span",null,As(o.irq)+"%",1)],512),[[xp,null!=o.irq]])]),Iu("tr",null,[Al(Iu("td",Nm,"nice:",512),[[xp,null!=o.nice]]),Al(Iu("td",Mm,[Iu("span",null,As(o.nice)+"%",1)],512),[[xp,null!=o.nice]])]),Iu("tr",null,[null==o.iowait&&null!=o.dpc?(xu(),Au("td",Rm,"dpc:")):Ru("v-if",!0),null==o.iowait&&null!=o.dpc?(xu(),Au("td",{key:1,scope:"col",class:xs(["text-end",o.getDecoration("dpc")])},[Iu("span",null,As(o.dpc)+"%",1)],2)):Ru("v-if",!0),Al(Iu("td",qm,"steal:",512),[[xp,null!=o.steal]]),Al(Iu("td",{scope:"col",class:xs(["text-end",o.getDecoration("steal")])},[Iu("span",null,As(o.steal)+"%",1)],2),[[xp,null!=o.steal]])])])])])]),Iu("td",null,[Iu("template",Bm,[Iu("table",$m,[Iu("tbody",null,[Iu("tr",null,[null!=o.nice&&null!=o.ctx_switches?(xu(),Au("td",Um," ctx_sw:")):Ru("v-if",!0),null!=o.nice&&null!=o.ctx_switches?(xu(),Au("td",{key:1,scope:"col",class:xs(["text-end",o.getDecoration("ctx_switches")])},[Iu("span",null,As(o.ctx_switches),1)],2)):Ru("v-if",!0)]),Iu("tr",null,[Al(Iu("td",Fm,"inter:",512),[[xp,null!=o.interrupts]]),Al(Iu("td",zm,[Iu("span",null,As(o.interrupts),1)],512),[[xp,null!=o.interrupts]])]),Iu("tr",null,[o.isWindows||o.isSunOS||null==o.soft_interrupts?Ru("v-if",!0):(xu(),Au("td",Hm,"sw_int: ")),o.isWindows||o.isSunOS||null==o.soft_interrupts?Ru("v-if",!0):(xu(),Au("td",Vm,[Iu("span",null,As(o.soft_interrupts),1)]))]),Iu("tr",null,[o.isLinux&&null!=o.guest?(xu(),Au("td",Gm,"guest:")):Ru("v-if",!0),o.isLinux&&null!=o.guest?(xu(),Au("td",Wm,[Iu("span",null,As(o.guest)+"%",1)])):Ru("v-if",!0)])])])])])])])])])])}]]),Qm={key:0,id:"diskio",class:"plugin"},Zm={class:"table table-sm table-borderless margin-bottom"},Ym={scope:"col",class:"text-end w-25"},Jm={scope:"col",class:"text-end w-25"},tf={scope:"col",class:"text-end w-25"},ef={scope:"col",class:"text-end w-25"},rf={scope:"row",class:"text-truncate"};var nf=r(4728),of=r.n(nf);function sf(t,e){return af(t=8*Math.round(t),e)+"b"}function af(t,e){if(e=e||!1,isNaN(parseFloat(t))||!isFinite(t)||0==t)return t;const r=["Y","Z","E","P","T","G","M","K"],n={Y:12089258196146292e8,Z:11805916207174113e5,E:0x1000000000000000,P:0x4000000000000,T:1099511627776,G:1073741824,M:1048576,K:1024};for(var i=0;i1){var a=0;return s<10?a=2:s<100&&(a=1),e?a="MK"==o?0:(0,am.min)([1,a]):"K"==o&&(a=0),parseFloat(s).toFixed(a)+o}}return t.toFixed(0)}function lf(t){return void 0===t||""===t?"?":t}function cf(t,e,r){return e=e||0,r=r||" ",String(t).padStart(e,r)}function uf(t,e){return"function"!=typeof t.slice&&(t=String(t)),t.slice(0,e)}function pf(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 df(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 of()(r)}function mf(t,e){return void 0===t||isNaN(t)?"-":new Intl.NumberFormat("en-US","number"==typeof e?{maximumFractionDigits:e}:e).format(t)}function ff(t){for(var e=0,r=0;r`${t}: ${e}`)).join(" / ")}const bf={props:{data:{type:Object}},data:()=>({store:qd}),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:af(t.read_bytes_rate_per_sec),rxps:af(t.write_bytes_rate_per_sec)},count:{txps:af(t.read_count_rate_per_sec),rxps:af(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,am.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()}}},yf=(0,Yd.A)(bf,[["render",function(t,e,r,n,i,o){return o.hasDisks?(xu(),Au("section",Qm,[Iu("table",Zm,[Iu("thead",null,[Iu("tr",null,[e[0]||(e[0]=Iu("th",{scope:"col"},"DISK I/O",-1)),Al(Iu("th",Ym,"Rps",512),[[xp,!o.args.diskio_iops]]),Al(Iu("th",Jm,"Wps",512),[[xp,!o.args.diskio_iops]]),Al(Iu("th",tf,"IORps",512),[[xp,o.args.diskio_iops]]),Al(Iu("th",ef,"IOWps",512),[[xp,o.args.diskio_iops]])])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.disks,((e,r)=>(xu(),Au("tr",{key:r},[Iu("td",rf,As(t.$filters.minSize(e.alias?e.alias:e.name,16)),1),Al(Iu("td",{class:xs(["text-end w-25",o.getDecoration(e.name,"write_bytes_rate_per_sec")])},As(e.bitrate.txps),3),[[xp,!o.args.diskio_iops]]),Al(Iu("td",{class:xs(["text-end w-25",o.getDecoration(e.name,"read_bytes_rate_per_sec")])},As(e.bitrate.rxps),3),[[xp,!o.args.diskio_iops]]),Al(Iu("td",{class:"text-end w-25"},As(e.count.txps),513),[[xp,o.args.diskio_iops]]),Al(Iu("td",{class:"text-end w-25"},As(e.count.rxps),513),[[xp,o.args.diskio_iops]])])))),128))])])])):Ru("v-if",!0)}]]),vf={key:0,id:"containers",class:"plugin"},xf={class:"table-responsive d-md-none"},wf={class:"table table-sm table-borderless table-striped table-hover"},_f={scope:"col"},kf={scope:"col"},Sf={scope:"col"},Af={scope:"col"},Ef={class:"table-responsive d-none d-md-block"},Cf={class:"table table-sm table-borderless table-striped table-hover"},Tf={scope:"col"},Of={scope:"col"},Df={scope:"col"},If={scope:"col"},Pf={scope:"col"},jf={scope:"col"},Lf={scope:"col"},Nf={scope:"col"},Mf={scope:"col"},Rf={scope:"col"};const qf={props:{data:{type:Object}},data:()=>({store:qd,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,am.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:()=>Ud.getLimit("containers","containers_disable_stats")||[]}},Bf=(0,Yd.A)(qf,[["render",function(t,e,r,n,i,o){return o.containers.length?(xu(),Au("section",vf,[e[6]||(e[6]=Iu("span",{class:"title"},"CONTAINERS",-1)),Al(Iu("span",null,As(o.containers.length)+" sorted by "+As(i.sorter.getColumnLabel(i.sorter.column)),513),[[xp,o.containers.length>1]]),Iu("div",xf,[Iu("table",wf,[Iu("thead",null,[Iu("tr",null,[Al(Iu("td",_f,"Pod",512),[[xp,o.showPod]]),Al(Iu("td",{scope:"col",class:xs(["sortable","name"===i.sorter.column&&"sort"]),onClick:e[0]||(e[0]=t=>o.args.sort_processes_key="name")}," Name ",2),[[xp,!o.getDisableStats().includes("name")]]),Al(Iu("td",kf,"Status",512),[[xp,!o.getDisableStats().includes("status")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","cpu_percent"===i.sorter.column&&"sort"]),onClick:e[1]||(e[1]=t=>o.args.sort_processes_key="cpu_percent")}," CPU% ",2),[[xp,!o.getDisableStats().includes("cpu")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","memory_percent"===i.sorter.column&&"sort"]),onClick:e[2]||(e[2]=t=>o.args.sort_processes_key="memory_percent")}," MEM ",2),[[xp,!o.getDisableStats().includes("mem")]]),Al(Iu("td",Sf,"MAX",512),[[xp,!o.getDisableStats().includes("mem")]]),Al(Iu("td",Af,"Command",512),[[xp,!o.getDisableStats().includes("command")]])])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.containers,((e,r)=>(xu(),Au("tr",{key:r},[Al(Iu("td",{scope:"row"},As(e.pod_id||"-"),513),[[xp,o.showPod]]),Al(Iu("td",{scope:"row"},As(e.name),513),[[xp,!o.getDisableStats().includes("name")]]),Al(Iu("td",{scope:"row",class:xs("Paused"==e.status?"careful":"ok")},As(e.status),3),[[xp,!o.getDisableStats().includes("status")]]),Al(Iu("td",{scope:"row"},As(t.$filters.number(e.cpu_percent,1)),513),[[xp,!o.getDisableStats().includes("cpu")]]),Al(Iu("td",{scope:"row"},As(t.$filters.bytes(e.memory_usage)),513),[[xp,!o.getDisableStats().includes("mem")]]),Al(Iu("td",{scope:"row"},As(t.$filters.bytes(e.limit)),513),[[xp,!o.getDisableStats().includes("mem")]]),Al(Iu("td",{scope:"row",class:"text-truncate"},As(e.command),513),[[xp,!o.getDisableStats().includes("command")]])])))),128))])])]),Iu("div",Ef,[Iu("table",Cf,[Iu("thead",null,[Iu("tr",null,[Al(Iu("td",Tf,"Engine",512),[[xp,o.showEngine]]),Al(Iu("td",Of,"Pod",512),[[xp,o.showPod]]),Al(Iu("td",{scope:"col",class:xs(["sortable","name"===i.sorter.column&&"sort"]),onClick:e[3]||(e[3]=t=>o.args.sort_processes_key="name")}," Name ",2),[[xp,!o.getDisableStats().includes("name")]]),Al(Iu("td",Df,"Status",512),[[xp,!o.getDisableStats().includes("status")]]),Al(Iu("td",If,"Uptime",512),[[xp,!o.getDisableStats().includes("uptime")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","cpu_percent"===i.sorter.column&&"sort"]),onClick:e[4]||(e[4]=t=>o.args.sort_processes_key="cpu_percent")}," CPU% ",2),[[xp,!o.getDisableStats().includes("cpu")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","memory_percent"===i.sorter.column&&"sort"]),onClick:e[5]||(e[5]=t=>o.args.sort_processes_key="memory_percent")}," MEM ",2),[[xp,!o.getDisableStats().includes("mem")]]),Al(Iu("td",Pf,"MAX",512),[[xp,!o.getDisableStats().includes("mem")]]),Al(Iu("td",jf,"IORps",512),[[xp,!o.getDisableStats().includes("diskio")]]),Al(Iu("td",Lf,"IOWps",512),[[xp,!o.getDisableStats().includes("diskio")]]),Al(Iu("td",Nf,"RXps",512),[[xp,!o.getDisableStats().includes("networkio")]]),Al(Iu("td",Mf,"TXps",512),[[xp,!o.getDisableStats().includes("networkio")]]),Al(Iu("td",Rf,"Command",512),[[xp,!o.getDisableStats().includes("command")]])])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.containers,((e,r)=>(xu(),Au("tr",{key:r},[Al(Iu("td",{scope:"row"},As(e.engine),513),[[xp,o.showEngine]]),Al(Iu("td",{scope:"row"},As(e.pod_id||"-"),513),[[xp,o.showPod]]),Al(Iu("td",{scope:"row"},As(e.name),513),[[xp,!o.getDisableStats().includes("name")]]),Al(Iu("td",{scope:"row",class:xs("Paused"==e.status?"careful":"ok")},As(e.status),3),[[xp,!o.getDisableStats().includes("status")]]),Al(Iu("td",{scope:"row"},As(e.uptime),513),[[xp,!o.getDisableStats().includes("uptime")]]),Al(Iu("td",{scope:"row"},As(t.$filters.number(e.cpu_percent,1)),513),[[xp,!o.getDisableStats().includes("cpu")]]),Al(Iu("td",{scope:"row"},As(t.$filters.bytes(e.memory_usage)),513),[[xp,!o.getDisableStats().includes("mem")]]),Al(Iu("td",{scope:"row"},As(t.$filters.bytes(e.limit)),513),[[xp,!o.getDisableStats().includes("mem")]]),Al(Iu("td",{scope:"row"},As(t.$filters.bytes(e.io_rx)),513),[[xp,!o.getDisableStats().includes("iodisk")]]),Al(Iu("td",{scope:"row"},As(t.$filters.bytes(e.io_wx)),513),[[xp,!o.getDisableStats().includes("iodisk")]]),Al(Iu("td",{scope:"row"},As(t.$filters.bits(e.network_rx)),513),[[xp,!o.getDisableStats().includes("networkio")]]),Al(Iu("td",{scope:"row"},As(t.$filters.bits(e.network_tx)),513),[[xp,!o.getDisableStats().includes("networkio")]]),Al(Iu("td",{scope:"row",class:"text-truncate"},As(e.command),513),[[xp,!o.getDisableStats().includes("command")]])])))),128))])])])])):Ru("v-if",!0)}]]),$f={key:0,id:"folders",class:"plugin"},Uf={class:"table table-sm table-borderless margin-bottom"},Ff={scope:"row"},zf={key:0,class:"visible-lg-inline"};const Hf={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"}},Vf=(0,Yd.A)(Hf,[["render",function(t,e,r,n,i,o){return o.hasFolders?(xu(),Au("section",$f,[Iu("table",Uf,[e[0]||(e[0]=Iu("thead",null,[Iu("tr",null,[Iu("th",{scope:"col"},"FOLDERS"),Iu("th",{scope:"col",class:"text-end"},"Size")])],-1)),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.folders,((e,r)=>(xu(),Au("tr",{key:r},[Iu("td",Ff,As(e.path),1),Iu("td",{class:xs(["text-end",o.getDecoration(e)])},[e.errno>0?(xu(),Au("span",zf,"?")):Ru("v-if",!0),Nu(" "+As(t.$filters.bytes(e.size)),1)],2)])))),128))])])])):Ru("v-if",!0)}]]),Gf={key:0,id:"fs",class:"plugin"},Wf={class:"table table-sm table-borderless margin-bottom"},Kf={key:0,scope:"col",class:"text-end w-25"},Xf={key:1,scope:"col",class:"text-end w-25"},Qf={scope:"row"},Zf={key:0,class:"visible-lg-inline"},Yf={scope:"row",class:"text-end"};const Jf={props:{data:{type:Object}},data:()=>({store:qd}),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,am.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()}}},th=(0,Yd.A)(Jf,[["render",function(t,e,r,n,i,o){return o.hasFs?(xu(),Au("section",Gf,[Iu("table",Wf,[Iu("thead",null,[Iu("tr",null,[e[0]||(e[0]=Iu("th",{scope:"col"},"FILE SYSTEM",-1)),o.args.fs_free_space?(xu(),Au("th",Xf,"Free")):(xu(),Au("th",Kf,"Used")),e[1]||(e[1]=Iu("th",{scope:"col",class:"text-end w-25"},"Total",-1))])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.fileSystems,((e,r)=>(xu(),Au("tr",{key:r},[Iu("td",Qf,[Nu(As(t.$filters.minSize(e.alias?e.alias:e.mountPoint,16,t.begin=!1))+" ",1),(e.alias?e.alias:e.mountPoint).length+e.name.length<=15?(xu(),Au("span",Zf," ("+As(e.name)+") ",1)):Ru("v-if",!0)]),o.args.fs_free_space?(xu(),Au("td",{key:1,scope:"row",class:xs(["text-end",o.getDecoration(e.mountPoint,"used")])},As(t.$filters.bytes(e.free)),3)):(xu(),Au("td",{key:0,scope:"row",class:xs(["text-end",o.getDecoration(e.mountPoint,"used")])},As(t.$filters.bytes(e.used)),3)),Iu("td",Yf,As(t.$filters.bytes(e.size)),1)])))),128))])])])):Ru("v-if",!0)}]]),eh={key:0,id:"gpu",class:"plugin"},rh={class:"title text-truncate"},nh={key:0,class:"table-responsive"},ih={key:1,class:"col text-end"},oh={key:1,class:"col text-end"},sh={key:1,class:"col text-end"},ah={key:1,class:"table-responsive"},lh={class:"table table-sm table-borderless"},ch={class:"col"},uh={key:1,class:"col"},ph={key:3,class:"col text-end"},dh={key:2,class:"table-responsive"},mh={class:"table table-sm table-borderless"},fh={key:1,class:"col"},hh={key:1,class:"col"},gh={key:1,class:"col"};const bh={props:{data:{type:Object}},data:()=>({store:qd}),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(const 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"}},yh=(0,Yd.A)(bh,[["render",function(t,e,r,n,i,o){return null!=o.gpus?(xu(),Au("section",eh,[Iu("div",rh,As(o.name),1),Ru(" single gpu "),1===o.gpus.length?(xu(),Au("div",nh,[(xu(!0),Au(fu,null,oc(o.gpus,((r,n)=>(xu(),Au("table",{key:n,class:"table table-sm table-borderless"},[Iu("tbody",null,[Iu("tr",null,[e[1]||(e[1]=Iu("td",{class:"col"},"proc:",-1)),null!=r.proc?(xu(),Au("td",{key:0,class:xs(["col text-end",o.getDecoration(r.gpu_id,"proc")])},[Iu("span",null,As(t.$filters.number(r.proc,0))+"%",1)],2)):Ru("v-if",!0),null==r.proc?(xu(),Au("td",ih,e[0]||(e[0]=[Iu("span",null,"N/A",-1)]))):Ru("v-if",!0)]),Iu("tr",null,[e[3]||(e[3]=Iu("td",{class:"col"},"mem:",-1)),null!=r.mem?(xu(),Au("td",{key:0,class:xs(["col text-end",o.getDecoration(r.gpu_id,"mem")])},[Iu("span",null,As(t.$filters.number(r.mem,0))+"%",1)],2)):Ru("v-if",!0),null==r.mem?(xu(),Au("td",oh,e[2]||(e[2]=[Iu("span",null,"N/A",-1)]))):Ru("v-if",!0)]),Iu("tr",null,[e[5]||(e[5]=Iu("td",{class:"col"},"temp:",-1)),null!=r.temperature?(xu(),Au("td",{key:0,class:xs(["col text-end",o.getDecoration(r.gpu_id,"temperature")])},[Iu("span",null,As(t.$filters.number(r.temperature,0)),1)],2)):Ru("v-if",!0),null==r.temperature?(xu(),Au("td",sh,e[4]||(e[4]=[Iu("span",null,"N/A",-1)]))):Ru("v-if",!0)])])])))),128))])):Ru("v-if",!0),Ru(" multiple gpus - one line per gpu (no mean) "),!o.args.meangpu&&o.gpus.length>1?(xu(),Au("div",ah,[Iu("table",lh,[Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.gpus,((r,n)=>(xu(),Au("tr",{key:n},[Iu("td",ch,As(r.gpu_id)+":",1),null!=r.proc?(xu(),Au("td",{key:0,class:xs(["col",o.getDecoration(r.gpu_id,"proc")])},[Iu("span",null,As(t.$filters.number(r.proc,0))+"%",1)],2)):Ru("v-if",!0),null==r.proc?(xu(),Au("td",uh,e[6]||(e[6]=[Iu("span",null,"N/A",-1)]))):Ru("v-if",!0),e[8]||(e[8]=Iu("td",{class:"col"},"mem:",-1)),null!=r.mem?(xu(),Au("td",{key:2,class:xs(["col text-end",o.getDecoration(r.gpu_id,"mem")])},[Iu("span",null,As(t.$filters.number(r.mem,0))+"% ",1)],2)):Ru("v-if",!0),null==r.mem?(xu(),Au("td",ph,e[7]||(e[7]=[Iu("span",null,"N/A",-1)]))):Ru("v-if",!0)])))),128))])])])):Ru("v-if",!0),Ru(" multiple gpus - mean "),o.args.meangpu&&o.gpus.length>1?(xu(),Au("div",dh,[Iu("table",mh,[Iu("tbody",null,[Iu("tr",null,[e[10]||(e[10]=Iu("td",{class:"col"},"proc mean:",-1)),null!=o.mean.proc?(xu(),Au("td",{key:0,class:xs(["col",o.getMeanDecoration("proc")])},[Iu("span",null,As(t.$filters.number(o.mean.proc,0))+"%",1)],2)):Ru("v-if",!0),null==o.mean.proc?(xu(),Au("td",fh,e[9]||(e[9]=[Iu("span",null,"N/A",-1),Nu(">")]))):Ru("v-if",!0)]),Iu("tr",null,[e[12]||(e[12]=Iu("td",{class:"col"},"mem mean:",-1)),null!=o.mean.mem?(xu(),Au("td",{key:0,class:xs(["col",o.getMeanDecoration("mem")])},[Iu("span",null,As(t.$filters.number(o.mean.mem,0))+"%",1)],2)):Ru("v-if",!0),null==o.mean.mem?(xu(),Au("td",hh,e[11]||(e[11]=[Iu("span",null,"N/A",-1)]))):Ru("v-if",!0)]),Iu("tr",null,[e[14]||(e[14]=Iu("td",{class:"col"},"temp mean:",-1)),null!=o.mean.temperature?(xu(),Au("td",{key:0,class:xs(["col",o.getMeanDecoration("temperature")])},[Iu("span",null,As(t.$filters.number(o.mean.temperature,0))+"°C",1)],2)):Ru("v-if",!0),null==o.mean.temperature?(xu(),Au("td",gh,e[13]||(e[13]=[Iu("span",null,"N/A",-1)]))):Ru("v-if",!0)])])])])):Ru("v-if",!0)])):Ru("v-if",!0)}]]),vh={id:"system",class:"plugin"},xh={key:0,class:"critical"},wh={class:"title"};const _h={props:{data:{type:Object}},data:()=>({store:qd}),computed:{stats(){return this.data.stats.system},hostname(){return this.stats.hostname},isDisconnected(){return"FAILURE"===this.store.status}}},kh=(0,Yd.A)(_h,[["render",function(t,e,r,n,i,o){return xu(),Au("section",vh,[o.isDisconnected?(xu(),Au("span",xh,"Disconnected from")):Ru("v-if",!0),Iu("span",wh,As(o.hostname),1)])}]]),Sh={key:0,id:"ip",class:"plugin"},Ah={key:0,class:"title"},Eh={key:1},Ch={key:2,class:"title"},Th={key:3},Oh={key:4,class:"text-truncate"};const Dh={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}}},Ih=(0,Yd.A)(Dh,[["render",function(t,e,r,n,i,o){return o.address?(xu(),Au("section",Sh,[o.address?(xu(),Au("span",Ah,"IP")):Ru("v-if",!0),o.address?(xu(),Au("span",Eh,As(o.address)+"/"+As(o.maskCdir),1)):Ru("v-if",!0),o.publicAddress?(xu(),Au("span",Ch,"Pub")):Ru("v-if",!0),o.publicAddress?(xu(),Au("span",Th,As(o.publicAddress),1)):Ru("v-if",!0),o.publicInfo?(xu(),Au("span",Oh,As(o.publicInfo),1)):Ru("v-if",!0)])):Ru("v-if",!0)}]]),Ph={id:"irq",class:"plugin"},jh={class:"table table-sm table-borderless margin-bottom"},Lh={scope:"row"},Nh={scope:"row",class:"text-end"};const Mh={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})))}}},Rh=(0,Yd.A)(Mh,[["render",function(t,e,r,n,i,o){return xu(),Au("section",Ph,[Iu("table",jh,[e[0]||(e[0]=Iu("thead",null,[Iu("tr",null,[Iu("th",{scope:"col"},"IRQ"),Iu("th",{scope:"col",class:"text-end"},"Rate/s")])],-1)),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.irqs,((t,e)=>(xu(),Au("tr",{key:e},[Iu("td",Lh,As(t.irq_line),1),Iu("td",Nh,As(t.irq_rate),1)])))),128))])])])}]]),qh={key:0,id:"load",class:"plugin"},Bh={class:"table-responsive"},$h={class:"table table-sm table-borderless"},Uh={scope:"col",class:"text-end"},Fh={class:"text-end"};const zh={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()}}},Hh=(0,Yd.A)(zh,[["render",function(t,e,r,n,i,o){return null!=o.cpucore?(xu(),Au("section",qh,[Iu("div",Bh,[Iu("table",$h,[Iu("thead",null,[Iu("tr",null,[e[0]||(e[0]=Iu("th",{scope:"col"},"LOAD",-1)),Iu("td",Uh,As(o.cpucore)+"-core",1)])]),Iu("tbody",null,[Iu("tr",null,[e[1]||(e[1]=Iu("td",{scope:"row"},"1 min:",-1)),Iu("td",Fh,[Iu("span",null,As(t.$filters.number(o.min1,2)),1)])]),Iu("tr",null,[e[2]||(e[2]=Iu("td",{scope:"row"},"5 min:",-1)),Iu("td",{class:xs(["text-end",o.getDecoration("min5")])},[Iu("span",null,As(t.$filters.number(o.min5,2)),1)],2)]),Iu("tr",null,[e[3]||(e[3]=Iu("td",{scope:"row"},"15 min:",-1)),Iu("td",{class:xs(["text-end",o.getDecoration("min15")])},[Iu("span",null,As(t.$filters.number(o.min15,2)),1)],2)])])])])])):Ru("v-if",!0)}]]),Vh={id:"mem",class:"plugin"},Gh={class:"table-responsive"},Wh={class:"table-sm table-borderless"},Kh={class:"justify-content-between"},Xh={scope:"col"},Qh={class:"table table-sm table-borderless"},Zh={class:"text-end"},Yh={class:"d-none d-xl-block d-xxl-block"},Jh={class:"table table-sm table-borderless"},tg={scope:"col"},eg={scope:"col"},rg={scope:"col"},ng={scope:"col"},ig={scope:"col"},og={scope:"col"},sg={scope:"col"},ag={scope:"col"};const lg={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()}}},cg=(0,Yd.A)(lg,[["render",function(t,e,r,n,i,o){return xu(),Au("section",Vh,[Ru(" d-none d-xxl-block "),Iu("div",Gh,[Iu("table",Wh,[Iu("tbody",null,[Iu("tr",Kh,[Iu("td",Xh,[Iu("table",Qh,[Iu("tbody",null,[Iu("tr",null,[e[0]||(e[0]=Iu("th",{scope:"col"},"MEM",-1)),Iu("td",{scope:"col",class:xs(["text-end",o.getDecoration("percent")])},[Iu("span",null,As(o.percent)+"%",1)],2)]),Iu("tr",null,[e[1]||(e[1]=Iu("td",{scope:"row"},"total:",-1)),Iu("td",Zh,[Iu("span",null,As(t.$filters.bytes(o.total)),1)])]),Iu("tr",null,[e[2]||(e[2]=Iu("td",{scope:"row"},"used:",-1)),Iu("td",{class:xs(["text-end",o.getDecoration("used")])},[Iu("span",null,As(t.$filters.bytes(o.used,2)),1)],2)]),Iu("tr",null,[e[3]||(e[3]=Iu("td",{scope:"row"},"free:",-1)),Iu("td",{class:xs(["text-end",o.getDecoration("free")])},[Iu("span",null,As(t.$filters.bytes(o.free,2)),1)],2)])])])]),Iu("td",null,[Iu("template",Yh,[Iu("table",Jh,[Iu("tbody",null,[Iu("tr",null,[Al(Iu("td",tg," active: ",512),[[xp,null!=o.active]]),Al(Iu("td",eg,[Iu("span",null,As(t.$filters.bytes(o.active)),1)],512),[[xp,null!=o.active]])]),Iu("tr",null,[Al(Iu("td",rg," inactive: ",512),[[xp,null!=o.inactive]]),Al(Iu("td",ng,[Iu("span",null,As(t.$filters.bytes(o.inactive)),1)],512),[[xp,null!=o.inactive]])]),Iu("tr",null,[Al(Iu("td",ig," buffers: ",512),[[xp,null!=o.buffers]]),Al(Iu("td",og,[Iu("span",null,As(t.$filters.bytes(o.buffers)),1)],512),[[xp,null!=o.buffers]])]),Iu("tr",null,[Al(Iu("td",sg," cached: ",512),[[xp,null!=o.cached]]),Al(Iu("td",ag,[Iu("span",null,As(t.$filters.bytes(o.cached)),1)],512),[[xp,null!=o.cached]])])])])])])])])])])])}]]),ug={id:"memswap",class:"plugin"},pg={class:"table-responsive"},dg={class:"table table-sm table-borderless"},mg={class:"text-end"},fg={class:"text-end"};const hg={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()}}},gg=(0,Yd.A)(hg,[["render",function(t,e,r,n,i,o){return xu(),Au("section",ug,[Iu("div",pg,[Iu("table",dg,[Iu("thead",null,[Iu("tr",null,[e[0]||(e[0]=Iu("th",{scope:"col"},"SWAP",-1)),Iu("td",{scope:"col",class:xs(["text-end",o.getDecoration("percent")])},[Iu("span",null,As(o.percent)+"%",1)],2)])]),Iu("tbody",null,[Iu("tr",null,[e[1]||(e[1]=Iu("td",{scope:"row"},"total:",-1)),Iu("td",mg,[Iu("span",null,As(t.$filters.bytes(o.total)),1)])]),Iu("tr",null,[e[2]||(e[2]=Iu("td",{scope:"row"},"used:",-1)),Iu("td",{class:xs(["text-end",o.getDecoration("used")])},[Iu("span",null,As(t.$filters.bytes(o.used,2)),1)],2)]),Iu("tr",null,[e[3]||(e[3]=Iu("td",{scope:"row"},"free:",-1)),Iu("td",fg,[Iu("span",null,As(t.$filters.bytes(o.free,2)),1)])])])])])])}]]),bg={key:0,id:"network",class:"plugin"},yg={class:"table table-sm table-borderless margin-bottom"},vg={scope:"col",class:"text-end w-25"},xg={scope:"col",class:"text-end w-25"},wg={scope:"col",class:"text-end w-25"},_g={scope:"col",class:"text-end w-25"},kg={scope:"col",class:"text-end w-25"},Sg={scope:"col",class:"text-end w-25"},Ag={scope:"col",class:"text-end w-25"},Eg={scope:"col",class:"text-end w-25"},Cg={scope:"row",class:"visible-lg-inline text-truncate"},Tg={class:"text-end"},Og={class:"text-end"};const Dg={props:{data:{type:Object}},data:()=>({store:qd}),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,am.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()}}},Ig=(0,Yd.A)(Dg,[["render",function(t,e,r,n,i,o){return o.hasNetworks?(xu(),Au("section",bg,[Iu("table",yg,[Iu("thead",null,[Iu("tr",null,[e[0]||(e[0]=Iu("th",{scope:"col"},"NETWORK",-1)),Al(Iu("th",vg,"Rxps",512),[[xp,!o.args.network_cumul&&!o.args.network_sum]]),Al(Iu("th",xg,"Txps",512),[[xp,!o.args.network_cumul&&!o.args.network_sum]]),Al(Iu("th",wg,null,512),[[xp,!o.args.network_cumul&&o.args.network_sum]]),Al(Iu("th",_g,"Rx+Txps",512),[[xp,!o.args.network_cumul&&o.args.network_sum]]),Al(Iu("th",kg,"Rx",512),[[xp,o.args.network_cumul&&!o.args.network_sum]]),Al(Iu("th",Sg,"Tx",512),[[xp,o.args.network_cumul&&!o.args.network_sum]]),Al(Iu("th",Ag,null,512),[[xp,o.args.network_cumul&&o.args.network_sum]]),Al(Iu("th",Eg,"Rx+Tx",512),[[xp,o.args.network_cumul&&o.args.network_sum]])])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.networks,((e,r)=>(xu(),Au("tr",{key:r},[Iu("td",Cg,As(t.$filters.minSize(e.alias?e.alias:e.ifname,16)),1),Al(Iu("td",{class:xs(["text-end",o.getDecoration(e.interfaceName,"bytes_recv_rate_per_sec")])},As(o.args.byte?t.$filters.bytes(e.bytes_recv_rate_per_sec):t.$filters.bits(e.bytes_recv_rate_per_sec)),3),[[xp,!o.args.network_cumul&&!o.args.network_sum]]),Al(Iu("td",{class:xs(["text-end",o.getDecoration(e.interfaceName,"bytes_sent_rate_per_sec")])},As(o.args.byte?t.$filters.bytes(e.bytes_sent_rate_per_sec):t.$filters.bits(e.bytes_sent_rate_per_sec)),3),[[xp,!o.args.network_cumul&&!o.args.network_sum]]),Al(Iu("td",Tg,null,512),[[xp,!o.args.network_cumul&&o.args.network_sum]]),Al(Iu("td",{class:"text-end"},As(o.args.byte?t.$filters.bytes(e.bytes_all_rate_per_sec):t.$filters.bits(e.bytes_all_rate_per_sec)),513),[[xp,!o.args.network_cumul&&o.args.network_sum]]),Al(Iu("td",{class:"text-end"},As(o.args.byte?t.$filters.bytes(e.bytes_recv):t.$filters.bits(e.bytes_recv)),513),[[xp,o.args.network_cumul&&!o.args.network_sum]]),Al(Iu("td",{class:"text-end"},As(o.args.byte?t.$filters.bytes(e.bytes_sent):t.$filters.bits(e.bytes_sent)),513),[[xp,o.args.network_cumul&&!o.args.network_sum]]),Al(Iu("td",Og,null,512),[[xp,o.args.network_cumul&&o.args.network_sum]]),Al(Iu("td",{class:"text-end"},As(o.args.byte?t.$filters.bytes(e.bytes_all):t.$filters.bits(e.bytes_all)),513),[[xp,o.args.network_cumul&&o.args.network_sum]])])))),128))])])])):Ru("v-if",!0)}]]),Pg={id:"now",class:"plugin"};const jg={props:{data:{type:Object}},computed:{date_custom(){return this.data.stats.now.custom}}},Lg=(0,Yd.A)(jg,[["render",function(t,e,r,n,i,o){return xu(),Au("section",Pg,[Iu("span",null,As(o.date_custom),1)])}]]),Ng={id:"percpu",class:"plugin"},Mg={class:"table-responsive"},Rg={class:"table-sm table-borderless"},qg={key:0,scope:"col"},Bg={key:1,scope:"col"},$g={key:0,scope:"col"},Ug={key:1,scope:"col"};const Fg={props:{data:{type:Object}},data:()=>({store:qd}),computed:{args(){return this.store.args||{}},config(){return this.store.config||{}},percpuStats(){return this.data.stats.percpu}},methods:{getUserAlert:t=>Ud.getAlert("percpu","percpu_user_",t.user),getSystemAlert:t=>Ud.getAlert("percpu","percpu_system_",t.system),getIOWaitAlert:t=>Ud.getAlert("percpu","percpu_iowait_",t.system)}},zg=(0,Yd.A)(Fg,[["render",function(t,e,r,n,i,o){return xu(),Au("section",Ng,[Ru(" d-none d-xl-block d-xxl-block "),Iu("div",Mg,[Iu("table",Rg,[Iu("thead",null,[Iu("tr",null,[o.args.disable_quicklook?(xu(),Au("th",qg,"CPU")):Ru("v-if",!0),o.args.disable_quicklook?(xu(),Au("td",Bg,"total")):Ru("v-if",!0),e[0]||(e[0]=Iu("td",{scope:"col"},"user",-1)),e[1]||(e[1]=Iu("td",{scope:"col"},"system",-1)),e[2]||(e[2]=Iu("td",{scope:"col"},"idle",-1)),e[3]||(e[3]=Iu("td",{scope:"col"},"iowait",-1)),e[4]||(e[4]=Iu("td",{scope:"col"},"steel",-1))])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.percpuStats,((t,e)=>(xu(),Au("tr",{key:e},[o.args.disable_quicklook?(xu(),Au("td",$g,"CPU"+As(t.cpu_number),1)):Ru("v-if",!0),o.args.disable_quicklook?(xu(),Au("td",Ug,As(t.total)+"%",1)):Ru("v-if",!0),Iu("td",{scope:"col",class:xs(o.getUserAlert(t))},As(t.user)+"%",3),Iu("td",{scope:"col",class:xs(o.getSystemAlert(t))},As(t.system)+"%",3),Al(Iu("td",{scope:"col"},As(t.idle)+"%",513),[[xp,null!=t.idle]]),Al(Iu("td",{scope:"col",class:xs(o.getIOWaitAlert(t))},As(t.iowait)+"%",3),[[xp,null!=t.iowait]]),Al(Iu("td",{scope:"col"},As(t.steal)+"%",513),[[xp,null!=t.steal]])])))),128))])])])])}]]),Hg={key:0,id:"ports",class:"plugin"},Vg={class:"table table-sm table-borderless margin-bottom"},Gg={scope:"row"},Wg={key:0},Kg={key:1},Xg={key:2},Qg={key:3},Zg={key:0},Yg={key:1},Jg={key:2};const tb={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"}},eb=(0,Yd.A)(tb,[["render",function(t,e,r,n,i,o){return o.hasPorts?(xu(),Au("section",Hg,[Iu("table",Vg,[Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.ports,((e,r)=>(xu(),Au("tr",{key:r},[Iu("td",Gg,[Ru(" prettier-ignore "),Nu(" "+As(t.$filters.minSize(e.description?e.description:e.host+" "+e.port,20)),1)]),e.host?(xu(),Au("td",{key:0,scope:"row",class:xs(["text-end",o.getPortDecoration(e)])},["null"==e.status?(xu(),Au("span",Wg,"Scanning")):"false"==e.status?(xu(),Au("span",Kg,"Timeout")):"true"==e.status?(xu(),Au("span",Xg,"Open")):(xu(),Au("span",Qg,As(t.$filters.number(1e3*e.status,0))+"ms",1))],2)):Ru("v-if",!0),e.url?(xu(),Au("td",{key:1,scope:"row",class:xs(["text-end",o.getPortDecoration(e)])},["null"==e.status?(xu(),Au("span",Zg,"Scanning")):"Error"==e.status?(xu(),Au("span",Yg,"Error")):(xu(),Au("span",Jg,"Code "+As(e.status),1))],2)):Ru("v-if",!0)])))),128))])])])):Ru("v-if",!0)}]]),rb={key:0},nb={key:1},ib={key:0,class:"row"},ob={class:"col-lg-18"};const sb={key:0,id:"amps",class:"plugin"},ab={class:"table table-sm table-borderless"},lb={key:0},cb=["innerHTML"];const ub={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}}},pb=(0,Yd.A)(ub,[["render",function(t,e,r,n,i,o){return o.hasAmps?(xu(),Au("section",sb,[Iu("table",ab,[Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.processes,((e,r)=>(xu(),Au("tr",{key:r},[Iu("td",{class:xs(o.getNameDecoration(e))},As(e.name),3),e.regex?(xu(),Au("td",lb,As(e.count),1)):Ru("v-if",!0),Iu("td",{class:"process-result",innerHTML:t.$filters.nl2br(e.result)},null,8,cb)])))),128))])]),Ru('
\n
\n
\n {{ process.name }}\n
\n
{{ process.count }}
\n
\n
\n
')])):Ru("v-if",!0)}]]),db={id:"processcount",class:"plugin"},mb={class:"title"};const fb={props:{data:{type:Object},sorter:{type:Object}},data:()=>({store:qd}),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}}},hb=(0,Yd.A)(fb,[["render",function(t,e,r,n,i,o){return xu(),Au("section",db,[e[0]||(e[0]=Iu("span",{class:"title"},"TASKS",-1)),Iu("span",null,As(o.total)+" ("+As(o.thread)+" thr),",1),Iu("span",null,As(o.running)+" run,",1),Iu("span",null,As(o.sleeping)+" slp,",1),Iu("span",null,As(o.stopped)+" oth",1),Iu("span",null,As(o.args.programs?"Programs":"Threads"),1),Iu("span",mb,As(r.sorter.auto?"sorted automatically":"sorted"),1),Iu("span",null,"by "+As(r.sorter.getColumnLabel(r.sorter.column)),1)])}]]),gb={key:0,id:"processlist",class:"plugin"},bb={key:0,class:"extendedstats"},yb={class:"careful"},vb={class:"careful"},xb={class:"careful"},wb={class:"careful"},_b={class:"table-responsive d-lg-none"},kb={class:"table table-sm table-borderless table-striped table-hover"},Sb={scope:"col"},Ab=["onClick"],Eb={class:"table-responsive-md d-none d-lg-block"},Cb={class:"table table-sm table-borderless table-striped table-hover"},Tb={scope:"col"},Ob={scope:"col"},Db={scope:"col"},Ib={scope:"col"},Pb={scope:"col"},jb=["onClick"],Lb={key:0,scope:"row",class:""},Nb={key:1,id:"processlist",class:"plugin"},Mb={class:"table-responsive d-lg-none"},Rb={class:"table table-sm table-borderless table-striped table-hover"},qb={class:"table-responsive d-none d-lg-block"},Bb={class:"table table-sm table-borderless table-striped table-hover"},$b={class:""},Ub={class:""},Fb={scope:"row"},zb={scope:"row",class:"table-cell widtd-60"};const Hb={props:{data:{type:Object},sorter:{type:Object}},data:()=>({store:qd}),computed:{args(){return this.store.args||{}},config(){return this.store.config||{}},stats_processlist(){return this.data.stats.processlist},stats_load(){return this.data.stats.load},cpucore(){return this.stats_load.cpucore},extended_stats(){return this.stats_processlist.find((t=>!0===t.extended_stats))||null},processes(){const{sorter:t}=this,e=(this.stats_processlist||[]).map((t=>this.updateProcess(t,this.data.stats.isWindows,this.args,this.cpucore)));return(0,am.orderBy)(e,[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,am.last)(t.username.split("\\"))),t.timeforhuman="?",t.cpu_times&&(t.timeplus=hf([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,am.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:{updateProcess:(t,e,r,n)=>(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,am.last)(t.username.split("\\"))),t.timeforhuman="?",t.cpu_times&&(t.timeplus=hf([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:r.disable_irix&&(t.cpu_percent=t.cpu_percent/n),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.name=t.name+" "+t.cmdline.slice(1).join(" ").replace(/\n/g," "),t.cmdline=t.cmdline.join(" ").replace(/\n/g," ")),null!==t.cmdline&&0!==t.cmdline.length||(t.cmdline=t.name),t),getCpuPercentAlert:t=>Ud.getAlert("processlist","processlist_cpu_",t.cpu_percent),getMemoryPercentAlert:t=>Ud.getAlert("processlist","processlist_mem_",t.cpu_percent),getDisableStats:()=>Ud.getLimit("processlist","processlist_disable_stats")||[],setExtendedStats(t){fetch("api/4/processes/extended/"+t.toString(),{method:"POST"}).then((t=>t.json())),this.$forceUpdate()},disableExtendedStats(){fetch("api/4/processes/extended/disable",{method:"POST"}).then((t=>t.json())),this.$forceUpdate()}}},Vb={components:{GlancesPluginAmps:pb,GlancesPluginProcesscount:hb,GlancesPluginProcesslist:(0,Yd.A)(Hb,[["render",function(t,e,r,n,i,o){return xu(),Au(fu,null,[Ru(" Display processes "),o.args.programs?Ru("v-if",!0):(xu(),Au("section",gb,[null!==o.extended_stats?(xu(),Au("div",bb,[Iu("div",null,[e[24]||(e[24]=Iu("span",{class:"title"},"Pinned thread: ",-1)),Iu("span",null,As(t.$filters.limitTo(o.extended_stats.cmdline,80)),1),Iu("span",null,[Iu("button",{class:"button",onClick:e[0]||(e[0]=t=>o.disableExtendedStats())},"Upin")])]),Iu("div",null,[e[25]||(e[25]=Iu("span",null,"CPU Min/Max/Mean: ",-1)),Iu("span",yb,As(t.$filters.number(o.extended_stats.cpu_min,1))+"% / "+As(t.$filters.number(o.extended_stats.cpu_max,1))+"% / "+As(t.$filters.number(o.extended_stats.cpu_mean,1))+"%",1),e[26]||(e[26]=Iu("span",null,"Affinity: ",-1)),Iu("span",vb,As(o.extended_stats.cpu_affinity|t.length),1)]),Iu("div",null,[e[27]||(e[27]=Iu("span",null,"MEM Min/Max/Mean: ",-1)),Iu("span",xb,As(t.$filters.number(o.extended_stats.memory_min,1))+"% / "+As(t.$filters.number(o.extended_stats.memory_max,1))+"% / "+As(t.$filters.number(o.extended_stats.memory_mean,1))+"%",1),e[28]||(e[28]=Iu("span",null,"Memory info: ",-1)),Iu("span",wb,As(t.$filters.dictToString(o.extended_stats.memory_info)),1)])])):Ru("v-if",!0),Iu("div",_b,[Iu("table",kb,[Iu("thead",null,[Iu("tr",null,[Al(Iu("td",{scope:"col",class:xs(["sortable","cpu_percent"===r.sorter.column&&"sort"]),onClick:e[1]||(e[1]=e=>t.$emit("update:sorter","cpu_percent"))},[Al(Iu("span",null,"CPU%",512),[[xp,!o.args.disable_irix]]),Al(Iu("span",null,"CPUi",512),[[xp,o.args.disable_irix]])],2),[[xp,!o.getDisableStats().includes("cpu_percent")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","memory_percent"===r.sorter.column&&"sort"]),onClick:e[2]||(e[2]=e=>t.$emit("update:sorter","memory_percent"))}," MEM% ",2),[[xp,!o.getDisableStats().includes("memory_percent")]]),Al(Iu("td",Sb," PID ",512),[[xp,!o.getDisableStats().includes("pid")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","username"===r.sorter.column&&"sort"]),onClick:e[3]||(e[3]=e=>t.$emit("update:sorter","username"))}," USER ",2),[[xp,!o.getDisableStats().includes("username")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","name"===r.sorter.column&&"sort"]),onClick:e[4]||(e[4]=e=>t.$emit("update:sorter","name"))}," Command (click to pin) ",2),[[xp,!o.getDisableStats().includes("cmdline")]])])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.processes,((e,r)=>(xu(),Au("tr",{key:r,style:{cursor:"pointer"},onClick:t=>o.setExtendedStats(e)},[Al(Iu("td",{scope:"row",class:xs(o.getCpuPercentAlert(e))},As(-1==e.cpu_percent?"?":e.cpu_percent),3),[[xp,!o.getDisableStats().includes("cpu_percent")]]),Al(Iu("td",{scope:"row",class:xs(o.getMemoryPercentAlert(e))},As(-1==e.memory_percent?"?":t.$filters.number(e.memory_percent,1)),3),[[xp,!o.getDisableStats().includes("memory_percent")]]),Al(Iu("td",{scope:"row"},As(e.pid),513),[[xp,!o.getDisableStats().includes("pid")]]),Al(Iu("td",{scope:"row",class:"text-truncate"},As(e.name),513),[[xp,o.args.process_short_name&&!o.getDisableStats().includes("cmdline")]]),Al(Iu("td",{scope:"row",class:"text-truncate"},As(e.cmdline),513),[[xp,!o.args.process_short_name&&!o.getDisableStats().includes("cmdline")]])],8,Ab)))),128))])])]),Iu("div",Eb,[Iu("table",Cb,[Iu("thead",null,[Iu("tr",null,[Al(Iu("td",{scope:"col",class:xs(["sortable","cpu_percent"===r.sorter.column&&"sort"]),onClick:e[5]||(e[5]=e=>t.$emit("update:sorter","cpu_percent"))},[Al(Iu("span",null,"CPU%",512),[[xp,!o.args.disable_irix]]),Al(Iu("span",null,"CPUi",512),[[xp,o.args.disable_irix]])],2),[[xp,!o.getDisableStats().includes("cpu_percent")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","memory_percent"===r.sorter.column&&"sort"]),onClick:e[6]||(e[6]=e=>t.$emit("update:sorter","memory_percent"))}," MEM% ",2),[[xp,!o.getDisableStats().includes("memory_percent")]]),Al(Iu("td",Tb," VIRT ",512),[[xp,!o.getDisableStats().includes("memory_info")]]),Al(Iu("td",Ob," RES ",512),[[xp,!o.getDisableStats().includes("memory_info")]]),Al(Iu("td",Db," PID ",512),[[xp,!o.getDisableStats().includes("pid")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","username"===r.sorter.column&&"sort"]),onClick:e[7]||(e[7]=e=>t.$emit("update:sorter","username"))}," USER ",2),[[xp,!o.getDisableStats().includes("username")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","timemillis"===r.sorter.column&&"sort"]),onClick:e[8]||(e[8]=e=>t.$emit("update:sorter","timemillis"))}," TIME+ ",2),[[xp,!o.getDisableStats().includes("cpu_times")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","num_threads"===r.sorter.column&&"sort"]),onClick:e[9]||(e[9]=e=>t.$emit("update:sorter","num_threads"))}," THR ",2),[[xp,!o.getDisableStats().includes("num_threads")]]),Al(Iu("td",Ib,"NI",512),[[xp,!o.getDisableStats().includes("nice")]]),Al(Iu("td",Pb,"S ",512),[[xp,!o.getDisableStats().includes("status")]]),Al(Iu("td",{scope:"col",class:xs(["",["sortable","io_counters"===r.sorter.column&&"sort"]]),onClick:e[10]||(e[10]=e=>t.$emit("update:sorter","io_counters"))}," IORps ",2),[[xp,o.ioReadWritePresentProcesses&&!o.getDisableStats().includes("io_counters")]]),Al(Iu("td",{scope:"col",class:xs(["text-start",["sortable","io_counters"===r.sorter.column&&"sort"]]),onClick:e[11]||(e[11]=e=>t.$emit("update:sorter","io_counters"))}," IOWps ",2),[[xp,o.ioReadWritePresentProcesses&&!o.getDisableStats().includes("io_counters")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","name"===r.sorter.column&&"sort"]),onClick:e[12]||(e[12]=e=>t.$emit("update:sorter","name"))}," Command (click to pin) ",2),[[xp,!o.getDisableStats().includes("cmdline")]])])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.processes,((e,r)=>(xu(),Au("tr",{key:r,style:{cursor:"pointer"},onClick:t=>o.setExtendedStats(e.pid)},[Al(Iu("td",{scope:"row",class:xs(o.getCpuPercentAlert(e))},As(-1==e.cpu_percent?"?":e.cpu_percent),3),[[xp,!o.getDisableStats().includes("cpu_percent")]]),Al(Iu("td",{scope:"row",class:xs(o.getMemoryPercentAlert(e))},As(-1==e.memory_percent?"?":t.$filters.number(e.memory_percent,1)),3),[[xp,!o.getDisableStats().includes("memory_percent")]]),Al(Iu("td",{scope:"row"},As(t.$filters.bytes(e.memvirt)),513),[[xp,!o.getDisableStats().includes("memory_info")]]),Al(Iu("td",{scope:"row"},As(t.$filters.bytes(e.memres)),513),[[xp,!o.getDisableStats().includes("memory_info")]]),Al(Iu("td",{scope:"row"},As(e.pid),513),[[xp,!o.getDisableStats().includes("pid")]]),Al(Iu("td",{scope:"row"},As(e.username),513),[[xp,!o.getDisableStats().includes("username")]]),Al(Iu("td",{scope:"row",class:""},As(e.timeforhuman),513),[[xp,!o.getDisableStats().includes("cpu_times")]]),"?"==e.timeplus?Al((xu(),Au("td",Lb,"?",512)),[[xp,!o.getDisableStats().includes("cpu_times")]]):Ru("v-if",!0),Al(Iu("td",{scope:"row",class:""},As(-1==e.num_threads?"?":e.num_threads),513),[[xp,!o.getDisableStats().includes("num_threads")]]),Al(Iu("td",{scope:"row",class:xs({nice:e.isNice})},As(t.$filters.exclamation(e.nice)),3),[[xp,!o.getDisableStats().includes("nice")]]),Al(Iu("td",{scope:"row",class:xs({status:"R"==e.status})},As(e.status),3),[[xp,!o.getDisableStats().includes("status")]]),Al(Iu("td",{scope:"row",class:""},As(t.$filters.bytes(e.io_read)),513),[[xp,o.ioReadWritePresentProcesses&&!o.getDisableStats().includes("io_counters")]]),Al(Iu("td",{scope:"row",class:"text-start"},As(t.$filters.bytes(e.io_write)),513),[[xp,o.ioReadWritePresentProcesses&&!o.getDisableStats().includes("io_counters")]]),Al(Iu("td",{scope:"row",class:"text-truncate"},As(e.name),513),[[xp,o.args.process_short_name&&!o.getDisableStats().includes("cmdline")]]),Al(Iu("td",{scope:"row",class:"text-truncate"},As(e.cmdline),513),[[xp,!o.args.process_short_name&&!o.getDisableStats().includes("cmdline")]])],8,jb)))),128))])])])])),Ru(" Display programs "),o.args.programs?(xu(),Au("section",Nb,[Iu("div",Mb,[Iu("table",Rb,[Iu("thead",null,[Iu("tr",null,[Al(Iu("td",{class:xs(["sortable","cpu_percent"===r.sorter.column&&"sort"]),onClick:e[13]||(e[13]=e=>t.$emit("update:sorter","cpu_percent"))},[Al(Iu("span",null,"CPU%",512),[[xp,!o.args.disable_irix]]),Al(Iu("span",null,"CPUi",512),[[xp,o.args.disable_irix]])],2),[[xp,!o.getDisableStats().includes("cpu_percent")]]),Al(Iu("td",{class:xs(["sortable","memory_percent"===r.sorter.column&&"sort"]),onClick:e[14]||(e[14]=e=>t.$emit("update:sorter","memory_percent"))}," MEM% ",2),[[xp,!o.getDisableStats().includes("memory_percent")]]),Al(Iu("td",null," NPROCS ",512),[[xp,!o.getDisableStats().includes("nprocs")]]),Al(Iu("td",{scope:"row",class:xs(["sortable","name"===r.sorter.column&&"sort"]),onClick:e[15]||(e[15]=e=>t.$emit("update:sorter","name"))}," Command (click to pin) ",2),[[xp,!o.getDisableStats().includes("cmdline")]])])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.programs,((e,r)=>(xu(),Au("tr",{key:r},[Al(Iu("td",{scope:"row",class:xs(o.getCpuPercentAlert(e))},As(-1==e.cpu_percent?"?":e.cpu_percent),3),[[xp,!o.getDisableStats().includes("cpu_percent")]]),Al(Iu("td",{scope:"row",class:xs(o.getMemoryPercentAlert(e))},As(-1==e.memory_percent?"?":t.$filters.number(e.memory_percent,1)),3),[[xp,!o.getDisableStats().includes("memory_percent")]]),Al(Iu("td",{scope:"row"},As(e.nprocs),513),[[xp,!o.getDisableStats().includes("nprocs")]]),Al(Iu("td",{scope:"row",class:"text-truncate"},As(e.name),513),[[xp,o.args.process_short_name&&!o.getDisableStats().includes("cmdline")]]),Al(Iu("td",{scope:"row"},As(e.cmdline),513),[[xp,!o.args.process_short_name&&!o.getDisableStats().includes("cmdline")]])])))),128))])])]),Iu("div",qb,[Iu("table",Bb,[Iu("thead",null,[Iu("tr",null,[Al(Iu("td",{class:xs(["sortable","cpu_percent"===r.sorter.column&&"sort"]),onClick:e[16]||(e[16]=e=>t.$emit("update:sorter","cpu_percent"))},[Al(Iu("span",null,"CPU%",512),[[xp,!o.args.disable_irix]]),Al(Iu("span",null,"CPUi",512),[[xp,o.args.disable_irix]])],2),[[xp,!o.getDisableStats().includes("cpu_percent")]]),Al(Iu("td",{class:xs(["sortable","memory_percent"===r.sorter.column&&"sort"]),onClick:e[17]||(e[17]=e=>t.$emit("update:sorter","memory_percent"))}," MEM% ",2),[[xp,!o.getDisableStats().includes("memory_percent")]]),Al(Iu("td",$b," VIRT ",512),[[xp,!o.getDisableStats().includes("memory_info")]]),Al(Iu("td",Ub," RES ",512),[[xp,!o.getDisableStats().includes("memory_info")]]),Al(Iu("td",null," NPROCS ",512),[[xp,!o.getDisableStats().includes("nprocs")]]),Al(Iu("td",{scope:"row",class:xs(["sortable","username"===r.sorter.column&&"sort"]),onClick:e[18]||(e[18]=e=>t.$emit("update:sorter","username"))}," USER ",2),[[xp,!o.getDisableStats().includes("username")]]),Al(Iu("td",{scope:"row",class:xs(["",["sortable","timemillis"===r.sorter.column&&"sort"]]),onClick:e[19]||(e[19]=e=>t.$emit("update:sorter","timemillis"))}," TIME+ ",2),[[xp,!o.getDisableStats().includes("cpu_times")]]),Al(Iu("td",{scope:"row",class:xs(["",["sortable","num_threads"===r.sorter.column&&"sort"]]),onClick:e[20]||(e[20]=e=>t.$emit("update:sorter","num_threads"))}," THR ",2),[[xp,!o.getDisableStats().includes("num_threads")]]),Al(Iu("td",Fb,"NI",512),[[xp,!o.getDisableStats().includes("nice")]]),Al(Iu("td",zb,"S ",512),[[xp,!o.getDisableStats().includes("status")]]),Al(Iu("td",{scope:"row",class:xs(["",["sortable","io_counters"===r.sorter.column&&"sort"]]),onClick:e[21]||(e[21]=e=>t.$emit("update:sorter","io_counters"))}," IORps ",2),[[xp,o.ioReadWritePresentPrograms&&!o.getDisableStats().includes("io_counters")]]),Al(Iu("td",{scope:"row",class:xs(["text-start",["sortable","io_counters"===r.sorter.column&&"sort"]]),onClick:e[22]||(e[22]=e=>t.$emit("update:sorter","io_counters"))}," IOWps ",2),[[xp,o.ioReadWritePresentPrograms&&!o.getDisableStats().includes("io_counters")]]),Al(Iu("td",{scope:"row",class:xs(["sortable","name"===r.sorter.column&&"sort"]),onClick:e[23]||(e[23]=e=>t.$emit("update:sorter","name"))}," Command (click to pin) ",2),[[xp,!o.getDisableStats().includes("cmdline")]])])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.programs,((e,r)=>(xu(),Au("tr",{key:r},[Al(Iu("td",{scope:"row",class:xs(o.getCpuPercentAlert(e))},As(-1==e.cpu_percent?"?":e.cpu_percent),3),[[xp,!o.getDisableStats().includes("cpu_percent")]]),Al(Iu("td",{scope:"row",class:xs(o.getMemoryPercentAlert(e))},As(-1==e.memory_percent?"?":t.$filters.number(e.memory_percent,1)),3),[[xp,!o.getDisableStats().includes("memory_percent")]]),Al(Iu("td",{scope:"row"},As(t.$filters.bytes(e.memvirt)),513),[[xp,!o.getDisableStats().includes("memory_info")]]),Al(Iu("td",{scope:"row"},As(t.$filters.bytes(e.memres)),513),[[xp,!o.getDisableStats().includes("memory_info")]]),Al(Iu("td",{scope:"row"},As(e.nprocs),513),[[xp,!o.getDisableStats().includes("nprocs")]]),Al(Iu("td",{scope:"row"},As(e.username),513),[[xp,!o.getDisableStats().includes("username")]]),Al(Iu("td",{scope:"row",class:""},As(e.timeforhuman),513),[[xp,!o.getDisableStats().includes("cpu_times")]]),Al(Iu("td",{scope:"row",class:""},As(-1==e.num_threads?"?":e.num_threads),513),[[xp,!o.getDisableStats().includes("num_threads")]]),Al(Iu("td",{scope:"row",class:xs({nice:e.isNice})},As(t.$filters.exclamation(e.nice)),3),[[xp,!o.getDisableStats().includes("nice")]]),Al(Iu("td",{scope:"row",class:xs({status:"R"==e.status})},As(e.status),3),[[xp,!o.getDisableStats().includes("status")]]),Al(Iu("td",{scope:"row",class:""},As(t.$filters.bytes(e.io_read)),513),[[xp,o.ioReadWritePresentPrograms&&!o.getDisableStats().includes("io_counters")]]),Al(Iu("td",{scope:"row",class:"text-start"},As(t.$filters.bytes(e.io_write)),513),[[xp,o.ioReadWritePresentPrograms&&!o.getDisableStats().includes("io_counters")]]),Al(Iu("td",{scope:"row",class:"text-truncate"},As(e.name),513),[[xp,o.args.process_short_name&&!o.getDisableStats().includes("cmdline")]]),Al(Iu("td",{scope:"row"},As(e.cmdline),513),[[xp,!o.args.process_short_name&&!o.getDisableStats().includes("cmdline")]])])))),128))])])])])):Ru("v-if",!0)],64)}]])},props:{data:{type:Object}},data:()=>({store:qd,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}})}}}},Gb=(0,Yd.A)(Vb,[["render",function(t,e,r,n,i,o){const s=ec("glances-plugin-processcount"),a=ec("glances-plugin-amps"),l=ec("glances-plugin-processlist");return o.args.disable_process?(xu(),Au("div",rb,"PROCESSES DISABLED (press 'z' to display)")):(xu(),Au("div",nb,[Pu(s,{sorter:i.sorter,data:r.data},null,8,["sorter","data"]),o.args.disable_amps?Ru("v-if",!0):(xu(),Au("div",ib,[Iu("div",ob,[Pu(a,{data:r.data},null,8,["data"])])])),Pu(l,{sorter:i.sorter,data:r.data,"onUpdate:sorter":e[0]||(e[0]=t=>o.args.sort_processes_key=t)},null,8,["sorter","data"])]))}]]),Wb={id:"quicklook",class:"plugin"},Kb={class:"d-flex justify-content-between"},Xb={class:"text-start text-truncate"},Qb={key:0,class:"text-end d-none d-xxl-block frequency"},Zb={class:"table-responsive"},Yb={class:"table table-sm table-borderless"},Jb={key:0},ty={scope:"col",class:"progress"},ey=["aria-valuenow"],ry={scope:"col",class:"text-end"},ny={scope:"col"},iy={scope:"col",class:"progress"},oy=["aria-valuenow"],sy={scope:"col",class:"text-end"},ay={scope:"col"},ly={scope:"col",class:"progress"},cy=["aria-valuenow"],uy={scope:"col",class:"text-end"};const py={props:{data:{type:Object}},data:()=>({store:qd}),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(){const 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}));const 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()}}},dy=(0,Yd.A)(py,[["render",function(t,e,r,n,i,o){return xu(),Au("section",Wb,[Iu("div",Kb,[Iu("span",Xb,As(o.cpu_name),1),o.cpu_hz_current?(xu(),Au("span",Qb,As(o.cpu_hz_current)+"/"+As(o.cpu_hz)+"Ghz ",1)):Ru("v-if",!0)]),Iu("div",Zb,[Iu("table",Yb,[o.args.percpu?Ru("v-if",!0):(xu(),Au("tr",Jb,[e[0]||(e[0]=Iu("td",{scope:"col"},"CPU",-1)),Iu("td",ty,[Iu("div",{class:xs(`progress-bar progress-bar-${o.getDecoration("cpu")}`),role:"progressbar","aria-valuenow":o.cpu,"aria-valuemin":"0","aria-valuemax":"100",style:hs(`width: ${o.cpu}%;`)},"   ",14,ey)]),Iu("td",ry,[Iu("span",null,As(o.cpu)+"%",1)])])),o.args.percpu?(xu(!0),Au(fu,{key:1},oc(o.percpus,((t,e)=>(xu(),Au("tr",{key:e},[Iu("td",ny,"CPU"+As(t.number),1),Iu("td",iy,[Iu("div",{class:xs(`progress-bar progress-bar-${o.getDecoration("cpu")}`),role:"progressbar","aria-valuenow":t.total,"aria-valuemin":"0","aria-valuemax":"100",style:hs(`width: ${t.total}%;`)},"   ",14,oy)]),Iu("td",sy,[Iu("span",null,As(t.total)+"%",1)])])))),128)):Ru("v-if",!0),(xu(!0),Au(fu,null,oc(o.stats_list_after_cpu,(t=>(xu(),Au("tr",null,[Iu("td",ay,As(t.toUpperCase()),1),Iu("td",ly,[Iu("div",{class:xs(`progress-bar progress-bar-${o.getDecoration(t)}`),role:"progressbar","aria-valuenow":o.stats[t],"aria-valuemin":"0","aria-valuemax":"100",style:hs(`width: ${o.stats[t]}%;`)},"   ",14,cy)]),Iu("td",uy,[Iu("span",null,As(o.stats[t])+"%",1)])])))),256))])])])}]]),my={key:0,id:"raid",class:"plugin"},fy={class:"table table-sm table-borderless margin-bottom"},hy={scope:"col"},gy={scope:"row"},by={class:"warning"};const yy={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"}},vy=(0,Yd.A)(yy,[["render",function(t,e,r,n,i,o){return o.hasDisks?(xu(),Au("section",my,[Iu("table",fy,[Iu("thead",null,[Iu("tr",null,[Iu("th",hy,"RAID disks "+As(o.disks.length),1),e[0]||(e[0]=Iu("th",{scope:"col",class:"text-end"},"Used",-1)),e[1]||(e[1]=Iu("th",{scope:"col",class:"text-end"},"Total",-1))])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.disks,((t,e)=>(xu(),Au("tr",{key:e},[Iu("td",gy,[Nu(As(t.type.toUpperCase())+" "+As(t.name)+" ",1),Al(Iu("div",by,"└─ Degraded mode",512),[[xp,t.degraded]]),Al(Iu("div",null,"   └─ "+As(t.config),513),[[xp,t.degraded]]),Al(Iu("div",{class:"critical"},"└─ Status "+As(t.status),513),[[xp,t.inactive]]),t.inactive?(xu(!0),Au(fu,{key:0},oc(t.components,((e,r)=>(xu(),Au("div",{key:r},"    "+As(r===t.components.length-1?"└─":"├─")+" disk "+As(e.number)+": "+As(e.name),1)))),128)):Ru("v-if",!0)]),Al(Iu("td",{scope:"row",class:xs(["text-end",o.getAlert(t)])},As(t.used),3),[[xp,"active"==t.status]]),Al(Iu("td",{scope:"row",class:xs(["text-end",o.getAlert(t)])},As(t.available),3),[[xp,"active"==t.status]])])))),128))])])])):Ru("v-if",!0)}]]),xy={key:0,id:"smart",class:"plugin"},wy={class:"table table-sm table-borderless margin-bottom"},_y={scope:"row"},ky={scope:"row"},Sy={scope:"row",class:"text-end text-truncate"};const Ay={props:{data:{type:Object}},computed:{stats(){return this.data.stats.smart},drives(){return(Array.isArray(this.stats)?this.stats:[]).map((t=>({name:t.DeviceName,details:Object.entries(t).filter((([t])=>"DeviceName"!==t)).sort((([,t],[,e])=>t.namee.name?1:0)).map((([t,e])=>e))})))},hasDrives(){return this.drives.length>0}}},Ey=(0,Yd.A)(Ay,[["render",function(t,e,r,n,i,o){return o.hasDrives?(xu(),Au("section",xy,[Iu("table",wy,[e[1]||(e[1]=Iu("thead",null,[Iu("tr",null,[Iu("th",{scope:"col"},"SMART DISKS"),Iu("th",{scope:"col",class:"text-end"})])],-1)),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.drives,((t,r)=>(xu(),Au(fu,{key:r},[Iu("tr",null,[Iu("td",_y,As(t.name),1),e[0]||(e[0]=Iu("td",{scope:"col",class:"text-end"},null,-1))]),(xu(!0),Au(fu,null,oc(t.details,((t,e)=>(xu(),Au("tr",{key:e},[Iu("td",ky,As(t.name),1),Iu("td",Sy,As(t.raw),1)])))),128))],64)))),128))])])])):Ru("v-if",!0)}]]),Cy={key:0,id:"sensors",class:"plugin"},Ty={class:"table table-sm table-borderless"},Oy={scope:"row"};const Dy={props:{data:{type:Object}},data:()=>({store:qd}),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()}}},Iy=(0,Yd.A)(Dy,[["render",function(t,e,r,n,i,o){return o.hasSensors?(xu(),Au("section",Cy,[Iu("table",Ty,[e[0]||(e[0]=Iu("thead",null,[Iu("tr",null,[Iu("th",{scope:"col"},"SENSORS"),Iu("th",{scope:"col",class:"text-end"})])],-1)),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.sensors,((t,e)=>(xu(),Au("tr",{key:e},[Iu("td",Oy,As(t.label),1),Iu("td",{class:xs(["text-end",o.getDecoration(t.label)])},As(t.value)+As(t.unit),3)])))),128))])])])):Ru("v-if",!0)}]]),Py={id:"system",class:"plugin"},jy={key:0,class:"critical"},Ly={class:"title"},Ny={class:"text-truncate"};const My={props:{data:{type:Object}},data:()=>({store:qd}),computed:{stats(){return this.data.stats.system},hostname(){return this.stats.hostname},humanReadableName(){return this.stats.hr_name},isDisconnected(){return"FAILURE"===this.store.status}}},Ry=(0,Yd.A)(My,[["render",function(t,e,r,n,i,o){return xu(),Au("section",Py,[o.isDisconnected?(xu(),Au("span",jy,"Disconnected from")):Ru("v-if",!0),Iu("span",Ly,As(o.hostname),1),Iu("span",Ny,As(o.humanReadableName),1)])}]]),qy={id:"uptime",class:"plugin"};const By={props:{data:{type:Object}},computed:{value(){return this.data.stats.uptime}}},$y=(0,Yd.A)(By,[["render",function(t,e,r,n,i,o){return xu(),Au("section",qy,[Iu("span",null,"Uptime: "+As(o.value),1)])}]]),Uy={key:0,id:"vms",class:"plugin"},Fy={class:"table table-sm table-borderless table-striped table-hover"};const zy={props:{data:{type:Object}},data:()=>({store:qd,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:"-",cpu_time:null!=t.cpu_time?t.cpu_time:"-",cpu_time_rate_per_sec:null!=t.cpu_time_rate_per_sec?t.cpu_time_rate_per_sec:"?",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,am.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","cpu_time","memory_usage","name"].includes(t)||(this.sorter={column:this.args.sort_processes_key||"cpu_time",auto:!this.args.sort_processes_key,isReverseColumn:function(t){return!["name"].includes(t)},getColumnLabel:function(t){return{load_1min:"load",cpu_time:"CPU time",memory_usage:"memory consumption",name:"VM name",None:"None"}[t]||t}})}}}},Hy=(0,Yd.A)(zy,[["render",function(t,e,r,n,i,o){return o.vms.length?(xu(),Au("section",Uy,[e[8]||(e[8]=Iu("span",{class:"title"},"VMs",-1)),Al(Iu("span",null,As(o.vms.length)+" sorted by "+As(i.sorter.getColumnLabel(i.sorter.column)),513),[[xp,o.vms.length>1]]),Iu("table",Fy,[Iu("thead",null,[Iu("tr",null,[Al(Iu("td",null,"Engine",512),[[xp,o.showEngine]]),Iu("td",{class:xs(["sortable","name"===i.sorter.column&&"sort"]),onClick:e[0]||(e[0]=t=>o.args.sort_processes_key="name")}," Name ",2),e[4]||(e[4]=Iu("td",null,"Status",-1)),e[5]||(e[5]=Iu("td",null,"Core",-1)),Iu("td",{class:xs(["sortable","cpu_time"===i.sorter.column&&"sort"]),onClick:e[1]||(e[1]=t=>o.args.sort_processes_key="cpu_time")}," CPU% ",2),Iu("td",{class:xs(["sortable","memory_usage"===i.sorter.column&&"sort"]),onClick:e[2]||(e[2]=t=>o.args.sort_processes_key="memory_usage")}," MEM ",2),e[6]||(e[6]=Iu("td",null,"/ MAX",-1)),Iu("td",{class:xs(["sortable","load_1min"===i.sorter.column&&"sort"]),onClick:e[3]||(e[3]=t=>o.args.sort_processes_key="load_1min")}," LOAD 1/5/15min ",2),e[7]||(e[7]=Iu("td",null,"Release",-1))])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.vms,((e,r)=>(xu(),Au("tr",{key:r},[Al(Iu("td",null,As(e.engine),513),[[xp,o.showEngine]]),Iu("td",null,As(e.name),1),Iu("td",{class:xs("stopped"==e.status?"careful":"ok")},As(e.status),3),Iu("td",null,As(t.$filters.number(e.cpu_count,1)),1),Iu("td",null,As(t.$filters.number(e.cpu_time,1)),1),Iu("td",null,As(t.$filters.bytes(e.memory_usage)),1),Iu("td",null," / "+As(t.$filters.bytes(e.memory_total)),1),Iu("td",null,As(t.$filters.number(e.load_1min))+"/"+As(t.$filters.number(e.load_5min))+"/"+As(t.$filters.number(e.load_15min)),1),Iu("td",null,As(e.release),1)])))),128))])])])):Ru("v-if",!0)}]]),Vy={key:0,id:"wifi",class:"plugin"},Gy={class:"table table-sm table-borderless margin-bottom"},Wy={scope:"row"};const Ky={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,am.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()}}},Xy=(0,Yd.A)(Ky,[["render",function(t,e,r,n,i,o){return o.hasHotpots?(xu(),Au("section",Vy,[Iu("table",Gy,[e[0]||(e[0]=Iu("thead",null,[Iu("tr",null,[Iu("th",{scope:"col"},"WIFI"),Iu("th",{scope:"col",class:"text-end"},"dBm")])],-1)),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.hotspots,((e,r)=>(xu(),Au("tr",{key:r},[Iu("td",Wy,As(t.$filters.limitTo(e.ssid,20)),1),Iu("td",{scope:"row",class:xs(["text-end",o.getDecoration(e,"quality_level")])},As(e.quality_level),3)])))),128))])])])):Ru("v-if",!0)}]]),Qy=JSON.parse('{"H":["network","ports","wifi","connections","diskio","fs","irq","folders","raid","smart","sensors"]}'),Zy={components:{GlancesHelp:Jd,GlancesPluginAlert:cm,GlancesPluginCloud:mm,GlancesPluginConnections:wm,GlancesPluginCpu:Xm,GlancesPluginDiskio:yf,GlancesPluginContainers:Bf,GlancesPluginFolders:Vf,GlancesPluginFs:th,GlancesPluginGpu:yh,GlancesPluginHostname:kh,GlancesPluginIp:Ih,GlancesPluginIrq:Rh,GlancesPluginLoad:Hh,GlancesPluginMem:cg,GlancesPluginMemswap:gg,GlancesPluginNetwork:Ig,GlancesPluginNow:Lg,GlancesPluginPercpu:zg,GlancesPluginPorts:eb,GlancesPluginProcess:Gb,GlancesPluginQuicklook:dy,GlancesPluginRaid:vy,GlancesPluginSensors:Iy,GlancesPluginSmart:Ey,GlancesPluginSystem:Ry,GlancesPluginUptime:$y,GlancesPluginVms:Hy,GlancesPluginWifi:Xy},data:()=>({store:qd}),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(","):Qy.H}},watch:{title(){document&&(document.title=this.title)}},mounted(){const t=window.__GLANCES__||{},e=isFinite(t["refresh-time"])?parseInt(t["refresh-time"],10):void 0;Fd.init(e),this.setupHotKeys()},beforeUnmount(){Nd.unbind()},methods:{setupHotKeys(){Nd("a",(()=>{this.store.args.sort_processes_key=null})),Nd("c",(()=>{this.store.args.sort_processes_key="cpu_percent"})),Nd("m",(()=>{this.store.args.sort_processes_key="memory_percent"})),Nd("u",(()=>{this.store.args.sort_processes_key="username"})),Nd("p",(()=>{this.store.args.sort_processes_key="name"})),Nd("i",(()=>{this.store.args.sort_processes_key="io_counters"})),Nd("t",(()=>{this.store.args.sort_processes_key="timemillis"})),Nd("shift+A",(()=>{this.store.args.disable_amps=!this.store.args.disable_amps})),Nd("d",(()=>{this.store.args.disable_diskio=!this.store.args.disable_diskio})),Nd("shift+Q",(()=>{this.store.args.enable_irq=!this.store.args.enable_irq})),Nd("f",(()=>{this.store.args.disable_fs=!this.store.args.disable_fs})),Nd("j",(()=>{this.store.args.programs=!this.store.args.programs})),Nd("k",(()=>{this.store.args.disable_connections=!this.store.args.disable_connections})),Nd("n",(()=>{this.store.args.disable_network=!this.store.args.disable_network})),Nd("s",(()=>{this.store.args.disable_sensors=!this.store.args.disable_sensors})),Nd("2",(()=>{this.store.args.disable_left_sidebar=!this.store.args.disable_left_sidebar})),Nd("z",(()=>{this.store.args.disable_process=!this.store.args.disable_process})),Nd("shift+S",(()=>{this.store.args.process_short_name=!this.store.args.process_short_name})),Nd("shift+D",(()=>{this.store.args.disable_containers=!this.store.args.disable_containers})),Nd("b",(()=>{this.store.args.byte=!this.store.args.byte})),Nd("shift+B",(()=>{this.store.args.diskio_iops=!this.store.args.diskio_iops})),Nd("l",(()=>{this.store.args.disable_alert=!this.store.args.disable_alert})),Nd("1",(()=>{this.store.args.percpu=!this.store.args.percpu})),Nd("h",(()=>{this.store.args.help_tag=!this.store.args.help_tag})),Nd("shift+T",(()=>{this.store.args.network_sum=!this.store.args.network_sum})),Nd("shift+U",(()=>{this.store.args.network_cumul=!this.store.args.network_cumul})),Nd("shift+F",(()=>{this.store.args.fs_free_space=!this.store.args.fs_free_space})),Nd("3",(()=>{this.store.args.disable_quicklook=!this.store.args.disable_quicklook})),Nd("6",(()=>{this.store.args.meangpu=!this.store.args.meangpu})),Nd("shift+G",(()=>{this.store.args.disable_gpu=!this.store.args.disable_gpu})),Nd("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})),Nd("shift+I",(()=>{this.store.args.disable_ip=!this.store.args.disable_ip})),Nd("shift+P",(()=>{this.store.args.disable_ports=!this.store.args.disable_ports})),Nd("shift+V",(()=>{this.store.args.disable_vms=!this.store.args.disable_vms})),Nd("shift+W",(()=>{this.store.args.disable_wifi=!this.store.args.disable_wifi})),Nd("0",(()=>{this.store.args.disable_irix=!this.store.args.disable_irix}))}}};const Yy=Fp((0,Yd.A)(Zy,[["render",function(t,e,r,n,i,o){const s=ec("glances-help"),a=ec("glances-plugin-hostname"),l=ec("glances-plugin-uptime"),c=ec("glances-plugin-system"),u=ec("glances-plugin-ip"),p=ec("glances-plugin-now"),d=ec("glances-plugin-cloud"),m=ec("glances-plugin-quicklook"),f=ec("glances-plugin-cpu"),h=ec("glances-plugin-gpu"),g=ec("glances-plugin-mem"),b=ec("glances-plugin-memswap"),y=ec("glances-plugin-load"),v=ec("glances-plugin-vms"),x=ec("glances-plugin-containers"),w=ec("glances-plugin-process"),_=ec("glances-plugin-alert");return o.dataLoaded?o.args.help_tag?(xu(),Eu(s,{key:1})):(xu(),Au("main",Gp,[Ru(" Display minimal header on low screen size (smarthphone) "),Iu("div",Wp,[Iu("div",Kp,[o.args.disable_system?Ru("v-if",!0):(xu(),Au("div",Xp,[Pu(a,{data:o.data},null,8,["data"])])),o.args.disable_uptime?Ru("v-if",!0):(xu(),Au("div",Qp,[Pu(l,{data:o.data},null,8,["data"])]))])]),Ru(" Display standard header on others screen sizes "),Iu("div",Zp,[Iu("div",Yp,[o.args.disable_system?Ru("v-if",!0):(xu(),Au("div",Jp,[Pu(c,{data:o.data},null,8,["data"])])),o.args.disable_ip?Ru("v-if",!0):(xu(),Au("div",td,[Pu(u,{data:o.data},null,8,["data"])])),o.args.disable_now?Ru("v-if",!0):(xu(),Au("div",ed,[Pu(p,{data:o.data},null,8,["data"])])),o.args.disable_uptime?Ru("v-if",!0):(xu(),Au("div",rd,[Pu(l,{data:o.data},null,8,["data"])]))])]),Iu("div",nd,[o.args.disable_cloud?Ru("v-if",!0):(xu(),Au("div",id,[Pu(d,{data:o.data},null,8,["data"])]))]),Ru(" Display top menu with CPU, MEM, LOAD..."),Iu("div",od,[Ru(" Quicklook "),o.args.disable_quicklook?Ru("v-if",!0):(xu(),Au("div",sd,[Pu(m,{data:o.data},null,8,["data"])])),Ru(" CPU "),o.args.disable_cpu&&o.args.percpu?Ru("v-if",!0):(xu(),Au("div",ad,[Pu(f,{data:o.data},null,8,["data"])])),Ru(' TODO: percpu need to be refactor\n
\n \n
\n
\n \n
'),Ru(" GPU "),!o.args.disable_gpu&&o.hasGpu?(xu(),Au("div",ld,[Pu(h,{data:o.data},null,8,["data"])])):Ru("v-if",!0),Ru(" MEM "),o.args.disable_mem?Ru("v-if",!0):(xu(),Au("div",cd,[Pu(g,{data:o.data},null,8,["data"])])),Ru(" SWAP "),o.args.disable_memswap?Ru("v-if",!0):(xu(),Au("div",ud,[Pu(b,{data:o.data},null,8,["data"])])),Ru(" LOAD "),o.args.disable_load?Ru("v-if",!0):(xu(),Au("div",pd,[Pu(y,{data:o.data},null,8,["data"])]))]),Ru(" Display bottom of the screen with sidebar and processlist "),Iu("div",dd,[Iu("div",md,[o.args.disable_left_sidebar?Ru("v-if",!0):(xu(),Au("div",{key:0,class:xs(["col-3 d-none d-md-block",{"sidebar-min":!o.args.percpu,"sidebar-max":o.args.percpu}])},[(xu(!0),Au(fu,null,oc(o.leftMenu,(t=>{return xu(),Au(fu,null,[o.args[`disable_${t}`]?Ru("v-if",!0):(xu(),Eu((e=`glances-plugin-${t}`,Wo(e)?nc(tc,e,!1)||e:e||rc),{key:0,id:`${t}`,data:o.data},null,8,["id","data"]))],64);var e})),256))],2)),Iu("div",{class:xs(["col",{"sidebar-min":!o.args.percpu,"sidebar-max":o.args.percpu}])},[o.args.disable_vms?Ru("v-if",!0):(xu(),Eu(v,{key:0,data:o.data},null,8,["data"])),o.args.disable_containers?Ru("v-if",!0):(xu(),Eu(x,{key:1,data:o.data},null,8,["data"])),Pu(w,{data:o.data},null,8,["data"]),o.args.disable_alert?Ru("v-if",!0):(xu(),Eu(_,{key:2,data:o.data},null,8,["data"]))],2)])])])):(xu(),Au("div",Vp,e[0]||(e[0]=[Iu("div",{class:"loader"},"Glances is loading...",-1)])))}]]));Yy.config.globalProperties.$filters=e,Yy.mount("#app")})()})(); \ No newline at end of file +const fd="undefined"!=typeof navigator&&navigator.userAgent.toLowerCase().indexOf("firefox")>0;function hd(t,e,r,n){t.addEventListener?t.addEventListener(e,r,n):t.attachEvent&&t.attachEvent("on".concat(e),r)}function gd(t,e,r,n){t.removeEventListener?t.removeEventListener(e,r,n):t.detachEvent&&t.detachEvent("on".concat(e),r)}function bd(t,e){const r=e.slice(0,e.length-1);for(let e=0;e=0;)e[r-1]+=",",e.splice(r,1),r=e.lastIndexOf("");return e}const vd={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,"-":fd?173:189,"=":fd?61:187,";":fd?59:186,"'":222,"[":219,"]":221,"\\":220},xd={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,command:91},wd={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},_d={16:!1,18:!1,17:!1,91:!1},kd={};for(let t=1;t<20;t++)vd["f".concat(t)]=111+t;let Sd=[],Ad=null,Ed="all";const Cd=new Map,Td=t=>vd[t.toLowerCase()]||xd[t.toLowerCase()]||t.toUpperCase().charCodeAt(0);function Od(t){Ed=t||"all"}function Dd(){return Ed||"all"}function Id(t){if(void 0===t)Object.keys(kd).forEach((t=>{Array.isArray(kd[t])&&kd[t].forEach((t=>Pd(t))),delete kd[t]})),Md(null);else if(Array.isArray(t))t.forEach((t=>{t.key&&Pd(t)}));else if("object"==typeof t)t.key&&Pd(t);else if("string"==typeof t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n{let{key:e,scope:r,method:n,splitKey:i="+"}=t;yd(e).forEach((t=>{const e=t.split(i),o=e.length,s=e[o-1],a="*"===s?"*":Td(s);if(!kd[a])return;r||(r=Dd());const l=o>1?bd(xd,e):[],c=[];kd[a]=kd[a].filter((t=>{const e=(!n||t.method===n)&&t.scope===r&&function(t,e){const r=t.length>=e.length?t:e,n=t.length>=e.length?e:t;let i=!0;for(let t=0;tMd(t)))}))};function jd(t,e,r,n){if(e.element!==n)return;let i;if(e.scope===r||"all"===e.scope){i=e.mods.length>0;for(const t in _d)Object.prototype.hasOwnProperty.call(_d,t)&&(!_d[t]&&e.mods.indexOf(+t)>-1||_d[t]&&-1===e.mods.indexOf(+t))&&(i=!1);(0!==e.mods.length||_d[16]||_d[18]||_d[17]||_d[91])&&!i&&"*"!==e.shortcut||(e.keys=[],e.keys=e.keys.concat(Sd),!1===e.method(t,e)&&(t.preventDefault?t.preventDefault():t.returnValue=!1,t.stopPropagation&&t.stopPropagation(),t.cancelBubble&&(t.cancelBubble=!0)))}}function Ld(t,e){const r=kd["*"];let n=t.keyCode||t.which||t.charCode;if(!Nd.filter.call(this,t))return;if(93!==n&&224!==n||(n=91),-1===Sd.indexOf(n)&&229!==n&&Sd.push(n),["metaKey","ctrlKey","altKey","shiftKey"].forEach((e=>{const r=wd[e];t[e]&&-1===Sd.indexOf(r)?Sd.push(r):!t[e]&&Sd.indexOf(r)>-1?Sd.splice(Sd.indexOf(r),1):"metaKey"===e&&t[e]&&(Sd=Sd.filter((t=>t in wd||t===n)))})),n in _d){_d[n]=!0;for(const t in xd)xd[t]===n&&(Nd[t]=!0);if(!r)return}for(const e in _d)Object.prototype.hasOwnProperty.call(_d,e)&&(_d[e]=t[wd[e]]);t.getModifierState&&(!t.altKey||t.ctrlKey)&&t.getModifierState("AltGraph")&&(-1===Sd.indexOf(17)&&Sd.push(17),-1===Sd.indexOf(18)&&Sd.push(18),_d[17]=!0,_d[18]=!0);const i=Dd();if(r)for(let n=0;n1&&(i=bd(xd,t)),(t="*"===(t=t[t.length-1])?"*":Td(t))in kd||(kd[t]=[]),kd[t].push({keyup:l,keydown:c,scope:o,mods:i,shortcut:n[a],method:r,key:n[a],splitKey:u,element:s});if(void 0!==s&&window){if(!Cd.has(s)){const t=function(){return Ld(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.event,s)},e=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.event;Ld(t,s),function(t){let e=t.keyCode||t.which||t.charCode;const r=Sd.indexOf(e);if(r>=0&&Sd.splice(r,1),t.key&&"meta"===t.key.toLowerCase()&&Sd.splice(0,Sd.length),93!==e&&224!==e||(e=91),e in _d){_d[e]=!1;for(const t in xd)xd[t]===e&&(Nd[t]=!1)}}(t)};Cd.set(s,{keydownListener:t,keyupListenr:e,capture:p}),hd(s,"keydown",t,p),hd(s,"keyup",e,p)}if(!Ad){const t=()=>{Sd=[]};Ad={listener:t,capture:p},hd(window,"focus",t,p)}}}function Md(t){const e=Object.values(kd).flat();if(e.findIndex((e=>{let{element:r}=e;return r===t}))<0){const{keydownListener:e,keyupListenr:r,capture:n}=Cd.get(t)||{};e&&r&&(gd(t,"keyup",r,n),gd(t,"keydown",e,n),Cd.delete(t))}if(e.length<=0||Cd.size<=0){if(Object.keys(Cd).forEach((t=>{const{keydownListener:e,keyupListenr:r,capture:n}=Cd.get(t)||{};e&&r&&(gd(t,"keyup",r,n),gd(t,"keydown",e,n),Cd.delete(t))})),Cd.clear(),Object.keys(kd).forEach((t=>delete kd[t])),Ad){const{listener:t,capture:e}=Ad;gd(window,"focus",t,e),Ad=null}}}const Rd={getPressedKeyString:function(){return Sd.map((t=>{return e=t,Object.keys(vd).find((t=>vd[t]===e))||(t=>Object.keys(xd).find((e=>xd[e]===t)))(t)||String.fromCharCode(t);var e}))},setScope:Od,getScope:Dd,deleteScope:function(t,e){let r,n;t||(t=Dd());for(const e in kd)if(Object.prototype.hasOwnProperty.call(kd,e))for(r=kd[e],n=0;n{let{element:e}=t;return Md(e)}))}else n++;Dd()===t&&Od(e||"all")},getPressedKeyCodes:function(){return Sd.slice(0)},getAllKeyCodes:function(){const t=[];return Object.keys(kd).forEach((e=>{kd[e].forEach((e=>{let{key:r,scope:n,mods:i,shortcut:o}=e;t.push({scope:n,shortcut:o,mods:i,keys:r.split("+").map((t=>Td(t)))})}))})),t},isPressed:function(t){return"string"==typeof t&&(t=Td(t)),-1!==Sd.indexOf(t)},filter:function(t){const e=t.target||t.srcElement,{tagName:r}=e;let n=!0;const i="INPUT"===r&&!["checkbox","radio","range","button","file","reset","submit","color"].includes(e.type);return(e.isContentEditable||(i||"TEXTAREA"===r||"SELECT"===r)&&!e.readOnly)&&(n=!1),n},trigger:function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"all";Object.keys(kd).forEach((r=>{kd[r].filter((r=>r.scope===e&&r.shortcut===t)).forEach((t=>{t&&t.method&&t.method()}))}))},unbind:Id,keyMap:vd,modifier:xd,modifierMap:wd};for(const t in Rd)Object.prototype.hasOwnProperty.call(Rd,t)&&(Nd[t]=Rd[t]);if("undefined"!=typeof window){const t=window.hotkeys;Nd.noConflict=e=>(e&&window.hotkeys===Nd&&(window.hotkeys=t),Nd),window.hotkeys=Nd}const qd=Ra({args:void 0,config:void 0,data:void 0,status:"IDLE"});var Bd=r(4644),$d=r.n(Bd);const Ud=new class{limits={};limitSuffix=["critical","careful","warning"];setLimits(t){this.limits=t}getLimit(t,e){return null!=this.limits[t]&&null!=this.limits[t][e]?this.limits[t][e]:null}getAlert(t,e,r,n,i){var o=(i=i||!1)?"_log":"",s=100*(r=r||0)/(n=n||100);if(null!=this.limits[t])for(var a=0;a=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 Fd=new class{data=void 0;init(t=60){let e;const r=()=>(qd.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,qd.data=e,qd.status="SUCCESS"})).catch((t=>{console.log(t),qd.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=>{Ud.setLimits(t)})),fetch("api/4/args",{method:"GET"}).then((t=>t.json())).then(((t={})=>{qd.args={...qd.args,...t}})),fetch("api/4/config",{method:"GET"}).then((t=>t.json())).then(((t={})=>{qd.config={...qd.config,...t}}))}getData(){return this.data}};const zd=new class{constructor(){this.favico=new($d())({animation:"none"})}badge(t){this.favico.badge(t)}reset(){this.favico.reset()}},Hd={key:0},Vd={class:"container-fluid"},Gd={class:"row"},Wd={class:"col-sm-12 col-lg-24 title"},Kd={class:"row"},Xd={class:"col-sm-12 col-lg-24"},Qd={class:"table table-sm table-borderless table-striped table-hover"};const Zd={data:()=>({help:void 0}),mounted(){fetch("api/4/help",{method:"GET"}).then((t=>t.json())).then((t=>this.help=t))}};var Yd=r(6262);const Jd=(0,Yd.A)(Zd,[["render",function(t,e,r,n,i,o){return i.help?(xu(),Au("div",Hd,[Iu("div",Vd,[Iu("div",Gd,[Iu("div",Wd,As(i.help.version)+" "+As(i.help.psutil_version),1)]),e[0]||(e[0]=Iu("div",{class:"row"}," ",-1)),Iu("div",Kd,[Iu("div",Xd,As(i.help.configuration_file),1)]),e[1]||(e[1]=Iu("div",{class:"row"}," ",-1))]),Iu("table",Qd,[Iu("thead",null,[Iu("tr",null,[Iu("th",null,As(i.help.header_sort.replace(":","")),1),Iu("th",null,As(i.help.header_show_hide.replace(":","")),1),Iu("th",null,As(i.help.header_toggle.replace(":","")),1),Iu("th",null,As(i.help.header_miscellaneous.replace(":","")),1)])]),Iu("tbody",null,[Iu("tr",null,[Iu("td",null,As(i.help.sort_auto),1),Iu("td",null,As(i.help.show_hide_application_monitoring),1),Iu("td",null,As(i.help.toggle_bits_bytes),1),Iu("td",null,As(i.help.misc_erase_process_filter),1)]),Iu("tr",null,[Iu("td",null,As(i.help.sort_cpu),1),Iu("td",null,As(i.help.show_hide_diskio),1),Iu("td",null,As(i.help.toggle_count_rate),1),Iu("td",null,As(i.help.misc_generate_history_graphs),1)]),Iu("tr",null,[Iu("td",null,As(i.help.sort_io_rate),1),Iu("td",null,As(i.help.show_hide_containers),1),Iu("td",null,As(i.help.toggle_used_free),1),Iu("td",null,As(i.help.misc_help),1)]),Iu("tr",null,[Iu("td",null,As(i.help.sort_mem),1),Iu("td",null,As(i.help.show_hide_top_extended_stats),1),Iu("td",null,As(i.help.toggle_bar_sparkline),1),Iu("td",null,As(i.help.misc_accumulate_processes_by_program),1)]),Iu("tr",null,[Iu("td",null,As(i.help.sort_process_name),1),Iu("td",null,As(i.help.show_hide_filesystem),1),Iu("td",null,As(i.help.toggle_separate_combined),1),e[2]||(e[2]=Iu("td",null," ",-1))]),Iu("tr",null,[Iu("td",null,As(i.help.sort_cpu_times),1),Iu("td",null,As(i.help.show_hide_gpu),1),Iu("td",null,As(i.help.toggle_live_cumulative),1),Iu("td",null,As(i.help.misc_reset_processes_summary_min_max),1)]),Iu("tr",null,[Iu("td",null,As(i.help.sort_user),1),Iu("td",null,As(i.help.show_hide_ip),1),Iu("td",null,As(i.help.toggle_linux_percentage),1),Iu("td",null,As(i.help.misc_quit),1)]),Iu("tr",null,[e[3]||(e[3]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_tcp_connection),1),Iu("td",null,As(i.help.toggle_cpu_individual_combined),1),Iu("td",null,As(i.help.misc_reset_history),1)]),Iu("tr",null,[e[4]||(e[4]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_alert),1),Iu("td",null,As(i.help.toggle_gpu_individual_combined),1),Iu("td",null,As(i.help.misc_delete_warning_alerts),1)]),Iu("tr",null,[e[5]||(e[5]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_network),1),Iu("td",null,As(i.help.toggle_short_full),1),Iu("td",null,As(i.help.misc_delete_warning_and_critical_alerts),1)]),Iu("tr",null,[e[6]||(e[6]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.sort_cpu_times),1),e[7]||(e[7]=Iu("td",null," ",-1)),e[8]||(e[8]=Iu("td",null," ",-1))]),Iu("tr",null,[e[9]||(e[9]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_irq),1),e[10]||(e[10]=Iu("td",null," ",-1)),e[11]||(e[11]=Iu("td",null," ",-1))]),Iu("tr",null,[e[12]||(e[12]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_raid_plugin),1),e[13]||(e[13]=Iu("td",null," ",-1)),e[14]||(e[14]=Iu("td",null," ",-1))]),Iu("tr",null,[e[15]||(e[15]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_sensors),1),e[16]||(e[16]=Iu("td",null," ",-1)),e[17]||(e[17]=Iu("td",null," ",-1))]),Iu("tr",null,[e[18]||(e[18]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_wifi_module),1),e[19]||(e[19]=Iu("td",null," ",-1)),e[20]||(e[20]=Iu("td",null," ",-1))]),Iu("tr",null,[e[21]||(e[21]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_processes),1),e[22]||(e[22]=Iu("td",null," ",-1)),e[23]||(e[23]=Iu("td",null," ",-1))]),Iu("tr",null,[e[24]||(e[24]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_left_sidebar),1),e[25]||(e[25]=Iu("td",null," ",-1)),e[26]||(e[26]=Iu("td",null," ",-1))]),Iu("tr",null,[e[27]||(e[27]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_quick_look),1),e[28]||(e[28]=Iu("td",null," ",-1)),e[29]||(e[29]=Iu("td",null," ",-1))]),Iu("tr",null,[e[30]||(e[30]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_cpu_mem_swap),1),e[31]||(e[31]=Iu("td",null," ",-1)),e[32]||(e[32]=Iu("td",null," ",-1))]),Iu("tr",null,[e[33]||(e[33]=Iu("td",null," ",-1)),Iu("td",null,As(i.help.show_hide_all),1),e[34]||(e[34]=Iu("td",null," ",-1)),e[35]||(e[35]=Iu("td",null," ",-1))])])]),e[36]||(e[36]=Mu('
 

For an exhaustive list of key bindings, click here.

 

Press h to came back to Glances.

',5))])):Ru("v-if",!0)}]]),tm={id:"alerts",class:"plugin"},em={key:0,class:"title"},rm={key:1,class:"title"},nm={class:"table table-sm table-borderless"},im={scope:"row"},om={scope:"row"},sm={scope:"row"};var am=r(2543);const lm={props:{data:{type:Object}},computed:{stats(){return this.data.stats.alert},alerts(){return(this.stats||[]).map((t=>{const e={};if(e.state=t.state,e.type=t.type,e.begin=1e3*t.begin,e.end=1e3*t.end,e.ongoing=-1==t.end,e.min=t.min,e.avg=t.avg,e.max=t.max,t.top.length>0&&(e.top=": "+t.top.join(", ")),!e.ongoing){const t=e.end-e.begin,r=parseInt(t/1e3%60),n=parseInt(t/6e4%60),i=parseInt(t/36e5%24);e.duration=(0,am.padStart)(i,2,"0")+":"+(0,am.padStart)(n,2,"0")+":"+(0,am.padStart)(r,2,"0")}return e}))},hasAlerts(){return this.countAlerts>0},countAlerts(){return this.alerts.length},hasOngoingAlerts(){return this.countOngoingAlerts>0},countOngoingAlerts(){return this.alerts.filter((({ongoing:t})=>t)).length}},watch:{countOngoingAlerts(){this.countOngoingAlerts?zd.badge(this.countOngoingAlerts):zd.reset()}},methods:{formatDate(t){const e=(new Date).getTimezoneOffset(),r=Math.trunc(Math.abs(e)/60),n=Math.abs(e%60);let i=e<=0?"+":"-";i+=String(r).padStart(2,"0")+String(n).padStart(2,"0");const o=new Date(t);return String(o.getFullYear())+"-"+String(o.getMonth()+1).padStart(2,"0")+"-"+String(o.getDate()).padStart(2,"0")+" "+String(o.getHours()).padStart(2,"0")+":"+String(o.getMinutes()).padStart(2,"0")+":"+String(o.getSeconds()).padStart(2,"0")+"("+i+")"},clear(){fetch("api/4/events/clear/all",{method:"POST",headers:{"Content-Type":"application/json"}}).then((t=>t.json())).then((t=>product.value=t))}}},cm=(0,Yd.A)(lm,[["render",function(t,e,r,n,i,o){return xu(),Au("section",tm,[o.hasAlerts?(xu(),Au("span",em,[Nu(" Warning or critical alerts (last "+As(o.countAlerts)+" entries) ",1),Iu("span",null,[Iu("button",{class:"button",onClick:e[0]||(e[0]=t=>o.clear())},"Clear alerts")])])):(xu(),Au("span",rm,"No warning or critical alert detected")),Iu("table",nm,[Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.alerts,((e,r)=>(xu(),Au("tr",{key:r},[Iu("td",im,[Iu("span",null,As(o.formatDate(e.begin)),1)]),Iu("td",om,[Iu("span",null,"("+As(e.ongoing?"ongoing":e.duration)+")",1)]),Iu("td",sm,[Al(Iu("span",null,As(e.state)+" on ",513),[[xp,!e.ongoing]]),Iu("span",{class:xs(e.state.toLowerCase())},As(e.type),3),Iu("span",null,"("+As(t.$filters.number(e.max,1))+")",1),Iu("span",null,As(e.top),1)])])))),128))])])])}]]),um={key:0,id:"cloud",class:"plugin"},pm={class:"title"};const dm={props:{data:{type:Object}},computed:{stats(){return this.data.stats.cloud},provider(){return void 0!==this.stats.id?`${stats.platform}`:null},instance(){const{stats:t}=this;return void 0!==this.stats.id?`${t.type} instance ${t.name} (${t.region})`:null}}},mm=(0,Yd.A)(dm,[["render",function(t,e,r,n,i,o){return o.instance||o.provider?(xu(),Au("section",um,[Iu("span",pm,As(o.provider),1),Nu(" "+As(o.instance),1)])):Ru("v-if",!0)}]]),fm={id:"connections",class:"plugin"},hm={class:"table table-sm table-borderless margin-bottom"},gm={class:"text-end"},bm={class:"text-end"},ym={class:"text-end"},vm={class:"text-end"};const xm={props:{data:{type:Object}},computed:{stats(){return this.data.stats.connections},view(){return this.data.views.connections},listen(){return this.stats.LISTEN},initiated(){return this.stats.initiated},established(){return this.stats.ESTABLISHED},terminated(){return this.stats.terminated},tracked(){return{count:this.stats.nf_conntrack_count,max:this.stats.nf_conntrack_max}}},methods:{getDecoration(t){if(void 0!==this.view[t])return this.view[t].decoration.toLowerCase()}}},wm=(0,Yd.A)(xm,[["render",function(t,e,r,n,i,o){return xu(),Au("section",fm,[Iu("table",hm,[e[5]||(e[5]=Iu("thead",null,[Iu("tr",null,[Iu("th",{scope:"col"},"TCP CONNECTIONS"),Iu("th",{scope:"col",class:"text-end"})])],-1)),Iu("tbody",null,[Iu("tr",null,[e[0]||(e[0]=Iu("td",{scope:"row"},"Listen",-1)),Iu("td",gm,As(o.listen),1)]),Iu("tr",null,[e[1]||(e[1]=Iu("td",{scope:"row"},"Initiated",-1)),Iu("td",bm,As(o.initiated),1)]),Iu("tr",null,[e[2]||(e[2]=Iu("td",{scope:"row"},"Established",-1)),Iu("td",ym,As(o.established),1)]),Iu("tr",null,[e[3]||(e[3]=Iu("td",{scope:"row"},"Terminated",-1)),Iu("td",vm,As(o.terminated),1)]),Iu("tr",null,[e[4]||(e[4]=Iu("td",{scope:"row"},"Tracked",-1)),Iu("td",{class:xs(["text-end",o.getDecoration("nf_conntrack_percent")])},As(o.tracked.count)+"/"+As(o.tracked.max),3)])])])])}]]),_m={id:"cpu",class:"plugin"},km={class:"table-responsive"},Sm={class:"table-sm table-borderless"},Am={class:"justify-content-between"},Em={scope:"col"},Cm={class:"table table-sm table-borderless"},Tm={key:0,scope:"col"},Om={class:"d-none d-xl-block d-xxl-block"},Dm={class:"table table-sm table-borderless"},Im={scope:"col"},Pm={scope:"col",class:"text-end"},jm={scope:"col"},Lm={scope:"col",class:"text-end"},Nm={scope:"col"},Mm={scope:"col",class:"text-end"},Rm={key:0,scope:"col"},qm={scope:"col"},Bm={class:"d-none d-xxl-block"},$m={class:"table table-sm table-borderless"},Um={key:0,scope:"col"},Fm={scope:"col"},zm={scope:"col",class:"text-end"},Hm={key:0,scope:"col"},Vm={key:1,scope:"col",class:"text-end"},Gm={key:0,scope:"col"},Wm={key:1,scope:"col",class:"text-end"};const Km={props:{data:{type:Object}},computed:{stats(){return this.data.stats.cpu},view(){return this.data.views.cpu},isLinux(){return this.data.isLinux},isSunOS(){return this.data.isSunOS},isWindows(){return this.data.isWindows},total(){return this.stats.total},user(){return this.stats.user},system(){return this.stats.system},idle(){return this.stats.idle},nice(){return this.stats.nice},irq(){return this.stats.irq},iowait(){return this.stats.iowait},dpc(){return this.stats.dpc},steal(){return this.stats.steal},guest(){return this.stats.guest},ctx_switches(){const{stats:t}=this;return t.ctx_switches?Math.floor(t.ctx_switches/t.time_since_update):null},interrupts(){const{stats:t}=this;return t.interrupts?Math.floor(t.interrupts/t.time_since_update):null},soft_interrupts(){const{stats:t}=this;return t.soft_interrupts?Math.floor(t.soft_interrupts/t.time_since_update):null},syscalls(){const{stats:t}=this;return t.syscalls?Math.floor(t.syscalls/t.time_since_update):null}},methods:{getDecoration(t){if(void 0!==this.view[t])return this.view[t].decoration.toLowerCase()}}},Xm=(0,Yd.A)(Km,[["render",function(t,e,r,n,i,o){return xu(),Au("section",_m,[Ru(" d-none d-xxl-block "),Iu("div",km,[Iu("table",Sm,[Iu("tbody",null,[Iu("tr",Am,[Iu("td",Em,[Iu("table",Cm,[Iu("tbody",null,[Iu("tr",null,[e[0]||(e[0]=Iu("th",{scope:"col"},"CPU",-1)),Iu("td",{scope:"col",class:xs(["text-end",o.getDecoration("total")])},[Iu("span",null,As(o.total)+"%",1)],2)]),Iu("tr",null,[e[1]||(e[1]=Iu("td",{scope:"col"},"user:",-1)),Iu("td",{scope:"col",class:xs(["text-end",o.getDecoration("user")])},[Iu("span",null,As(o.user)+"%",1)],2)]),Iu("tr",null,[e[2]||(e[2]=Iu("td",{scope:"col"},"system:",-1)),Iu("td",{scope:"col",class:xs(["text-end",o.getDecoration("system")])},[Iu("span",null,As(o.system)+"%",1)],2)]),Iu("tr",null,[null!=o.iowait?(xu(),Au("td",Tm,"iowait:")):Ru("v-if",!0),null!=o.iowait?(xu(),Au("td",{key:1,scope:"col",class:xs(["text-end",o.getDecoration("iowait")])},[Iu("span",null,As(o.iowait)+"%",1)],2)):Ru("v-if",!0)])])])]),Iu("td",null,[Iu("template",Om,[Iu("table",Dm,[Iu("tbody",null,[Iu("tr",null,[Al(Iu("td",Im,"idle:",512),[[xp,null!=o.idle]]),Al(Iu("td",Pm,[Iu("span",null,As(o.idle)+"%",1)],512),[[xp,null!=o.idle]])]),Iu("tr",null,[Al(Iu("td",jm,"irq:",512),[[xp,null!=o.irq]]),Al(Iu("td",Lm,[Iu("span",null,As(o.irq)+"%",1)],512),[[xp,null!=o.irq]])]),Iu("tr",null,[Al(Iu("td",Nm,"nice:",512),[[xp,null!=o.nice]]),Al(Iu("td",Mm,[Iu("span",null,As(o.nice)+"%",1)],512),[[xp,null!=o.nice]])]),Iu("tr",null,[null==o.iowait&&null!=o.dpc?(xu(),Au("td",Rm,"dpc:")):Ru("v-if",!0),null==o.iowait&&null!=o.dpc?(xu(),Au("td",{key:1,scope:"col",class:xs(["text-end",o.getDecoration("dpc")])},[Iu("span",null,As(o.dpc)+"%",1)],2)):Ru("v-if",!0),Al(Iu("td",qm,"steal:",512),[[xp,null!=o.steal]]),Al(Iu("td",{scope:"col",class:xs(["text-end",o.getDecoration("steal")])},[Iu("span",null,As(o.steal)+"%",1)],2),[[xp,null!=o.steal]])])])])])]),Iu("td",null,[Iu("template",Bm,[Iu("table",$m,[Iu("tbody",null,[Iu("tr",null,[null!=o.nice&&null!=o.ctx_switches?(xu(),Au("td",Um," ctx_sw:")):Ru("v-if",!0),null!=o.nice&&null!=o.ctx_switches?(xu(),Au("td",{key:1,scope:"col",class:xs(["text-end",o.getDecoration("ctx_switches")])},[Iu("span",null,As(o.ctx_switches),1)],2)):Ru("v-if",!0)]),Iu("tr",null,[Al(Iu("td",Fm,"inter:",512),[[xp,null!=o.interrupts]]),Al(Iu("td",zm,[Iu("span",null,As(o.interrupts),1)],512),[[xp,null!=o.interrupts]])]),Iu("tr",null,[o.isWindows||o.isSunOS||null==o.soft_interrupts?Ru("v-if",!0):(xu(),Au("td",Hm,"sw_int: ")),o.isWindows||o.isSunOS||null==o.soft_interrupts?Ru("v-if",!0):(xu(),Au("td",Vm,[Iu("span",null,As(o.soft_interrupts),1)]))]),Iu("tr",null,[o.isLinux&&null!=o.guest?(xu(),Au("td",Gm,"guest:")):Ru("v-if",!0),o.isLinux&&null!=o.guest?(xu(),Au("td",Wm,[Iu("span",null,As(o.guest)+"%",1)])):Ru("v-if",!0)])])])])])])])])])])}]]),Qm={key:0,id:"diskio",class:"plugin"},Zm={class:"table table-sm table-borderless margin-bottom"},Ym={scope:"col",class:"text-end w-25"},Jm={scope:"col",class:"text-end w-25"},tf={scope:"col",class:"text-end w-25"},ef={scope:"col",class:"text-end w-25"},rf={scope:"row",class:"text-truncate"};var nf=r(4728),of=r.n(nf);function sf(t,e){return af(t=8*Math.round(t),e)+"b"}function af(t,e){if(e=e||!1,isNaN(parseFloat(t))||!isFinite(t)||0==t)return t;const r=["Y","Z","E","P","T","G","M","K"],n={Y:12089258196146292e8,Z:11805916207174113e5,E:0x1000000000000000,P:0x4000000000000,T:1099511627776,G:1073741824,M:1048576,K:1024};for(var i=0;i1){var a=0;return s<10?a=2:s<100&&(a=1),e?a="MK"==o?0:(0,am.min)([1,a]):"K"==o&&(a=0),parseFloat(s).toFixed(a)+o}}return t.toFixed(0)}function lf(t){return void 0===t||""===t?"?":t}function cf(t,e,r){return e=e||0,r=r||" ",String(t).padStart(e,r)}function uf(t,e){return"function"!=typeof t.slice&&(t=String(t)),t.slice(0,e)}function pf(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 df(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 of()(r)}function mf(t,e){return void 0===t||isNaN(t)?"-":new Intl.NumberFormat("en-US","number"==typeof e?{maximumFractionDigits:e}:e).format(t)}function ff(t){for(var e=0,r=0;r`${t}: ${e}`)).join(" / ")}const bf={props:{data:{type:Object}},data:()=>({store:qd}),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:af(t.read_bytes_rate_per_sec),rxps:af(t.write_bytes_rate_per_sec)},count:{txps:af(t.read_count_rate_per_sec),rxps:af(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,am.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()}}},yf=(0,Yd.A)(bf,[["render",function(t,e,r,n,i,o){return o.hasDisks?(xu(),Au("section",Qm,[Iu("table",Zm,[Iu("thead",null,[Iu("tr",null,[e[0]||(e[0]=Iu("th",{scope:"col"},"DISK I/O",-1)),Al(Iu("th",Ym,"Rps",512),[[xp,!o.args.diskio_iops]]),Al(Iu("th",Jm,"Wps",512),[[xp,!o.args.diskio_iops]]),Al(Iu("th",tf,"IORps",512),[[xp,o.args.diskio_iops]]),Al(Iu("th",ef,"IOWps",512),[[xp,o.args.diskio_iops]])])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.disks,((e,r)=>(xu(),Au("tr",{key:r},[Iu("td",rf,As(t.$filters.minSize(e.alias?e.alias:e.name,16)),1),Al(Iu("td",{class:xs(["text-end w-25",o.getDecoration(e.name,"write_bytes_rate_per_sec")])},As(e.bitrate.txps),3),[[xp,!o.args.diskio_iops]]),Al(Iu("td",{class:xs(["text-end w-25",o.getDecoration(e.name,"read_bytes_rate_per_sec")])},As(e.bitrate.rxps),3),[[xp,!o.args.diskio_iops]]),Al(Iu("td",{class:"text-end w-25"},As(e.count.txps),513),[[xp,o.args.diskio_iops]]),Al(Iu("td",{class:"text-end w-25"},As(e.count.rxps),513),[[xp,o.args.diskio_iops]])])))),128))])])])):Ru("v-if",!0)}]]),vf={key:0,id:"containers",class:"plugin"},xf={class:"table-responsive d-md-none"},wf={class:"table table-sm table-borderless table-striped table-hover"},_f={scope:"col"},kf={scope:"col"},Sf={scope:"col"},Af={scope:"col"},Ef={class:"table-responsive d-none d-md-block"},Cf={class:"table table-sm table-borderless table-striped table-hover"},Tf={scope:"col"},Of={scope:"col"},Df={scope:"col"},If={scope:"col"},Pf={scope:"col"},jf={scope:"col"},Lf={scope:"col"},Nf={scope:"col"},Mf={scope:"col"},Rf={scope:"col"};const qf={props:{data:{type:Object}},data:()=>({store:qd,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,am.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:()=>Ud.getLimit("containers","containers_disable_stats")||[]}},Bf=(0,Yd.A)(qf,[["render",function(t,e,r,n,i,o){return o.containers.length?(xu(),Au("section",vf,[e[6]||(e[6]=Iu("span",{class:"title"},"CONTAINERS",-1)),Al(Iu("span",null,As(o.containers.length)+" sorted by "+As(i.sorter.getColumnLabel(i.sorter.column)),513),[[xp,o.containers.length>1]]),Iu("div",xf,[Iu("table",wf,[Iu("thead",null,[Iu("tr",null,[Al(Iu("td",_f,"Pod",512),[[xp,o.showPod]]),Al(Iu("td",{scope:"col",class:xs(["sortable","name"===i.sorter.column&&"sort"]),onClick:e[0]||(e[0]=t=>o.args.sort_processes_key="name")}," Name ",2),[[xp,!o.getDisableStats().includes("name")]]),Al(Iu("td",kf,"Status",512),[[xp,!o.getDisableStats().includes("status")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","cpu_percent"===i.sorter.column&&"sort"]),onClick:e[1]||(e[1]=t=>o.args.sort_processes_key="cpu_percent")}," CPU% ",2),[[xp,!o.getDisableStats().includes("cpu")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","memory_percent"===i.sorter.column&&"sort"]),onClick:e[2]||(e[2]=t=>o.args.sort_processes_key="memory_percent")}," MEM ",2),[[xp,!o.getDisableStats().includes("mem")]]),Al(Iu("td",Sf,"MAX",512),[[xp,!o.getDisableStats().includes("mem")]]),Al(Iu("td",Af,"Command",512),[[xp,!o.getDisableStats().includes("command")]])])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.containers,((e,r)=>(xu(),Au("tr",{key:r},[Al(Iu("td",{scope:"row"},As(e.pod_id||"-"),513),[[xp,o.showPod]]),Al(Iu("td",{scope:"row"},As(e.name),513),[[xp,!o.getDisableStats().includes("name")]]),Al(Iu("td",{scope:"row",class:xs("Paused"==e.status?"careful":"ok")},As(e.status),3),[[xp,!o.getDisableStats().includes("status")]]),Al(Iu("td",{scope:"row"},As(t.$filters.number(e.cpu_percent,1)),513),[[xp,!o.getDisableStats().includes("cpu")]]),Al(Iu("td",{scope:"row"},As(t.$filters.bytes(e.memory_usage)),513),[[xp,!o.getDisableStats().includes("mem")]]),Al(Iu("td",{scope:"row"},As(t.$filters.bytes(e.limit)),513),[[xp,!o.getDisableStats().includes("mem")]]),Al(Iu("td",{scope:"row",class:"text-truncate"},As(e.command),513),[[xp,!o.getDisableStats().includes("command")]])])))),128))])])]),Iu("div",Ef,[Iu("table",Cf,[Iu("thead",null,[Iu("tr",null,[Al(Iu("td",Tf,"Engine",512),[[xp,o.showEngine]]),Al(Iu("td",Of,"Pod",512),[[xp,o.showPod]]),Al(Iu("td",{scope:"col",class:xs(["sortable","name"===i.sorter.column&&"sort"]),onClick:e[3]||(e[3]=t=>o.args.sort_processes_key="name")}," Name ",2),[[xp,!o.getDisableStats().includes("name")]]),Al(Iu("td",Df,"Status",512),[[xp,!o.getDisableStats().includes("status")]]),Al(Iu("td",If,"Uptime",512),[[xp,!o.getDisableStats().includes("uptime")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","cpu_percent"===i.sorter.column&&"sort"]),onClick:e[4]||(e[4]=t=>o.args.sort_processes_key="cpu_percent")}," CPU% ",2),[[xp,!o.getDisableStats().includes("cpu")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","memory_percent"===i.sorter.column&&"sort"]),onClick:e[5]||(e[5]=t=>o.args.sort_processes_key="memory_percent")}," MEM ",2),[[xp,!o.getDisableStats().includes("mem")]]),Al(Iu("td",Pf,"MAX",512),[[xp,!o.getDisableStats().includes("mem")]]),Al(Iu("td",jf,"IORps",512),[[xp,!o.getDisableStats().includes("diskio")]]),Al(Iu("td",Lf,"IOWps",512),[[xp,!o.getDisableStats().includes("diskio")]]),Al(Iu("td",Nf,"RXps",512),[[xp,!o.getDisableStats().includes("networkio")]]),Al(Iu("td",Mf,"TXps",512),[[xp,!o.getDisableStats().includes("networkio")]]),Al(Iu("td",Rf,"Command",512),[[xp,!o.getDisableStats().includes("command")]])])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.containers,((e,r)=>(xu(),Au("tr",{key:r},[Al(Iu("td",{scope:"row"},As(e.engine),513),[[xp,o.showEngine]]),Al(Iu("td",{scope:"row"},As(e.pod_id||"-"),513),[[xp,o.showPod]]),Al(Iu("td",{scope:"row"},As(e.name),513),[[xp,!o.getDisableStats().includes("name")]]),Al(Iu("td",{scope:"row",class:xs("Paused"==e.status?"careful":"ok")},As(e.status),3),[[xp,!o.getDisableStats().includes("status")]]),Al(Iu("td",{scope:"row"},As(e.uptime),513),[[xp,!o.getDisableStats().includes("uptime")]]),Al(Iu("td",{scope:"row"},As(t.$filters.number(e.cpu_percent,1)),513),[[xp,!o.getDisableStats().includes("cpu")]]),Al(Iu("td",{scope:"row"},As(t.$filters.bytes(e.memory_usage)),513),[[xp,!o.getDisableStats().includes("mem")]]),Al(Iu("td",{scope:"row"},As(t.$filters.bytes(e.limit)),513),[[xp,!o.getDisableStats().includes("mem")]]),Al(Iu("td",{scope:"row"},As(t.$filters.bytes(e.io_rx)),513),[[xp,!o.getDisableStats().includes("iodisk")]]),Al(Iu("td",{scope:"row"},As(t.$filters.bytes(e.io_wx)),513),[[xp,!o.getDisableStats().includes("iodisk")]]),Al(Iu("td",{scope:"row"},As(t.$filters.bits(e.network_rx)),513),[[xp,!o.getDisableStats().includes("networkio")]]),Al(Iu("td",{scope:"row"},As(t.$filters.bits(e.network_tx)),513),[[xp,!o.getDisableStats().includes("networkio")]]),Al(Iu("td",{scope:"row",class:"text-truncate"},As(e.command),513),[[xp,!o.getDisableStats().includes("command")]])])))),128))])])])])):Ru("v-if",!0)}]]),$f={key:0,id:"folders",class:"plugin"},Uf={class:"table table-sm table-borderless margin-bottom"},Ff={scope:"row"},zf={key:0,class:"visible-lg-inline"};const Hf={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"}},Vf=(0,Yd.A)(Hf,[["render",function(t,e,r,n,i,o){return o.hasFolders?(xu(),Au("section",$f,[Iu("table",Uf,[e[0]||(e[0]=Iu("thead",null,[Iu("tr",null,[Iu("th",{scope:"col"},"FOLDERS"),Iu("th",{scope:"col",class:"text-end"},"Size")])],-1)),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.folders,((e,r)=>(xu(),Au("tr",{key:r},[Iu("td",Ff,As(e.path),1),Iu("td",{class:xs(["text-end",o.getDecoration(e)])},[e.errno>0?(xu(),Au("span",zf,"?")):Ru("v-if",!0),Nu(" "+As(t.$filters.bytes(e.size)),1)],2)])))),128))])])])):Ru("v-if",!0)}]]),Gf={key:0,id:"fs",class:"plugin"},Wf={class:"table table-sm table-borderless margin-bottom"},Kf={key:0,scope:"col",class:"text-end w-25"},Xf={key:1,scope:"col",class:"text-end w-25"},Qf={scope:"row"},Zf={key:0,class:"visible-lg-inline"},Yf={scope:"row",class:"text-end"};const Jf={props:{data:{type:Object}},data:()=>({store:qd}),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,am.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()}}},th=(0,Yd.A)(Jf,[["render",function(t,e,r,n,i,o){return o.hasFs?(xu(),Au("section",Gf,[Iu("table",Wf,[Iu("thead",null,[Iu("tr",null,[e[0]||(e[0]=Iu("th",{scope:"col"},"FILE SYSTEM",-1)),o.args.fs_free_space?(xu(),Au("th",Xf,"Free")):(xu(),Au("th",Kf,"Used")),e[1]||(e[1]=Iu("th",{scope:"col",class:"text-end w-25"},"Total",-1))])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.fileSystems,((e,r)=>(xu(),Au("tr",{key:r},[Iu("td",Qf,[Nu(As(t.$filters.minSize(e.alias?e.alias:e.mountPoint,16,t.begin=!1))+" ",1),(e.alias?e.alias:e.mountPoint).length+e.name.length<=15?(xu(),Au("span",Zf," ("+As(e.name)+") ",1)):Ru("v-if",!0)]),o.args.fs_free_space?(xu(),Au("td",{key:1,scope:"row",class:xs(["text-end",o.getDecoration(e.mountPoint,"used")])},As(t.$filters.bytes(e.free)),3)):(xu(),Au("td",{key:0,scope:"row",class:xs(["text-end",o.getDecoration(e.mountPoint,"used")])},As(t.$filters.bytes(e.used)),3)),Iu("td",Yf,As(t.$filters.bytes(e.size)),1)])))),128))])])])):Ru("v-if",!0)}]]),eh={key:0,id:"gpu",class:"plugin"},rh={class:"title text-truncate"},nh={key:0,class:"table-responsive"},ih={key:1,class:"col text-end"},oh={key:1,class:"col text-end"},sh={key:1,class:"col text-end"},ah={key:1,class:"table-responsive"},lh={class:"table table-sm table-borderless"},ch={class:"col"},uh={key:1,class:"col"},ph={key:3,class:"col text-end"},dh={key:2,class:"table-responsive"},mh={class:"table table-sm table-borderless"},fh={key:1,class:"col"},hh={key:1,class:"col"},gh={key:1,class:"col"};const bh={props:{data:{type:Object}},data:()=>({store:qd}),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(const 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"}},yh=(0,Yd.A)(bh,[["render",function(t,e,r,n,i,o){return null!=o.gpus?(xu(),Au("section",eh,[Iu("div",rh,As(o.name),1),Ru(" single gpu "),1===o.gpus.length?(xu(),Au("div",nh,[(xu(!0),Au(fu,null,oc(o.gpus,((r,n)=>(xu(),Au("table",{key:n,class:"table table-sm table-borderless"},[Iu("tbody",null,[Iu("tr",null,[e[1]||(e[1]=Iu("td",{class:"col"},"proc:",-1)),null!=r.proc?(xu(),Au("td",{key:0,class:xs(["col text-end",o.getDecoration(r.gpu_id,"proc")])},[Iu("span",null,As(t.$filters.number(r.proc,0))+"%",1)],2)):Ru("v-if",!0),null==r.proc?(xu(),Au("td",ih,e[0]||(e[0]=[Iu("span",null,"N/A",-1)]))):Ru("v-if",!0)]),Iu("tr",null,[e[3]||(e[3]=Iu("td",{class:"col"},"mem:",-1)),null!=r.mem?(xu(),Au("td",{key:0,class:xs(["col text-end",o.getDecoration(r.gpu_id,"mem")])},[Iu("span",null,As(t.$filters.number(r.mem,0))+"%",1)],2)):Ru("v-if",!0),null==r.mem?(xu(),Au("td",oh,e[2]||(e[2]=[Iu("span",null,"N/A",-1)]))):Ru("v-if",!0)]),Iu("tr",null,[e[5]||(e[5]=Iu("td",{class:"col"},"temp:",-1)),null!=r.temperature?(xu(),Au("td",{key:0,class:xs(["col text-end",o.getDecoration(r.gpu_id,"temperature")])},[Iu("span",null,As(t.$filters.number(r.temperature,0)),1)],2)):Ru("v-if",!0),null==r.temperature?(xu(),Au("td",sh,e[4]||(e[4]=[Iu("span",null,"N/A",-1)]))):Ru("v-if",!0)])])])))),128))])):Ru("v-if",!0),Ru(" multiple gpus - one line per gpu (no mean) "),!o.args.meangpu&&o.gpus.length>1?(xu(),Au("div",ah,[Iu("table",lh,[Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.gpus,((r,n)=>(xu(),Au("tr",{key:n},[Iu("td",ch,As(r.gpu_id)+":",1),null!=r.proc?(xu(),Au("td",{key:0,class:xs(["col",o.getDecoration(r.gpu_id,"proc")])},[Iu("span",null,As(t.$filters.number(r.proc,0))+"%",1)],2)):Ru("v-if",!0),null==r.proc?(xu(),Au("td",uh,e[6]||(e[6]=[Iu("span",null,"N/A",-1)]))):Ru("v-if",!0),e[8]||(e[8]=Iu("td",{class:"col"},"mem:",-1)),null!=r.mem?(xu(),Au("td",{key:2,class:xs(["col text-end",o.getDecoration(r.gpu_id,"mem")])},[Iu("span",null,As(t.$filters.number(r.mem,0))+"% ",1)],2)):Ru("v-if",!0),null==r.mem?(xu(),Au("td",ph,e[7]||(e[7]=[Iu("span",null,"N/A",-1)]))):Ru("v-if",!0)])))),128))])])])):Ru("v-if",!0),Ru(" multiple gpus - mean "),o.args.meangpu&&o.gpus.length>1?(xu(),Au("div",dh,[Iu("table",mh,[Iu("tbody",null,[Iu("tr",null,[e[10]||(e[10]=Iu("td",{class:"col"},"proc mean:",-1)),null!=o.mean.proc?(xu(),Au("td",{key:0,class:xs(["col",o.getMeanDecoration("proc")])},[Iu("span",null,As(t.$filters.number(o.mean.proc,0))+"%",1)],2)):Ru("v-if",!0),null==o.mean.proc?(xu(),Au("td",fh,e[9]||(e[9]=[Iu("span",null,"N/A",-1),Nu(">")]))):Ru("v-if",!0)]),Iu("tr",null,[e[12]||(e[12]=Iu("td",{class:"col"},"mem mean:",-1)),null!=o.mean.mem?(xu(),Au("td",{key:0,class:xs(["col",o.getMeanDecoration("mem")])},[Iu("span",null,As(t.$filters.number(o.mean.mem,0))+"%",1)],2)):Ru("v-if",!0),null==o.mean.mem?(xu(),Au("td",hh,e[11]||(e[11]=[Iu("span",null,"N/A",-1)]))):Ru("v-if",!0)]),Iu("tr",null,[e[14]||(e[14]=Iu("td",{class:"col"},"temp mean:",-1)),null!=o.mean.temperature?(xu(),Au("td",{key:0,class:xs(["col",o.getMeanDecoration("temperature")])},[Iu("span",null,As(t.$filters.number(o.mean.temperature,0))+"°C",1)],2)):Ru("v-if",!0),null==o.mean.temperature?(xu(),Au("td",gh,e[13]||(e[13]=[Iu("span",null,"N/A",-1)]))):Ru("v-if",!0)])])])])):Ru("v-if",!0)])):Ru("v-if",!0)}]]),vh={id:"system",class:"plugin"},xh={key:0,class:"critical"},wh={class:"title"};const _h={props:{data:{type:Object}},data:()=>({store:qd}),computed:{stats(){return this.data.stats.system},hostname(){return this.stats.hostname},isDisconnected(){return"FAILURE"===this.store.status}}},kh=(0,Yd.A)(_h,[["render",function(t,e,r,n,i,o){return xu(),Au("section",vh,[o.isDisconnected?(xu(),Au("span",xh,"Disconnected from")):Ru("v-if",!0),Iu("span",wh,As(o.hostname),1)])}]]),Sh={key:0,id:"ip",class:"plugin"},Ah={key:0,class:"title"},Eh={key:1},Ch={key:2,class:"title"},Th={key:3},Oh={key:4,class:"text-truncate"};const Dh={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}}},Ih=(0,Yd.A)(Dh,[["render",function(t,e,r,n,i,o){return o.address?(xu(),Au("section",Sh,[o.address?(xu(),Au("span",Ah,"IP")):Ru("v-if",!0),o.address?(xu(),Au("span",Eh,As(o.address)+"/"+As(o.maskCdir),1)):Ru("v-if",!0),o.publicAddress?(xu(),Au("span",Ch,"Pub")):Ru("v-if",!0),o.publicAddress?(xu(),Au("span",Th,As(o.publicAddress),1)):Ru("v-if",!0),o.publicInfo?(xu(),Au("span",Oh,As(o.publicInfo),1)):Ru("v-if",!0)])):Ru("v-if",!0)}]]),Ph={id:"irq",class:"plugin"},jh={class:"table table-sm table-borderless margin-bottom"},Lh={scope:"row"},Nh={scope:"row",class:"text-end"};const Mh={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})))}}},Rh=(0,Yd.A)(Mh,[["render",function(t,e,r,n,i,o){return xu(),Au("section",Ph,[Iu("table",jh,[e[0]||(e[0]=Iu("thead",null,[Iu("tr",null,[Iu("th",{scope:"col"},"IRQ"),Iu("th",{scope:"col",class:"text-end"},"Rate/s")])],-1)),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.irqs,((t,e)=>(xu(),Au("tr",{key:e},[Iu("td",Lh,As(t.irq_line),1),Iu("td",Nh,As(t.irq_rate),1)])))),128))])])])}]]),qh={key:0,id:"load",class:"plugin"},Bh={class:"table-responsive"},$h={class:"table table-sm table-borderless"},Uh={scope:"col",class:"text-end"},Fh={class:"text-end"};const zh={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()}}},Hh=(0,Yd.A)(zh,[["render",function(t,e,r,n,i,o){return null!=o.cpucore?(xu(),Au("section",qh,[Iu("div",Bh,[Iu("table",$h,[Iu("thead",null,[Iu("tr",null,[e[0]||(e[0]=Iu("th",{scope:"col"},"LOAD",-1)),Iu("td",Uh,As(o.cpucore)+"-core",1)])]),Iu("tbody",null,[Iu("tr",null,[e[1]||(e[1]=Iu("td",{scope:"row"},"1 min:",-1)),Iu("td",Fh,[Iu("span",null,As(t.$filters.number(o.min1,2)),1)])]),Iu("tr",null,[e[2]||(e[2]=Iu("td",{scope:"row"},"5 min:",-1)),Iu("td",{class:xs(["text-end",o.getDecoration("min5")])},[Iu("span",null,As(t.$filters.number(o.min5,2)),1)],2)]),Iu("tr",null,[e[3]||(e[3]=Iu("td",{scope:"row"},"15 min:",-1)),Iu("td",{class:xs(["text-end",o.getDecoration("min15")])},[Iu("span",null,As(t.$filters.number(o.min15,2)),1)],2)])])])])])):Ru("v-if",!0)}]]),Vh={id:"mem",class:"plugin"},Gh={class:"table-responsive"},Wh={class:"table-sm table-borderless"},Kh={class:"justify-content-between"},Xh={scope:"col"},Qh={class:"table table-sm table-borderless"},Zh={class:"text-end"},Yh={class:"d-none d-xl-block d-xxl-block"},Jh={class:"table table-sm table-borderless"},tg={scope:"col"},eg={scope:"col"},rg={scope:"col"},ng={scope:"col"},ig={scope:"col"},og={scope:"col"},sg={scope:"col"},ag={scope:"col"};const lg={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()}}},cg=(0,Yd.A)(lg,[["render",function(t,e,r,n,i,o){return xu(),Au("section",Vh,[Ru(" d-none d-xxl-block "),Iu("div",Gh,[Iu("table",Wh,[Iu("tbody",null,[Iu("tr",Kh,[Iu("td",Xh,[Iu("table",Qh,[Iu("tbody",null,[Iu("tr",null,[e[0]||(e[0]=Iu("th",{scope:"col"},"MEM",-1)),Iu("td",{scope:"col",class:xs(["text-end",o.getDecoration("percent")])},[Iu("span",null,As(o.percent)+"%",1)],2)]),Iu("tr",null,[e[1]||(e[1]=Iu("td",{scope:"row"},"total:",-1)),Iu("td",Zh,[Iu("span",null,As(t.$filters.bytes(o.total)),1)])]),Iu("tr",null,[e[2]||(e[2]=Iu("td",{scope:"row"},"used:",-1)),Iu("td",{class:xs(["text-end",o.getDecoration("used")])},[Iu("span",null,As(t.$filters.bytes(o.used,2)),1)],2)]),Iu("tr",null,[e[3]||(e[3]=Iu("td",{scope:"row"},"free:",-1)),Iu("td",{class:xs(["text-end",o.getDecoration("free")])},[Iu("span",null,As(t.$filters.bytes(o.free,2)),1)],2)])])])]),Iu("td",null,[Iu("template",Yh,[Iu("table",Jh,[Iu("tbody",null,[Iu("tr",null,[Al(Iu("td",tg," active: ",512),[[xp,null!=o.active]]),Al(Iu("td",eg,[Iu("span",null,As(t.$filters.bytes(o.active)),1)],512),[[xp,null!=o.active]])]),Iu("tr",null,[Al(Iu("td",rg," inactive: ",512),[[xp,null!=o.inactive]]),Al(Iu("td",ng,[Iu("span",null,As(t.$filters.bytes(o.inactive)),1)],512),[[xp,null!=o.inactive]])]),Iu("tr",null,[Al(Iu("td",ig," buffers: ",512),[[xp,null!=o.buffers]]),Al(Iu("td",og,[Iu("span",null,As(t.$filters.bytes(o.buffers)),1)],512),[[xp,null!=o.buffers]])]),Iu("tr",null,[Al(Iu("td",sg," cached: ",512),[[xp,null!=o.cached]]),Al(Iu("td",ag,[Iu("span",null,As(t.$filters.bytes(o.cached)),1)],512),[[xp,null!=o.cached]])])])])])])])])])])])}]]),ug={id:"memswap",class:"plugin"},pg={class:"table-responsive"},dg={class:"table table-sm table-borderless"},mg={class:"text-end"},fg={class:"text-end"};const hg={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()}}},gg=(0,Yd.A)(hg,[["render",function(t,e,r,n,i,o){return xu(),Au("section",ug,[Iu("div",pg,[Iu("table",dg,[Iu("thead",null,[Iu("tr",null,[e[0]||(e[0]=Iu("th",{scope:"col"},"SWAP",-1)),Iu("td",{scope:"col",class:xs(["text-end",o.getDecoration("percent")])},[Iu("span",null,As(o.percent)+"%",1)],2)])]),Iu("tbody",null,[Iu("tr",null,[e[1]||(e[1]=Iu("td",{scope:"row"},"total:",-1)),Iu("td",mg,[Iu("span",null,As(t.$filters.bytes(o.total)),1)])]),Iu("tr",null,[e[2]||(e[2]=Iu("td",{scope:"row"},"used:",-1)),Iu("td",{class:xs(["text-end",o.getDecoration("used")])},[Iu("span",null,As(t.$filters.bytes(o.used,2)),1)],2)]),Iu("tr",null,[e[3]||(e[3]=Iu("td",{scope:"row"},"free:",-1)),Iu("td",fg,[Iu("span",null,As(t.$filters.bytes(o.free,2)),1)])])])])])])}]]),bg={key:0,id:"network",class:"plugin"},yg={class:"table table-sm table-borderless margin-bottom"},vg={scope:"col",class:"text-end w-25"},xg={scope:"col",class:"text-end w-25"},wg={scope:"col",class:"text-end w-25"},_g={scope:"col",class:"text-end w-25"},kg={scope:"col",class:"text-end w-25"},Sg={scope:"col",class:"text-end w-25"},Ag={scope:"col",class:"text-end w-25"},Eg={scope:"col",class:"text-end w-25"},Cg={scope:"row",class:"visible-lg-inline text-truncate"},Tg={class:"text-end"},Og={class:"text-end"};const Dg={props:{data:{type:Object}},data:()=>({store:qd}),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,am.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()}}},Ig=(0,Yd.A)(Dg,[["render",function(t,e,r,n,i,o){return o.hasNetworks?(xu(),Au("section",bg,[Iu("table",yg,[Iu("thead",null,[Iu("tr",null,[e[0]||(e[0]=Iu("th",{scope:"col"},"NETWORK",-1)),Al(Iu("th",vg,"Rxps",512),[[xp,!o.args.network_cumul&&!o.args.network_sum]]),Al(Iu("th",xg,"Txps",512),[[xp,!o.args.network_cumul&&!o.args.network_sum]]),Al(Iu("th",wg,null,512),[[xp,!o.args.network_cumul&&o.args.network_sum]]),Al(Iu("th",_g,"Rx+Txps",512),[[xp,!o.args.network_cumul&&o.args.network_sum]]),Al(Iu("th",kg,"Rx",512),[[xp,o.args.network_cumul&&!o.args.network_sum]]),Al(Iu("th",Sg,"Tx",512),[[xp,o.args.network_cumul&&!o.args.network_sum]]),Al(Iu("th",Ag,null,512),[[xp,o.args.network_cumul&&o.args.network_sum]]),Al(Iu("th",Eg,"Rx+Tx",512),[[xp,o.args.network_cumul&&o.args.network_sum]])])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.networks,((e,r)=>(xu(),Au("tr",{key:r},[Iu("td",Cg,As(t.$filters.minSize(e.alias?e.alias:e.ifname,16)),1),Al(Iu("td",{class:xs(["text-end",o.getDecoration(e.interfaceName,"bytes_recv_rate_per_sec")])},As(o.args.byte?t.$filters.bytes(e.bytes_recv_rate_per_sec):t.$filters.bits(e.bytes_recv_rate_per_sec)),3),[[xp,!o.args.network_cumul&&!o.args.network_sum]]),Al(Iu("td",{class:xs(["text-end",o.getDecoration(e.interfaceName,"bytes_sent_rate_per_sec")])},As(o.args.byte?t.$filters.bytes(e.bytes_sent_rate_per_sec):t.$filters.bits(e.bytes_sent_rate_per_sec)),3),[[xp,!o.args.network_cumul&&!o.args.network_sum]]),Al(Iu("td",Tg,null,512),[[xp,!o.args.network_cumul&&o.args.network_sum]]),Al(Iu("td",{class:"text-end"},As(o.args.byte?t.$filters.bytes(e.bytes_all_rate_per_sec):t.$filters.bits(e.bytes_all_rate_per_sec)),513),[[xp,!o.args.network_cumul&&o.args.network_sum]]),Al(Iu("td",{class:"text-end"},As(o.args.byte?t.$filters.bytes(e.bytes_recv):t.$filters.bits(e.bytes_recv)),513),[[xp,o.args.network_cumul&&!o.args.network_sum]]),Al(Iu("td",{class:"text-end"},As(o.args.byte?t.$filters.bytes(e.bytes_sent):t.$filters.bits(e.bytes_sent)),513),[[xp,o.args.network_cumul&&!o.args.network_sum]]),Al(Iu("td",Og,null,512),[[xp,o.args.network_cumul&&o.args.network_sum]]),Al(Iu("td",{class:"text-end"},As(o.args.byte?t.$filters.bytes(e.bytes_all):t.$filters.bits(e.bytes_all)),513),[[xp,o.args.network_cumul&&o.args.network_sum]])])))),128))])])])):Ru("v-if",!0)}]]),Pg={id:"now",class:"plugin"};const jg={props:{data:{type:Object}},computed:{date_custom(){return this.data.stats.now.custom}}},Lg=(0,Yd.A)(jg,[["render",function(t,e,r,n,i,o){return xu(),Au("section",Pg,[Iu("span",null,As(o.date_custom),1)])}]]),Ng={id:"percpu",class:"plugin"},Mg={class:"table-responsive"},Rg={class:"table-sm table-borderless"},qg={key:0,scope:"col"},Bg={key:1,scope:"col"},$g={key:0,scope:"col"},Ug={key:1,scope:"col"};const Fg={props:{data:{type:Object}},data:()=>({store:qd}),computed:{args(){return this.store.args||{}},config(){return this.store.config||{}},percpuStats(){return this.data.stats.percpu}},methods:{getUserAlert:t=>Ud.getAlert("percpu","percpu_user_",t.user),getSystemAlert:t=>Ud.getAlert("percpu","percpu_system_",t.system),getIOWaitAlert:t=>Ud.getAlert("percpu","percpu_iowait_",t.system)}},zg=(0,Yd.A)(Fg,[["render",function(t,e,r,n,i,o){return xu(),Au("section",Ng,[Ru(" d-none d-xl-block d-xxl-block "),Iu("div",Mg,[Iu("table",Rg,[Iu("thead",null,[Iu("tr",null,[o.args.disable_quicklook?(xu(),Au("th",qg,"CPU")):Ru("v-if",!0),o.args.disable_quicklook?(xu(),Au("td",Bg,"total")):Ru("v-if",!0),e[0]||(e[0]=Iu("td",{scope:"col"},"user",-1)),e[1]||(e[1]=Iu("td",{scope:"col"},"system",-1)),e[2]||(e[2]=Iu("td",{scope:"col"},"idle",-1)),e[3]||(e[3]=Iu("td",{scope:"col"},"iowait",-1)),e[4]||(e[4]=Iu("td",{scope:"col"},"steel",-1))])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.percpuStats,((t,e)=>(xu(),Au("tr",{key:e},[o.args.disable_quicklook?(xu(),Au("td",$g,"CPU"+As(t.cpu_number),1)):Ru("v-if",!0),o.args.disable_quicklook?(xu(),Au("td",Ug,As(t.total)+"%",1)):Ru("v-if",!0),Iu("td",{scope:"col",class:xs(o.getUserAlert(t))},As(t.user)+"%",3),Iu("td",{scope:"col",class:xs(o.getSystemAlert(t))},As(t.system)+"%",3),Al(Iu("td",{scope:"col"},As(t.idle)+"%",513),[[xp,null!=t.idle]]),Al(Iu("td",{scope:"col",class:xs(o.getIOWaitAlert(t))},As(t.iowait)+"%",3),[[xp,null!=t.iowait]]),Al(Iu("td",{scope:"col"},As(t.steal)+"%",513),[[xp,null!=t.steal]])])))),128))])])])])}]]),Hg={key:0,id:"ports",class:"plugin"},Vg={class:"table table-sm table-borderless margin-bottom"},Gg={scope:"row"},Wg={key:0},Kg={key:1},Xg={key:2},Qg={key:3},Zg={key:0},Yg={key:1},Jg={key:2};const tb={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"}},eb=(0,Yd.A)(tb,[["render",function(t,e,r,n,i,o){return o.hasPorts?(xu(),Au("section",Hg,[Iu("table",Vg,[Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.ports,((e,r)=>(xu(),Au("tr",{key:r},[Iu("td",Gg,[Ru(" prettier-ignore "),Nu(" "+As(t.$filters.minSize(e.description?e.description:e.host+" "+e.port,20)),1)]),e.host?(xu(),Au("td",{key:0,scope:"row",class:xs(["text-end",o.getPortDecoration(e)])},["null"==e.status?(xu(),Au("span",Wg,"Scanning")):"false"==e.status?(xu(),Au("span",Kg,"Timeout")):"true"==e.status?(xu(),Au("span",Xg,"Open")):(xu(),Au("span",Qg,As(t.$filters.number(1e3*e.status,0))+"ms",1))],2)):Ru("v-if",!0),e.url?(xu(),Au("td",{key:1,scope:"row",class:xs(["text-end",o.getPortDecoration(e)])},["null"==e.status?(xu(),Au("span",Zg,"Scanning")):"Error"==e.status?(xu(),Au("span",Yg,"Error")):(xu(),Au("span",Jg,"Code "+As(e.status),1))],2)):Ru("v-if",!0)])))),128))])])])):Ru("v-if",!0)}]]),rb={key:0},nb={key:1},ib={key:0,class:"row"},ob={class:"col-lg-18"};const sb={key:0,id:"amps",class:"plugin"},ab={class:"table table-sm table-borderless"},lb={key:0},cb=["innerHTML"];const ub={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}}},pb=(0,Yd.A)(ub,[["render",function(t,e,r,n,i,o){return o.hasAmps?(xu(),Au("section",sb,[Iu("table",ab,[Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.processes,((e,r)=>(xu(),Au("tr",{key:r},[Iu("td",{class:xs(o.getNameDecoration(e))},As(e.name),3),e.regex?(xu(),Au("td",lb,As(e.count),1)):Ru("v-if",!0),Iu("td",{class:"process-result",innerHTML:t.$filters.nl2br(e.result)},null,8,cb)])))),128))])]),Ru('
\n
\n
\n {{ process.name }}\n
\n
{{ process.count }}
\n
\n
\n ')])):Ru("v-if",!0)}]]),db={id:"processcount",class:"plugin"},mb={class:"title"};const fb={props:{data:{type:Object},sorter:{type:Object}},data:()=>({store:qd}),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}}},hb=(0,Yd.A)(fb,[["render",function(t,e,r,n,i,o){return xu(),Au("section",db,[e[0]||(e[0]=Iu("span",{class:"title"},"TASKS",-1)),Iu("span",null,As(o.total)+" ("+As(o.thread)+" thr),",1),Iu("span",null,As(o.running)+" run,",1),Iu("span",null,As(o.sleeping)+" slp,",1),Iu("span",null,As(o.stopped)+" oth",1),Iu("span",null,As(o.args.programs?"Programs":"Threads"),1),Iu("span",mb,As(r.sorter.auto?"sorted automatically":"sorted"),1),Iu("span",null,"by "+As(r.sorter.getColumnLabel(r.sorter.column)),1)])}]]),gb={key:0,id:"processlist",class:"plugin"},bb={key:0,class:"extendedstats"},yb={class:"careful"},vb={class:"careful"},xb={class:"careful"},wb={class:"careful"},_b={class:"table-responsive d-lg-none"},kb={class:"table table-sm table-borderless table-striped table-hover"},Sb={scope:"col"},Ab=["onClick"],Eb={class:"table-responsive-md d-none d-lg-block"},Cb={class:"table table-sm table-borderless table-striped table-hover"},Tb={scope:"col"},Ob={scope:"col"},Db={scope:"col"},Ib={scope:"col"},Pb={scope:"col"},jb=["onClick"],Lb={key:0,scope:"row",class:""},Nb={key:1,id:"processlist",class:"plugin"},Mb={class:"table-responsive d-lg-none"},Rb={class:"table table-sm table-borderless table-striped table-hover"},qb={class:"table-responsive d-none d-lg-block"},Bb={class:"table table-sm table-borderless table-striped table-hover"},$b={class:""},Ub={class:""},Fb={scope:"row"},zb={scope:"row",class:"table-cell widtd-60"};const Hb={props:{data:{type:Object},sorter:{type:Object}},data:()=>({store:qd}),computed:{args(){return this.store.args||{}},config(){return this.store.config||{}},stats_processlist(){return this.data.stats.processlist},stats_core(){return this.data.stats.core},cpucore(){return 0!==this.stats_core.log?this.stats_core.log:1},extended_stats(){return this.stats_processlist.find((t=>!0===t.extended_stats))||null},processes(){const{sorter:t}=this,e=(this.stats_processlist||[]).map((t=>this.updateProcess(t,this.data.stats.isWindows,this.args,this.cpucore)));return(0,am.orderBy)(e,[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,am.last)(t.username.split("\\"))),t.timeforhuman="?",t.cpu_times&&(t.timeplus=hf([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,am.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:{updateProcess:(t,e,r,n)=>(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,am.last)(t.username.split("\\"))),t.timeforhuman="?",t.cpu_times&&(t.timeplus=hf([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),t.irix=1,null===t.cpu_percent?t.cpu_percent=-1:r.disable_irix&&(t.irix=n),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.name=t.name+" "+t.cmdline.slice(1).join(" ").replace(/\n/g," "),t.cmdline=t.cmdline.join(" ").replace(/\n/g," ")),null!==t.cmdline&&0!==t.cmdline.length||(t.cmdline=t.name),t),getCpuPercentAlert:t=>Ud.getAlert("processlist","processlist_cpu_",t.cpu_percent),getMemoryPercentAlert:t=>Ud.getAlert("processlist","processlist_mem_",t.cpu_percent),getDisableStats:()=>Ud.getLimit("processlist","processlist_disable_stats")||[],setExtendedStats(t){fetch("api/4/processes/extended/"+t.toString(),{method:"POST"}).then((t=>t.json())),this.$forceUpdate()},disableExtendedStats(){fetch("api/4/processes/extended/disable",{method:"POST"}).then((t=>t.json())),this.$forceUpdate()}}},Vb={components:{GlancesPluginAmps:pb,GlancesPluginProcesscount:hb,GlancesPluginProcesslist:(0,Yd.A)(Hb,[["render",function(t,e,r,n,i,o){return xu(),Au(fu,null,[Ru(" Display processes "),o.args.programs?Ru("v-if",!0):(xu(),Au("section",gb,[null!==o.extended_stats?(xu(),Au("div",bb,[Iu("div",null,[e[24]||(e[24]=Iu("span",{class:"title"},"Pinned thread: ",-1)),Iu("span",null,As(t.$filters.limitTo(o.extended_stats.cmdline,80)),1),Iu("span",null,[Iu("button",{class:"button",onClick:e[0]||(e[0]=t=>o.disableExtendedStats())},"Upin")])]),Iu("div",null,[e[25]||(e[25]=Iu("span",null,"CPU Min/Max/Mean: ",-1)),Iu("span",yb,As(t.$filters.number(o.extended_stats.cpu_min,1))+"% / "+As(t.$filters.number(o.extended_stats.cpu_max,1))+"% / "+As(t.$filters.number(o.extended_stats.cpu_mean,1))+"%",1),e[26]||(e[26]=Iu("span",null,"Affinity: ",-1)),Iu("span",vb,As(o.extended_stats.cpu_affinity|t.length),1)]),Iu("div",null,[e[27]||(e[27]=Iu("span",null,"MEM Min/Max/Mean: ",-1)),Iu("span",xb,As(t.$filters.number(o.extended_stats.memory_min,1))+"% / "+As(t.$filters.number(o.extended_stats.memory_max,1))+"% / "+As(t.$filters.number(o.extended_stats.memory_mean,1))+"%",1),e[28]||(e[28]=Iu("span",null,"Memory info: ",-1)),Iu("span",wb,As(t.$filters.dictToString(o.extended_stats.memory_info)),1)])])):Ru("v-if",!0),Iu("div",_b,[Iu("table",kb,[Iu("thead",null,[Iu("tr",null,[Al(Iu("td",{scope:"col",class:xs(["sortable","cpu_percent"===r.sorter.column&&"sort"]),onClick:e[1]||(e[1]=e=>t.$emit("update:sorter","cpu_percent"))},[Al(Iu("span",null,"CPU%",512),[[xp,!o.args.disable_irix]]),Al(Iu("span",null,"CPUi",512),[[xp,o.args.disable_irix]])],2),[[xp,!o.getDisableStats().includes("cpu_percent")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","memory_percent"===r.sorter.column&&"sort"]),onClick:e[2]||(e[2]=e=>t.$emit("update:sorter","memory_percent"))}," MEM% ",2),[[xp,!o.getDisableStats().includes("memory_percent")]]),Al(Iu("td",Sb," PID ",512),[[xp,!o.getDisableStats().includes("pid")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","username"===r.sorter.column&&"sort"]),onClick:e[3]||(e[3]=e=>t.$emit("update:sorter","username"))}," USER ",2),[[xp,!o.getDisableStats().includes("username")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","name"===r.sorter.column&&"sort"]),onClick:e[4]||(e[4]=e=>t.$emit("update:sorter","name"))}," Command (click to pin) ",2),[[xp,!o.getDisableStats().includes("cmdline")]])])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.processes,((e,r)=>(xu(),Au("tr",{key:r,style:{cursor:"pointer"},onClick:t=>o.setExtendedStats(e)},[Al(Iu("td",{scope:"row",class:xs(o.getCpuPercentAlert(e))},As(-1==e.cpu_percent?"?":t.$filters.number(e.cpu_percent/e.irix,1)),3),[[xp,!o.getDisableStats().includes("cpu_percent")]]),Al(Iu("td",{scope:"row",class:xs(o.getMemoryPercentAlert(e))},As(-1==e.memory_percent?"?":t.$filters.number(e.memory_percent,1)),3),[[xp,!o.getDisableStats().includes("memory_percent")]]),Al(Iu("td",{scope:"row"},As(e.pid),513),[[xp,!o.getDisableStats().includes("pid")]]),Al(Iu("td",{scope:"row",class:"text-truncate"},As(e.name),513),[[xp,o.args.process_short_name&&!o.getDisableStats().includes("cmdline")]]),Al(Iu("td",{scope:"row",class:"text-truncate"},As(e.cmdline),513),[[xp,!o.args.process_short_name&&!o.getDisableStats().includes("cmdline")]])],8,Ab)))),128))])])]),Iu("div",Eb,[Iu("table",Cb,[Iu("thead",null,[Iu("tr",null,[Al(Iu("td",{scope:"col",class:xs(["sortable","cpu_percent"===r.sorter.column&&"sort"]),onClick:e[5]||(e[5]=e=>t.$emit("update:sorter","cpu_percent"))},[Al(Iu("span",null,"CPU%",512),[[xp,!o.args.disable_irix]]),Al(Iu("span",null,"CPUi",512),[[xp,o.args.disable_irix]])],2),[[xp,!o.getDisableStats().includes("cpu_percent")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","memory_percent"===r.sorter.column&&"sort"]),onClick:e[6]||(e[6]=e=>t.$emit("update:sorter","memory_percent"))}," MEM% ",2),[[xp,!o.getDisableStats().includes("memory_percent")]]),Al(Iu("td",Tb," VIRT ",512),[[xp,!o.getDisableStats().includes("memory_info")]]),Al(Iu("td",Ob," RES ",512),[[xp,!o.getDisableStats().includes("memory_info")]]),Al(Iu("td",Db," PID ",512),[[xp,!o.getDisableStats().includes("pid")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","username"===r.sorter.column&&"sort"]),onClick:e[7]||(e[7]=e=>t.$emit("update:sorter","username"))}," USER ",2),[[xp,!o.getDisableStats().includes("username")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","timemillis"===r.sorter.column&&"sort"]),onClick:e[8]||(e[8]=e=>t.$emit("update:sorter","timemillis"))}," TIME+ ",2),[[xp,!o.getDisableStats().includes("cpu_times")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","num_threads"===r.sorter.column&&"sort"]),onClick:e[9]||(e[9]=e=>t.$emit("update:sorter","num_threads"))}," THR ",2),[[xp,!o.getDisableStats().includes("num_threads")]]),Al(Iu("td",Ib,"NI",512),[[xp,!o.getDisableStats().includes("nice")]]),Al(Iu("td",Pb,"S ",512),[[xp,!o.getDisableStats().includes("status")]]),Al(Iu("td",{scope:"col",class:xs(["",["sortable","io_counters"===r.sorter.column&&"sort"]]),onClick:e[10]||(e[10]=e=>t.$emit("update:sorter","io_counters"))}," IORps ",2),[[xp,o.ioReadWritePresentProcesses&&!o.getDisableStats().includes("io_counters")]]),Al(Iu("td",{scope:"col",class:xs(["text-start",["sortable","io_counters"===r.sorter.column&&"sort"]]),onClick:e[11]||(e[11]=e=>t.$emit("update:sorter","io_counters"))}," IOWps ",2),[[xp,o.ioReadWritePresentProcesses&&!o.getDisableStats().includes("io_counters")]]),Al(Iu("td",{scope:"col",class:xs(["sortable","name"===r.sorter.column&&"sort"]),onClick:e[12]||(e[12]=e=>t.$emit("update:sorter","name"))}," Command (click to pin) ",2),[[xp,!o.getDisableStats().includes("cmdline")]])])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.processes,((e,r)=>(xu(),Au("tr",{key:r,style:{cursor:"pointer"},onClick:t=>o.setExtendedStats(e.pid)},[Al(Iu("td",{scope:"row",class:xs(o.getCpuPercentAlert(e))},As(-1==e.cpu_percent?"?":t.$filters.number(e.cpu_percent/e.irix,1)),3),[[xp,!o.getDisableStats().includes("cpu_percent")]]),Al(Iu("td",{scope:"row",class:xs(o.getMemoryPercentAlert(e))},As(-1==e.memory_percent?"?":t.$filters.number(e.memory_percent,1)),3),[[xp,!o.getDisableStats().includes("memory_percent")]]),Al(Iu("td",{scope:"row"},As(t.$filters.bytes(e.memvirt)),513),[[xp,!o.getDisableStats().includes("memory_info")]]),Al(Iu("td",{scope:"row"},As(t.$filters.bytes(e.memres)),513),[[xp,!o.getDisableStats().includes("memory_info")]]),Al(Iu("td",{scope:"row"},As(e.pid),513),[[xp,!o.getDisableStats().includes("pid")]]),Al(Iu("td",{scope:"row"},As(e.username),513),[[xp,!o.getDisableStats().includes("username")]]),Al(Iu("td",{scope:"row",class:""},As(e.timeforhuman),513),[[xp,!o.getDisableStats().includes("cpu_times")]]),"?"==e.timeplus?Al((xu(),Au("td",Lb,"?",512)),[[xp,!o.getDisableStats().includes("cpu_times")]]):Ru("v-if",!0),Al(Iu("td",{scope:"row",class:""},As(-1==e.num_threads?"?":e.num_threads),513),[[xp,!o.getDisableStats().includes("num_threads")]]),Al(Iu("td",{scope:"row",class:xs({nice:e.isNice})},As(t.$filters.exclamation(e.nice)),3),[[xp,!o.getDisableStats().includes("nice")]]),Al(Iu("td",{scope:"row",class:xs({status:"R"==e.status})},As(e.status),3),[[xp,!o.getDisableStats().includes("status")]]),Al(Iu("td",{scope:"row",class:""},As(t.$filters.bytes(e.io_read)),513),[[xp,o.ioReadWritePresentProcesses&&!o.getDisableStats().includes("io_counters")]]),Al(Iu("td",{scope:"row",class:"text-start"},As(t.$filters.bytes(e.io_write)),513),[[xp,o.ioReadWritePresentProcesses&&!o.getDisableStats().includes("io_counters")]]),Al(Iu("td",{scope:"row",class:"text-truncate"},As(e.name),513),[[xp,o.args.process_short_name&&!o.getDisableStats().includes("cmdline")]]),Al(Iu("td",{scope:"row",class:"text-truncate"},As(e.cmdline),513),[[xp,!o.args.process_short_name&&!o.getDisableStats().includes("cmdline")]])],8,jb)))),128))])])])])),Ru(" Display programs "),o.args.programs?(xu(),Au("section",Nb,[Iu("div",Mb,[Iu("table",Rb,[Iu("thead",null,[Iu("tr",null,[Al(Iu("td",{class:xs(["sortable","cpu_percent"===r.sorter.column&&"sort"]),onClick:e[13]||(e[13]=e=>t.$emit("update:sorter","cpu_percent"))},[Al(Iu("span",null,"CPU%",512),[[xp,!o.args.disable_irix]]),Al(Iu("span",null,"CPUi",512),[[xp,o.args.disable_irix]])],2),[[xp,!o.getDisableStats().includes("cpu_percent")]]),Al(Iu("td",{class:xs(["sortable","memory_percent"===r.sorter.column&&"sort"]),onClick:e[14]||(e[14]=e=>t.$emit("update:sorter","memory_percent"))}," MEM% ",2),[[xp,!o.getDisableStats().includes("memory_percent")]]),Al(Iu("td",null," NPROCS ",512),[[xp,!o.getDisableStats().includes("nprocs")]]),Al(Iu("td",{scope:"row",class:xs(["sortable","name"===r.sorter.column&&"sort"]),onClick:e[15]||(e[15]=e=>t.$emit("update:sorter","name"))}," Command (click to pin) ",2),[[xp,!o.getDisableStats().includes("cmdline")]])])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.programs,((e,r)=>(xu(),Au("tr",{key:r},[Al(Iu("td",{scope:"row",class:xs(o.getCpuPercentAlert(e))},As(-1==e.cpu_percent?"?":t.$filters.number(e.cpu_percent/e.irix,1)),3),[[xp,!o.getDisableStats().includes("cpu_percent")]]),Al(Iu("td",{scope:"row",class:xs(o.getMemoryPercentAlert(e))},As(-1==e.memory_percent?"?":t.$filters.number(e.memory_percent,1)),3),[[xp,!o.getDisableStats().includes("memory_percent")]]),Al(Iu("td",{scope:"row"},As(e.nprocs),513),[[xp,!o.getDisableStats().includes("nprocs")]]),Al(Iu("td",{scope:"row",class:"text-truncate"},As(e.name),513),[[xp,o.args.process_short_name&&!o.getDisableStats().includes("cmdline")]]),Al(Iu("td",{scope:"row"},As(e.cmdline),513),[[xp,!o.args.process_short_name&&!o.getDisableStats().includes("cmdline")]])])))),128))])])]),Iu("div",qb,[Iu("table",Bb,[Iu("thead",null,[Iu("tr",null,[Al(Iu("td",{class:xs(["sortable","cpu_percent"===r.sorter.column&&"sort"]),onClick:e[16]||(e[16]=e=>t.$emit("update:sorter","cpu_percent"))},[Al(Iu("span",null,"CPU%",512),[[xp,!o.args.disable_irix]]),Al(Iu("span",null,"CPUi",512),[[xp,o.args.disable_irix]])],2),[[xp,!o.getDisableStats().includes("cpu_percent")]]),Al(Iu("td",{class:xs(["sortable","memory_percent"===r.sorter.column&&"sort"]),onClick:e[17]||(e[17]=e=>t.$emit("update:sorter","memory_percent"))}," MEM% ",2),[[xp,!o.getDisableStats().includes("memory_percent")]]),Al(Iu("td",$b," VIRT ",512),[[xp,!o.getDisableStats().includes("memory_info")]]),Al(Iu("td",Ub," RES ",512),[[xp,!o.getDisableStats().includes("memory_info")]]),Al(Iu("td",null," NPROCS ",512),[[xp,!o.getDisableStats().includes("nprocs")]]),Al(Iu("td",{scope:"row",class:xs(["sortable","username"===r.sorter.column&&"sort"]),onClick:e[18]||(e[18]=e=>t.$emit("update:sorter","username"))}," USER ",2),[[xp,!o.getDisableStats().includes("username")]]),Al(Iu("td",{scope:"row",class:xs(["",["sortable","timemillis"===r.sorter.column&&"sort"]]),onClick:e[19]||(e[19]=e=>t.$emit("update:sorter","timemillis"))}," TIME+ ",2),[[xp,!o.getDisableStats().includes("cpu_times")]]),Al(Iu("td",{scope:"row",class:xs(["",["sortable","num_threads"===r.sorter.column&&"sort"]]),onClick:e[20]||(e[20]=e=>t.$emit("update:sorter","num_threads"))}," THR ",2),[[xp,!o.getDisableStats().includes("num_threads")]]),Al(Iu("td",Fb,"NI",512),[[xp,!o.getDisableStats().includes("nice")]]),Al(Iu("td",zb,"S ",512),[[xp,!o.getDisableStats().includes("status")]]),Al(Iu("td",{scope:"row",class:xs(["",["sortable","io_counters"===r.sorter.column&&"sort"]]),onClick:e[21]||(e[21]=e=>t.$emit("update:sorter","io_counters"))}," IORps ",2),[[xp,o.ioReadWritePresentPrograms&&!o.getDisableStats().includes("io_counters")]]),Al(Iu("td",{scope:"row",class:xs(["text-start",["sortable","io_counters"===r.sorter.column&&"sort"]]),onClick:e[22]||(e[22]=e=>t.$emit("update:sorter","io_counters"))}," IOWps ",2),[[xp,o.ioReadWritePresentPrograms&&!o.getDisableStats().includes("io_counters")]]),Al(Iu("td",{scope:"row",class:xs(["sortable","name"===r.sorter.column&&"sort"]),onClick:e[23]||(e[23]=e=>t.$emit("update:sorter","name"))}," Command (click to pin) ",2),[[xp,!o.getDisableStats().includes("cmdline")]])])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.programs,((e,r)=>(xu(),Au("tr",{key:r},[Al(Iu("td",{scope:"row",class:xs(o.getCpuPercentAlert(e))},As(-1==e.cpu_percent?"?":t.$filters.number(e.cpu_percent/e.irix,1)),3),[[xp,!o.getDisableStats().includes("cpu_percent")]]),Al(Iu("td",{scope:"row",class:xs(o.getMemoryPercentAlert(e))},As(-1==e.memory_percent?"?":t.$filters.number(e.memory_percent,1)),3),[[xp,!o.getDisableStats().includes("memory_percent")]]),Al(Iu("td",{scope:"row"},As(t.$filters.bytes(e.memvirt)),513),[[xp,!o.getDisableStats().includes("memory_info")]]),Al(Iu("td",{scope:"row"},As(t.$filters.bytes(e.memres)),513),[[xp,!o.getDisableStats().includes("memory_info")]]),Al(Iu("td",{scope:"row"},As(e.nprocs),513),[[xp,!o.getDisableStats().includes("nprocs")]]),Al(Iu("td",{scope:"row"},As(e.username),513),[[xp,!o.getDisableStats().includes("username")]]),Al(Iu("td",{scope:"row",class:""},As(e.timeforhuman),513),[[xp,!o.getDisableStats().includes("cpu_times")]]),Al(Iu("td",{scope:"row",class:""},As(-1==e.num_threads?"?":e.num_threads),513),[[xp,!o.getDisableStats().includes("num_threads")]]),Al(Iu("td",{scope:"row",class:xs({nice:e.isNice})},As(t.$filters.exclamation(e.nice)),3),[[xp,!o.getDisableStats().includes("nice")]]),Al(Iu("td",{scope:"row",class:xs({status:"R"==e.status})},As(e.status),3),[[xp,!o.getDisableStats().includes("status")]]),Al(Iu("td",{scope:"row",class:""},As(t.$filters.bytes(e.io_read)),513),[[xp,o.ioReadWritePresentPrograms&&!o.getDisableStats().includes("io_counters")]]),Al(Iu("td",{scope:"row",class:"text-start"},As(t.$filters.bytes(e.io_write)),513),[[xp,o.ioReadWritePresentPrograms&&!o.getDisableStats().includes("io_counters")]]),Al(Iu("td",{scope:"row",class:"text-truncate"},As(e.name),513),[[xp,o.args.process_short_name&&!o.getDisableStats().includes("cmdline")]]),Al(Iu("td",{scope:"row"},As(e.cmdline),513),[[xp,!o.args.process_short_name&&!o.getDisableStats().includes("cmdline")]])])))),128))])])])])):Ru("v-if",!0)],64)}]])},props:{data:{type:Object}},data:()=>({store:qd,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}})}}}},Gb=(0,Yd.A)(Vb,[["render",function(t,e,r,n,i,o){const s=ec("glances-plugin-processcount"),a=ec("glances-plugin-amps"),l=ec("glances-plugin-processlist");return o.args.disable_process?(xu(),Au("div",rb,"PROCESSES DISABLED (press 'z' to display)")):(xu(),Au("div",nb,[Pu(s,{sorter:i.sorter,data:r.data},null,8,["sorter","data"]),o.args.disable_amps?Ru("v-if",!0):(xu(),Au("div",ib,[Iu("div",ob,[Pu(a,{data:r.data},null,8,["data"])])])),Pu(l,{sorter:i.sorter,data:r.data,"onUpdate:sorter":e[0]||(e[0]=t=>o.args.sort_processes_key=t)},null,8,["sorter","data"])]))}]]),Wb={id:"quicklook",class:"plugin"},Kb={class:"d-flex justify-content-between"},Xb={class:"text-start text-truncate"},Qb={key:0,class:"text-end d-none d-xxl-block frequency"},Zb={class:"table-responsive"},Yb={class:"table table-sm table-borderless"},Jb={key:0},ty={scope:"col",class:"progress"},ey=["aria-valuenow"],ry={scope:"col",class:"text-end"},ny={scope:"col"},iy={scope:"col",class:"progress"},oy=["aria-valuenow"],sy={scope:"col",class:"text-end"},ay={scope:"col"},ly={scope:"col",class:"progress"},cy=["aria-valuenow"],uy={scope:"col",class:"text-end"};const py={props:{data:{type:Object}},data:()=>({store:qd}),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(){const 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}));const 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()}}},dy=(0,Yd.A)(py,[["render",function(t,e,r,n,i,o){return xu(),Au("section",Wb,[Iu("div",Kb,[Iu("span",Xb,As(o.cpu_name),1),o.cpu_hz_current?(xu(),Au("span",Qb,As(o.cpu_hz_current)+"/"+As(o.cpu_hz)+"Ghz ",1)):Ru("v-if",!0)]),Iu("div",Zb,[Iu("table",Yb,[o.args.percpu?Ru("v-if",!0):(xu(),Au("tr",Jb,[e[0]||(e[0]=Iu("td",{scope:"col"},"CPU",-1)),Iu("td",ty,[Iu("div",{class:xs(`progress-bar progress-bar-${o.getDecoration("cpu")}`),role:"progressbar","aria-valuenow":o.cpu,"aria-valuemin":"0","aria-valuemax":"100",style:hs(`width: ${o.cpu}%;`)},"   ",14,ey)]),Iu("td",ry,[Iu("span",null,As(o.cpu)+"%",1)])])),o.args.percpu?(xu(!0),Au(fu,{key:1},oc(o.percpus,((t,e)=>(xu(),Au("tr",{key:e},[Iu("td",ny,"CPU"+As(t.number),1),Iu("td",iy,[Iu("div",{class:xs(`progress-bar progress-bar-${o.getDecoration("cpu")}`),role:"progressbar","aria-valuenow":t.total,"aria-valuemin":"0","aria-valuemax":"100",style:hs(`width: ${t.total}%;`)},"   ",14,oy)]),Iu("td",sy,[Iu("span",null,As(t.total)+"%",1)])])))),128)):Ru("v-if",!0),(xu(!0),Au(fu,null,oc(o.stats_list_after_cpu,(t=>(xu(),Au("tr",null,[Iu("td",ay,As(t.toUpperCase()),1),Iu("td",ly,[Iu("div",{class:xs(`progress-bar progress-bar-${o.getDecoration(t)}`),role:"progressbar","aria-valuenow":o.stats[t],"aria-valuemin":"0","aria-valuemax":"100",style:hs(`width: ${o.stats[t]}%;`)},"   ",14,cy)]),Iu("td",uy,[Iu("span",null,As(o.stats[t])+"%",1)])])))),256))])])])}]]),my={key:0,id:"raid",class:"plugin"},fy={class:"table table-sm table-borderless margin-bottom"},hy={scope:"col"},gy={scope:"row"},by={class:"warning"};const yy={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"}},vy=(0,Yd.A)(yy,[["render",function(t,e,r,n,i,o){return o.hasDisks?(xu(),Au("section",my,[Iu("table",fy,[Iu("thead",null,[Iu("tr",null,[Iu("th",hy,"RAID disks "+As(o.disks.length),1),e[0]||(e[0]=Iu("th",{scope:"col",class:"text-end"},"Used",-1)),e[1]||(e[1]=Iu("th",{scope:"col",class:"text-end"},"Total",-1))])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.disks,((t,e)=>(xu(),Au("tr",{key:e},[Iu("td",gy,[Nu(As(t.type.toUpperCase())+" "+As(t.name)+" ",1),Al(Iu("div",by,"└─ Degraded mode",512),[[xp,t.degraded]]),Al(Iu("div",null,"   └─ "+As(t.config),513),[[xp,t.degraded]]),Al(Iu("div",{class:"critical"},"└─ Status "+As(t.status),513),[[xp,t.inactive]]),t.inactive?(xu(!0),Au(fu,{key:0},oc(t.components,((e,r)=>(xu(),Au("div",{key:r},"    "+As(r===t.components.length-1?"└─":"├─")+" disk "+As(e.number)+": "+As(e.name),1)))),128)):Ru("v-if",!0)]),Al(Iu("td",{scope:"row",class:xs(["text-end",o.getAlert(t)])},As(t.used),3),[[xp,"active"==t.status]]),Al(Iu("td",{scope:"row",class:xs(["text-end",o.getAlert(t)])},As(t.available),3),[[xp,"active"==t.status]])])))),128))])])])):Ru("v-if",!0)}]]),xy={key:0,id:"smart",class:"plugin"},wy={class:"table table-sm table-borderless margin-bottom"},_y={scope:"row"},ky={scope:"row"},Sy={scope:"row",class:"text-end text-truncate"};const Ay={props:{data:{type:Object}},computed:{stats(){return this.data.stats.smart},drives(){return(Array.isArray(this.stats)?this.stats:[]).map((t=>({name:t.DeviceName,details:Object.entries(t).filter((([t])=>"DeviceName"!==t)).sort((([,t],[,e])=>t.namee.name?1:0)).map((([t,e])=>e))})))},hasDrives(){return this.drives.length>0}}},Ey=(0,Yd.A)(Ay,[["render",function(t,e,r,n,i,o){return o.hasDrives?(xu(),Au("section",xy,[Iu("table",wy,[e[1]||(e[1]=Iu("thead",null,[Iu("tr",null,[Iu("th",{scope:"col"},"SMART DISKS"),Iu("th",{scope:"col",class:"text-end"})])],-1)),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.drives,((t,r)=>(xu(),Au(fu,{key:r},[Iu("tr",null,[Iu("td",_y,As(t.name),1),e[0]||(e[0]=Iu("td",{scope:"col",class:"text-end"},null,-1))]),(xu(!0),Au(fu,null,oc(t.details,((t,e)=>(xu(),Au("tr",{key:e},[Iu("td",ky,As(t.name),1),Iu("td",Sy,As(t.raw),1)])))),128))],64)))),128))])])])):Ru("v-if",!0)}]]),Cy={key:0,id:"sensors",class:"plugin"},Ty={class:"table table-sm table-borderless"},Oy={scope:"row"};const Dy={props:{data:{type:Object}},data:()=>({store:qd}),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()}}},Iy=(0,Yd.A)(Dy,[["render",function(t,e,r,n,i,o){return o.hasSensors?(xu(),Au("section",Cy,[Iu("table",Ty,[e[0]||(e[0]=Iu("thead",null,[Iu("tr",null,[Iu("th",{scope:"col"},"SENSORS"),Iu("th",{scope:"col",class:"text-end"})])],-1)),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.sensors,((t,e)=>(xu(),Au("tr",{key:e},[Iu("td",Oy,As(t.label),1),Iu("td",{class:xs(["text-end",o.getDecoration(t.label)])},As(t.value)+As(t.unit),3)])))),128))])])])):Ru("v-if",!0)}]]),Py={id:"system",class:"plugin"},jy={key:0,class:"critical"},Ly={class:"title"},Ny={class:"text-truncate"};const My={props:{data:{type:Object}},data:()=>({store:qd}),computed:{stats(){return this.data.stats.system},hostname(){return this.stats.hostname},humanReadableName(){return this.stats.hr_name},isDisconnected(){return"FAILURE"===this.store.status}}},Ry=(0,Yd.A)(My,[["render",function(t,e,r,n,i,o){return xu(),Au("section",Py,[o.isDisconnected?(xu(),Au("span",jy,"Disconnected from")):Ru("v-if",!0),Iu("span",Ly,As(o.hostname),1),Iu("span",Ny,As(o.humanReadableName),1)])}]]),qy={id:"uptime",class:"plugin"};const By={props:{data:{type:Object}},computed:{value(){return this.data.stats.uptime}}},$y=(0,Yd.A)(By,[["render",function(t,e,r,n,i,o){return xu(),Au("section",qy,[Iu("span",null,"Uptime: "+As(o.value),1)])}]]),Uy={key:0,id:"vms",class:"plugin"},Fy={class:"table table-sm table-borderless table-striped table-hover"};const zy={props:{data:{type:Object}},data:()=>({store:qd,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:"-",cpu_time:null!=t.cpu_time?t.cpu_time:"-",cpu_time_rate_per_sec:null!=t.cpu_time_rate_per_sec?t.cpu_time_rate_per_sec:"?",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,am.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","cpu_time","memory_usage","name"].includes(t)||(this.sorter={column:this.args.sort_processes_key||"cpu_time",auto:!this.args.sort_processes_key,isReverseColumn:function(t){return!["name"].includes(t)},getColumnLabel:function(t){return{load_1min:"load",cpu_time:"CPU time",memory_usage:"memory consumption",name:"VM name",None:"None"}[t]||t}})}}}},Hy=(0,Yd.A)(zy,[["render",function(t,e,r,n,i,o){return o.vms.length?(xu(),Au("section",Uy,[e[8]||(e[8]=Iu("span",{class:"title"},"VMs",-1)),Al(Iu("span",null,As(o.vms.length)+" sorted by "+As(i.sorter.getColumnLabel(i.sorter.column)),513),[[xp,o.vms.length>1]]),Iu("table",Fy,[Iu("thead",null,[Iu("tr",null,[Al(Iu("td",null,"Engine",512),[[xp,o.showEngine]]),Iu("td",{class:xs(["sortable","name"===i.sorter.column&&"sort"]),onClick:e[0]||(e[0]=t=>o.args.sort_processes_key="name")}," Name ",2),e[4]||(e[4]=Iu("td",null,"Status",-1)),e[5]||(e[5]=Iu("td",null,"Core",-1)),Iu("td",{class:xs(["sortable","cpu_time"===i.sorter.column&&"sort"]),onClick:e[1]||(e[1]=t=>o.args.sort_processes_key="cpu_time")}," CPU% ",2),Iu("td",{class:xs(["sortable","memory_usage"===i.sorter.column&&"sort"]),onClick:e[2]||(e[2]=t=>o.args.sort_processes_key="memory_usage")}," MEM ",2),e[6]||(e[6]=Iu("td",null,"/ MAX",-1)),Iu("td",{class:xs(["sortable","load_1min"===i.sorter.column&&"sort"]),onClick:e[3]||(e[3]=t=>o.args.sort_processes_key="load_1min")}," LOAD 1/5/15min ",2),e[7]||(e[7]=Iu("td",null,"Release",-1))])]),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.vms,((e,r)=>(xu(),Au("tr",{key:r},[Al(Iu("td",null,As(e.engine),513),[[xp,o.showEngine]]),Iu("td",null,As(e.name),1),Iu("td",{class:xs("stopped"==e.status?"careful":"ok")},As(e.status),3),Iu("td",null,As(t.$filters.number(e.cpu_count,1)),1),Iu("td",null,As(t.$filters.number(e.cpu_time,1)),1),Iu("td",null,As(t.$filters.bytes(e.memory_usage)),1),Iu("td",null," / "+As(t.$filters.bytes(e.memory_total)),1),Iu("td",null,As(t.$filters.number(e.load_1min))+"/"+As(t.$filters.number(e.load_5min))+"/"+As(t.$filters.number(e.load_15min)),1),Iu("td",null,As(e.release),1)])))),128))])])])):Ru("v-if",!0)}]]),Vy={key:0,id:"wifi",class:"plugin"},Gy={class:"table table-sm table-borderless margin-bottom"},Wy={scope:"row"};const Ky={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,am.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()}}},Xy=(0,Yd.A)(Ky,[["render",function(t,e,r,n,i,o){return o.hasHotpots?(xu(),Au("section",Vy,[Iu("table",Gy,[e[0]||(e[0]=Iu("thead",null,[Iu("tr",null,[Iu("th",{scope:"col"},"WIFI"),Iu("th",{scope:"col",class:"text-end"},"dBm")])],-1)),Iu("tbody",null,[(xu(!0),Au(fu,null,oc(o.hotspots,((e,r)=>(xu(),Au("tr",{key:r},[Iu("td",Wy,As(t.$filters.limitTo(e.ssid,20)),1),Iu("td",{scope:"row",class:xs(["text-end",o.getDecoration(e,"quality_level")])},As(e.quality_level),3)])))),128))])])])):Ru("v-if",!0)}]]),Qy=JSON.parse('{"H":["network","ports","wifi","connections","diskio","fs","irq","folders","raid","smart","sensors"]}'),Zy={components:{GlancesHelp:Jd,GlancesPluginAlert:cm,GlancesPluginCloud:mm,GlancesPluginConnections:wm,GlancesPluginCpu:Xm,GlancesPluginDiskio:yf,GlancesPluginContainers:Bf,GlancesPluginFolders:Vf,GlancesPluginFs:th,GlancesPluginGpu:yh,GlancesPluginHostname:kh,GlancesPluginIp:Ih,GlancesPluginIrq:Rh,GlancesPluginLoad:Hh,GlancesPluginMem:cg,GlancesPluginMemswap:gg,GlancesPluginNetwork:Ig,GlancesPluginNow:Lg,GlancesPluginPercpu:zg,GlancesPluginPorts:eb,GlancesPluginProcess:Gb,GlancesPluginQuicklook:dy,GlancesPluginRaid:vy,GlancesPluginSensors:Iy,GlancesPluginSmart:Ey,GlancesPluginSystem:Ry,GlancesPluginUptime:$y,GlancesPluginVms:Hy,GlancesPluginWifi:Xy},data:()=>({store:qd}),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(","):Qy.H}},watch:{title(){document&&(document.title=this.title)}},mounted(){const t=window.__GLANCES__||{},e=isFinite(t["refresh-time"])?parseInt(t["refresh-time"],10):void 0;Fd.init(e),this.setupHotKeys()},beforeUnmount(){Nd.unbind()},methods:{setupHotKeys(){Nd("a",(()=>{this.store.args.sort_processes_key=null})),Nd("c",(()=>{this.store.args.sort_processes_key="cpu_percent"})),Nd("m",(()=>{this.store.args.sort_processes_key="memory_percent"})),Nd("u",(()=>{this.store.args.sort_processes_key="username"})),Nd("p",(()=>{this.store.args.sort_processes_key="name"})),Nd("i",(()=>{this.store.args.sort_processes_key="io_counters"})),Nd("t",(()=>{this.store.args.sort_processes_key="timemillis"})),Nd("shift+A",(()=>{this.store.args.disable_amps=!this.store.args.disable_amps})),Nd("d",(()=>{this.store.args.disable_diskio=!this.store.args.disable_diskio})),Nd("shift+Q",(()=>{this.store.args.enable_irq=!this.store.args.enable_irq})),Nd("f",(()=>{this.store.args.disable_fs=!this.store.args.disable_fs})),Nd("j",(()=>{this.store.args.programs=!this.store.args.programs})),Nd("k",(()=>{this.store.args.disable_connections=!this.store.args.disable_connections})),Nd("n",(()=>{this.store.args.disable_network=!this.store.args.disable_network})),Nd("s",(()=>{this.store.args.disable_sensors=!this.store.args.disable_sensors})),Nd("2",(()=>{this.store.args.disable_left_sidebar=!this.store.args.disable_left_sidebar})),Nd("z",(()=>{this.store.args.disable_process=!this.store.args.disable_process})),Nd("shift+S",(()=>{this.store.args.process_short_name=!this.store.args.process_short_name})),Nd("shift+D",(()=>{this.store.args.disable_containers=!this.store.args.disable_containers})),Nd("b",(()=>{this.store.args.byte=!this.store.args.byte})),Nd("shift+B",(()=>{this.store.args.diskio_iops=!this.store.args.diskio_iops})),Nd("l",(()=>{this.store.args.disable_alert=!this.store.args.disable_alert})),Nd("1",(()=>{this.store.args.percpu=!this.store.args.percpu})),Nd("h",(()=>{this.store.args.help_tag=!this.store.args.help_tag})),Nd("shift+T",(()=>{this.store.args.network_sum=!this.store.args.network_sum})),Nd("shift+U",(()=>{this.store.args.network_cumul=!this.store.args.network_cumul})),Nd("shift+F",(()=>{this.store.args.fs_free_space=!this.store.args.fs_free_space})),Nd("3",(()=>{this.store.args.disable_quicklook=!this.store.args.disable_quicklook})),Nd("6",(()=>{this.store.args.meangpu=!this.store.args.meangpu})),Nd("shift+G",(()=>{this.store.args.disable_gpu=!this.store.args.disable_gpu})),Nd("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})),Nd("shift+I",(()=>{this.store.args.disable_ip=!this.store.args.disable_ip})),Nd("shift+P",(()=>{this.store.args.disable_ports=!this.store.args.disable_ports})),Nd("shift+V",(()=>{this.store.args.disable_vms=!this.store.args.disable_vms})),Nd("shift+W",(()=>{this.store.args.disable_wifi=!this.store.args.disable_wifi})),Nd("0",(()=>{this.store.args.disable_irix=!this.store.args.disable_irix}))}}};const Yy=Fp((0,Yd.A)(Zy,[["render",function(t,e,r,n,i,o){const s=ec("glances-help"),a=ec("glances-plugin-hostname"),l=ec("glances-plugin-uptime"),c=ec("glances-plugin-system"),u=ec("glances-plugin-ip"),p=ec("glances-plugin-now"),d=ec("glances-plugin-cloud"),m=ec("glances-plugin-quicklook"),f=ec("glances-plugin-cpu"),h=ec("glances-plugin-gpu"),g=ec("glances-plugin-mem"),b=ec("glances-plugin-memswap"),y=ec("glances-plugin-load"),v=ec("glances-plugin-vms"),x=ec("glances-plugin-containers"),w=ec("glances-plugin-process"),_=ec("glances-plugin-alert");return o.dataLoaded?o.args.help_tag?(xu(),Eu(s,{key:1})):(xu(),Au("main",Gp,[Ru(" Display minimal header on low screen size (smarthphone) "),Iu("div",Wp,[Iu("div",Kp,[o.args.disable_system?Ru("v-if",!0):(xu(),Au("div",Xp,[Pu(a,{data:o.data},null,8,["data"])])),o.args.disable_uptime?Ru("v-if",!0):(xu(),Au("div",Qp,[Pu(l,{data:o.data},null,8,["data"])]))])]),Ru(" Display standard header on others screen sizes "),Iu("div",Zp,[Iu("div",Yp,[o.args.disable_system?Ru("v-if",!0):(xu(),Au("div",Jp,[Pu(c,{data:o.data},null,8,["data"])])),o.args.disable_ip?Ru("v-if",!0):(xu(),Au("div",td,[Pu(u,{data:o.data},null,8,["data"])])),o.args.disable_now?Ru("v-if",!0):(xu(),Au("div",ed,[Pu(p,{data:o.data},null,8,["data"])])),o.args.disable_uptime?Ru("v-if",!0):(xu(),Au("div",rd,[Pu(l,{data:o.data},null,8,["data"])]))])]),Iu("div",nd,[o.args.disable_cloud?Ru("v-if",!0):(xu(),Au("div",id,[Pu(d,{data:o.data},null,8,["data"])]))]),Ru(" Display top menu with CPU, MEM, LOAD..."),Iu("div",od,[Ru(" Quicklook "),o.args.disable_quicklook?Ru("v-if",!0):(xu(),Au("div",sd,[Pu(m,{data:o.data},null,8,["data"])])),Ru(" CPU "),o.args.disable_cpu&&o.args.percpu?Ru("v-if",!0):(xu(),Au("div",ad,[Pu(f,{data:o.data},null,8,["data"])])),Ru(' TODO: percpu need to be refactor\n
\n \n
\n
\n \n
'),Ru(" GPU "),!o.args.disable_gpu&&o.hasGpu?(xu(),Au("div",ld,[Pu(h,{data:o.data},null,8,["data"])])):Ru("v-if",!0),Ru(" MEM "),o.args.disable_mem?Ru("v-if",!0):(xu(),Au("div",cd,[Pu(g,{data:o.data},null,8,["data"])])),Ru(" SWAP "),o.args.disable_memswap?Ru("v-if",!0):(xu(),Au("div",ud,[Pu(b,{data:o.data},null,8,["data"])])),Ru(" LOAD "),o.args.disable_load?Ru("v-if",!0):(xu(),Au("div",pd,[Pu(y,{data:o.data},null,8,["data"])]))]),Ru(" Display bottom of the screen with sidebar and processlist "),Iu("div",dd,[Iu("div",md,[o.args.disable_left_sidebar?Ru("v-if",!0):(xu(),Au("div",{key:0,class:xs(["col-3 d-none d-md-block",{"sidebar-min":!o.args.percpu,"sidebar-max":o.args.percpu}])},[(xu(!0),Au(fu,null,oc(o.leftMenu,(t=>{return xu(),Au(fu,null,[o.args[`disable_${t}`]?Ru("v-if",!0):(xu(),Eu((e=`glances-plugin-${t}`,Wo(e)?nc(tc,e,!1)||e:e||rc),{key:0,id:`${t}`,data:o.data},null,8,["id","data"]))],64);var e})),256))],2)),Iu("div",{class:xs(["col",{"sidebar-min":!o.args.percpu,"sidebar-max":o.args.percpu}])},[o.args.disable_vms?Ru("v-if",!0):(xu(),Eu(v,{key:0,data:o.data},null,8,["data"])),o.args.disable_containers?Ru("v-if",!0):(xu(),Eu(x,{key:1,data:o.data},null,8,["data"])),Pu(w,{data:o.data},null,8,["data"]),o.args.disable_alert?Ru("v-if",!0):(xu(),Eu(_,{key:2,data:o.data},null,8,["data"]))],2)])])])):(xu(),Au("div",Vp,e[0]||(e[0]=[Iu("div",{class:"loader"},"Glances is loading...",-1)])))}]]));Yy.config.globalProperties.$filters=e,Yy.mount("#app")})()})(); \ No newline at end of file diff --git a/glances/plugins/processlist/__init__.py b/glances/plugins/processlist/__init__.py index c5855e6a..c62e0888 100644 --- a/glances/plugins/processlist/__init__.py +++ b/glances/plugins/processlist/__init__.py @@ -709,7 +709,7 @@ class PluginModel(GlancesPluginModel): if args.disable_irix and 0 < self.nb_log_core < 10: msg = self.layout_header['cpu'].format('CPU%/' + str(self.nb_log_core)) elif args.disable_irix and self.nb_log_core != 0: - msg = self.layout_header['cpu'].format('CPU%/C') + msg = self.layout_header['cpu'].format('CPUi') else: msg = self.layout_header['cpu'].format('CPU%') ret.append(self.curse_add_line(msg, sort_style if process_sort_key == 'cpu_percent' else 'DEFAULT'))