summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicolargo <nicolas@nicolargo.com>2024-04-13 10:40:29 +0200
committernicolargo <nicolas@nicolargo.com>2024-04-13 10:40:29 +0200
commit1de207e2fd40d152eb9bc906496db29b71234f61 (patch)
tree826f8c9b9a2993417fd5b7c5f8ee161db722c29a
parent7430b6b2b4f6a59a4b5cd1898fc5e0c2bf5bd54b (diff)
RAID plugin not showing up in Glances web UI (Docker install) #2716
-rw-r--r--conf/glances.conf2
-rw-r--r--glances/outputs/glances_curses.py1
-rw-r--r--glances/outputs/static/js/components/plugin-raid.vue6
-rw-r--r--glances/outputs/static/public/glances.js2
-rw-r--r--glances/plugins/raid/__init__.py4
5 files changed, 8 insertions, 7 deletions
diff --git a/conf/glances.conf b/conf/glances.conf
index cffa9f71..35c1a9e9 100644
--- a/conf/glances.conf
+++ b/conf/glances.conf
@@ -294,7 +294,7 @@ disable=True
[raid]
# Documentation: https://glances.readthedocs.io/en/latest/aoa/raid.html
# This plugin is disabled by default
-disable=True
+disable=False
[smart]
# Documentation: https://glances.readthedocs.io/en/latest/aoa/smart.html
diff --git a/glances/outputs/glances_curses.py b/glances/outputs/glances_curses.py
index 468d6d0b..9f6d6a05 100644
--- a/glances/outputs/glances_curses.py
+++ b/glances/outputs/glances_curses.py
@@ -106,6 +106,7 @@ class _GlancesCurses(object):
# Define left sidebar
# This default list is also defined in the glances/outputs/static/js/uiconfig.json
# file for the web interface
+ # Both can be overwritten by the configuration file ([outputs] left_menu option)
_left_sidebar = [
'network',
'wifi',
diff --git a/glances/outputs/static/js/components/plugin-raid.vue b/glances/outputs/static/js/components/plugin-raid.vue
index 4c32daf6..f651fb75 100644
--- a/glances/outputs/static/js/components/plugin-raid.vue
+++ b/glances/outputs/static/js/components/plugin-raid.vue
@@ -7,7 +7,7 @@
</div>
<div class="table-row" v-for="(disk, diskId) in disks" :key="diskId">
<div class="table-cell text-left">
- {{ disk.type.toUppercase() }} {{ disk.name }}
+ {{ disk.type.toUpperCase() }} {{ disk.name }}
<div class="warning" v-show="disk.degraded">└─ Degraded mode</div>
<div v-show="disk.degraded">&nbsp; &nbsp;└─ {{ disk.config }}</div>
<div class="critical" v-show="disk.inactive">└─ Status {{ disk.status }}</div>
@@ -20,10 +20,10 @@
</div>
</template>
</div>
- <div class="table-cell" v-show="!disk.inactive" :class="getAlert(disk)">
+ <div class="table-cell" v-show="disk.status == 'active'" :class="getAlert(disk)">
{{ disk.used }}
</div>
- <div class="table-cell" v-show="!disk.inactive" :class="getAlert(disk)">
+ <div class="table-cell" v-show="disk.status == 'active'" :class="getAlert(disk)">
{{ disk.available }}
</div>
</div>
diff --git a/glances/outputs/static/public/glances.js b/glances/outputs/static/public/glances.js
index 234ed017..d38dfb98 100644
--- a/glances/outputs/static/public/glances.js
+++ b/glances/outputs/static/public/glances.js
@@ -28,4 +28,4 @@ function n(e){return"[object Object]"===Object.prototype.toString.call(e)}Object
* https://jaywcjlove.github.io/hotkeys-js
* Licensed under the MIT license
*/
-var mo="undefined"!=typeof navigator&&navigator.userAgent.toLowerCase().indexOf("firefox")>0;function bo(e,t,n,r){e.addEventListener?e.addEventListener(t,n,r):e.attachEvent&&e.attachEvent("on".concat(t),(function(){n(window.event)}))}function vo(e,t){for(var n=t.slice(0,t.length-1),r=0;r<n.length;r++)n[r]=e[n[r].toLowerCase()];return n}function yo(e){"string"!=typeof e&&(e="");for(var t=(e=e.replace(/\s/g,"")).split(","),n=t.lastIndexOf("");n>=0;)t[n-1]+=",",t.splice(n,1),n=t.lastIndexOf("");return t}for(var wo={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,"-":mo?173:189,"=":mo?61:187,";":mo?59:186,"'":222,"[":219,"]":221,"\\":220},xo={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,command:91},_o={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},ko={16:!1,18:!1,17:!1,91:!1},So={},Co=1;Co<20;Co++)wo["f".concat(Co)]=111+Co;var To=[],Ao=!1,Eo="all",Oo=[],Io=function(e){return wo[e.toLowerCase()]||xo[e.toLowerCase()]||e.toUpperCase().charCodeAt(0)};function Po(e){Eo=e||"all"}function No(){return Eo||"all"}var Lo=function(e){var t=e.key,n=e.scope,r=e.method,i=e.splitKey,s=void 0===i?"+":i;yo(t).forEach((function(e){var t=e.split(s),i=t.length,o=t[i-1],a="*"===o?"*":Io(o);if(So[a]){n||(n=No());var l=i>1?vo(xo,t):[];So[a]=So[a].filter((function(e){return!((!r||e.method===r)&&e.scope===n&&function(e,t){for(var n=e.length>=t.length?e:t,r=e.length>=t.length?t:e,i=!0,s=0;s<n.length;s++)-1===r.indexOf(n[s])&&(i=!1);return i}(e.mods,l))}))}}))};function Do(e,t,n,r){var i;if(t.element===r&&(t.scope===n||"all"===t.scope)){for(var s in i=t.mods.length>0,ko)Object.prototype.hasOwnProperty.call(ko,s)&&(!ko[s]&&t.mods.indexOf(+s)>-1||ko[s]&&-1===t.mods.indexOf(+s))&&(i=!1);(0!==t.mods.length||ko[16]||ko[18]||ko[17]||ko[91])&&!i&&"*"!==t.shortcut||(t.keys=[],t.keys=t.keys.concat(To),!1===t.method(e,t)&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0)))}}function Mo(e,t){var n=So["*"],r=e.keyCode||e.which||e.charCode;if(jo.filter.call(this,e)){if(93!==r&&224!==r||(r=91),-1===To.indexOf(r)&&229!==r&&To.push(r),["ctrlKey","altKey","shiftKey","metaKey"].forEach((function(t){var n=_o[t];e[t]&&-1===To.indexOf(n)?To.push(n):!e[t]&&To.indexOf(n)>-1?To.splice(To.indexOf(n),1):"metaKey"===t&&e[t]&&3===To.length&&(e.ctrlKey||e.shiftKey||e.altKey||(To=To.slice(To.indexOf(n))))})),r in ko){for(var i in ko[r]=!0,xo)xo[i]===r&&(jo[i]=!0);if(!n)return}for(var s in ko)Object.prototype.hasOwnProperty.call(ko,s)&&(ko[s]=e[_o[s]]);e.getModifierState&&(!e.altKey||e.ctrlKey)&&e.getModifierState("AltGraph")&&(-1===To.indexOf(17)&&To.push(17),-1===To.indexOf(18)&&To.push(18),ko[17]=!0,ko[18]=!0);var o=No();if(n)for(var a=0;a<n.length;a++)n[a].scope===o&&("keydown"===e.type&&n[a].keydown||"keyup"===e.type&&n[a].keyup)&&Do(e,n[a],o,t);if(r in So)for(var l=0;l<So[r].length;l++)if(("keydown"===e.type&&So[r][l].keydown||"keyup"===e.type&&So[r][l].keyup)&&So[r][l].key){for(var c=So[r][l],u=c.splitKey,d=c.key.split(u),f=[],p=0;p<d.length;p++)f.push(Io(d[p]));f.sort().join("")===To.sort().join("")&&Do(e,c,o,t)}}}function jo(e,t,n){To=[];var r=yo(e),i=[],s="all",o=document,a=0,l=!1,c=!0,u="+",d=!1;for(void 0===n&&"function"==typeof t&&(n=t),"[object Object]"===Object.prototype.toString.call(t)&&(t.scope&&(s=t.scope),t.element&&(o=t.element),t.keyup&&(l=t.keyup),void 0!==t.keydown&&(c=t.keydown),void 0!==t.capture&&(d=t.capture),"string"==typeof t.splitKey&&(u=t.splitKey)),"string"==typeof t&&(s=t);a<r.length;a++)i=[],(e=r[a].split(u)).length>1&&(i=vo(xo,e)),(e="*"===(e=e[e.length-1])?"*":Io(e))in So||(So[e]=[]),So[e].push({keyup:l,keydown:c,scope:s,mods:i,shortcut:r[a],method:n,key:r[a],splitKey:u,element:o});void 0!==o&&!function(e){return Oo.indexOf(e)>-1}(o)&&window&&(Oo.push(o),bo(o,"keydown",(function(e){Mo(e,o)}),d),Ao||(Ao=!0,bo(window,"focus",(function(){To=[]}),d)),bo(o,"keyup",(function(e){Mo(e,o),function(e){var t=e.keyCode||e.which||e.charCode,n=To.indexOf(t);if(n>=0&&To.splice(n,1),e.key&&"meta"===e.key.toLowerCase()&&To.splice(0,To.length),93!==t&&224!==t||(t=91),t in ko)for(var r in ko[t]=!1,xo)xo[r]===t&&(jo[r]=!1)}(e)}),d))}var Ro={getPressedKeyString:function(){return To.map((function(e){return t=e,Object.keys(wo).find((function(e){return wo[e]===t}))||function(e){return Object.keys(xo).find((function(t){return xo[t]===e}))}(e)||String.fromCharCode(e);var t}))},setScope:Po,getScope:No,deleteScope:function(e,t){var n,r;for(var i in e||(e=No()),So)if(Object.prototype.hasOwnProperty.call(So,i))for(n=So[i],r=0;r<n.length;)n[r].scope===e?n.splice(r,1):r++;No()===e&&Po(t||"all")},getPressedKeyCodes:function(){return To.slice(0)},getAllKeyCodes:function(){var e=[];return Object.keys(So).forEach((function(t){So[t].forEach((function(t){var n=t.key,r=t.scope,i=t.mods,s=t.shortcut;e.push({scope:r,shortcut:s,mods:i,keys:n.split("+").map((function(e){return Io(e)}))})}))})),e},isPressed:function(e){return"string"==typeof e&&(e=Io(e)),-1!==To.indexOf(e)},filter:function(e){var t=e.target||e.srcElement,n=t.tagName,r=!0;return!t.isContentEditable&&("INPUT"!==n&&"TEXTAREA"!==n&&"SELECT"!==n||t.readOnly)||(r=!1),r},trigger:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"all";Object.keys(So).forEach((function(n){So[n].filter((function(n){return n.scope===t&&n.shortcut===e})).forEach((function(e){e&&e.method&&e.method()}))}))},unbind:function(e){if(void 0===e)Object.keys(So).forEach((function(e){return delete So[e]}));else if(Array.isArray(e))e.forEach((function(e){e.key&&Lo(e)}));else if("object"==typeof e)e.key&&Lo(e);else if("string"==typeof e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=n[0],s=n[1];"function"==typeof i&&(s=i,i=""),Lo({key:e,scope:i,method:s,splitKey:"+"})}},keyMap:wo,modifier:xo,modifierMap:_o};for(var qo in Ro)Object.prototype.hasOwnProperty.call(Ro,qo)&&(jo[qo]=Ro[qo]);if("undefined"!=typeof window){var Bo=window.hotkeys;jo.noConflict=function(e){return e&&window.hotkeys===jo&&(window.hotkeys=Bo),jo},window.hotkeys=jo}const Uo=kt({args:void 0,config:void 0,data:void 0,status:"IDLE"});var Fo=n(9049),zo=n.n(Fo);const $o=new class{limits={};limitSuffix=["critical","careful","warning"];setLimits(e){this.limits=e}getAlert(e,t,n,r,i){var s=(i=i||!1)?"_log":"",o=100*(n=n||0)/(r=r||100);if(null!=this.limits[e])for(var a=0;a<this.limitSuffix.length;a++){var l=t+this.limitSuffix[a];if(o>=this.limits[e][l]){var c=l.lastIndexOf("_");return l.substring(c+1)+s}}return"ok"+s}getAlertLog(e,t,n,r){return this.getAlert(e,t,n,r,!0)}};const Ho=new class{data=void 0;init(e=60){let t;const n=()=>(Uo.status="PENDING",Promise.all([fetch("api/4/all",{method:"GET"}).then((e=>e.json())),fetch("api/4/all/views",{method:"GET"}).then((e=>e.json()))]).then((e=>{const t={stats:e[0],views:e[1],isBsd:"FreeBSD"===e[0].system.os_name,isLinux:"Linux"===e[0].system.os_name,isSunOS:"SunOS"===e[0].system.os_name,isMac:"Darwin"===e[0].system.os_name,isWindows:"Windows"===e[0].system.os_name};this.data=t,Uo.data=t,Uo.status="SUCCESS"})).catch((e=>{console.log(e),Uo.status="FAILURE"})).then((()=>{t&&clearTimeout(t),t=setTimeout(n,1e3*e)})));n(),fetch("api/4/all/limits",{method:"GET"}).then((e=>e.json())).then((e=>{$o.setLimits(e)})),fetch("api/4/args",{method:"GET"}).then((e=>e.json())).then(((e={})=>{Uo.args={...Uo.args,...e}})),fetch("api/4/config",{method:"GET"}).then((e=>e.json())).then(((e={})=>{Uo.config={...Uo.config,...e}}))}getData(){return this.data}};const Vo=new class{constructor(){this.favico=new(zo())({animation:"none"})}badge(e){this.favico.badge(e)}reset(){this.favico.reset()}},Go={key:0},Wo={class:"container-fluid"},Zo={class:"row"},Ko={class:"col-sm-12 col-lg-24"},Qo=wi("div",{class:"row"}," ",-1),Xo={class:"row"},Jo={class:"col-sm-12 col-lg-24"},Yo=wi("div",{class:"row"}," ",-1),ea={class:"divTable",style:{width:"100%"}},ta={class:"divTableBody"},na={class:"divTableRow"},ra={class:"divTableHead"},ia={class:"divTableHead"},sa={class:"divTableHead"},oa={class:"divTableHead"},aa={class:"divTableRow"},la={class:"divTableCell"},ca={class:"divTableCell"},ua={class:"divTableCell"},da={class:"divTableCell"},fa={class:"divTableRow"},pa={class:"divTableCell"},ha={class:"divTableCell"},ga={class:"divTableCell"},ma={class:"divTableCell"},ba={class:"divTableRow"},va={class:"divTableCell"},ya={class:"divTableCell"},wa={class:"divTableCell"},xa={class:"divTableCell"},_a={class:"divTableRow"},ka={class:"divTableCell"},Sa={class:"divTableCell"},Ca={class:"divTableCell"},Ta={class:"divTableCell"},Aa={class:"divTableRow"},Ea={class:"divTableCell"},Oa={class:"divTableCell"},Ia={class:"divTableCell"},Pa={class:"divTableCell"},Na={class:"divTableRow"},La={class:"divTableCell"},Da={class:"divTableCell"},Ma={class:"divTableCell"},ja={class:"divTableCell"},Ra={class:"divTableRow"},qa={class:"divTableCell"},Ba={class:"divTableCell"},Ua={class:"divTableCell"},Fa={class:"divTableCell"},za={class:"divTableRow"},$a=wi("div",{class:"divTableCell"}," ",-1),Ha={class:"divTableCell"},Va={class:"divTableCell"},Ga={class:"divTableCell"},Wa={class:"divTableRow"},Za=wi("div",{class:"divTableCell"}," ",-1),Ka={class:"divTableCell"},Qa={class:"divTableCell"},Xa={class:"divTableCell"},Ja={class:"divTableRow"},Ya=wi("div",{class:"divTableCell"}," ",-1),el={class:"divTableCell"},tl={class:"divTableCell"},nl={class:"divTableCell"},rl={class:"divTableRow"},il=wi("div",{class:"divTableCell"}," ",-1),sl={class:"divTableCell"},ol=wi("div",{class:"divTableCell"}," ",-1),al={class:"divTableCell"},ll={class:"divTableRow"},cl=wi("div",{class:"divTableCell"}," ",-1),ul={class:"divTableCell"},dl=wi("div",{class:"divTableCell"}," ",-1),fl=wi("div",{class:"divTableCell"}," ",-1),pl={class:"divTableRow"},hl=wi("div",{class:"divTableCell"}," ",-1),gl={class:"divTableCell"},ml=wi("div",{class:"divTableCell"}," ",-1),bl=wi("div",{class:"divTableCell"}," ",-1),vl={class:"divTableRow"},yl=wi("div",{class:"divTableCell"}," ",-1),wl={class:"divTableCell"},xl=wi("div",{class:"divTableCell"}," ",-1),_l=wi("div",{class:"divTableCell"}," ",-1),kl={class:"divTableRow"},Sl=wi("div",{class:"divTableCell"}," ",-1),Cl={class:"divTableCell"},Tl=wi("div",{class:"divTableCell"}," ",-1),Al=wi("div",{class:"divTableCell"}," ",-1),El={class:"divTableRow"},Ol=wi("div",{class:"divTableCell"}," ",-1),Il={class:"divTableCell"},Pl=wi("div",{class:"divTableCell"}," ",-1),Nl=wi("div",{class:"divTableCell"}," ",-1),Ll={class:"divTableRow"},Dl=wi("div",{class:"divTableCell"}," ",-1),Ml={class:"divTableCell"},jl=wi("div",{class:"divTableCell"}," ",-1),Rl=wi("div",{class:"divTableCell"}," ",-1),ql={class:"divTableRow"},Bl=wi("div",{class:"divTableCell"}," ",-1),Ul={class:"divTableCell"},Fl=wi("div",{class:"divTableCell"}," ",-1),zl=wi("div",{class:"divTableCell"}," ",-1),$l={class:"divTableRow"},Hl=wi("div",{class:"divTableCell"}," ",-1),Vl={class:"divTableCell"},Gl=wi("div",{class:"divTableCell"}," ",-1),Wl=wi("div",{class:"divTableCell"}," ",-1),Zl={class:"divTableRow"},Kl=wi("div",{class:"divTableCell"}," ",-1),Ql={class:"divTableCell"},Xl=wi("div",{class:"divTableCell"}," ",-1),Jl=wi("div",{class:"divTableCell"}," ",-1),Yl=wi("div",null,[wi("p",null,[Si(" For an exhaustive list of key bindings, "),wi("a",{href:"https://glances.readthedocs.io/en/latest/cmds.html#interactive-commands"},"click here"),Si(". ")])],-1),ec=wi("div",null,[wi("p",null,[Si("Press "),wi("b",null,"h"),Si(" to came back to Glances.")])],-1);const tc={data:()=>({help:void 0}),mounted(){fetch("api/4/help",{method:"GET"}).then((e=>e.json())).then((e=>this.help=e))}};var nc=n(3744);const rc=(0,nc.Z)(tc,[["render",function(e,t,n,r,i,s){return i.help?(li(),pi("div",Go,[wi("div",Wo,[wi("div",Zo,[wi("div",Ko,pe(i.help.version)+" "+pe(i.help.psutil_version),1)]),Qo,wi("div",Xo,[wi("div",Jo,pe(i.help.configuration_file),1)]),Yo]),wi("div",ea,[wi("div",ta,[wi("div",na,[wi("div",ra,pe(i.help.header_sort.replace(":","")),1),wi("div",ia,pe(i.help.header_show_hide.replace(":","")),1),wi("div",sa,pe(i.help.header_toggle.replace(":","")),1),wi("div",oa,pe(i.help.header_miscellaneous.replace(":","")),1)]),wi("div",aa,[wi("div",la,pe(i.help.sort_auto),1),wi("div",ca,pe(i.help.show_hide_application_monitoring),1),wi("div",ua,pe(i.help.toggle_bits_bytes),1),wi("div",da,pe(i.help.misc_erase_process_filter),1)]),wi("div",fa,[wi("div",pa,pe(i.help.sort_cpu),1),wi("div",ha,pe(i.help.show_hide_diskio),1),wi("div",ga,pe(i.help.toggle_count_rate),1),wi("div",ma,pe(i.help.misc_generate_history_graphs),1)]),wi("div",ba,[wi("div",va,pe(i.help.sort_io_rate),1),wi("div",ya,pe(i.help.show_hide_containers),1),wi("div",wa,pe(i.help.toggle_used_free),1),wi("div",xa,pe(i.help.misc_help),1)]),wi("div",_a,[wi("div",ka,pe(i.help.sort_mem),1),wi("div",Sa,pe(i.help.show_hide_top_extended_stats),1),wi("div",Ca,pe(i.help.toggle_bar_sparkline),1),wi("div",Ta,pe(i.help.misc_accumulate_processes_by_program),1)]),wi("div",Aa,[wi("div",Ea,pe(i.help.sort_process_name),1),wi("div",Oa,pe(i.help.show_hide_filesystem),1),wi("div",Ia,pe(i.help.toggle_separate_combined),1),wi("div",Pa,pe(i.help.misc_kill_process)+" - N/A in WebUI ",1)]),wi("div",Na,[wi("div",La,pe(i.help.sort_cpu_times),1),wi("div",Da,pe(i.help.show_hide_gpu),1),wi("div",Ma,pe(i.help.toggle_live_cumulative),1),wi("div",ja,pe(i.help.misc_reset_processes_summary_min_max),1)]),wi("div",Ra,[wi("div",qa,pe(i.help.sort_user),1),wi("div",Ba,pe(i.help.show_hide_ip),1),wi("div",Ua,pe(i.help.toggle_linux_percentage),1),wi("div",Fa,pe(i.help.misc_quit),1)]),wi("div",za,[$a,wi("div",Ha,pe(i.help.show_hide_tcp_connection),1),wi("div",Va,pe(i.help.toggle_cpu_individual_combined),1),wi("div",Ga,pe(i.help.misc_reset_history),1)]),wi("div",Wa,[Za,wi("div",Ka,pe(i.help.show_hide_alert),1),wi("div",Qa,pe(i.help.toggle_gpu_individual_combined),1),wi("div",Xa,pe(i.help.misc_delete_warning_alerts),1)]),wi("div",Ja,[Ya,wi("div",el,pe(i.help.show_hide_network),1),wi("div",tl,pe(i.help.toggle_short_full),1),wi("div",nl,pe(i.help.misc_delete_warning_and_critical_alerts),1)]),wi("div",rl,[il,wi("div",sl,pe(i.help.sort_cpu_times),1),ol,wi("div",al,pe(i.help.misc_edit_process_filter_pattern)+" - N/A in WebUI ",1)]),wi("div",ll,[cl,wi("div",ul,pe(i.help.show_hide_irq),1),dl,fl]),wi("div",pl,[hl,wi("div",gl,pe(i.help.show_hide_raid_plugin),1),ml,bl]),wi("div",vl,[yl,wi("div",wl,pe(i.help.show_hide_sensors),1),xl,_l]),wi("div",kl,[Sl,wi("div",Cl,pe(i.help.show_hide_wifi_module),1),Tl,Al]),wi("div",El,[Ol,wi("div",Il,pe(i.help.show_hide_processes),1),Pl,Nl]),wi("div",Ll,[Dl,wi("div",Ml,pe(i.help.show_hide_left_sidebar),1),jl,Rl]),wi("div",ql,[Bl,wi("div",Ul,pe(i.help.show_hide_quick_look),1),Fl,zl]),wi("div",$l,[Hl,wi("div",Vl,pe(i.help.show_hide_cpu_mem_swap),1),Gl,Wl]),wi("div",Zl,[Kl,wi("div",Ql,pe(i.help.show_hide_all),1),Xl,Jl])])]),Yl,ec])):Ti("v-if",!0)}]]),ic={class:"plugin"},sc={id:"alerts"},oc={key:0,class:"title"},ac={key:1,class:"title"},lc={id:"alert"},cc={class:"table"},uc={class:"table-cell text-left"};var dc=n(6486);const fc={props:{data:{type:Object}},computed:{stats(){return this.data.stats.alert},alerts(){return(this.stats||[]).map((e=>{const t={};var n=(new Date).getTimezoneOffset();if(t.state=e.state,t.type=e.type,t.begin=1e3*e.begin-60*n*1e3,t.end=1e3*e.end-60*n*1e3,t.ongoing=-1==e.end,t.min=e.min,t.avg=e.avg,t.max=e.max,t.top=e.top.join(", "),!t.ongoing){const e=t.end-t.begin,n=parseInt(e/1e3%60),r=parseInt(e/6e4%60),i=parseInt(e/36e5%24);t.duration=(0,dc.padStart)(i,2,"0")+":"+(0,dc.padStart)(r,2,"0")+":"+(0,dc.padStart)(n,2,"0")}return t}))},hasAlerts(){return this.countAlerts>0},countAlerts(){return this.alerts.length},hasOngoingAlerts(){return this.countOngoingAlerts>0},countOngoingAlerts(){return this.alerts.filter((({ongoing:e})=>e)).length}},watch:{countOngoingAlerts(){this.countOngoingAlerts?Vo.badge(this.countOngoingAlerts):Vo.reset()}},methods:{formatDate:e=>new Date(e).toISOString().slice(0,19).replace(/[^\d-:]/," ")}},pc=(0,nc.Z)(fc,[["render",function(e,t,n,r,i,s){return li(),pi("div",ic,[wi("section",sc,[s.hasAlerts?(li(),pi("span",oc," Warning or critical alerts (last "+pe(s.countAlerts)+" entries) ",1)):(li(),pi("span",ac,"No warning or critical alert detected"))]),wi("section",lc,[wi("div",cc,[(li(!0),pi(ni,null,pr(s.alerts,((t,n)=>(li(),pi("div",{class:"table-row",key:n},[wi("div",uc,[Si(pe(s.formatDate(t.begin))+" "+pe(t.tz)+" ("+pe(t.ongoing?"ongoing":t.duration)+") - ",1),On(wi("span",null,pe(t.state)+" on ",513),[[Ds,!t.ongoing]]),wi("span",{class:ce(t.state.toLowerCase())},pe(t.type),3),Si(" ("+pe(e.$filters.number(t.max,1))+") "+pe(t.top),1)])])))),128))])])])}]]),hc={key:0,id:"cloud",class:"plugin"},gc={class:"title"};const mc={props:{data:{type:Object}},computed:{stats(){return this.data.stats.cloud},provider(){return void 0!==this.stats.id?`${stats.platform}`:null},instance(){const{stats:e}=this;return void 0!==this.stats.id?`${e.type} instance ${e.name} (${e.region})`:null}}},bc=(0,nc.Z)(mc,[["render",function(e,t,n,r,i,s){return s.instance||s.provider?(li(),pi("section",hc,[wi("span",gc,pe(s.provider),1),Si(" "+pe(s.instance),1)])):Ti("v-if",!0)}]]),vc={class:"plugin",id:"connections"},yc=wi("div",{class:"table-row"},[wi("div",{class:"table-cell text-left title"},"TCP CONNECTIONS"),wi("div",{class:"table-cell"})],-1),wc={class:"table-row"},xc=wi("div",{class:"table-cell text-left"},"Listen",-1),_c=wi("div",{class:"table-cell"},null,-1),kc={class:"table-cell"},Sc={class:"table-row"},Cc=wi("div",{class:"table-cell text-left"},"Initiated",-1),Tc=wi("div",{class:"table-cell"},null,-1),Ac={class:"table-cell"},Ec={class:"table-row"},Oc=wi("div",{class:"table-cell text-left"},"Established",-1),Ic=wi("div",{class:"table-cell"},null,-1),Pc={class:"table-cell"},Nc={class:"table-row"},Lc=wi("div",{class:"table-cell text-left"},"Terminated",-1),Dc=wi("div",{class:"table-cell"},null,-1),Mc={class:"table-cell"},jc={class:"table-row"},Rc=wi("div",{class:"table-cell text-left"},"Tracked",-1),qc=wi("div",{class:"table-cell"},null,-1);const Bc={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(e){if(void 0!==this.view[e])return this.view[e].decoration.toLowerCase()}}},Uc=(0,nc.Z)(Bc,[["render",function(e,t,n,r,i,s){return li(),pi("section",vc,[yc,wi("div",wc,[xc,_c,wi("div",kc,pe(s.listen),1)]),wi("div",Sc,[Cc,Tc,wi("div",Ac,pe(s.initiated),1)]),wi("div",Ec,[Oc,Ic,wi("div",Pc,pe(s.established),1)]),wi("div",Nc,[Lc,Dc,wi("div",Mc,pe(s.terminated),1)]),wi("div",jc,[Rc,qc,wi("div",{class:ce(["table-cell",s.getDecoration("nf_conntrack_percent")])},pe(s.tracked.count)+"/"+pe(s.tracked.max),3)])])}]]),Fc={id:"cpu",class:"plugin"},zc={class:"row"},$c={class:"col-sm-24 col-md-12 col-lg-8"},Hc={class:"table"},Vc={class:"table-row"},Gc=wi("div",{class:"table-cell text-left title"},"CPU",-1),Wc={class:"table-row"},Zc=wi("div",{class:"table-cell text-left"},"user:",-1),Kc={class:"table-row"},Qc=wi("div",{class:"table-cell text-left"},"system:",-1),Xc={class:"table-row"},Jc=wi("div",{class:"table-cell text-left"},"iowait:",-1),Yc={class:"table-row"},eu=wi("div",{class:"table-cell text-left"},"dpc:",-1),tu={class:"hidden-xs hidden-sm col-md-12 col-lg-8"},nu={class:"table"},ru={class:"table-row"},iu=wi("div",{class:"table-cell text-left"},"idle:",-1),su={class:"table-cell"},ou={class:"table-row"},au=wi("div",{class:"table-cell text-left"},"irq:",-1),lu={class:"table-cell"},cu={class:"table-row"},uu=wi("div",{class:"table-cell text-left"},"inter:",-1),du={class:"table-cell"},fu={class:"table-row"},pu=wi("div",{class:"table-cell text-left"},"nice:",-1),hu={class:"table-cell"},gu={key:0,class:"table-row"},mu=wi("div",{class:"table-cell text-left"},"ctx_sw:",-1),bu={class:"table-row"},vu=wi("div",{class:"table-cell text-left"},"steal:",-1),yu={key:1,class:"table-row"},wu=wi("div",{class:"table-cell text-left"},"syscal:",-1),xu={class:"table-cell"},_u={class:"hidden-xs hidden-sm hidden-md col-lg-8"},ku={class:"table"},Su={key:0,class:"table-row"},Cu=wi("div",{class:"table-cell text-left"},"ctx_sw:",-1),Tu={key:1,class:"table-row"},Au=wi("div",{class:"table-cell text-left"},"inter:",-1),Eu={class:"table-cell"},Ou={key:2,class:"table-row"},Iu=wi("div",{class:"table-cell text-left"},"sw_int:",-1),Pu={class:"table-cell"},Nu={key:3,class:"table-row"},Lu=wi("div",{class:"table-cell text-left"},"guest:",-1),Du={class:"table-cell"};const Mu={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:e}=this;return e.ctx_switches?Math.floor(e.ctx_switches/e.time_since_update):null},interrupts(){const{stats:e}=this;return e.interrupts?Math.floor(e.interrupts/e.time_since_update):null},soft_interrupts(){const{stats:e}=this;return e.soft_interrupts?Math.floor(e.soft_interrupts/e.time_since_update):null},syscalls(){const{stats:e}=this;return e.syscalls?Math.floor(e.syscalls/e.time_since_update):null}},methods:{getDecoration(e){if(void 0!==this.view[e])return this.view[e].decoration.toLowerCase()}}},ju=(0,nc.Z)(Mu,[["render",function(e,t,n,r,i,s){return li(),pi("section",Fc,[wi("div",zc,[wi("div",$c,[wi("div",Hc,[wi("div",Vc,[Gc,wi("div",{class:ce(["table-cell",s.getDecoration("total")])},pe(s.total)+"%",3)]),wi("div",Wc,[Zc,wi("div",{class:ce(["table-cell",s.getDecoration("user")])},pe(s.user)+"%",3)]),wi("div",Kc,[Qc,wi("div",{class:ce(["table-cell",s.getDecoration("system")])},pe(s.system)+"%",3)]),On(wi("div",Xc,[Jc,wi("div",{class:ce(["table-cell",s.getDecoration("iowait")])},pe(s.iowait)+"%",3)],512),[[Ds,null!=s.iowait]]),On(wi("div",Yc,[eu,wi("div",{class:ce(["table-cell",s.getDecoration("dpc")])},pe(s.dpc)+"%",3)],512),[[Ds,null==s.iowait&&null!=s.dpc]])])]),wi("div",tu,[wi("div",nu,[wi("div",ru,[iu,wi("div",su,pe(s.idle)+"%",1)]),On(wi("div",ou,[au,wi("div",lu,pe(s.irq)+"%",1)],512),[[Ds,null!=s.irq]]),Ti(" If no irq, display interrupts "),On(wi("div",cu,[uu,wi("div",du,pe(s.interrupts),1)],512),[[Ds,null==s.irq]]),On(wi("div",fu,[pu,wi("div",hu,pe(s.nice)+"%",1)],512),[[Ds,null!=s.nice]]),Ti(" If no nice, display ctx_switches "),null==s.nice&&null!=s.ctx_switches?(li(),pi("div",gu,[mu,wi("div",{class:ce(["table-cell",s.getDecoration("ctx_switches")])},pe(s.ctx_switches),3)])):Ti("v-if",!0),On(wi("div",bu,[vu,wi("div",{class:ce(["table-cell",s.getDecoration("steal")])},pe(s.steal)+"%",3)],512),[[Ds,null!=s.steal]]),s.isLinux||null==s.syscalls?Ti("v-if",!0):(li(),pi("div",yu,[wu,wi("div",xu,pe(s.syscalls),1)]))])]),wi("div",_u,[wi("div",ku,[Ti(" If not already display instead of nice, then display ctx_switches "),null!=s.nice&&null!=s.ctx_switches?(li(),pi("div",Su,[Cu,wi("div",{class:ce(["table-cell",s.getDecoration("ctx_switches")])},pe(s.ctx_switches),3)])):Ti("v-if",!0),Ti(" If not already display instead of irq, then display interrupts "),null!=s.irq&&null!=s.interrupts?(li(),pi("div",Tu,[Au,wi("div",Eu,pe(s.interrupts),1)])):Ti("v-if",!0),s.isWindows||s.isSunOS||null==s.soft_interrupts?Ti("v-if",!0):(li(),pi("div",Ou,[Iu,wi("div",Pu,pe(s.soft_interrupts),1)])),s.isLinux&&null!=s.guest?(li(),pi("div",Nu,[Lu,wi("div",Du,pe(s.guest)+"%",1)])):Ti("v-if",!0)])])])])}]]),Ru={class:"plugin",id:"diskio"},qu={key:0,class:"table-row"},Bu=wi("div",{class:"table-cell text-left title"},"DISK I/O",-1),Uu={class:"table-cell"},Fu={class:"table-cell"},zu={class:"table-cell"},$u={class:"table-cell"},Hu={class:"table-cell text-left"};var Vu=n(1036),Gu=n.n(Vu);function Wu(e,t){return Zu(e=8*Math.round(e),t)+"b"}function Zu(e,t){if(t=t||!1,isNaN(parseFloat(e))||!isFinite(e)||0==e)return e;const n=["Y","Z","E","P","T","G","M","K"],r={Y:12089258196146292e8,Z:11805916207174113e5,E:0x1000000000000000,P:0x4000000000000,T:1099511627776,G:1073741824,M:1048576,K:1024};for(var i=0;i<n.length;i++){var s=n[i],o=e/r[s];if(o>1){var a=0;return o<10?a=2:o<100&&(a=1),t?a="MK"==s?0:(0,dc.min)([1,a]):"K"==s&&(a=0),parseFloat(o).toFixed(a)+s}}return e.toFixed(0)}function Ku(e){return void 0===e||""===e?"?":e}function Qu(e,t,n){return t=t||0,n=n||" ",String(e).padStart(t,n)}function Xu(e,t){return"function"!=typeof e.slice&&(e=String(e)),e.slice(0,t)}function Ju(e,t,n=!0){return t=t||8,e.length>t?n?e.substring(0,t-1)+"_":"_"+e.substring(e.length-t+1):e}function Yu(e){if(void 0===e)return e;var t=function(e){var t=document.createElement("div");return t.innerText=e,t.innerHTML}(e),n=t.replace(/\n/g,"<br>");return Gu()(n)}function ed(e,t){return new Intl.NumberFormat(void 0,"number"==typeof t?{maximumFractionDigits:t}:t).format(e)}function td(e){for(var t=0,n=0;n<e.length;n++)t+=1e3*e[n];return t}function nd(e){var t=td(e),n=new Date(t),r=Math.floor((n-new Date(n.getFullYear(),0,0))/1e3/60/60/24);return{hours:n.getUTCHours()+24*(r-1),minutes:n.getUTCMinutes(),seconds:n.getUTCSeconds(),milliseconds:parseInt(""+n.getUTCMilliseconds()/10)}}const rd={props:{data:{type:Object}},data:()=>({store:Uo}),computed:{args(){return this.store.args||{}},stats(){return this.data.stats.diskio},disks(){const e=this.stats.map((e=>{const t=e.time_since_update;return{name:e.disk_name,bitrate:{txps:Zu(e.read_bytes/t),rxps:Zu(e.write_bytes/t)},count:{txps:Zu(e.read_count/t),rxps:Zu(e.write_count/t)},alias:void 0!==e.alias?e.alias:null}}));return(0,dc.orderBy)(e,["name"])}}},id=(0,nc.Z)(rd,[["render",function(e,t,n,r,i,s){return li(),pi("section",Ru,[s.disks.length>0?(li(),pi("div",qu,[Bu,On(wi("div",Uu,"R/s",512),[[Ds,!s.args.diskio_iops]]),On(wi("div",Fu,"W/s",512),[[Ds,!s.args.diskio_iops]]),On(wi("div",zu,"IOR/s",512),[[Ds,s.args.diskio_iops]]),On(wi("div",$u,"IOW/s",512),[[Ds,s.args.diskio_iops]])])):Ti("v-if",!0),(li(!0),pi(ni,null,pr(s.disks,((t,n)=>(li(),pi("div",{class:"table-row",key:n},[wi("div",Hu,pe(e.$filters.minSize(t.alias?t.alias:t.name,32)),1),On(wi("div",{class:"table-cell"},pe(t.bitrate.txps),513),[[Ds,!s.args.diskio_iops]]),On(wi("div",{class:"table-cell"},pe(t.bitrate.rxps),513),[[Ds,!s.args.diskio_iops]]),On(wi("div",{class:"table-cell"},pe(t.count.txps),513),[[Ds,s.args.diskio_iops]]),On(wi("div",{class:"table-cell"},pe(t.count.rxps),513),[[Ds,s.args.diskio_iops]])])))),128))])}]]),sd={key:0,id:"containers-plugin",class:"plugin"},od=wi("span",{class:"title"},"CONTAINERS",-1),ad={class:"table"},ld={class:"table-row"},cd=wi("div",{class:"table-cell text-left"},"Engine",-1),ud=wi("div",{class:"table-cell text-left"},"Pod",-1),dd=wi("div",{class:"table-cell"},"Status",-1),fd=wi("div",{class:"table-cell"},"Uptime",-1),pd=Ci('<div class="table-cell">/MAX</div><div class="table-cell">IOR/s</div><div class="table-cell">IOW/s</div><div class="table-cell">RX/s</div><div class="table-cell">TX/s</div><div class="table-cell text-left">Command</div>',6),hd={class:"table-cell text-left"},gd={class:"table-cell text-left"},md={class:"table-cell text-left"},bd={class:"table-cell"},vd={class:"table-cell"},yd={class:"table-cell"},wd={class:"table-cell"},xd={class:"table-cell"},_d={class:"table-cell"},kd={class:"table-cell"},Sd={class:"table-cell"},Cd={class:"table-cell text-left"};const Td={props:{data:{type:Object}},data:()=>({store:Uo,sorter:void 0}),computed:{args(){return this.store.args||{}},sortProcessesKey(){return this.args.sort_processes_key},stats(){return this.data.stats.containers},containers(){const{sorter:e}=this,t=(this.stats||[]).map((e=>({id:e.id,name:e.name,status:e.status,uptime:e.uptime,cpu_percent:e.cpu.total,memory_usage:null!=e.memory.usage?e.memory.usage:"?",limit:null!=e.memory.limit?e.memory.limit:"?",io_rx:null!=e.io_rx?e.io_rx:"?",io_wx:null!=e.io_wx?e.io_wx:"?",network_rx:null!=e.network_rx?e.network_rx:"?",network_tx:null!=e.network_tx?e.network_tx:"?",command:e.command,image:e.image,engine:e.engine,pod_id:e.pod_id})));return(0,dc.orderBy)(t,[e.column].reduce(((e,t)=>("memory_percent"===t&&(t=["memory_usage"]),e.concat(t))),[]),[e.isReverseColumn(e.column)?"desc":"asc"])}},watch:{sortProcessesKey:{immediate:!0,handler(e){e&&!["cpu_percent","memory_percent","name"].includes(e)||(this.sorter={column:this.args.sort_processes_key||"cpu_percent",auto:!this.args.sort_processes_key,isReverseColumn:function(e){return!["name"].includes(e)},getColumnLabel:function(e){return{io_counters:"disk IO",cpu_percent:"CPU consumption",memory_usage:"memory consumption",cpu_times:"uptime",name:"container name",None:"None"}[e]||e}})}}}},Ad=(0,nc.Z)(Td,[["render",function(e,t,n,r,i,s){return s.containers.length?(li(),pi("section",sd,[od,Si(" "+pe(s.containers.length)+" sorted by "+pe(i.sorter.getColumnLabel(i.sorter.column))+" ",1),wi("div",ad,[wi("div",ld,[cd,ud,wi("div",{class:ce(["table-cell text-left",["sortable","name"===i.sorter.column&&"sort"]]),onClick:t[0]||(t[0]=e=>s.args.sort_processes_key="name")}," Name ",2),dd,fd,wi("div",{class:ce(["table-cell",["sortable","cpu_percent"===i.sorter.column&&"sort"]]),onClick:t[1]||(t[1]=e=>s.args.sort_processes_key="cpu_percent")}," CPU% ",2),wi("div",{class:ce(["table-cell",["sortable","memory_percent"===i.sorter.column&&"sort"]]),onClick:t[2]||(t[2]=e=>s.args.sort_processes_key="memory_percent")}," MEM ",2),pd]),(li(!0),pi(ni,null,pr(s.containers,((t,n)=>(li(),pi("div",{class:"table-row",key:n},[wi("div",hd,pe(t.engine),1),wi("div",gd,pe(t.pod_id||"-"),1),wi("div",md,pe(t.name),1),wi("div",{class:ce(["table-cell","Paused"==t.status?"careful":"ok"])},pe(t.status),3),wi("div",bd,pe(t.uptime),1),wi("div",vd,pe(e.$filters.number(t.cpu_percent,1)),1),wi("div",yd,pe(e.$filters.bytes(t.memory_usage)),1),wi("div",wd,pe(e.$filters.bytes(t.limit)),1),wi("div",xd,pe(e.$filters.bytes(t.io_rx)),1),wi("div",_d,pe(e.$filters.bytes(t.io_wx)),1),wi("div",kd,pe(e.$filters.bits(t.network_rx)),1),wi("div",Sd,pe(e.$filters.bits(t.network_tx)),1),wi("div",Cd,pe(t.command),1)])))),128))])])):Ti("v-if",!0)}]]),Ed={class:"plugin",id:"folders"},Od={key:0,class:"table-row"},Id=[wi("div",{class:"table-cell text-left title"},"FOLDERS",-1),wi("div",{class:"table-cell"},null,-1),wi("div",{class:"table-cell"},"Size",-1)],Pd={class:"table-cell text-left"},Nd=wi("div",{class:"table-cell"},null,-1),Ld={key:0,class:"visible-lg-inline"};const Dd={props:{data:{type:Object}},computed:{stats(){return this.data.stats.folders},folders(){return this.stats.map((e=>({path:e.path,size:e.size,errno:e.errno,careful:e.careful,warning:e.warning,critical:e.critical})))}},methods:{getDecoration:e=>e.errno>0?"error":null!==e.critical&&e.size>1e6*e.critical?"critical":null!==e.warning&&e.size>1e6*e.warning?"warning":null!==e.careful&&e.size>1e6*e.careful?"careful":"ok"}},Md=(0,nc.Z)(Dd,[["render",function(e,t,n,r,i,s){return li(),pi("section",Ed,[s.folders.length>0?(li(),pi("div",Od,Id)):Ti("v-if",!0),(li(!0),pi(ni,null,pr(s.folders,((t,n)=>(li(),pi("div",{class:"table-row",key:n},[wi("div",Pd,pe(t.path),1),Nd,wi("div",{class:ce(["table-cell",s.getDecoration(t)])},[t.errno>0?(li(),pi("span",Ld," ? ")):Ti("v-if",!0),Si(" "+pe(e.$filters.bytes(t.size)),1)],2)])))),128))])}]]),jd={class:"plugin",id:"fs"},Rd={class:"table-row"},qd=wi("div",{class:"table-cell text-left title"},"FILE SYS",-1),Bd={class:"table-cell"},Ud=wi("div",{class:"table-cell"},"Total",-1),Fd={class:"table-cell text-left"},zd={key:0,class:"visible-lg-inline"},$d={class:"table-cell"};const Hd={props:{data:{type:Object}},data:()=>({store:Uo}),computed:{args(){return this.store.args||{}},stats(){return this.data.stats.fs},view(){return this.data.views.fs},fileSystems(){const e=this.stats.map((e=>({name:e.device_name,mountPoint:e.mnt_point,percent:e.percent,size:e.size,used:e.used,free:e.free,alias:void 0!==e.alias?e.alias:null})));return(0,dc.orderBy)(e,["mnt_point"])}},methods:{getDecoration(e,t){if(null!=this.view[e][t])return this.view[e][t].decoration.toLowerCase()}}},Vd=(0,nc.Z)(Hd,[["render",function(e,t,n,r,i,s){return li(),pi("section",jd,[wi("div",Rd,[qd,wi("div",Bd,[On(wi("span",null,"Used",512),[[Ds,!s.args.fs_free_space]]),On(wi("span",null,"Free",512),[[Ds,s.args.fs_free_space]])]),Ud]),(li(!0),pi(ni,null,pr(s.fileSystems,((t,n)=>(li(),pi("div",{class:"table-row",key:n},[wi("div",Fd,[Si(pe(e.$filters.minSize(t.alias?t.alias:t.mountPoint,36,e.begin=!1))+" ",1),(t.alias?t.alias:t.mountPoint).length+t.name.length<=34?(li(),pi("span",zd," ("+pe(t.name)+") ",1)):Ti("v-if",!0)]),wi("div",{class:ce(["table-cell",s.getDecoration(t.mountPoint,"used")])},[On(wi("span",null,pe(e.$filters.bytes(t.used)),513),[[Ds,!s.args.fs_free_space]]),On(wi("span",null,pe(e.$filters.bytes(t.free)),513),[[Ds,s.args.fs_free_space]])],2),wi("div",$d,pe(e.$filters.bytes(t.size)),1)])))),128))])}]]),Gd={id:"gpu",class:"plugin"},Wd={class:"gpu-name title"},Zd={class:"table"},Kd={key:0,class:"table-row"},Qd=wi("div",{class:"table-cell text-left"},"proc:",-1),Xd={key:1,class:"table-cell"},Jd={key:1,class:"table-row"},Yd=wi("div",{class:"table-cell text-left"},"mem:",-1),ef={key:1,class:"table-cell"},tf={key:2,class:"table-row"},nf=wi("div",{class:"table-cell text-left"},"temperature:",-1),rf={key:1,class:"table-cell"},sf={class:"table-cell text-left"},of={key:1},af={key:3},lf={key:5};const cf={props:{data:{type:Object}},data:()=>({store:Uo}),computed:{args(){return this.store.args||{}},stats(){return this.data.stats.gpu},view(){return this.data.views.gpu},gpus(){return this.stats},name(){let e="GPU";const{stats:t}=this;return 1===t.length?e=t[0].name:t.length&&(e=`${t.length} GPU ${t[0].name}`),e},mean(){const e={proc:null,mem:null,temperature:null},{stats:t}=this;if(!t.length)return e;for(let n of t)e.proc+=n.proc,e.mem+=n.mem,e.temperature+=n.temperature;return e.proc=e.proc/t.length,e.mem=e.mem/t.length,e.temperature=e.temperature/t.length,e}},methods:{getDecoration(e,t){if(void 0!==this.view[e][t])return this.view[e][t].decoration.toLowerCase()},getMeanDecoration(e){return this.getDecoration(0,e)}}},uf=(0,nc.Z)(cf,[["render",function(e,t,n,r,i,s){return li(),pi("section",Gd,[wi("div",Wd,pe(s.name),1),wi("div",Zd,[s.args.meangpu||1===s.gpus.length?(li(),pi("div",Kd,[Qd,null!=s.mean.proc?(li(),pi("div",{key:0,class:ce(["table-cell",s.getMeanDecoration("proc")])},pe(e.$filters.number(s.mean.proc,0))+"% ",3)):Ti("v-if",!0),null==s.mean.proc?(li(),pi("div",Xd,"N/A")):Ti("v-if",!0)])):Ti("v-if",!0),s.args.meangpu||1===s.gpus.length?(li(),pi("div",Jd,[Yd,null!=s.mean.mem?(li(),pi("div",{key:0,class:ce(["table-cell",s.getMeanDecoration("mem")])},pe(e.$filters.number(s.mean.mem,0))+"% ",3)):Ti("v-if",!0),null==s.mean.mem?(li(),pi("div",ef,"N/A")):Ti("v-if",!0)])):Ti("v-if",!0),s.args.meangpu||1===s.gpus.length?(li(),pi("div",tf,[nf,null!=s.mean.temperature?(li(),pi("div",{key:0,class:ce(["table-cell",s.getMeanDecoration("temperature")])},pe(e.$filters.number(s.mean.temperature,0))+"° ",3)):Ti("v-if",!0),null==s.mean.temperature?(li(),pi("div",rf,"N/A")):Ti("v-if",!0)])):Ti("v-if",!0),!s.args.meangpu&&s.gpus.length>1?(li(!0),pi(ni,{key:3},pr(s.gpus,((t,n)=>(li(),pi("div",{class:"table-row",key:n},[wi("div",sf,[Si(pe(t.gpu_id)+": ",1),null!=t.proc?(li(),pi("span",{key:0,class:ce(s.getDecoration(t.gpu_id,"proc"))},pe(e.$filters.number(t.proc,0))+"% ",3)):Ti("v-if",!0),null==t.proc?(li(),pi("span",of,"N/A")):Ti("v-if",!0),Si(" mem: "),null!=t.mem?(li(),pi("span",{key:2,class:ce(s.getDecoration(t.gpu_id,"mem"))},pe(e.$filters.number(t.mem,0))+"% ",3)):Ti("v-if",!0),null==t.mem?(li(),pi("span",af,"N/A")):Ti("v-if",!0),Si(" temp: "),null!=t.temperature?(li(),pi("span",{key:4,class:ce(s.getDecoration(t.gpu_id,"temperature"))},pe(e.$filters.number(t.temperature,0))+"C ",3)):Ti("v-if",!0),null==t.temperature?(li(),pi("span",lf,"N/A")):Ti("v-if",!0)])])))),128)):Ti("v-if",!0)])])}]]),df={key:0,class:"plugin",id:"ip"},ff={key:0,class:"title"},pf={key:1},hf={key:2,class:"title"},gf={key:3},mf={key:4};const bf={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}}},vf=(0,nc.Z)(bf,[["render",function(e,t,n,r,i,s){return null!=s.address?(li(),pi("section",df,[null!=s.address?(li(),pi("span",ff,"IP")):Ti("v-if",!0),null!=s.address?(li(),pi("span",pf,pe(s.address)+"/"+pe(s.maskCdir),1)):Ti("v-if",!0),null!=s.publicAddress?(li(),pi("span",hf,"Pub")):Ti("v-if",!0),null!=s.publicAddress?(li(),pi("span",gf,pe(s.publicAddress),1)):Ti("v-if",!0),null!=s.publicInfo?(li(),pi("span",mf,pe(s.publicInfo),1)):Ti("v-if",!0)])):Ti("v-if",!0)}]]),yf={class:"plugin",id:"irq"},wf={key:0,class:"table-row"},xf=[wi("div",{class:"table-cell text-left title"},"IRQ",-1),wi("div",{class:"table-cell"},null,-1),wi("div",{class:"table-cell"},"Rate/s",-1)],_f={class:"table-cell text-left"},kf=wi("div",{class:"table-cell"},null,-1),Sf={class:"table-cell"};const Cf={props:{data:{type:Object}},computed:{stats(){return this.data.stats.irq},irqs(){return this.stats.map((e=>({irq_line:e.irq_line,irq_rate:e.irq_rate})))}}},Tf=(0,nc.Z)(Cf,[["render",function(e,t,n,r,i,s){return li(),pi("section",yf,[s.irqs.length>0?(li(),pi("div",wf,xf)):Ti("v-if",!0),(li(!0),pi(ni,null,pr(s.irqs,((e,t)=>(li(),pi("div",{class:"table-row",key:t},[wi("div",_f,pe(e.irq_line),1),kf,wi("div",Sf,[wi("span",null,pe(e.irq_rate),1)])])))),128))])}]]),Af={key:0,id:"load",class:"plugin"},Ef={class:"table"},Of={class:"table-row"},If=wi("div",{class:"table-cell text-left title"},"LOAD",-1),Pf={class:"table-cell"},Nf={class:"table-row"},Lf=wi("div",{class:"table-cell text-left"},"1 min:",-1),Df={class:"table-cell"},Mf={class:"table-row"},jf=wi("div",{class:"table-cell text-left"},"5 min:",-1),Rf={class:"table-row"},qf=wi("div",{class:"table-cell text-left"},"15 min:",-1);const Bf={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(e){if(void 0!==this.view[e])return this.view[e].decoration.toLowerCase()}}},Uf=(0,nc.Z)(Bf,[["render",function(e,t,n,r,i,s){return null!=s.cpucore?(li(),pi("section",Af,[wi("div",Ef,[wi("div",Of,[If,wi("div",Pf,pe(s.cpucore)+"-core",1)]),wi("div",Nf,[Lf,wi("div",Df,pe(e.$filters.number(s.min1,2)),1)]),wi("div",Mf,[jf,wi("div",{class:ce(["table-cell",s.getDecoration("min5")])},pe(e.$filters.number(s.min5,2)),3)]),wi("div",Rf,[qf,wi("div",{class:ce(["table-cell",s.getDecoration("min15")])},pe(e.$filters.number(s.min15,2)),3)])])])):Ti("v-if",!0)}]]),Ff={id:"mem",class:"plugin"},zf={class:"table"},$f={class:"table-row"},Hf=wi("div",{class:"table-cell text-left title"},"MEM",-1),Vf={class:"table-row"},Gf=wi("div",{class:"table-cell text-left"},"total:",-1),Wf={class:"table-cell"},Zf={class:"table-row"},Kf=wi("div",{class:"table-cell text-left"},"used:",-1),Qf={class:"table-row"},Xf=wi("div",{class:"table-cell text-left"},"free:",-1),Jf={class:"table-cell"};const Yf={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}},methods:{getDecoration(e){if(void 0!==this.view[e])return this.view[e].decoration.toLowerCase()}}},ep=(0,nc.Z)(Yf,[["render",function(e,t,n,r,i,s){return li(),pi("section",Ff,[wi("div",zf,[wi("div",$f,[Hf,wi("div",{class:ce(["table-cell",s.getDecoration("percent")])},pe(s.percent)+"%",3)]),wi("div",Vf,[Gf,wi("div",Wf,pe(e.$filters.bytes(s.total)),1)]),wi("div",Zf,[Kf,wi("div",{class:ce(["table-cell",s.getDecoration("used")])},pe(e.$filters.bytes(s.used,2)),3)]),wi("div",Qf,[Xf,wi("div",Jf,pe(e.$filters.bytes(s.free)),1)])])])}]]),tp={id:"mem-more",class:"plugin"},np={class:"table"},rp={class:"table-row"},ip=wi("div",{class:"table-cell text-left"},"active:",-1),sp={class:"table-cell"},op={class:"table-row"},ap=wi("div",{class:"table-cell text-left"},"inactive:",-1),lp={class:"table-cell"},cp={class:"table-row"},up=wi("div",{class:"table-cell text-left"},"buffers:",-1),dp={class:"table-cell"},fp={class:"table-row"},pp=wi("div",{class:"table-cell text-left"},"cached:",-1),hp={class:"table-cell"};const gp={props:{data:{type:Object}},computed:{stats(){return this.data.stats.mem},active(){return this.stats.active},inactive(){return this.stats.inactive},buffers(){return this.stats.buffers},cached(){return this.stats.cached}}},mp=(0,nc.Z)(gp,[["render",function(e,t,n,r,i,s){return li(),pi("section",tp,[wi("div",np,[On(wi("div",rp,[ip,wi("div",sp,pe(e.$filters.bytes(s.active)),1)],512),[[Ds,null!=s.active]]),On(wi("div",op,[ap,wi("div",lp,pe(e.$filters.bytes(s.inactive)),1)],512),[[Ds,null!=s.inactive]]),On(wi("div",cp,[up,wi("div",dp,pe(e.$filters.bytes(s.buffers)),1)],512),[[Ds,null!=s.buffers]]),On(wi("div",fp,[pp,wi("div",hp,pe(e.$filters.bytes(s.cached)),1)],512),[[Ds,null!=s.cached]])])])}]]),bp={id:"memswap",class:"plugin"},vp={class:"table"},yp={class:"table-row"},wp=wi("div",{class:"table-cell text-left title"},"SWAP",-1),xp={class:"table-row"},_p=wi("div",{class:"table-cell text-left"},"total:",-1),kp={class:"table-cell"},Sp={class:"table-row"},Cp=wi("div",{class:"table-cell text-left"},"used:",-1),Tp={class:"table-row"},Ap=wi("div",{class:"table-cell text-left"},"free:",-1),Ep={class:"table-cell"};const Op={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(e){if(void 0!==this.view[e])return this.view[e].decoration.toLowerCase()}}},Ip=(0,nc.Z)(Op,[["render",function(e,t,n,r,i,s){return li(),pi("section",bp,[wi("div",vp,[wi("div",yp,[wp,wi("div",{class:ce(["table-cell",s.getDecoration("percent")])},pe(s.percent)+"%",3)]),wi("div",xp,[_p,wi("div",kp,pe(e.$filters.bytes(s.total)),1)]),wi("div",Sp,[Cp,wi("div",{class:ce(["table-cell",s.getDecoration("used")])},pe(e.$filters.bytes(s.used)),3)]),wi("div",Tp,[Ap,wi("div",Ep,pe(e.$filters.bytes(s.free)),1)])])])}]]),Pp={class:"plugin",id:"network"},Np={class:"table-row"},Lp=wi("div",{class:"table-cell text-left title"},"NETWORK",-1),Dp={class:"table-cell"},Mp={class:"table-cell"},jp={class:"table-cell"},Rp={class:"table-cell"},qp={class:"table-cell"},Bp={class:"table-cell"},Up={class:"table-cell"},Fp={class:"table-cell"},zp={class:"table-cell text-left"},$p={class:"visible-lg-inline"},Hp={class:"hidden-lg"},Vp={class:"table-cell"},Gp={class:"table-cell"};const Wp={props:{data:{type:Object}},data:()=>({store:Uo}),computed:{args(){return this.store.args||{}},stats(){return this.data.stats.network},networks(){const e=this.stats.map((e=>{const t=void 0!==e.alias?e.alias:null;return{interfaceName:e.interface_name,ifname:t||e.interface_name,bytes_recv_rate_per_sec:e.bytes_recv_rate_per_sec,bytes_sent_rate_per_sec:e.bytes_sent_rate_per_sec,bytes_all_rate_per_sec:e.bytes_all_rate_per_sec,bytes_recv:e.bytes_recv,bytes_sent:e.bytes_sent,bytes_all:e.bytes_all}}));return(0,dc.orderBy)(e,["interfaceName"])}}},Zp=(0,nc.Z)(Wp,[["render",function(e,t,n,r,i,s){return li(),pi("section",Pp,[wi("div",Np,[Lp,On(wi("div",Dp,"Rx/s",512),[[Ds,!s.args.network_cumul&&!s.args.network_sum]]),On(wi("div",Mp,"Tx/s",512),[[Ds,!s.args.network_cumul&&!s.args.network_sum]]),On(wi("div",jp,null,512),[[Ds,!s.args.network_cumul&&s.args.network_sum]]),On(wi("div",Rp,"Rx+Tx/s",512),[[Ds,!s.args.network_cumul&&s.args.network_sum]]),On(wi("div",qp,"Rx",512),[[Ds,s.args.network_cumul&&!s.args.network_sum]]),On(wi("div",Bp,"Tx",512),[[Ds,s.args.network_cumul&&!s.args.network_sum]]),On(wi("div",Up,null,512),[[Ds,s.args.network_cumul&&s.args.network_sum]]),On(wi("div",Fp,"Rx+Tx",512),[[Ds,s.args.network_cumul&&s.args.network_sum]])]),(li(!0),pi(ni,null,pr(s.networks,((t,n)=>(li(),pi("div",{class:"table-row",key:n},[wi("div",zp,[wi("span",$p,pe(t.ifname),1),wi("span",Hp,pe(e.$filters.minSize(t.ifname)),1)]),On(wi("div",{class:"table-cell"},pe(s.args.byte?e.$filters.bytes(t.bytes_recv_rate_per_sec):e.$filters.bits(t.bytes_recv_rate_per_sec)),513),[[Ds,!s.args.network_cumul&&!s.args.network_sum]]),On(wi("div",{class:"table-cell"},pe(s.args.byte?e.$filters.bytes(t.bytes_sent_rate_per_sec):e.$filters.bits(t.bytes_sent_rate_per_sec)),513),[[Ds,!s.args.network_cumul&&!s.args.network_sum]]),On(wi("div",Vp,null,512),[[Ds,!s.args.network_cumul&&s.args.network_sum]]),On(wi("div",{class:"table-cell"},pe(s.args.byte?e.$filters.bytes(t.bytes_all_rate_per_sec):e.$filters.bits(t.bytes_all_rate_per_sec)),513),[[Ds,!s.args.network_cumul&&s.args.network_sum]]),On(wi("div",{class:"table-cell"},pe(s.args.byte?e.$filters.bytes(t.bytes_recv):e.$filters.bits(t.bytes_recv)),513),[[Ds,s.args.network_cumul&&!s.args.network_sum]]),On(wi("div",{class:"table-cell"},pe(s.args.byte?e.$filters.bytes(t.bytes_sent):e.$filters.bits(t.bytes_sent)),513),[[Ds,s.args.network_cumul&&!s.args.network_sum]]),On(wi("div",Gp,null,512),[[Ds,s.args.network_cumul&&s.args.network_sum]]),On(wi("div",{class:"table-cell"},pe(s.args.byte?e.$filters.bytes(t.bytes_all):e.$filters.bits(t.bytes_all)),513),[[Ds,s.args.network_cumul&&s.args.network_sum]])])))),128))])}]]),Kp={id:"now",class:"plugin"},Qp={class:"table-row"},Xp={class:"table-cell text-left"};const Jp={props:{data:{type:Object}},computed:{value(){return this.data.stats.now}}},Yp=(0,nc.Z)(Jp,[["render",function(e,t,n,r,i,s){return li(),pi("section",Kp,[wi("div",Qp,[wi("div",Xp,pe(s.value),1)])])}]]),eh={id:"percpu",class:"plugin"},th={class:"table-row"},nh={class:"table-cell text-left title"},rh={key:0},ih={class:"table-row"},sh=wi("div",{class:"table-cell text-left"},"user:",-1),oh={class:"table-row"},ah=wi("div",{class:"table-cell text-left"},"system:",-1),lh={class:"table-row"},ch=wi("div",{class:"table-cell text-left"},"idle:",-1),uh={key:0,class:"table-row"},dh=wi("div",{class:"table-cell text-left"},"iowait:",-1),fh={key:1,class:"table-row"},ph=wi("div",{class:"table-cell text-left"},"steal:",-1);const hh={props:{data:{type:Object}},computed:{percpuStats(){return this.data.stats.percpu},cpusChunks(){const e=this.percpuStats.map((e=>({number:e.cpu_number,total:e.total,user:e.user,system:e.system,idle:e.idle,iowait:e.iowait,steal:e.steal})));return(0,dc.chunk)(e,4)}},methods:{getUserAlert:e=>$o.getAlert("percpu","percpu_user_",e.user),getSystemAlert:e=>$o.getAlert("percpu","percpu_system_",e.system)}},gh=(0,nc.Z)(hh,[["render",function(e,t,n,r,i,s){return li(),pi("section",eh,[(li(!0),pi(ni,null,pr(s.cpusChunks,((e,t)=>(li(),pi("div",{class:"table",key:t},[wi("div",th,[wi("div",nh,[0===t?(li(),pi("span",rh,"PER CPU")):Ti("v-if",!0)]),(li(!0),pi(ni,null,pr(e,((e,t)=>(li(),pi("div",{class:"table-cell",key:t},pe(e.total)+"% ",1)))),128))]),wi("div",ih,[sh,(li(!0),pi(ni,null,pr(e,((e,t)=>(li(),pi("div",{class:ce(["table-cell",s.getUserAlert(e)]),key:t},pe(e.user)+"% ",3)))),128))]),wi("div",oh,[ah,(li(!0),pi(ni,null,pr(e,((e,t)=>(li(),pi("div",{class:ce(["table-cell",s.getSystemAlert(e)]),key:t},pe(e.system)+"% ",3)))),128))]),wi("div",lh,[ch,(li(!0),pi(ni,null,pr(e,((e,t)=>(li(),pi("div",{class:"table-cell",key:t},pe(e.idle)+"% ",1)))),128))]),e[0].iowait?(li(),pi("div",uh,[dh,(li(!0),pi(ni,null,pr(e,((e,t)=>(li(),pi("div",{class:ce(["table-cell",s.getSystemAlert(e)]),key:t},pe(e.iowait)+"% ",3)))),128))])):Ti("v-if",!0),e[0].steal?(li(),pi("div",fh,[ph,(li(!0),pi(ni,null,pr(e,((e,t)=>(li(),pi("div",{class:ce(["table-cell",s.getSystemAlert(e)]),key:t},pe(e.steal)+"% ",3)))),128))])):Ti("v-if",!0)])))),128))])}]]),mh={class:"plugin",id:"ports"},bh={class:"table-cell text-left"},vh=wi("div",{class:"table-cell"},null,-1),yh={key:0},wh={key:1},xh={key:2},_h={key:3},kh={key:0},Sh={key:1},Ch={key:2};const Th={props:{data:{type:Object}},computed:{stats(){return this.data.stats.ports},ports(){return this.stats}},methods:{getPortDecoration:e=>null===e.status?"careful":!1===e.status?"critical":null!==e.rtt_warning&&e.stat