From ef9694cd6ada357c56b338bb5aa069575a7c397b Mon Sep 17 00:00:00 2001 From: nicolargo Date: Sat, 20 Jan 2024 14:56:57 +0100 Subject: [PATCH 1/7] First version of the #2662 - Need to study how to display the swap --- conf/glances.conf | 4 ++ glances/outputs/glances_bars.py | 31 ++++++++----- glances/plugins/load/__init__.py | 66 +++++++++++++++++---------- glances/plugins/quicklook/__init__.py | 49 ++++++++++++++------ 4 files changed, 102 insertions(+), 48 deletions(-) diff --git a/conf/glances.conf b/conf/glances.conf index 4f07a8b0..75512743 100644 --- a/conf/glances.conf +++ b/conf/glances.conf @@ -57,6 +57,10 @@ mem_critical=90 swap_careful=50 swap_warning=70 swap_critical=90 +# Source: http://blog.scoutapp.com/articles/2009/07/31/understanding-load-averages +load_careful=70 +load_warning=100 +load_critical=500 [system] # This plugin display the first line in the Glances UI with: diff --git a/glances/outputs/glances_bars.py b/glances/outputs/glances_bars.py index 75899480..8e803fd6 100644 --- a/glances/outputs/glances_bars.py +++ b/glances/outputs/glances_bars.py @@ -28,7 +28,12 @@ class Bar(object): sys.stdout.flush() """ - def __init__(self, size, percentage_char='|', empty_char=' ', pre_char='[', post_char=']', with_text=True): + def __init__(self, size, + percentage_char='|', + empty_char=' ', + pre_char='[', post_char=']', + display_value=True, + min_value=0, max_value=100): # Build curses_bars self.__curses_bars = [empty_char] * 5 + [percentage_char] * 5 # Bar size @@ -36,20 +41,20 @@ class Bar(object): # Bar current percent self.__percent = 0 # Min and max value - self.min_value = 0 - self.max_value = 100 + self.min_value = min_value + self.max_value = max_value # Char used for the decoration self.__pre_char = pre_char self.__post_char = post_char self.__empty_char = empty_char - self.__with_text = with_text + self.__display_value = display_value @property def size(self, with_decoration=False): # Return the bar size, with or without decoration if with_decoration: return self.__size - if self.__with_text: + if self.__display_value: return self.__size - 6 @property @@ -58,10 +63,8 @@ class Bar(object): @percent.setter def percent(self, value): - if value <= self.min_value: + if value < self.min_value: value = self.min_value - if value >= self.max_value: - value = self.max_value self.__percent = value @property @@ -74,14 +77,20 @@ class Bar(object): def get(self): """Return the bars.""" - frac, whole = modf(self.size * self.percent / 100.0) + value = self.percent + if value > self.max_value: + value = self.max_value + frac, whole = modf(self.size * value / 100.0) ret = self.__curses_bars[8] * int(whole) if frac > 0: ret += self.__curses_bars[int(frac * 8)] whole += 1 ret += self.__empty_char * int(self.size - whole) - if self.__with_text: - ret = '{}{:5.1f}%'.format(ret, self.percent) + if self.__display_value: + if self.percent > self.max_value: + ret = '{}>{:4.0f}%'.format(ret, self.max_value) + else: + ret = '{}{:5.1f}%'.format(ret, self.percent) return ret def __str__(self): diff --git a/glances/plugins/load/__init__.py b/glances/plugins/load/__init__.py index 292821dd..cc936078 100644 --- a/glances/plugins/load/__init__.py +++ b/glances/plugins/load/__init__.py @@ -58,6 +58,14 @@ items_history_list = [ {'name': 'min15', 'description': '15 minutes load'}, ] +# Get the number of logical CPU core only once +# the variable is also shared with the QuickLook plugin +try: + nb_log_core = CorePluginModel().update()["log"] +except Exception as e: + logger.warning('Error: Can not retrieve the CPU core number (set it to 1) ({})'.format(e)) + nb_log_core = 1 + class PluginModel(GlancesPluginModel): """Glances load plugin. @@ -74,24 +82,6 @@ class PluginModel(GlancesPluginModel): # We want to display the stat in the curse interface self.display_curse = True - # Call CorePluginModel in order to display the core number - try: - self.nb_log_core = CorePluginModel(args=self.args).update()["log"] - except Exception as e: - logger.warning('Error: Can not retrieve the CPU core number (set it to 1) ({})'.format(e)) - self.nb_log_core = 1 - - def _getloadavg(self): - """Get load average. On both Linux and Windows thanks to PsUtil""" - try: - return psutil.getloadavg() - except (AttributeError, OSError): - pass - try: - return os.getloadavg() - except (AttributeError, OSError): - return None - @GlancesPluginModel._check_decorator @GlancesPluginModel._log_result_decorator def update(self): @@ -103,11 +93,16 @@ class PluginModel(GlancesPluginModel): # Update stats using the standard system lib # Get the load using the os standard lib - load = self._getloadavg() + load = get_load_average() if load is None: stats = self.get_init_value() else: - stats = {'min1': load[0], 'min5': load[1], 'min15': load[2], 'cpucore': self.nb_log_core} + stats = { + 'min1': load[0], + 'min5': load[1], + 'min15': load[2], + 'cpucore': get_nb_log_core() + } elif self.input_method == 'snmp': # Update stats using SNMP @@ -122,7 +117,7 @@ class PluginModel(GlancesPluginModel): for k, v in iteritems(stats): stats[k] = float(v) - stats['cpucore'] = self.nb_log_core + stats['cpucore'] = get_nb_log_core() # Update the stats self.stats = stats @@ -170,9 +165,9 @@ class PluginModel(GlancesPluginModel): ret.append(self.curse_new_line()) msg = '{:7}'.format('{} min'.format(load_time)) ret.append(self.curse_add_line(msg)) - if args.disable_irix and self.nb_log_core != 0: + if args.disable_irix and get_nb_log_core() != 0: # Enable Irix mode for load (see issue #1554) - load_stat = self.stats['min{}'.format(load_time)] / self.nb_log_core * 100 + load_stat = self.stats['min{}'.format(load_time)] / get_nb_log_core() * 100 msg = '{:>5.1f}%'.format(load_stat) else: # Default mode for load @@ -181,3 +176,28 @@ class PluginModel(GlancesPluginModel): ret.append(self.curse_add_line(msg, self.get_views(key='min{}'.format(load_time), option='decoration'))) return ret + + +def get_nb_log_core(): + """Get the number of logical CPU core.""" + return nb_log_core + + +def get_load_average(percent: bool = False): + """Get load average. On both Linux and Windows thanks to PsUtil + + if percent is True, return the load average in percent + Ex: if you only have one CPU core and the load average is 1.0, then return 100%""" + load_average = None + try: + load_average = psutil.getloadavg() + except (AttributeError, OSError): + try: + load_average = os.getloadavg() + except (AttributeError, OSError): + pass + + if load_average and percent: + return tuple([i / get_nb_log_core() * 100 for i in load_average]) + else: + return load_average diff --git a/glances/plugins/quicklook/__init__.py b/glances/plugins/quicklook/__init__.py index 862eb243..083a5939 100644 --- a/glances/plugins/quicklook/__init__.py +++ b/glances/plugins/quicklook/__init__.py @@ -2,7 +2,7 @@ # # This file is part of Glances. # -# SPDX-FileCopyrightText: 2022 Nicolas Hennion +# SPDX-FileCopyrightText: 2024 Nicolas Hennion # # SPDX-License-Identifier: LGPL-3.0-only # @@ -11,6 +11,7 @@ from glances.logger import logger from glances.cpu_percent import cpu_percent +from glances.plugins.load import get_load_average, get_nb_log_core from glances.outputs.glances_bars import Bar from glances.outputs.glances_sparklines import Sparkline from glances.plugins.plugin.model import GlancesPluginModel @@ -84,11 +85,20 @@ class PluginModel(GlancesPluginModel): # Grab quicklook stats: CPU, MEM and SWAP if self.input_method == 'local': - # Get the latest CPU percent value + # Get system information + cpu_info = cpu_percent.get_info() + stats['cpu_name'] = cpu_info['cpu_name'] + stats['cpu_hz_current'] = ( + self._mhz_to_hz(cpu_info['cpu_hz_current']) if cpu_info['cpu_hz_current'] is not None else None + ) + stats['cpu_hz'] = self._mhz_to_hz(cpu_info['cpu_hz']) if cpu_info['cpu_hz'] is not None else None + + # Get the CPU percent value (global and per core) + # Stats is shared across all plugins stats['cpu'] = cpu_percent.get() stats['percpu'] = cpu_percent.get(percpu=True) - # Use the psutil lib for the memory (virtual and swap) + # Get the virtual and swap memory stats['mem'] = psutil.virtual_memory().percent try: stats['swap'] = psutil.swap_memory().percent @@ -96,13 +106,14 @@ class PluginModel(GlancesPluginModel): # Correct issue in Illumos OS (see #1767) stats['swap'] = None - # Get additional information - cpu_info = cpu_percent.get_info() - stats['cpu_name'] = cpu_info['cpu_name'] - stats['cpu_hz_current'] = ( - self._mhz_to_hz(cpu_info['cpu_hz_current']) if cpu_info['cpu_hz_current'] is not None else None - ) - stats['cpu_hz'] = self._mhz_to_hz(cpu_info['cpu_hz']) if cpu_info['cpu_hz'] is not None else None + # Get load + stats['cpucore'] = get_nb_log_core() + try: + # Load average is a tuple (1 min, 5 min, 15 min) + # Process only the 15 min value + stats['load'] = get_load_average(percent=True)[2] + except (TypeError, IndexError): + stats['load'] = None elif self.input_method == 'snmp': # Not available @@ -118,12 +129,16 @@ class PluginModel(GlancesPluginModel): # Call the father's method super(PluginModel, self).update_views() - # Add specifics information - # Alert only + # Alert for CPU, MEM and SWAP for key in ['cpu', 'mem', 'swap']: if key in self.stats: self.views[key]['decoration'] = self.get_alert(self.stats[key], header=key) + # Alert for LOAD + self.views['load']['decoration'] = self.get_alert( + self.stats['load'], header='load' + ) + def msg_curse(self, args=None, max_width=10): """Return the list to display in the UI.""" # Init the return message @@ -145,9 +160,13 @@ class PluginModel(GlancesPluginModel): sparkline_tag = data.available if not sparkline_tag: # Fallback to bar if Sparkline module is not installed - data = Bar(max_width, percentage_char=self.get_conf_value('percentage_char', default=['|'])[0]) + data = Bar(max_width, + percentage_char=self.get_conf_value('percentage_char', default=['|'])[0]) # Build the string message + ########################## + + # System information if 'cpu_name' in self.stats and 'cpu_hz_current' in self.stats and 'cpu_hz' in self.stats: msg_name = self.stats['cpu_name'] if self.stats['cpu_hz_current'] and self.stats['cpu_hz']: @@ -160,7 +179,9 @@ class PluginModel(GlancesPluginModel): ret.append(self.curse_add_line(msg_name)) ret.append(self.curse_add_line(msg_freq)) ret.append(self.curse_new_line()) - for key in ['cpu', 'mem', 'swap']: + + # Loop over CPU, MEM and LOAD + for key in ['cpu', 'mem', 'load']: if key == 'cpu' and args.percpu: if sparkline_tag: raw_cpu = self.get_raw_history(item='percpu', nb=data.size) From 2d997ac36fcfe876949d7d266fecbd15171a8fe4 Mon Sep 17 00:00:00 2001 From: nicolargo Date: Sat, 20 Jan 2024 17:19:41 +0100 Subject: [PATCH 2/7] Add swap information - Todo: WebUI --- glances/outputs/glances_bars.py | 16 ++++++---------- glances/plugins/quicklook/__init__.py | 6 +++++- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/glances/outputs/glances_bars.py b/glances/outputs/glances_bars.py index 8e803fd6..f6466a9b 100644 --- a/glances/outputs/glances_bars.py +++ b/glances/outputs/glances_bars.py @@ -15,7 +15,6 @@ from math import modf class Bar(object): - """Manage bar (progression or status). import sys @@ -29,11 +28,8 @@ class Bar(object): """ def __init__(self, size, - percentage_char='|', - empty_char=' ', - pre_char='[', post_char=']', - display_value=True, - min_value=0, max_value=100): + percentage_char='|', empty_char=' ', pre_char='[', post_char=']', + display_value=True, min_value=0, max_value=100): # Build curses_bars self.__curses_bars = [empty_char] * 5 + [percentage_char] * 5 # Bar size @@ -75,11 +71,9 @@ class Bar(object): def post_char(self): return self.__post_char - def get(self): + def get(self, overwrite=''): """Return the bars.""" - value = self.percent - if value > self.max_value: - value = self.max_value + value = self.max_value if self.percent > self.max_value else self.percent frac, whole = modf(self.size * value / 100.0) ret = self.__curses_bars[8] * int(whole) if frac > 0: @@ -91,6 +85,8 @@ class Bar(object): ret = '{}>{:4.0f}%'.format(ret, self.max_value) else: ret = '{}{:5.1f}%'.format(ret, self.percent) + if overwrite and len(overwrite) < len(ret) - 6: + ret = overwrite + ret[len(overwrite):] return ret def __str__(self): diff --git a/glances/plugins/quicklook/__init__.py b/glances/plugins/quicklook/__init__.py index 083a5939..e9570678 100644 --- a/glances/plugins/quicklook/__init__.py +++ b/glances/plugins/quicklook/__init__.py @@ -221,10 +221,14 @@ class PluginModel(GlancesPluginModel): def _msg_create_line(self, msg, data, key): """Create a new line to the Quick view.""" + if key == 'mem' and self.get_alert(self.stats['swap'], header='swap') != 'DEFAULT': + overwrite = 'SWAP' + else: + overwrite = '' return [ self.curse_add_line(msg), self.curse_add_line(data.pre_char, decoration='BOLD'), - self.curse_add_line(data.get(), self.get_views(key=key, option='decoration')), + self.curse_add_line(data.get(overwrite), self.get_views(key=key, option='decoration')), self.curse_add_line(data.post_char, decoration='BOLD'), self.curse_add_line(' '), ] From 92db000a753bf2b5fa66428ab173e8aa00624a72 Mon Sep 17 00:00:00 2001 From: nicolargo Date: Sat, 20 Jan 2024 17:24:04 +0100 Subject: [PATCH 3/7] Sparkline not working - Web UI not done --- glances/outputs/glances_sparklines.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glances/outputs/glances_sparklines.py b/glances/outputs/glances_sparklines.py index 6d6d2b86..742f9944 100644 --- a/glances/outputs/glances_sparklines.py +++ b/glances/outputs/glances_sparklines.py @@ -75,7 +75,7 @@ class Sparkline(object): def post_char(self): return self.__post_char - def get(self): + def get(self, overwrite=''): """Return the sparkline.""" ret = sparklines(self.percents, minimum=0, maximum=100)[0] if self.__with_text: From 0a555866e371f084103cda1afdb9f3a9ccbd7652 Mon Sep 17 00:00:00 2001 From: nicolargo Date: Sat, 20 Jan 2024 17:40:26 +0100 Subject: [PATCH 4/7] TODO - WebUI --- glances/outputs/glances_sparklines.py | 15 ++++++++++----- glances/plugins/quicklook/__init__.py | 5 +++++ 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/glances/outputs/glances_sparklines.py b/glances/outputs/glances_sparklines.py index 742f9944..29c0fbf0 100644 --- a/glances/outputs/glances_sparklines.py +++ b/glances/outputs/glances_sparklines.py @@ -34,7 +34,9 @@ class Sparkline(object): """Manage sparklines (see https://pypi.org/project/sparklines/).""" - def __init__(self, size, pre_char='[', post_char=']', empty_char=' ', with_text=True): + def __init__(self, size, + pre_char='[', post_char=']', empty_char=' ', + display_value=True): # If the sparklines python module available ? self.__available = sparklines_module # Sparkline size @@ -45,7 +47,7 @@ class Sparkline(object): self.__pre_char = pre_char self.__post_char = post_char self.__empty_char = empty_char - self.__with_text = with_text + self.__display_value = display_value @property def available(self): @@ -56,7 +58,7 @@ class Sparkline(object): # Return the sparkline size, with or without decoration if with_decoration: return self.__size - if self.__with_text: + if self.__display_value: return self.__size - 6 @property @@ -78,11 +80,14 @@ class Sparkline(object): def get(self, overwrite=''): """Return the sparkline.""" ret = sparklines(self.percents, minimum=0, maximum=100)[0] - if self.__with_text: + if self.__display_value: percents_without_none = [x for x in self.percents if x is not None] if len(percents_without_none) > 0: ret = '{}{:5.1f}%'.format(ret, percents_without_none[-1]) - return nativestr(ret) + ret = nativestr(ret) + if overwrite and len(overwrite) < len(ret) - 6: + ret = overwrite + ret[len(overwrite):] + return ret def __str__(self): """Return the sparkline.""" diff --git a/glances/plugins/quicklook/__init__.py b/glances/plugins/quicklook/__init__.py index e9570678..1cfd5682 100644 --- a/glances/plugins/quicklook/__init__.py +++ b/glances/plugins/quicklook/__init__.py @@ -37,6 +37,10 @@ fields_description = { 'description': 'SWAP percent usage', 'unit': 'percent', }, + 'load': { + 'description': 'LOAD percent usage', + 'unit': 'percent', + }, 'cpu_name': { 'description': 'CPU name', }, @@ -57,6 +61,7 @@ items_history_list = [ {'name': 'percpu', 'description': 'PERCPU percent usage', 'y_unit': '%'}, {'name': 'mem', 'description': 'MEM percent usage', 'y_unit': '%'}, {'name': 'swap', 'description': 'SWAP percent usage', 'y_unit': '%'}, + {'name': 'load', 'description': 'LOAD percent usage', 'y_unit': '%'}, ] From e564c21b8977f249dd2fbce7522d2be16f513720 Mon Sep 17 00:00:00 2001 From: nicolargo Date: Sat, 20 Jan 2024 17:53:39 +0100 Subject: [PATCH 5/7] WebUI done - To be tested with no LOAD (is it a usecase ?) --- .../static/js/components/plugin-quicklook.vue | 13 ++++++++----- glances/outputs/static/public/glances.js | 2 +- glances/plugins/load/__init__.py | 2 +- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/glances/outputs/static/js/components/plugin-quicklook.vue b/glances/outputs/static/js/components/plugin-quicklook.vue index 1b806275..fd607de0 100644 --- a/glances/outputs/static/js/components/plugin-quicklook.vue +++ b/glances/outputs/static/js/components/plugin-quicklook.vue @@ -61,22 +61,22 @@
{{ mem }}%
-
SWAP
+
LOAD
 
-
{{ swap }}%
+
{{ load }}%
@@ -109,6 +109,9 @@ export default { mem() { return this.stats.mem; }, + load() { + return this.stats.load; + }, cpu() { return this.stats.cpu; }, diff --git a/glances/outputs/static/public/glances.js b/glances/outputs/static/public/glances.js index 9b4636a2..5bfc2ce1 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=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;s0,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;a1&&(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;r1&&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=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"};const Nu={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},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()}}},Lu=(0,nc.Z)(Nu,[["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&&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&&s.syscalls?(li(),pi("div",yu,[wu,wi("div",xu,pe(s.syscalls),1)])):Ti("v-if",!0)])]),wi("div",_u,[wi("div",ku,[Ti(" If not already display instead of nice, then display ctx_switches "),null!=s.nice&&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&&s.interrupts?(li(),pi("div",Tu,[Au,wi("div",Eu,pe(s.interrupts),1)])):Ti("v-if",!0),s.isWindows||s.isSunOS||!s.soft_interrupts?Ti("v-if",!0):(li(),pi("div",Ou,[Iu,wi("div",Pu,pe(s.soft_interrupts),1)]))])])])])}]]),Du={class:"plugin",id:"diskio"},Mu={key:0,class:"table-row"},ju=wi("div",{class:"table-cell text-left title"},"DISK I/O",-1),Ru={class:"table-cell"},qu={class:"table-cell"},Bu={class:"table-cell"},Uu={class:"table-cell"},Fu={class:"table-cell text-left"};var zu=n(1036),$u=n.n(zu);function Hu(e,t){return Vu(e=8*Math.round(e),t)+"b"}function Vu(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;i1){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 Gu(e){return void 0===e||""===e?"?":e}function Wu(e,t,n){return t=t||0,n=n||" ",String(e).padStart(t,n)}function Zu(e,t){return"function"!=typeof e.slice&&(e=String(e)),e.slice(0,t)}function Ku(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 Qu(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,"
");return $u()(n)}function Xu(e,t){return new Intl.NumberFormat(void 0,"number"==typeof t?{maximumFractionDigits:t}:t).format(e)}function Ju(e){for(var t=0,n=0;n({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:Vu(e.read_bytes/t),rxps:Vu(e.write_bytes/t)},count:{txps:Vu(e.read_count/t),rxps:Vu(e.write_count/t)},alias:void 0!==e.alias?e.alias:null}}));return(0,dc.orderBy)(e,["name"])}}},td=(0,nc.Z)(ed,[["render",function(e,t,n,r,i,s){return li(),pi("section",Du,[s.disks.length>0?(li(),pi("div",Mu,[ju,On(wi("div",Ru,"R/s",512),[[Ds,!s.args.diskio_iops]]),On(wi("div",qu,"W/s",512),[[Ds,!s.args.diskio_iops]]),On(wi("div",Bu,"IOR/s",512),[[Ds,s.args.diskio_iops]]),On(wi("div",Uu,"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",Fu,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))])}]]),nd={key:0,id:"containers-plugin",class:"plugin"},rd=wi("span",{class:"title"},"CONTAINERS",-1),id={class:"table"},sd={class:"table-row"},od=wi("div",{class:"table-cell text-left"},"Engine",-1),ad=wi("div",{class:"table-cell text-left"},"Pod",-1),ld=wi("div",{class:"table-cell"},"Status",-1),cd=wi("div",{class:"table-cell"},"Uptime",-1),ud=Ci('
/MAX
IOR/s
IOW/s
RX/s
TX/s
Command
',6),dd={class:"table-cell text-left"},fd={class:"table-cell text-left"},pd={class:"table-cell text-left"},hd={class:"table-cell"},gd={class:"table-cell"},md={class:"table-cell"},bd={class:"table-cell"},vd={class:"table-cell"},yd={class:"table-cell"},wd={class:"table-cell"},xd={class:"table-cell"},_d={class:"table-cell text-left"};const kd={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}})}}}},Sd=(0,nc.Z)(kd,[["render",function(e,t,n,r,i,s){return s.containers.length?(li(),pi("section",nd,[rd,Si(" "+pe(s.containers.length)+" sorted by "+pe(i.sorter.getColumnLabel(i.sorter.column))+" ",1),wi("div",id,[wi("div",sd,[od,ad,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),ld,cd,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),ud]),(li(!0),pi(ni,null,pr(s.containers,((t,n)=>(li(),pi("div",{class:"table-row",key:n},[wi("div",dd,pe(t.engine),1),wi("div",fd,pe(t.pod_id||"-"),1),wi("div",pd,pe(t.name),1),wi("div",{class:ce(["table-cell","Paused"==t.status?"careful":"ok"])},pe(t.status),3),wi("div",hd,pe(t.uptime),1),wi("div",gd,pe(e.$filters.number(t.cpu_percent,1)),1),wi("div",md,pe(e.$filters.bytes(t.memory_usage)),1),wi("div",bd,pe(e.$filters.bytes(t.limit)),1),wi("div",vd,pe(e.$filters.bytes(t.io_rx)),1),wi("div",yd,pe(e.$filters.bytes(t.io_wx)),1),wi("div",wd,pe(e.$filters.bits(t.network_rx)),1),wi("div",xd,pe(e.$filters.bits(t.network_tx)),1),wi("div",_d,pe(t.command),1)])))),128))])])):Ti("v-if",!0)}]]),Cd={class:"plugin",id:"folders"},Td={key:0,class:"table-row"},Ad=[wi("div",{class:"table-cell text-left title"},"FOLDERS",-1),wi("div",{class:"table-cell"},null,-1),wi("div",{class:"table-cell"},"Size",-1)],Ed={class:"table-cell text-left"},Od=wi("div",{class:"table-cell"},null,-1),Id={key:0,class:"visible-lg-inline"};const Pd={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"}},Nd=(0,nc.Z)(Pd,[["render",function(e,t,n,r,i,s){return li(),pi("section",Cd,[s.folders.length>0?(li(),pi("div",Td,Ad)):Ti("v-if",!0),(li(!0),pi(ni,null,pr(s.folders,((t,n)=>(li(),pi("div",{class:"table-row",key:n},[wi("div",Ed,pe(t.path),1),Od,wi("div",{class:ce(["table-cell",s.getDecoration(t)])},[t.errno>0?(li(),pi("span",Id," ? ")):Ti("v-if",!0),Si(" "+pe(e.$filters.bytes(t.size)),1)],2)])))),128))])}]]),Ld={class:"plugin",id:"fs"},Dd={class:"table-row"},Md=wi("div",{class:"table-cell text-left title"},"FILE SYS",-1),jd={class:"table-cell"},Rd=wi("div",{class:"table-cell"},"Total",-1),qd={class:"table-cell text-left"},Bd={key:0,class:"visible-lg-inline"},Ud={class:"table-cell"};const Fd={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()}}},zd=(0,nc.Z)(Fd,[["render",function(e,t,n,r,i,s){return li(),pi("section",Ld,[wi("div",Dd,[Md,wi("div",jd,[On(wi("span",null,"Used",512),[[Ds,!s.args.fs_free_space]]),On(wi("span",null,"Free",512),[[Ds,s.args.fs_free_space]])]),Rd]),(li(!0),pi(ni,null,pr(s.fileSystems,((t,n)=>(li(),pi("div",{class:"table-row",key:n},[wi("div",qd,[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",Bd," ("+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",Ud,pe(e.$filters.bytes(t.size)),1)])))),128))])}]]),$d={id:"gpu",class:"plugin"},Hd={class:"gpu-name title"},Vd={class:"table"},Gd={key:0,class:"table-row"},Wd=wi("div",{class:"table-cell text-left"},"proc:",-1),Zd={key:1,class:"table-cell"},Kd={key:1,class:"table-row"},Qd=wi("div",{class:"table-cell text-left"},"mem:",-1),Xd={key:1,class:"table-cell"},Jd={key:2,class:"table-row"},Yd=wi("div",{class:"table-cell text-left"},"temperature:",-1),ef={key:1,class:"table-cell"},tf={class:"table-cell text-left"},nf={key:1},rf={key:3},sf={key:5};const of={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)}}},af=(0,nc.Z)(of,[["render",function(e,t,n,r,i,s){return li(),pi("section",$d,[wi("div",Hd,pe(s.name),1),wi("div",Vd,[s.args.meangpu||1===s.gpus.length?(li(),pi("div",Gd,[Wd,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",Zd,"N/A")):Ti("v-if",!0)])):Ti("v-if",!0),s.args.meangpu||1===s.gpus.length?(li(),pi("div",Kd,[Qd,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",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.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",ef,"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",tf,[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",nf,"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",rf,"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",sf,"N/A")):Ti("v-if",!0)])])))),128)):Ti("v-if",!0)])])}]]),lf={key:0,class:"plugin",id:"ip"},cf={key:0,class:"title"},uf={key:1},df={key:2,class:"title"},ff={key:3},pf={key:4};const hf={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}}},gf=(0,nc.Z)(hf,[["render",function(e,t,n,r,i,s){return null!=s.address?(li(),pi("section",lf,[null!=s.address?(li(),pi("span",cf,"IP")):Ti("v-if",!0),null!=s.address?(li(),pi("span",uf,pe(s.address)+"/"+pe(s.maskCdir),1)):Ti("v-if",!0),null!=s.publicAddress?(li(),pi("span",df,"Pub")):Ti("v-if",!0),null!=s.publicAddress?(li(),pi("span",ff,pe(s.publicAddress),1)):Ti("v-if",!0),null!=s.publicInfo?(li(),pi("span",pf,pe(s.publicInfo),1)):Ti("v-if",!0)])):Ti("v-if",!0)}]]),mf={class:"plugin",id:"irq"},bf={key:0,class:"table-row"},vf=[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)],yf={class:"table-cell text-left"},wf=wi("div",{class:"table-cell"},null,-1),xf={class:"table-cell"};const _f={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})))}}},kf=(0,nc.Z)(_f,[["render",function(e,t,n,r,i,s){return li(),pi("section",mf,[s.irqs.length>0?(li(),pi("div",bf,vf)):Ti("v-if",!0),(li(!0),pi(ni,null,pr(s.irqs,((e,t)=>(li(),pi("div",{class:"table-row",key:t},[wi("div",yf,pe(e.irq_line),1),wf,wi("div",xf,[wi("span",null,pe(e.irq_rate),1)])])))),128))])}]]),Sf={key:0,id:"load",class:"plugin"},Cf={class:"table"},Tf={class:"table-row"},Af=wi("div",{class:"table-cell text-left title"},"LOAD",-1),Ef={class:"table-cell"},Of={class:"table-row"},If=wi("div",{class:"table-cell text-left"},"1 min:",-1),Pf={class:"table-cell"},Nf={class:"table-row"},Lf=wi("div",{class:"table-cell text-left"},"5 min:",-1),Df={class:"table-row"},Mf=wi("div",{class:"table-cell text-left"},"15 min:",-1);const jf={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()}}},Rf=(0,nc.Z)(jf,[["render",function(e,t,n,r,i,s){return null!=s.cpucore?(li(),pi("section",Sf,[wi("div",Cf,[wi("div",Tf,[Af,wi("div",Ef,pe(s.cpucore)+"-core",1)]),wi("div",Of,[If,wi("div",Pf,pe(e.$filters.number(s.min1,2)),1)]),wi("div",Nf,[Lf,wi("div",{class:ce(["table-cell",s.getDecoration("min5")])},pe(e.$filters.number(s.min5,2)),3)]),wi("div",Df,[Mf,wi("div",{class:ce(["table-cell",s.getDecoration("min15")])},pe(e.$filters.number(s.min15,2)),3)])])])):Ti("v-if",!0)}]]),qf={id:"mem",class:"plugin"},Bf={class:"table"},Uf={class:"table-row"},Ff=wi("div",{class:"table-cell text-left title"},"MEM",-1),zf={class:"table-row"},$f=wi("div",{class:"table-cell text-left"},"total:",-1),Hf={class:"table-cell"},Vf={class:"table-row"},Gf=wi("div",{class:"table-cell text-left"},"used:",-1),Wf={class:"table-row"},Zf=wi("div",{class:"table-cell text-left"},"free:",-1),Kf={class:"table-cell"};const Qf={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()}}},Xf=(0,nc.Z)(Qf,[["render",function(e,t,n,r,i,s){return li(),pi("section",qf,[wi("div",Bf,[wi("div",Uf,[Ff,wi("div",{class:ce(["table-cell",s.getDecoration("percent")])},pe(s.percent)+"%",3)]),wi("div",zf,[$f,wi("div",Hf,pe(e.$filters.bytes(s.total)),1)]),wi("div",Vf,[Gf,wi("div",{class:ce(["table-cell",s.getDecoration("used")])},pe(e.$filters.bytes(s.used,2)),3)]),wi("div",Wf,[Zf,wi("div",Kf,pe(e.$filters.bytes(s.free)),1)])])])}]]),Jf={id:"mem-more",class:"plugin"},Yf={class:"table"},ep={class:"table-row"},tp=wi("div",{class:"table-cell text-left"},"active:",-1),np={class:"table-cell"},rp={class:"table-row"},ip=wi("div",{class:"table-cell text-left"},"inactive:",-1),sp={class:"table-cell"},op={class:"table-row"},ap=wi("div",{class:"table-cell text-left"},"buffers:",-1),lp={class:"table-cell"},cp={class:"table-row"},up=wi("div",{class:"table-cell text-left"},"cached:",-1),dp={class:"table-cell"};const fp={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}}},pp=(0,nc.Z)(fp,[["render",function(e,t,n,r,i,s){return li(),pi("section",Jf,[wi("div",Yf,[On(wi("div",ep,[tp,wi("div",np,pe(e.$filters.bytes(s.active)),1)],512),[[Ds,null!=s.active]]),On(wi("div",rp,[ip,wi("div",sp,pe(e.$filters.bytes(s.inactive)),1)],512),[[Ds,null!=s.inactive]]),On(wi("div",op,[ap,wi("div",lp,pe(e.$filters.bytes(s.buffers)),1)],512),[[Ds,null!=s.buffers]]),On(wi("div",cp,[up,wi("div",dp,pe(e.$filters.bytes(s.cached)),1)],512),[[Ds,null!=s.cached]])])])}]]),hp={id:"memswap",class:"plugin"},gp={class:"table"},mp={class:"table-row"},bp=wi("div",{class:"table-cell text-left title"},"SWAP",-1),vp={class:"table-row"},yp=wi("div",{class:"table-cell text-left"},"total:",-1),wp={class:"table-cell"},xp={class:"table-row"},_p=wi("div",{class:"table-cell text-left"},"used:",-1),kp={class:"table-row"},Sp=wi("div",{class:"table-cell text-left"},"free:",-1),Cp={class:"table-cell"};const Tp={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()}}},Ap=(0,nc.Z)(Tp,[["render",function(e,t,n,r,i,s){return li(),pi("section",hp,[wi("div",gp,[wi("div",mp,[bp,wi("div",{class:ce(["table-cell",s.getDecoration("percent")])},pe(s.percent)+"%",3)]),wi("div",vp,[yp,wi("div",wp,pe(e.$filters.bytes(s.total)),1)]),wi("div",xp,[_p,wi("div",{class:ce(["table-cell",s.getDecoration("used")])},pe(e.$filters.bytes(s.used)),3)]),wi("div",kp,[Sp,wi("div",Cp,pe(e.$filters.bytes(s.free)),1)])])])}]]),Ep={class:"plugin",id:"network"},Op={class:"table-row"},Ip=wi("div",{class:"table-cell text-left title"},"NETWORK",-1),Pp={class:"table-cell"},Np={class:"table-cell"},Lp={class:"table-cell"},Dp={class:"table-cell"},Mp={class:"table-cell"},jp={class:"table-cell"},Rp={class:"table-cell"},qp={class:"table-cell"},Bp={class:"table-cell text-left"},Up={class:"visible-lg-inline"},Fp={class:"hidden-lg"},zp={class:"table-cell"},$p={class:"table-cell"};const Hp={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,rx:e.rx,tx:e.tx,cx:e.cx,time_since_update:e.time_since_update,cumulativeRx:e.cumulative_rx,cumulativeTx:e.cumulative_tx,cumulativeCx:e.cumulative_cx}}));return(0,dc.orderBy)(e,["interfaceName"])}}},Vp=(0,nc.Z)(Hp,[["render",function(e,t,n,r,i,s){return li(),pi("section",Ep,[wi("div",Op,[Ip,On(wi("div",Pp,"Rx/s",512),[[Ds,!s.args.network_cumul&&!s.args.network_sum]]),On(wi("div",Np,"Tx/s",512),[[Ds,!s.args.network_cumul&&!s.args.network_sum]]),On(wi("div",Lp,null,512),[[Ds,!s.args.network_cumul&&s.args.network_sum]]),On(wi("div",Dp,"Rx+Tx/s",512),[[Ds,!s.args.network_cumul&&s.args.network_sum]]),On(wi("div",Mp,"Rx",512),[[Ds,s.args.network_cumul&&!s.args.network_sum]]),On(wi("div",jp,"Tx",512),[[Ds,s.args.network_cumul&&!s.args.network_sum]]),On(wi("div",Rp,null,512),[[Ds,s.args.network_cumul&&s.args.network_sum]]),On(wi("div",qp,"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",Bp,[wi("span",Up,pe(t.ifname),1),wi("span",Fp,pe(e.$filters.minSize(t.ifname)),1)]),On(wi("div",{class:"table-cell"},pe(s.args.byte?e.$filters.bytes(t.rx/t.time_since_update):e.$filters.bits(t.rx/t.time_since_update)),513),[[Ds,!s.args.network_cumul&&!s.args.network_sum]]),On(wi("div",{class:"table-cell"},pe(s.args.byte?e.$filters.bytes(t.tx/t.time_since_update):e.$filters.bits(t.tx/t.time_since_update)),513),[[Ds,!s.args.network_cumul&&!s.args.network_sum]]),On(wi("div",zp,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.cx/t.time_since_update):e.$filters.bits(t.cx/t.time_since_update)),513),[[Ds,!s.args.network_cumul&&s.args.network_sum]]),On(wi("div",{class:"table-cell"},pe(s.args.byte?e.$filters.bytes(t.cumulativeRx):e.$filters.bits(t.cumulativeRx)),513),[[Ds,s.args.network_cumul&&!s.args.network_sum]]),On(wi("div",{class:"table-cell"},pe(s.args.byte?e.$filters.bytes(t.cumulativeTx):e.$filters.bits(t.cumulativeTx)),513),[[Ds,s.args.network_cumul&&!s.args.network_sum]]),On(wi("div",$p,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.cumulativeCx):e.$filters.bits(t.cumulativeCx)),513),[[Ds,s.args.network_cumul&&s.args.network_sum]])])))),128))])}]]),Gp={id:"now",class:"plugin"},Wp={class:"table-row"},Zp={class:"table-cell text-left"};const Kp={props:{data:{type:Object}},computed:{value(){return this.data.stats.now}}},Qp=(0,nc.Z)(Kp,[["render",function(e,t,n,r,i,s){return li(),pi("section",Gp,[wi("div",Wp,[wi("div",Zp,pe(s.value),1)])])}]]),Xp={id:"percpu",class:"plugin"},Jp={class:"table-row"},Yp={class:"table-cell text-left title"},eh={key:0},th={class:"table-row"},nh=wi("div",{class:"table-cell text-left"},"user:",-1),rh={class:"table-row"},ih=wi("div",{class:"table-cell text-left"},"system:",-1),sh={class:"table-row"},oh=wi("div",{class:"table-cell text-left"},"idle:",-1),ah={key:0,class:"table-row"},lh=wi("div",{class:"table-cell text-left"},"iowait:",-1),ch={key:1,class:"table-row"},uh=wi("div",{class:"table-cell text-left"},"steal:",-1);const dh={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)}},fh=(0,nc.Z)(dh,[["render",function(e,t,n,r,i,s){return li(),pi("section",Xp,[(li(!0),pi(ni,null,pr(s.cpusChunks,((e,t)=>(li(),pi("div",{class:"table",key:t},[wi("div",Jp,[wi("div",Yp,[0===t?(li(),pi("span",eh,"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",th,[nh,(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",rh,[ih,(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",sh,[oh,(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",ah,[lh,(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",ch,[uh,(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))])}]]),ph={class:"plugin",id:"ports"},hh={class:"table-cell text-left"},gh=wi("div",{class:"table-cell"},null,-1),mh={key:0},bh={key:1},vh={key:2},yh={key:3},wh={key:0},xh={key:1},_h={key:2};const kh={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.status>e.rtt_warning?"warning":"ok",getWebDecoration:e=>null===e.status?"careful":-1===[200,301,302].indexOf(e.status)?"critical":null!==e.rtt_warning&&e.elapsed>e.rtt_warning?"warning":"ok"}},Sh=(0,nc.Z)(kh,[["render",function(e,t,n,r,i,s){return li(),pi("section",ph,[(li(!0),pi(ni,null,pr(s.ports,((t,n)=>(li(),pi("div",{class:"table-row",key:n},[wi("div",hh,[Ti(" prettier-ignore "),Si(" "+pe(e.$filters.minSize(t.description?t.description:t.host+" "+t.port,20)),1)]),gh,t.host?(li(),pi("div",{key:0,class:ce([s.getPortDecoration(t),"table-cell"])},["null"==t.status?(li(),pi("span",mh,"Scanning")):"false"==t.status?(li(),pi("span",bh,"Timeout")):"true"==t.status?(li(),pi("span",vh,"Open")):(li(),pi("span",yh,pe(e.$filters.number(1e3*t.status,0))+"ms",1))],2)):Ti("v-if",!0),t.url?(li(),pi("div",{key:1,class:ce([s.getWebDecoration(t),"table-cell"])},["null"==t.status?(li(),pi("span",wh,"Scanning")):"Error"==t.status?(li(),pi("span",xh,"Error")):(li(),pi("span",_h,"Code "+pe(t.status),1))],2)):Ti("v-if",!0)])))),128))])}]]),Ch={key:0},Th={key:1},Ah={key:0,class:"row"},Eh={class:"col-lg-18"};const Oh={id:"amps",class:"plugin"},Ih={class:"table"},Ph={key:0,class:"table-cell text-left"},Nh=["innerHTML"];const Lh={props:{data:{type:Object}},computed:{stats(){return this.data.stats.amps},processes(){return this.stats.filter((e=>null!==e.result))}},methods:{getNameDecoration(e){const t=e.count,n=e.countmin,r=e.countmax;let i="ok";return i=t>0?(null===n||t>=n)&&(null===r||t<=r)?"ok":"careful":null===n?"ok":"critical",i}}},Dh=(0,nc.Z)(Lh,[["render",function(e,t,n,r,i,s){return li(),pi("section",Oh,[wi("div",Ih,[(li(!0),pi(ni,null,pr(s.processes,((t,n)=>(li(),pi("div",{class:"table-row",key:n},[wi("div",{class:ce(["table-cell text-left",s.getNameDecoration(t)])},pe(t.name),3),t.regex?(li(),pi("div",Ph,pe(t.count),1)):Ti("v-if",!0),wi("div",{class:"table-cell text-left process-result",innerHTML:e.$filters.nl2br(t.result)},null,8,Nh)])))),128))])])}]]),Mh={id:"processcount",class:"plugin"},jh=wi("span",{class:"title"},"TASKS",-1),Rh={class:"title"};const qh={props:{data:{type:Object},sorter:{type:Object}},data:()=>({store:Uo}),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}}},Bh=(0,nc.Z)(qh,[["render",function(e,t,n,r,i,s){return li(),pi("section",Mh,[jh,wi("span",null,pe(s.total)+" ("+pe(s.thread)+" thr),",1),wi("span",null,pe(s.running)+" run,",1),wi("span",null,pe(s.sleeping)+" slp,",1),wi("span",null,pe(s.stopped)+" oth",1),wi("span",null,pe(s.args.programs?"Programs":"Threads"),1),wi("span",Rh,pe(n.sorter.auto?"sorted automatically":"sorted"),1),wi("span",null,"by "+pe(n.sorter.getColumnLabel(n.sorter.column)),1)])}]]),Uh={id:"processlist-plugin",class:"plugin"},Fh={class:"table"},zh={class:"table-row"},$h=wi("div",{class:"table-cell width-80 hidden-xs hidden-sm"},"VIRT",-1),Hh=wi("div",{class:"table-cell width-80 hidden-xs hidden-sm"},"RES",-1),Vh=wi("div",{class:"table-cell width-80"},"PID",-1),Gh=wi("div",{class:"table-cell width-60"},"NI",-1),Wh=wi("div",{class:"table-cell width-60"},"S",-1),Zh={class:"table-cell width-80"},Kh={class:"table-cell width-80"},Qh={class:"table-cell width-80"},Xh={class:"table-cell width-100 text-left"},Jh={key:0,class:"table-cell width-100 hidden-xs hidden-sm"},Yh={key:1,class:"table-cell width-80 hidden-xs hidden-sm"},eg={class:"table-cell width-80 text-left hidden-xs hidden-sm"};const tg={props:{data:{type:Object},sorter:{type:Object}},data:()=>({store:Uo}),computed:{args(){return this.store.args||{}},config(){return this.store.config||{}},stats(){return this.data.stats.processlist},processes(){const{sorter:e}=this,t=this.data.stats.isWindows,n=(this.stats||[]).map((e=>(e.memvirt="?",e.memres="?",e.memory_info&&(e.memvirt=e.memory_info.vms,e.memres=e.memory_info.rss),t&&null!==e.username&&(e.username=(0,dc.last)(e.username.split("\\"))),e.timeplus="?",e.timemillis="?",e.cpu_times&&(e.timeplus=Yu(e.cpu_times),e.timemillis=Ju(e.cpu_times)),null===e.num_threads&&(e.num_threads=-1),null===e.cpu_percent&&(e.cpu_percent=-1),null===e.memory_percent&&(e.memory_percent=-1),e.io_read=null,e.io_write=null,e.io_counters&&(e.io_read=(e.io_counters[0]-e.io_counters[2])/e.time_since_update,e.io_write=(e.io_counters[1]-e.io_counters[3])/e.time_since_update),e.isNice=void 0!==e.nice&&(t&&32!=e.nice||!t&&0!=e.nice),Array.isArray(e.cmdline)&&(e.cmdline=e.cmdline.join(" ").replace(/\n/g," ")),null!==e.cmdline&&0!==e.cmdline.length||(e.cmdline=e.name),e)));return(0,dc.orderBy)(n,[e.column].reduce(((e,t)=>("io_counters"===t&&(t=["io_read","io_write"]),e.concat(t))),[]),[e.isReverseColumn(e.column)?"desc":"asc"]).slice(0,this.limit)},ioReadWritePresent(){return(this.stats||[]).some((({io_counters:e})=>e))},limit(){return void 0!==this.config.outputs?this.config.outputs.max_processes_display:void 0}},methods:{getCpuPercentAlert:e=>$o.getAlert("processlist","processlist_cpu_",e.cpu_percent),getMemoryPercentAlert:e=>$o.getAlert("processlist","processlist_mem_",e.cpu_percent)}},ng={components:{GlancesPluginAmps:Dh,GlancesPluginProcesscount:Bh,GlancesPluginProcesslist:(0,nc.Z)(tg,[["render",function(e,t,n,r,i,s){return li(),pi(ni,null,[Ti(" prettier-ignore "),wi("section",Uh,[wi("div",Fh,[wi("div",zh,[wi("div",{class:ce(["table-cell width-60",["sortable","cpu_percent"===n.sorter.column&&"sort"]]),onClick:t[0]||(t[0]=t=>e.$emit("update:sorter","cpu_percent"))}," CPU% ",2),wi("div",{class:ce(["table-cell width-60",["sortable","memory_percent"===n.sorter.column&&"sort"]]),onClick:t[1]||(t[1]=t=>e.$emit("update:sorter","memory_percent"))}," MEM% ",2),$h,Hh,Vh,wi("div",{class:ce(["table-cell width-100 text-left",["sortable","username"===n.sorter.column&&"sort"]]),onClick:t[2]||(t[2]=t=>e.$emit("update:sorter","username"))}," USER ",2),wi("div",{class:ce(["table-cell width-100 hidden-xs hidden-sm",["sortable","timemillis"===n.sorter.column&&"sort"]]),onClick:t[3]||(t[3]=t=>e.$emit("update:sorter","timemillis"))}," TIME+ ",2),wi("div",{class:ce(["table-cell width-80 text-left hidden-xs hidden-sm",["sortable","num_threads"===n.sorter.column&&"sort"]]),onClick:t[4]||(t[4]=t=>e.$emit("update:sorter","num_threads"))}," THR ",2),Gh,Wh,On(wi("div",{class:ce(["table-cell width-80 hidden-xs hidden-sm",["sortable","io_counters"===n.sorter.column&&"sort"]]),onClick:t[5]||(t[5]=t=>e.$emit("update:sorter","io_counters"))}," IOR/s ",2),[[Ds,s.ioReadWritePresent]]),On(wi("div",{class:ce(["table-cell width-80 text-left hidden-xs hidden-sm",["sortable","io_counters"===n.sorter.column&&"sort"]]),onClick:t[6]||(t[6]=t=>e.$emit("update:sorter","io_counters"))}," IOW/s ",2),[[Ds,s.ioReadWritePresent]]),wi("div",{class:ce(["table-cell text-left",["sortable","name"===n.sorter.column&&"sort"]]),onClick:t[7]||(t[7]=t=>e.$emit("update:sorter","name"))}," Command ",2)]),(li(!0),pi(ni,null,pr(s.processes,((t,n)=>(li(),pi("div",{class:"table-row",key:n},[wi("div",{class:ce(["table-cell width-60",s.getCpuPercentAlert(t)])},pe(-1==t.cpu_percent?"?":e.$filters.number(t.cpu_percent,1)),3),wi("div",{class:ce(["table-cell width-60",s.getMemoryPercentAlert(t)])},pe(-1==t.memory_percent?"?":e.$filters.number(t.memory_percent,1)),3),wi("div",Zh,pe(e.$filters.bytes(t.memvirt)),1),wi("div",Kh,pe(e.$filters.bytes(t.memres)),1),wi("div",Qh,pe(t.pid),1),wi("div",Xh,pe(t.username),1),"?"!=t.timeplus?(li(),pi("div",Jh,[On(wi("span",{class:"highlight"},pe(t.timeplus.hours)+"h",513),[[Ds,t.timeplus.hours>0]]),Si(" "+pe(e.$filters.leftPad(t.timeplus.minutes,2,"0"))+":"+pe(e.$filters.leftPad(t.timeplus.seconds,2,"0"))+" ",1),On(wi("span",null,"."+pe(e.$filters.leftPad(t.timeplus.milliseconds,2,"0")),513),[[Ds,t.timeplus.hours<=0]])])):Ti("v-if",!0),"?"==t.timeplus?(li(),pi("div",Yh,"?")):Ti("v-if",!0),wi("div",eg,pe(-1==t.num_threads?"?":t.num_threads),1),wi("div",{class:ce(["table-cell width-60",{nice:t.isNice}])},pe(e.$filters.exclamation(t.nice)),3),wi("div",{class:ce(["table-cell width-60",{status:"R"==t.status}])},pe(t.status),3),On(wi("div",{class:"table-cell width-80 hidden-xs hidden-sm"},pe(e.$filters.bytes(t.io_read)),513),[[Ds,s.ioReadWritePresent]]),On(wi("div",{class:"table-cell width-80 text-left hidden-xs hidden-sm"},pe(e.$filters.bytes(t.io_write)),513),[[Ds,s.ioReadWritePresent]]),On(wi("div",{class:"table-cell text-left"},pe(t.name),513),[[Ds,s.args.process_short_name]]),On(wi("div",{class:"table-cell text-left"},pe(t.cmdline),513),[[Ds,!s.args.process_short_name]])])))),128))])])],2112)}]])},props:{data:{type:Object}},data:()=>({store:Uo,sorter:void 0}),computed:{args(){return this.store.args||{}},sortProcessesKey(){return this.args.sort_processes_key}},watch:{sortProcessesKey:{immediate:!0,handler(e){e&&!["cpu_percent","memory_percent","username","timemillis","num_threads","io_counters","name"].includes(e)||(this.sorter={column:this.args.sort_processes_key||"cpu_percent",auto:!this.args.sort_processes_key,isReverseColumn:function(e){return!["username","name"].includes(e)},getColumnLabel:function(e){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"}[e]||e}})}}}},rg=(0,nc.Z)(ng,[["render",function(e,t,n,r,i,s){const o=cr("glances-plugin-processcount"),a=cr("glances-plugin-amps"),l=cr("glances-plugin-processlist");return s.args.disable_process?(li(),pi("div",Ch,"PROCESSES DISABLED (press 'z' to display)")):(li(),pi("div",Th,[xi(o,{sorter:i.sorter,data:n.data},null,8,["sorter","data"]),s.args.disable_amps?Ti("v-if",!0):(li(),pi("div",Ah,[wi("div",Eh,[xi(a,{data:n.data},null,8,["data"])])])),xi(l,{sorter:i.sorter,data:n.data,"onUpdate:sorter":t[0]||(t[0]=e=>s.args.sort_processes_key=e)},null,8,["sorter","data"])]))}]]),ig={id:"quicklook",class:"plugin"},sg={class:"cpu-name"},og={class:"table"},ag={key:0,class:"table-row"},lg=wi("div",{class:"table-cell text-left"},"CPU",-1),cg={class:"table-cell"},ug={class:"progress"},dg=["aria-valuenow"],fg={class:"table-cell"},pg={class:"table-cell text-left"},hg={class:"table-cell"},gg={class:"progress"},mg=["aria-valuenow"],bg={class:"table-cell"},vg={class:"table-row"},yg=wi("div",{class:"table-cell text-left"},"MEM",-1),wg={class:"table-cell"},xg={class:"progress"},_g=["aria-valuenow"],kg={class:"table-cell"},Sg={class:"table-row"},Cg=wi("div",{class:"table-cell text-left"},"SWAP",-1),Tg={class:"table-cell"},Ag={class:"progress"},Eg=["aria-valuenow"],Og={class:"table-cell"};const Ig={props:{data:{type:Object}},data:()=>({store:Uo}),computed:{args(){return this.store.args||{}},stats(){return this.data.stats.quicklook},view(){return this.data.views.quicklook},mem(){return this.stats.mem},cpu(){return this.stats.cpu},cpu_name(){return this.stats.cpu_name},cpu_hz_current(){return this.stats.cpu_hz_current},cpu_hz(){return this.stats.cpu_hz},swap(){return this.stats.swap},percpus(){return this.stats.percpu.map((({cpu_number:e,total:t})=>({number:e,total:t})))}},methods:{getDecoration(e){if(void 0!==this.view[e])return this.view[e].decoration.toLowerCase()}}},Pg=(0,nc.Z)(Ig,[["render",function(e,t,n,r,i,s){return li(),pi("section",ig,[wi("div",sg,pe(s.cpu_name),1),wi("div",og,[s.args.percpu?Ti("v-if",!0):(li(),pi("div",ag,[lg,wi("div",cg,[wi("div",ug,[wi("div",{class:ce(`progress-bar progress-bar-${s.getDecoration("cpu")}`),role:"progressbar","aria-valuenow":s.cpu,"aria-valuemin":"0","aria-valuemax":"100",style:ie(`width: ${s.cpu}%;`)},"   ",14,dg)])]),wi("div",fg,pe(s.cpu)+"%",1)])),s.args.percpu?(li(!0),pi(ni,{key:1},pr(s.percpus,((e,t)=>(li(),pi("div",{class:"table-row",key:t},[wi("div",pg,"CPU"+pe(e.number),1),wi("div",hg,[wi("div",gg,[wi("div",{class:ce(`progress-bar progress-bar-${s.getDecoration("cpu")}`),role:"progressbar","aria-valuenow":e.total,"aria-valuemin":"0","aria-valuemax":"100",style:ie(`width: ${e.total}%;`)},"   ",14,mg)])]),wi("div",bg,pe(e.total)+"%",1)])))),128)):Ti("v-if",!0),wi("div",vg,[yg,wi("div",wg,[wi("div",xg,[wi("div",{class:ce(`progress-bar progress-bar-${s.getDecoration("mem")}`),role:"progressbar","aria-valuenow":s.mem,"aria-valuemin":"0","aria-valuemax":"100",style:ie(`width: ${s.mem}%;`)},"   ",14,_g)])]),wi("div",kg,pe(s.mem)+"%",1)]),wi("div",Sg,[Cg,wi("div",Tg,[wi("div",Ag,[wi("div",{class:ce(`progress-bar progress-bar-${s.getDecoration("swap")}`),role:"progressbar","aria-valuenow":s.swap,"aria-valuemin":"0","aria-valuemax":"100",style:ie(`width: ${s.swap}%;`)},"   ",14,Eg)])]),wi("div",Og,pe(s.swap)+"%",1)])])])}]]),Ng={class:"plugin",id:"raid"},Lg={key:0,class:"table-row"},Dg=[wi("div",{class:"table-cell text-left title"},"RAID disks",-1),wi("div",{class:"table-cell"},"Used",-1),wi("div",{class:"table-cell"},"Total",-1)],Mg={class:"table-cell text-left"},jg={class:"warning"};const Rg={props:{data:{type:Object}},computed:{stats(){return this.data.stats.raid},disks(){const e=Object.entries(this.stats).map((([e,t])=>{const n=Object.entries(t.components).map((([e,t])=>({number:t,name:e})));return{name:e,type:null==t.type?"UNKNOWN":t.type,used:t.used,available:t.available,status:t.status,degraded:t.used0}},methods:{getAlert:e=>e.inactive?"critical":e.degraded?"warning":"ok"}},qg=(0,nc.Z)(Rg,[["render",function(e,t,n,r,i,s){return li(),pi("section",Ng,[s.hasDisks?(li(),pi("div",Lg,Dg)):Ti("v-if",!0),(li(!0),pi(ni,null,pr(s.disks,((e,t)=>(li(),pi("div",{class:"table-row",key:t},[wi("div",Mg,[Si(pe(e.type.toUppercase())+" "+pe(e.name)+" ",1),On(wi("div",jg,"└─ Degraded mode",512),[[Ds,e.degraded]]),On(wi("div",null,"   └─ "+pe(e.config),513),[[Ds,e.degraded]]),On(wi("div",{class:"critical"},"└─ Status "+pe(e.status),513),[[Ds,e.inactive]]),e.inactive?(li(!0),pi(ni,{key:0},pr(e.components,((t,n)=>(li(),pi("div",{key:n},"    "+pe(n===e.components.length-1?"└─":"├─")+" disk "+pe(t.number)+": "+pe(t.name),1)))),128)):Ti("v-if",!0)]),On(wi("div",{class:ce(["table-cell",s.getAlert(e)])},pe(e.used),3),[[Ds,!e.inactive]]),On(wi("div",{class:ce(["table-cell",s.getAlert(e)])},pe(e.available),3),[[Ds,!e.inactive]])])))),128))])}]]),Bg={id:"smart",class:"plugin"},Ug=wi("div",{class:"table-row"},[wi("div",{class:"table-cell text-left title"},"SMART disks"),wi("div",{class:"table-cell"}),wi("div",{class:"table-cell"})],-1),Fg={class:"table-row"},zg={class:"table-cell text-left text-truncate"},$g=wi("div",{class:"table-cell"},null,-1),Hg=wi("div",{class:"table-cell"},null,-1),Vg={class:"table-cell text-left"},Gg=wi("div",{class:"table-cell"},null,-1),Wg={class:"table-cell text-truncate"};const Zg={props:{data:{type:Object}},computed:{stats(){return this.data.stats.smart},drives(){return(Array.isArray(this.stats)?this.stats:[]).map((e=>{const t=e.DeviceName,n=Object.entries(e).filter((([e])=>"DeviceName"!==e)).sort((([,e],[,t])=>e.namet.name?1:0)).map((([e,t])=>t));return{name:t,details:n}}))}}},Kg=(0,nc.Z)(Zg,[["render",function(e,t,n,r,i,s){return li(),pi("section",Bg,[Ug,(li(!0),pi(ni,null,pr(s.drives,((e,t)=>(li(),pi(ni,{key:t},[wi("div",Fg,[wi("div",zg,pe(e.name),1),$g,Hg]),(li(!0),pi(ni,null,pr(e.details,((e,t)=>(li(),pi("div",{key:t,class:"table-row"},[wi("div",Vg,"  "+pe(e.name),1),Gg,wi("div",Wg,[wi("span",null,pe(e.raw),1)])])))),128))],64)))),128))])}]]),Qg={class:"plugin",id:"sensors"},Xg={key:0,class:"table-row"},Jg=[wi("div",{class:"table-cell text-left title"},"SENSORS",-1)],Yg={class:"table-cell text-left"},em={class:"table-cell"};const tm={props:{data:{type:Object}},data:()=>({store:Uo}),computed:{args(){return this.store.args||{}},stats(){return this.data.stats.sensors},sensors(){return this.stats.filter((e=>!(Array.isArray(e.value)&&0===e.value.length||0===e.value))).map((e=>(this.args.fahrenheit&&"battery"!=e.type&&"fan_speed"!=e.type&&(e.value=parseFloat(1.8*e.value+32).toFixed(1),e.unit="F"),e)))}},methods:{getAlert(e){const t="battery"==e.type?100-e.value:e.value;return $o.getAlert("sensors","sensors_"+e.type+"_",t)}}},nm=(0,nc.Z)(tm,[["render",function(e,t,n,r,i,s){return li(),pi("section",Qg,[s.sensors.length>0?(li(),pi("div",Xg,Jg)):Ti("v-if",!0),(li(!0),pi(ni,null,pr(s.sensors,((e,t)=>(li(),pi("div",{class:"table-row",key:t},[wi("div",Yg,pe(e.label),1),wi("div",em,pe(e.unit),1),wi("div",{class:ce(["table-cell",s.getAlert(e)])},pe(e.value),3)])))),128))])}]]),rm={class:"plugin",id:"system"},im={key:0,class:"critical"},sm={class:"title"},om={key:1,class:"hidden-xs hidden-sm"},am={key:2,class:"hidden-xs hidden-sm"};const lm={props:{data:{type:Object}},data:()=>({store:Uo}),computed:{stats(){return this.data.stats.system},isLinux(){return this.data.isLinux},hostname(){return this.stats.hostname},platform(){return this.stats.platform},os(){return{name:this.stats.os_name,version:this.stats.os_version}},humanReadableName(){return this.stats.hr_name},isDisconnected(){return"FAILURE"===this.store.status}}},cm=(0,nc.Z)(lm,[["render",function(e,t,n,r,i,s){return li(),pi("section",rm,[s.isDisconnected?(li(),pi("span",im,"Disconnected from")):Ti("v-if",!0),wi("span",sm,pe(s.hostname),1),s.isLinux?(li(),pi("span",om," ("+pe(s.humanReadableName)+" / "+pe(s.os.name)+" "+pe(s.os.version)+") ",1)):Ti("v-if",!0),s.isLinux?Ti("v-if",!0):(li(),pi("span",am," ("+pe(s.os.name)+" "+pe(s.os.version)+" "+pe(s.platform)+") ",1))])}]]),um={class:"plugin",id:"uptime"};const dm={props:{data:{type:Object}},computed:{value(){return this.data.stats.uptime}}},fm=(0,nc.Z)(dm,[["render",function(e,t,n,r,i,s){return li(),pi("section",um,[wi("span",null,"Uptime: "+pe(s.value),1)])}]]),pm={class:"plugin",id:"wifi"},hm={key:0,class:"table-row"},gm=[wi("div",{class:"table-cell text-left title"},"WIFI",-1),wi("div",{class:"table-cell"},null,-1),wi("div",{class:"table-cell"},"dBm",-1)],mm={class:"table-cell text-left"},bm=wi("div",{class:"table-cell"},null,-1);const vm={props:{data:{type:Object}},computed:{stats(){return this.data.stats.wifi},view(){return this.data.views.wifi},hotspots(){const e=this.stats.map((e=>{if(""!==e.ssid)return{ssid:e.ssid,signal:e.signal,security:e.security}})).filter(Boolean);return(0,dc.orderBy)(e,["ssid"])}},methods:{getDecoration(e,t){if(void 0!==this.view[e.ssid][t])return this.view[e.ssid][t].decoration.toLowerCase()}}},ym=(0,nc.Z)(vm,[["render",function(e,t,n,r,i,s){return li(),pi("section",pm,[s.hotspots.length>0?(li(),pi("div",hm,gm)):Ti("v-if",!0),(li(!0),pi(ni,null,pr(s.hotspots,((t,n)=>(li(),pi("div",{class:"table-row",key:n},[wi("div",mm,[Si(pe(e.$filters.limitTo(t.ssid,20))+" ",1),wi("span",null,pe(t.security),1)]),bm,wi("div",{class:ce(["table-cell",s.getDecoration(t,"signal")])},pe(t.signal),3)])))),128))])}]]),wm=JSON.parse('{"t":["network","wifi","connections","ports","diskio","fs","irq","folders","raid","smart","sensors","now"]}'),xm={components:{GlancesHelp:rc,GlancesPluginAlert:pc,GlancesPluginCloud:bc,GlancesPluginConnections:Uc,GlancesPluginCpu:Lu,GlancesPluginDiskio:td,GlancesPluginContainers:Sd,GlancesPluginFolders:Nd,GlancesPluginFs:zd,GlancesPluginGpu:af,GlancesPluginIp:gf,GlancesPluginIrq:kf,GlancesPluginLoad:Rf,GlancesPluginMem:Xf,GlancesPluginMemMore:pp,GlancesPluginMemswap:Ap,GlancesPluginNetwork:Vp,GlancesPluginNow:Qp,GlancesPluginPercpu:fh,GlancesPluginPorts:Sh,GlancesPluginProcess:rg,GlancesPluginQuicklook:Pg,GlancesPluginRaid:qg,GlancesPluginSensors:nm,GlancesPluginSmart:Kg,GlancesPluginSystem:cm,GlancesPluginUptime:fm,GlancesPluginWifi:ym},data:()=>({store:Uo}),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:e}=this,t=e.stats&&e.stats.system&&e.stats.system.hostname||"";return t?`${t} - Glances`:"Glances"},leftMenu(){return void 0!==this.config.outputs.left_menu?this.config.outputs.left_menu.split(","):wm.t}},watch:{title(){document&&(document.title=this.title)}},methods:{setupHotKeys(){jo("a",(()=>{this.store.args.sort_processes_key=null})),jo("c",(()=>{this.store.args.sort_processes_key="cpu_percent"})),jo("m",(()=>{this.store.args.sort_processes_key="memory_percent"})),jo("u",(()=>{this.store.args.sort_processes_key="username"})),jo("p",(()=>{this.store.args.sort_processes_key="name"})),jo("i",(()=>{this.store.args.sort_processes_key="io_counters"})),jo("t",(()=>{this.store.args.sort_processes_key="timemillis"})),jo("shift+A",(()=>{this.store.args.disable_amps=!this.store.args.disable_amps})),jo("d",(()=>{this.store.args.disable_diskio=!this.store.args.disable_diskio})),jo("shift+Q",(()=>{this.store.args.enable_irq=!this.store.args.enable_irq})),jo("f",(()=>{this.store.args.disable_fs=!this.store.args.disable_fs})),jo("j",(()=>{this.store.args.programs=!this.store.args.programs})),jo("k",(()=>{this.store.args.disable_connections=!this.store.args.disable_connections})),jo("n",(()=>{this.store.args.disable_network=!this.store.args.disable_network})),jo("s",(()=>{this.store.args.disable_sensors=!this.store.args.disable_sensors})),jo("2",(()=>{this.store.args.disable_left_sidebar=!this.store.args.disable_left_sidebar})),jo("z",(()=>{this.store.args.disable_process=!this.store.args.disable_process})),jo("shift+S",(()=>{this.store.args.process_short_name=!this.store.args.process_short_name})),jo("shift+D",(()=>{this.store.args.disable_containers=!this.store.args.disable_containers})),jo("b",(()=>{this.store.args.byte=!this.store.args.byte})),jo("shift+B",(()=>{this.store.args.diskio_iops=!this.store.args.diskio_iops})),jo("l",(()=>{this.store.args.disable_alert=!this.store.args.disable_alert})),jo("1",(()=>{this.store.args.percpu=!this.store.args.percpu})),jo("h",(()=>{this.store.args.help_tag=!this.store.args.help_tag})),jo("shift+T",(()=>{this.store.args.network_sum=!this.store.args.network_sum})),jo("shift+U",(()=>{this.store.args.network_cumul=!this.store.args.network_cumul})),jo("shift+F",(()=>{this.store.args.fs_free_space=!this.store.args.fs_free_space})),jo("3",(()=>{this.store.args.disable_quicklook=!this.store.args.disable_quicklook})),jo("6",(()=>{this.store.args.meangpu=!this.store.args.meangpu})),jo("shift+G",(()=>{this.store.args.disable_gpu=!this.store.args.disable_gpu})),jo("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})),jo("shift+I",(()=>{this.store.args.disable_ip=!this.store.args.disable_ip})),jo("shift+P",(()=>{this.store.args.disable_ports=!this.store.args.disable_ports})),jo("shift+W",(()=>{this.store.args.disable_wifi=!this.store.args.disable_wifi}))}},mounted(){const e=window.__GLANCES__||{},t=isFinite(e["refresh-time"])?parseInt(e["refresh-time"],10):void 0;Ho.init(t),this.setupHotKeys()},beforeUnmount(){jo.unbind()}};const _m=((...e)=>{const t=qs().createApp(...e);const{mount:n}=t;return t.mount=e=>{const r=Bs(e);if(!r)return;const i=t._component;L(i)||i.render||i.template||(i.template=r.innerHTML),r.innerHTML="";const s=n(r,!1,r instanceof SVGElement);return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),s},t})((0,nc.Z)(xm,[["render",function(e,t,n,r,i,s){const o=cr("glances-help"),a=cr("glances-plugin-system"),l=cr("glances-plugin-ip"),c=cr("glances-plugin-uptime"),u=cr("glances-plugin-cloud"),d=cr("glances-plugin-quicklook"),f=cr("glances-plugin-cpu"),p=cr("glances-plugin-percpu"),h=cr("glances-plugin-gpu"),g=cr("glances-plugin-mem"),m=cr("glances-plugin-mem-more"),b=cr("glances-plugin-memswap"),v=cr("glances-plugin-load"),y=cr("glances-plugin-containers"),w=cr("glances-plugin-process"),x=cr("glances-plugin-alert");return s.dataLoaded?s.args.help_tag?(li(),hi(o,{key:1})):(li(),pi("main",zs,[wi("div",$s,[wi("div",Hs,[wi("div",Vs,[wi("div",Gs,[xi(a,{data:s.data},null,8,["data"])]),s.args.disable_ip?Ti("v-if",!0):(li(),pi("div",Ws,[xi(l,{data:s.data},null,8,["data"])])),wi("div",Zs,[xi(c,{data:s.data},null,8,["data"])])])])]),wi("div",Ks,[wi("div",Qs,[wi("div",Xs,[wi("div",Js,[xi(u,{data:s.data},null,8,["data"])])])]),s.args.enable_separator?(li(),pi("div",Ys)):Ti("v-if",!0),wi("div",eo,[s.args.disable_quicklook?Ti("v-if",!0):(li(),pi("div",to,[xi(d,{data:s.data},null,8,["data"])])),s.args.disable_cpu||s.args.percpu?Ti("v-if",!0):(li(),pi("div",no,[xi(f,{data:s.data},null,8,["data"])])),!s.args.disable_cpu&&s.args.percpu?(li(),pi("div",ro,[xi(p,{data:s.data},null,8,["data"])])):Ti("v-if",!0),!s.args.disable_gpu&&s.hasGpu?(li(),pi("div",io,[xi(h,{data:s.data},null,8,["data"])])):Ti("v-if",!0),s.args.disable_mem?Ti("v-if",!0):(li(),pi("div",so,[xi(g,{data:s.data},null,8,["data"])])),Ti(" NOTE: display if MEM enabled and GPU disabled "),s.args.disable_mem||!s.args.disable_gpu&&s.hasGpu?Ti("v-if",!0):(li(),pi("div",oo,[xi(m,{data:s.data},null,8,["data"])])),s.args.disable_memswap?Ti("v-if",!0):(li(),pi("div",ao,[xi(b,{data:s.data},null,8,["data"])])),s.args.disable_load?Ti("v-if",!0):(li(),pi("div",lo,[xi(v,{data:s.data},null,8,["data"])]))]),s.args.enable_separator?(li(),pi("div",co)):Ti("v-if",!0)]),wi("div",uo,[wi("div",fo,[s.args.disable_left_sidebar?Ti("v-if",!0):(li(),pi("div",po,[wi("div",ho,[Ti(" When they exist on the same node, v-if has a higher priority than v-for.\n That means the v-if condition will not have access to variables from the\n scope of the v-for "),(li(!0),pi(ni,null,pr(s.leftMenu,(e=>{return li(),pi(ni,null,[s.args[`disable_${e}`]?Ti("v-if",!0):(li(),hi((t=`glances-plugin-${e}`,D(t)?dr(lr,t,!1)||t:t||ur),{key:0,id:`plugin-${e}`,class:"plugin table-row-group",data:s.data},null,8,["id","data"]))],64);var t})),256))])])),wi("div",go,[s.args.disable_containers?Ti("v-if",!0):(li(),hi(y,{key:0,data:s.data},null,8,["data"])),xi(w,{data:s.data},null,8,["data"]),s.args.disable_alert?Ti("v-if",!0):(li(),hi(x,{key:1,data:s.data},null,8,["data"]))])])])])):(li(),pi("div",Us,Fs))}]]));_m.config.globalProperties.$filters=e,_m.mount("#app")})()})(); \ No newline at end of file +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=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;s0,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;a1&&(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;r1&&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=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"};const Nu={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},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()}}},Lu=(0,nc.Z)(Nu,[["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&&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&&s.syscalls?(li(),pi("div",yu,[wu,wi("div",xu,pe(s.syscalls),1)])):Ti("v-if",!0)])]),wi("div",_u,[wi("div",ku,[Ti(" If not already display instead of nice, then display ctx_switches "),null!=s.nice&&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&&s.interrupts?(li(),pi("div",Tu,[Au,wi("div",Eu,pe(s.interrupts),1)])):Ti("v-if",!0),s.isWindows||s.isSunOS||!s.soft_interrupts?Ti("v-if",!0):(li(),pi("div",Ou,[Iu,wi("div",Pu,pe(s.soft_interrupts),1)]))])])])])}]]),Du={class:"plugin",id:"diskio"},Mu={key:0,class:"table-row"},ju=wi("div",{class:"table-cell text-left title"},"DISK I/O",-1),Ru={class:"table-cell"},qu={class:"table-cell"},Bu={class:"table-cell"},Uu={class:"table-cell"},Fu={class:"table-cell text-left"};var zu=n(1036),$u=n.n(zu);function Hu(e,t){return Vu(e=8*Math.round(e),t)+"b"}function Vu(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;i1){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 Gu(e){return void 0===e||""===e?"?":e}function Wu(e,t,n){return t=t||0,n=n||" ",String(e).padStart(t,n)}function Zu(e,t){return"function"!=typeof e.slice&&(e=String(e)),e.slice(0,t)}function Ku(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 Qu(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,"
");return $u()(n)}function Xu(e,t){return new Intl.NumberFormat(void 0,"number"==typeof t?{maximumFractionDigits:t}:t).format(e)}function Ju(e){for(var t=0,n=0;n({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:Vu(e.read_bytes/t),rxps:Vu(e.write_bytes/t)},count:{txps:Vu(e.read_count/t),rxps:Vu(e.write_count/t)},alias:void 0!==e.alias?e.alias:null}}));return(0,dc.orderBy)(e,["name"])}}},td=(0,nc.Z)(ed,[["render",function(e,t,n,r,i,s){return li(),pi("section",Du,[s.disks.length>0?(li(),pi("div",Mu,[ju,On(wi("div",Ru,"R/s",512),[[Ds,!s.args.diskio_iops]]),On(wi("div",qu,"W/s",512),[[Ds,!s.args.diskio_iops]]),On(wi("div",Bu,"IOR/s",512),[[Ds,s.args.diskio_iops]]),On(wi("div",Uu,"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",Fu,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))])}]]),nd={key:0,id:"containers-plugin",class:"plugin"},rd=wi("span",{class:"title"},"CONTAINERS",-1),id={class:"table"},sd={class:"table-row"},od=wi("div",{class:"table-cell text-left"},"Engine",-1),ad=wi("div",{class:"table-cell text-left"},"Pod",-1),ld=wi("div",{class:"table-cell"},"Status",-1),cd=wi("div",{class:"table-cell"},"Uptime",-1),ud=Ci('
/MAX
IOR/s
IOW/s
RX/s
TX/s
Command
',6),dd={class:"table-cell text-left"},fd={class:"table-cell text-left"},pd={class:"table-cell text-left"},hd={class:"table-cell"},gd={class:"table-cell"},md={class:"table-cell"},bd={class:"table-cell"},vd={class:"table-cell"},yd={class:"table-cell"},wd={class:"table-cell"},xd={class:"table-cell"},_d={class:"table-cell text-left"};const kd={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}})}}}},Sd=(0,nc.Z)(kd,[["render",function(e,t,n,r,i,s){return s.containers.length?(li(),pi("section",nd,[rd,Si(" "+pe(s.containers.length)+" sorted by "+pe(i.sorter.getColumnLabel(i.sorter.column))+" ",1),wi("div",id,[wi("div",sd,[od,ad,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),ld,cd,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),ud]),(li(!0),pi(ni,null,pr(s.containers,((t,n)=>(li(),pi("div",{class:"table-row",key:n},[wi("div",dd,pe(t.engine),1),wi("div",fd,pe(t.pod_id||"-"),1),wi("div",pd,pe(t.name),1),wi("div",{class:ce(["table-cell","Paused"==t.status?"careful":"ok"])},pe(t.status),3),wi("div",hd,pe(t.uptime),1),wi("div",gd,pe(e.$filters.number(t.cpu_percent,1)),1),wi("div",md,pe(e.$filters.bytes(t.memory_usage)),1),wi("div",bd,pe(e.$filters.bytes(t.limit)),1),wi("div",vd,pe(e.$filters.bytes(t.io_rx)),1),wi("div",yd,pe(e.$filters.bytes(t.io_wx)),1),wi("div",wd,pe(e.$filters.bits(t.network_rx)),1),wi("div",xd,pe(e.$filters.bits(t.network_tx)),1),wi("div",_d,pe(t.command),1)])))),128))])])):Ti("v-if",!0)}]]),Cd={class:"plugin",id:"folders"},Td={key:0,class:"table-row"},Ad=[wi("div",{class:"table-cell text-left title"},"FOLDERS",-1),wi("div",{class:"table-cell"},null,-1),wi("div",{class:"table-cell"},"Size",-1)],Ed={class:"table-cell text-left"},Od=wi("div",{class:"table-cell"},null,-1),Id={key:0,class:"visible-lg-inline"};const Pd={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"}},Nd=(0,nc.Z)(Pd,[["render",function(e,t,n,r,i,s){return li(),pi("section",Cd,[s.folders.length>0?(li(),pi("div",Td,Ad)):Ti("v-if",!0),(li(!0),pi(ni,null,pr(s.folders,((t,n)=>(li(),pi("div",{class:"table-row",key:n},[wi("div",Ed,pe(t.path),1),Od,wi("div",{class:ce(["table-cell",s.getDecoration(t)])},[t.errno>0?(li(),pi("span",Id," ? ")):Ti("v-if",!0),Si(" "+pe(e.$filters.bytes(t.size)),1)],2)])))),128))])}]]),Ld={class:"plugin",id:"fs"},Dd={class:"table-row"},Md=wi("div",{class:"table-cell text-left title"},"FILE SYS",-1),jd={class:"table-cell"},Rd=wi("div",{class:"table-cell"},"Total",-1),qd={class:"table-cell text-left"},Bd={key:0,class:"visible-lg-inline"},Ud={class:"table-cell"};const Fd={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()}}},zd=(0,nc.Z)(Fd,[["render",function(e,t,n,r,i,s){return li(),pi("section",Ld,[wi("div",Dd,[Md,wi("div",jd,[On(wi("span",null,"Used",512),[[Ds,!s.args.fs_free_space]]),On(wi("span",null,"Free",512),[[Ds,s.args.fs_free_space]])]),Rd]),(li(!0),pi(ni,null,pr(s.fileSystems,((t,n)=>(li(),pi("div",{class:"table-row",key:n},[wi("div",qd,[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",Bd," ("+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",Ud,pe(e.$filters.bytes(t.size)),1)])))),128))])}]]),$d={id:"gpu",class:"plugin"},Hd={class:"gpu-name title"},Vd={class:"table"},Gd={key:0,class:"table-row"},Wd=wi("div",{class:"table-cell text-left"},"proc:",-1),Zd={key:1,class:"table-cell"},Kd={key:1,class:"table-row"},Qd=wi("div",{class:"table-cell text-left"},"mem:",-1),Xd={key:1,class:"table-cell"},Jd={key:2,class:"table-row"},Yd=wi("div",{class:"table-cell text-left"},"temperature:",-1),ef={key:1,class:"table-cell"},tf={class:"table-cell text-left"},nf={key:1},rf={key:3},sf={key:5};const of={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)}}},af=(0,nc.Z)(of,[["render",function(e,t,n,r,i,s){return li(),pi("section",$d,[wi("div",Hd,pe(s.name),1),wi("div",Vd,[s.args.meangpu||1===s.gpus.length?(li(),pi("div",Gd,[Wd,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",Zd,"N/A")):Ti("v-if",!0)])):Ti("v-if",!0),s.args.meangpu||1===s.gpus.length?(li(),pi("div",Kd,[Qd,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",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.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",ef,"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",tf,[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",nf,"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",rf,"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",sf,"N/A")):Ti("v-if",!0)])])))),128)):Ti("v-if",!0)])])}]]),lf={key:0,class:"plugin",id:"ip"},cf={key:0,class:"title"},uf={key:1},df={key:2,class:"title"},ff={key:3},pf={key:4};const hf={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}}},gf=(0,nc.Z)(hf,[["render",function(e,t,n,r,i,s){return null!=s.address?(li(),pi("section",lf,[null!=s.address?(li(),pi("span",cf,"IP")):Ti("v-if",!0),null!=s.address?(li(),pi("span",uf,pe(s.address)+"/"+pe(s.maskCdir),1)):Ti("v-if",!0),null!=s.publicAddress?(li(),pi("span",df,"Pub")):Ti("v-if",!0),null!=s.publicAddress?(li(),pi("span",ff,pe(s.publicAddress),1)):Ti("v-if",!0),null!=s.publicInfo?(li(),pi("span",pf,pe(s.publicInfo),1)):Ti("v-if",!0)])):Ti("v-if",!0)}]]),mf={class:"plugin",id:"irq"},bf={key:0,class:"table-row"},vf=[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)],yf={class:"table-cell text-left"},wf=wi("div",{class:"table-cell"},null,-1),xf={class:"table-cell"};const _f={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})))}}},kf=(0,nc.Z)(_f,[["render",function(e,t,n,r,i,s){return li(),pi("section",mf,[s.irqs.length>0?(li(),pi("div",bf,vf)):Ti("v-if",!0),(li(!0),pi(ni,null,pr(s.irqs,((e,t)=>(li(),pi("div",{class:"table-row",key:t},[wi("div",yf,pe(e.irq_line),1),wf,wi("div",xf,[wi("span",null,pe(e.irq_rate),1)])])))),128))])}]]),Sf={key:0,id:"load",class:"plugin"},Cf={class:"table"},Tf={class:"table-row"},Af=wi("div",{class:"table-cell text-left title"},"LOAD",-1),Ef={class:"table-cell"},Of={class:"table-row"},If=wi("div",{class:"table-cell text-left"},"1 min:",-1),Pf={class:"table-cell"},Nf={class:"table-row"},Lf=wi("div",{class:"table-cell text-left"},"5 min:",-1),Df={class:"table-row"},Mf=wi("div",{class:"table-cell text-left"},"15 min:",-1);const jf={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()}}},Rf=(0,nc.Z)(jf,[["render",function(e,t,n,r,i,s){return null!=s.cpucore?(li(),pi("section",Sf,[wi("div",Cf,[wi("div",Tf,[Af,wi("div",Ef,pe(s.cpucore)+"-core",1)]),wi("div",Of,[If,wi("div",Pf,pe(e.$filters.number(s.min1,2)),1)]),wi("div",Nf,[Lf,wi("div",{class:ce(["table-cell",s.getDecoration("min5")])},pe(e.$filters.number(s.min5,2)),3)]),wi("div",Df,[Mf,wi("div",{class:ce(["table-cell",s.getDecoration("min15")])},pe(e.$filters.number(s.min15,2)),3)])])])):Ti("v-if",!0)}]]),qf={id:"mem",class:"plugin"},Bf={class:"table"},Uf={class:"table-row"},Ff=wi("div",{class:"table-cell text-left title"},"MEM",-1),zf={class:"table-row"},$f=wi("div",{class:"table-cell text-left"},"total:",-1),Hf={class:"table-cell"},Vf={class:"table-row"},Gf=wi("div",{class:"table-cell text-left"},"used:",-1),Wf={class:"table-row"},Zf=wi("div",{class:"table-cell text-left"},"free:",-1),Kf={class:"table-cell"};const Qf={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()}}},Xf=(0,nc.Z)(Qf,[["render",function(e,t,n,r,i,s){return li(),pi("section",qf,[wi("div",Bf,[wi("div",Uf,[Ff,wi("div",{class:ce(["table-cell",s.getDecoration("percent")])},pe(s.percent)+"%",3)]),wi("div",zf,[$f,wi("div",Hf,pe(e.$filters.bytes(s.total)),1)]),wi("div",Vf,[Gf,wi("div",{class:ce(["table-cell",s.getDecoration("used")])},pe(e.$filters.bytes(s.used,2)),3)]),wi("div",Wf,[Zf,wi("div",Kf,pe(e.$filters.bytes(s.free)),1)])])])}]]),Jf={id:"mem-more",class:"plugin"},Yf={class:"table"},ep={class:"table-row"},tp=wi("div",{class:"table-cell text-left"},"active:",-1),np={class:"table-cell"},rp={class:"table-row"},ip=wi("div",{class:"table-cell text-left"},"inactive:",-1),sp={class:"table-cell"},op={class:"table-row"},ap=wi("div",{class:"table-cell text-left"},"buffers:",-1),lp={class:"table-cell"},cp={class:"table-row"},up=wi("div",{class:"table-cell text-left"},"cached:",-1),dp={class:"table-cell"};const fp={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}}},pp=(0,nc.Z)(fp,[["render",function(e,t,n,r,i,s){return li(),pi("section",Jf,[wi("div",Yf,[On(wi("div",ep,[tp,wi("div",np,pe(e.$filters.bytes(s.active)),1)],512),[[Ds,null!=s.active]]),On(wi("div",rp,[ip,wi("div",sp,pe(e.$filters.bytes(s.inactive)),1)],512),[[Ds,null!=s.inactive]]),On(wi("div",op,[ap,wi("div",lp,pe(e.$filters.bytes(s.buffers)),1)],512),[[Ds,null!=s.buffers]]),On(wi("div",cp,[up,wi("div",dp,pe(e.$filters.bytes(s.cached)),1)],512),[[Ds,null!=s.cached]])])])}]]),hp={id:"memswap",class:"plugin"},gp={class:"table"},mp={class:"table-row"},bp=wi("div",{class:"table-cell text-left title"},"SWAP",-1),vp={class:"table-row"},yp=wi("div",{class:"table-cell text-left"},"total:",-1),wp={class:"table-cell"},xp={class:"table-row"},_p=wi("div",{class:"table-cell text-left"},"used:",-1),kp={class:"table-row"},Sp=wi("div",{class:"table-cell text-left"},"free:",-1),Cp={class:"table-cell"};const Tp={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()}}},Ap=(0,nc.Z)(Tp,[["render",function(e,t,n,r,i,s){return li(),pi("section",hp,[wi("div",gp,[wi("div",mp,[bp,wi("div",{class:ce(["table-cell",s.getDecoration("percent")])},pe(s.percent)+"%",3)]),wi("div",vp,[yp,wi("div",wp,pe(e.$filters.bytes(s.total)),1)]),wi("div",xp,[_p,wi("div",{class:ce(["table-cell",s.getDecoration("used")])},pe(e.$filters.bytes(s.used)),3)]),wi("div",kp,[Sp,wi("div",Cp,pe(e.$filters.bytes(s.free)),1)])])])}]]),Ep={class:"plugin",id:"network"},Op={class:"table-row"},Ip=wi("div",{class:"table-cell text-left title"},"NETWORK",-1),Pp={class:"table-cell"},Np={class:"table-cell"},Lp={class:"table-cell"},Dp={class:"table-cell"},Mp={class:"table-cell"},jp={class:"table-cell"},Rp={class:"table-cell"},qp={class:"table-cell"},Bp={class:"table-cell text-left"},Up={class:"visible-lg-inline"},Fp={class:"hidden-lg"},zp={class:"table-cell"},$p={class:"table-cell"};const Hp={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,rx:e.rx,tx:e.tx,cx:e.cx,time_since_update:e.time_since_update,cumulativeRx:e.cumulative_rx,cumulativeTx:e.cumulative_tx,cumulativeCx:e.cumulative_cx}}));return(0,dc.orderBy)(e,["interfaceName"])}}},Vp=(0,nc.Z)(Hp,[["render",function(e,t,n,r,i,s){return li(),pi("section",Ep,[wi("div",Op,[Ip,On(wi("div",Pp,"Rx/s",512),[[Ds,!s.args.network_cumul&&!s.args.network_sum]]),On(wi("div",Np,"Tx/s",512),[[Ds,!s.args.network_cumul&&!s.args.network_sum]]),On(wi("div",Lp,null,512),[[Ds,!s.args.network_cumul&&s.args.network_sum]]),On(wi("div",Dp,"Rx+Tx/s",512),[[Ds,!s.args.network_cumul&&s.args.network_sum]]),On(wi("div",Mp,"Rx",512),[[Ds,s.args.network_cumul&&!s.args.network_sum]]),On(wi("div",jp,"Tx",512),[[Ds,s.args.network_cumul&&!s.args.network_sum]]),On(wi("div",Rp,null,512),[[Ds,s.args.network_cumul&&s.args.network_sum]]),On(wi("div",qp,"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",Bp,[wi("span",Up,pe(t.ifname),1),wi("span",Fp,pe(e.$filters.minSize(t.ifname)),1)]),On(wi("div",{class:"table-cell"},pe(s.args.byte?e.$filters.bytes(t.rx/t.time_since_update):e.$filters.bits(t.rx/t.time_since_update)),513),[[Ds,!s.args.network_cumul&&!s.args.network_sum]]),On(wi("div",{class:"table-cell"},pe(s.args.byte?e.$filters.bytes(t.tx/t.time_since_update):e.$filters.bits(t.tx/t.time_since_update)),513),[[Ds,!s.args.network_cumul&&!s.args.network_sum]]),On(wi("div",zp,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.cx/t.time_since_update):e.$filters.bits(t.cx/t.time_since_update)),513),[[Ds,!s.args.network_cumul&&s.args.network_sum]]),On(wi("div",{class:"table-cell"},pe(s.args.byte?e.$filters.bytes(t.cumulativeRx):e.$filters.bits(t.cumulativeRx)),513),[[Ds,s.args.network_cumul&&!s.args.network_sum]]),On(wi("div",{class:"table-cell"},pe(s.args.byte?e.$filters.bytes(t.cumulativeTx):e.$filters.bits(t.cumulativeTx)),513),[[Ds,s.args.network_cumul&&!s.args.network_sum]]),On(wi("div",$p,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.cumulativeCx):e.$filters.bits(t.cumulativeCx)),513),[[Ds,s.args.network_cumul&&s.args.network_sum]])])))),128))])}]]),Gp={id:"now",class:"plugin"},Wp={class:"table-row"},Zp={class:"table-cell text-left"};const Kp={props:{data:{type:Object}},computed:{value(){return this.data.stats.now}}},Qp=(0,nc.Z)(Kp,[["render",function(e,t,n,r,i,s){return li(),pi("section",Gp,[wi("div",Wp,[wi("div",Zp,pe(s.value),1)])])}]]),Xp={id:"percpu",class:"plugin"},Jp={class:"table-row"},Yp={class:"table-cell text-left title"},eh={key:0},th={class:"table-row"},nh=wi("div",{class:"table-cell text-left"},"user:",-1),rh={class:"table-row"},ih=wi("div",{class:"table-cell text-left"},"system:",-1),sh={class:"table-row"},oh=wi("div",{class:"table-cell text-left"},"idle:",-1),ah={key:0,class:"table-row"},lh=wi("div",{class:"table-cell text-left"},"iowait:",-1),ch={key:1,class:"table-row"},uh=wi("div",{class:"table-cell text-left"},"steal:",-1);const dh={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)}},fh=(0,nc.Z)(dh,[["render",function(e,t,n,r,i,s){return li(),pi("section",Xp,[(li(!0),pi(ni,null,pr(s.cpusChunks,((e,t)=>(li(),pi("div",{class:"table",key:t},[wi("div",Jp,[wi("div",Yp,[0===t?(li(),pi("span",eh,"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",th,[nh,(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",rh,[ih,(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",sh,[oh,(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",ah,[lh,(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",ch,[uh,(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))])}]]),ph={class:"plugin",id:"ports"},hh={class:"table-cell text-left"},gh=wi("div",{class:"table-cell"},null,-1),mh={key:0},bh={key:1},vh={key:2},yh={key:3},wh={key:0},xh={key:1},_h={key:2};const kh={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.status>e.rtt_warning?"warning":"ok",getWebDecoration:e=>null===e.status?"careful":-1===[200,301,302].indexOf(e.status)?"critical":null!==e.rtt_warning&&e.elapsed>e.rtt_warning?"warning":"ok"}},Sh=(0,nc.Z)(kh,[["render",function(e,t,n,r,i,s){return li(),pi("section",ph,[(li(!0),pi(ni,null,pr(s.ports,((t,n)=>(li(),pi("div",{class:"table-row",key:n},[wi("div",hh,[Ti(" prettier-ignore "),Si(" "+pe(e.$filters.minSize(t.description?t.description:t.host+" "+t.port,20)),1)]),gh,t.host?(li(),pi("div",{key:0,class:ce([s.getPortDecoration(t),"table-cell"])},["null"==t.status?(li(),pi("span",mh,"Scanning")):"false"==t.status?(li(),pi("span",bh,"Timeout")):"true"==t.status?(li(),pi("span",vh,"Open")):(li(),pi("span",yh,pe(e.$filters.number(1e3*t.status,0))+"ms",1))],2)):Ti("v-if",!0),t.url?(li(),pi("div",{key:1,class:ce([s.getWebDecoration(t),"table-cell"])},["null"==t.status?(li(),pi("span",wh,"Scanning")):"Error"==t.status?(li(),pi("span",xh,"Error")):(li(),pi("span",_h,"Code "+pe(t.status),1))],2)):Ti("v-if",!0)])))),128))])}]]),Ch={key:0},Th={key:1},Ah={key:0,class:"row"},Eh={class:"col-lg-18"};const Oh={id:"amps",class:"plugin"},Ih={class:"table"},Ph={key:0,class:"table-cell text-left"},Nh=["innerHTML"];const Lh={props:{data:{type:Object}},computed:{stats(){return this.data.stats.amps},processes(){return this.stats.filter((e=>null!==e.result))}},methods:{getNameDecoration(e){const t=e.count,n=e.countmin,r=e.countmax;let i="ok";return i=t>0?(null===n||t>=n)&&(null===r||t<=r)?"ok":"careful":null===n?"ok":"critical",i}}},Dh=(0,nc.Z)(Lh,[["render",function(e,t,n,r,i,s){return li(),pi("section",Oh,[wi("div",Ih,[(li(!0),pi(ni,null,pr(s.processes,((t,n)=>(li(),pi("div",{class:"table-row",key:n},[wi("div",{class:ce(["table-cell text-left",s.getNameDecoration(t)])},pe(t.name),3),t.regex?(li(),pi("div",Ph,pe(t.count),1)):Ti("v-if",!0),wi("div",{class:"table-cell text-left process-result",innerHTML:e.$filters.nl2br(t.result)},null,8,Nh)])))),128))])])}]]),Mh={id:"processcount",class:"plugin"},jh=wi("span",{class:"title"},"TASKS",-1),Rh={class:"title"};const qh={props:{data:{type:Object},sorter:{type:Object}},data:()=>({store:Uo}),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}}},Bh=(0,nc.Z)(qh,[["render",function(e,t,n,r,i,s){return li(),pi("section",Mh,[jh,wi("span",null,pe(s.total)+" ("+pe(s.thread)+" thr),",1),wi("span",null,pe(s.running)+" run,",1),wi("span",null,pe(s.sleeping)+" slp,",1),wi("span",null,pe(s.stopped)+" oth",1),wi("span",null,pe(s.args.programs?"Programs":"Threads"),1),wi("span",Rh,pe(n.sorter.auto?"sorted automatically":"sorted"),1),wi("span",null,"by "+pe(n.sorter.getColumnLabel(n.sorter.column)),1)])}]]),Uh={id:"processlist-plugin",class:"plugin"},Fh={class:"table"},zh={class:"table-row"},$h=wi("div",{class:"table-cell width-80 hidden-xs hidden-sm"},"VIRT",-1),Hh=wi("div",{class:"table-cell width-80 hidden-xs hidden-sm"},"RES",-1),Vh=wi("div",{class:"table-cell width-80"},"PID",-1),Gh=wi("div",{class:"table-cell width-60"},"NI",-1),Wh=wi("div",{class:"table-cell width-60"},"S",-1),Zh={class:"table-cell width-80"},Kh={class:"table-cell width-80"},Qh={class:"table-cell width-80"},Xh={class:"table-cell width-100 text-left"},Jh={key:0,class:"table-cell width-100 hidden-xs hidden-sm"},Yh={key:1,class:"table-cell width-80 hidden-xs hidden-sm"},eg={class:"table-cell width-80 text-left hidden-xs hidden-sm"};const tg={props:{data:{type:Object},sorter:{type:Object}},data:()=>({store:Uo}),computed:{args(){return this.store.args||{}},config(){return this.store.config||{}},stats(){return this.data.stats.processlist},processes(){const{sorter:e}=this,t=this.data.stats.isWindows,n=(this.stats||[]).map((e=>(e.memvirt="?",e.memres="?",e.memory_info&&(e.memvirt=e.memory_info.vms,e.memres=e.memory_info.rss),t&&null!==e.username&&(e.username=(0,dc.last)(e.username.split("\\"))),e.timeplus="?",e.timemillis="?",e.cpu_times&&(e.timeplus=Yu(e.cpu_times),e.timemillis=Ju(e.cpu_times)),null===e.num_threads&&(e.num_threads=-1),null===e.cpu_percent&&(e.cpu_percent=-1),null===e.memory_percent&&(e.memory_percent=-1),e.io_read=null,e.io_write=null,e.io_counters&&(e.io_read=(e.io_counters[0]-e.io_counters[2])/e.time_since_update,e.io_write=(e.io_counters[1]-e.io_counters[3])/e.time_since_update),e.isNice=void 0!==e.nice&&(t&&32!=e.nice||!t&&0!=e.nice),Array.isArray(e.cmdline)&&(e.cmdline=e.cmdline.join(" ").replace(/\n/g," ")),null!==e.cmdline&&0!==e.cmdline.length||(e.cmdline=e.name),e)));return(0,dc.orderBy)(n,[e.column].reduce(((e,t)=>("io_counters"===t&&(t=["io_read","io_write"]),e.concat(t))),[]),[e.isReverseColumn(e.column)?"desc":"asc"]).slice(0,this.limit)},ioReadWritePresent(){return(this.stats||[]).some((({io_counters:e})=>e))},limit(){return void 0!==this.config.outputs?this.config.outputs.max_processes_display:void 0}},methods:{getCpuPercentAlert:e=>$o.getAlert("processlist","processlist_cpu_",e.cpu_percent),getMemoryPercentAlert:e=>$o.getAlert("processlist","processlist_mem_",e.cpu_percent)}},ng={components:{GlancesPluginAmps:Dh,GlancesPluginProcesscount:Bh,GlancesPluginProcesslist:(0,nc.Z)(tg,[["render",function(e,t,n,r,i,s){return li(),pi(ni,null,[Ti(" prettier-ignore "),wi("section",Uh,[wi("div",Fh,[wi("div",zh,[wi("div",{class:ce(["table-cell width-60",["sortable","cpu_percent"===n.sorter.column&&"sort"]]),onClick:t[0]||(t[0]=t=>e.$emit("update:sorter","cpu_percent"))}," CPU% ",2),wi("div",{class:ce(["table-cell width-60",["sortable","memory_percent"===n.sorter.column&&"sort"]]),onClick:t[1]||(t[1]=t=>e.$emit("update:sorter","memory_percent"))}," MEM% ",2),$h,Hh,Vh,wi("div",{class:ce(["table-cell width-100 text-left",["sortable","username"===n.sorter.column&&"sort"]]),onClick:t[2]||(t[2]=t=>e.$emit("update:sorter","username"))}," USER ",2),wi("div",{class:ce(["table-cell width-100 hidden-xs hidden-sm",["sortable","timemillis"===n.sorter.column&&"sort"]]),onClick:t[3]||(t[3]=t=>e.$emit("update:sorter","timemillis"))}," TIME+ ",2),wi("div",{class:ce(["table-cell width-80 text-left hidden-xs hidden-sm",["sortable","num_threads"===n.sorter.column&&"sort"]]),onClick:t[4]||(t[4]=t=>e.$emit("update:sorter","num_threads"))}," THR ",2),Gh,Wh,On(wi("div",{class:ce(["table-cell width-80 hidden-xs hidden-sm",["sortable","io_counters"===n.sorter.column&&"sort"]]),onClick:t[5]||(t[5]=t=>e.$emit("update:sorter","io_counters"))}," IOR/s ",2),[[Ds,s.ioReadWritePresent]]),On(wi("div",{class:ce(["table-cell width-80 text-left hidden-xs hidden-sm",["sortable","io_counters"===n.sorter.column&&"sort"]]),onClick:t[6]||(t[6]=t=>e.$emit("update:sorter","io_counters"))}," IOW/s ",2),[[Ds,s.ioReadWritePresent]]),wi("div",{class:ce(["table-cell text-left",["sortable","name"===n.sorter.column&&"sort"]]),onClick:t[7]||(t[7]=t=>e.$emit("update:sorter","name"))}," Command ",2)]),(li(!0),pi(ni,null,pr(s.processes,((t,n)=>(li(),pi("div",{class:"table-row",key:n},[wi("div",{class:ce(["table-cell width-60",s.getCpuPercentAlert(t)])},pe(-1==t.cpu_percent?"?":e.$filters.number(t.cpu_percent,1)),3),wi("div",{class:ce(["table-cell width-60",s.getMemoryPercentAlert(t)])},pe(-1==t.memory_percent?"?":e.$filters.number(t.memory_percent,1)),3),wi("div",Zh,pe(e.$filters.bytes(t.memvirt)),1),wi("div",Kh,pe(e.$filters.bytes(t.memres)),1),wi("div",Qh,pe(t.pid),1),wi("div",Xh,pe(t.username),1),"?"!=t.timeplus?(li(),pi("div",Jh,[On(wi("span",{class:"highlight"},pe(t.timeplus.hours)+"h",513),[[Ds,t.timeplus.hours>0]]),Si(" "+pe(e.$filters.leftPad(t.timeplus.minutes,2,"0"))+":"+pe(e.$filters.leftPad(t.timeplus.seconds,2,"0"))+" ",1),On(wi("span",null,"."+pe(e.$filters.leftPad(t.timeplus.milliseconds,2,"0")),513),[[Ds,t.timeplus.hours<=0]])])):Ti("v-if",!0),"?"==t.timeplus?(li(),pi("div",Yh,"?")):Ti("v-if",!0),wi("div",eg,pe(-1==t.num_threads?"?":t.num_threads),1),wi("div",{class:ce(["table-cell width-60",{nice:t.isNice}])},pe(e.$filters.exclamation(t.nice)),3),wi("div",{class:ce(["table-cell width-60",{status:"R"==t.status}])},pe(t.status),3),On(wi("div",{class:"table-cell width-80 hidden-xs hidden-sm"},pe(e.$filters.bytes(t.io_read)),513),[[Ds,s.ioReadWritePresent]]),On(wi("div",{class:"table-cell width-80 text-left hidden-xs hidden-sm"},pe(e.$filters.bytes(t.io_write)),513),[[Ds,s.ioReadWritePresent]]),On(wi("div",{class:"table-cell text-left"},pe(t.name),513),[[Ds,s.args.process_short_name]]),On(wi("div",{class:"table-cell text-left"},pe(t.cmdline),513),[[Ds,!s.args.process_short_name]])])))),128))])])],2112)}]])},props:{data:{type:Object}},data:()=>({store:Uo,sorter:void 0}),computed:{args(){return this.store.args||{}},sortProcessesKey(){return this.args.sort_processes_key}},watch:{sortProcessesKey:{immediate:!0,handler(e){e&&!["cpu_percent","memory_percent","username","timemillis","num_threads","io_counters","name"].includes(e)||(this.sorter={column:this.args.sort_processes_key||"cpu_percent",auto:!this.args.sort_processes_key,isReverseColumn:function(e){return!["username","name"].includes(e)},getColumnLabel:function(e){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"}[e]||e}})}}}},rg=(0,nc.Z)(ng,[["render",function(e,t,n,r,i,s){const o=cr("glances-plugin-processcount"),a=cr("glances-plugin-amps"),l=cr("glances-plugin-processlist");return s.args.disable_process?(li(),pi("div",Ch,"PROCESSES DISABLED (press 'z' to display)")):(li(),pi("div",Th,[xi(o,{sorter:i.sorter,data:n.data},null,8,["sorter","data"]),s.args.disable_amps?Ti("v-if",!0):(li(),pi("div",Ah,[wi("div",Eh,[xi(a,{data:n.data},null,8,["data"])])])),xi(l,{sorter:i.sorter,data:n.data,"onUpdate:sorter":t[0]||(t[0]=e=>s.args.sort_processes_key=e)},null,8,["sorter","data"])]))}]]),ig={id:"quicklook",class:"plugin"},sg={class:"cpu-name"},og={class:"table"},ag={key:0,class:"table-row"},lg=wi("div",{class:"table-cell text-left"},"CPU",-1),cg={class:"table-cell"},ug={class:"progress"},dg=["aria-valuenow"],fg={class:"table-cell"},pg={class:"table-cell text-left"},hg={class:"table-cell"},gg={class:"progress"},mg=["aria-valuenow"],bg={class:"table-cell"},vg={class:"table-row"},yg=wi("div",{class:"table-cell text-left"},"MEM",-1),wg={class:"table-cell"},xg={class:"progress"},_g=["aria-valuenow"],kg={class:"table-cell"},Sg={class:"table-row"},Cg=wi("div",{class:"table-cell text-left"},"LOAD",-1),Tg={class:"table-cell"},Ag={class:"progress"},Eg=["aria-valuenow"],Og={class:"table-cell"};const Ig={props:{data:{type:Object}},data:()=>({store:Uo}),computed:{args(){return this.store.args||{}},stats(){return this.data.stats.quicklook},view(){return this.data.views.quicklook},mem(){return this.stats.mem},load(){return this.stats.load},cpu(){return this.stats.cpu},cpu_name(){return this.stats.cpu_name},cpu_hz_current(){return this.stats.cpu_hz_current},cpu_hz(){return this.stats.cpu_hz},swap(){return this.stats.swap},percpus(){return this.stats.percpu.map((({cpu_number:e,total:t})=>({number:e,total:t})))}},methods:{getDecoration(e){if(void 0!==this.view[e])return this.view[e].decoration.toLowerCase()}}},Pg=(0,nc.Z)(Ig,[["render",function(e,t,n,r,i,s){return li(),pi("section",ig,[wi("div",sg,pe(s.cpu_name),1),wi("div",og,[s.args.percpu?Ti("v-if",!0):(li(),pi("div",ag,[lg,wi("div",cg,[wi("div",ug,[wi("div",{class:ce(`progress-bar progress-bar-${s.getDecoration("cpu")}`),role:"progressbar","aria-valuenow":s.cpu,"aria-valuemin":"0","aria-valuemax":"100",style:ie(`width: ${s.cpu}%;`)},"   ",14,dg)])]),wi("div",fg,pe(s.cpu)+"%",1)])),s.args.percpu?(li(!0),pi(ni,{key:1},pr(s.percpus,((e,t)=>(li(),pi("div",{class:"table-row",key:t},[wi("div",pg,"CPU"+pe(e.number),1),wi("div",hg,[wi("div",gg,[wi("div",{class:ce(`progress-bar progress-bar-${s.getDecoration("cpu")}`),role:"progressbar","aria-valuenow":e.total,"aria-valuemin":"0","aria-valuemax":"100",style:ie(`width: ${e.total}%;`)},"   ",14,mg)])]),wi("div",bg,pe(e.total)+"%",1)])))),128)):Ti("v-if",!0),wi("div",vg,[yg,wi("div",wg,[wi("div",xg,[wi("div",{class:ce(`progress-bar progress-bar-${s.getDecoration("mem")}`),role:"progressbar","aria-valuenow":s.mem,"aria-valuemin":"0","aria-valuemax":"100",style:ie(`width: ${s.mem}%;`)},"   ",14,_g)])]),wi("div",kg,pe(s.mem)+"%",1)]),wi("div",Sg,[Cg,wi("div",Tg,[wi("div",Ag,[wi("div",{class:ce(`progress-bar progress-bar-${s.getDecoration("load")}`),role:"progressbar","aria-valuenow":s.load,"aria-valuemin":"0","aria-valuemax":"100",style:ie(`width: ${s.load}%;`)},"   ",14,Eg)])]),wi("div",Og,pe(s.load)+"%",1)])])])}]]),Ng={class:"plugin",id:"raid"},Lg={key:0,class:"table-row"},Dg=[wi("div",{class:"table-cell text-left title"},"RAID disks",-1),wi("div",{class:"table-cell"},"Used",-1),wi("div",{class:"table-cell"},"Total",-1)],Mg={class:"table-cell text-left"},jg={class:"warning"};const Rg={props:{data:{type:Object}},computed:{stats(){return this.data.stats.raid},disks(){const e=Object.entries(this.stats).map((([e,t])=>{const n=Object.entries(t.components).map((([e,t])=>({number:t,name:e})));return{name:e,type:null==t.type?"UNKNOWN":t.type,used:t.used,available:t.available,status:t.status,degraded:t.used0}},methods:{getAlert:e=>e.inactive?"critical":e.degraded?"warning":"ok"}},qg=(0,nc.Z)(Rg,[["render",function(e,t,n,r,i,s){return li(),pi("section",Ng,[s.hasDisks?(li(),pi("div",Lg,Dg)):Ti("v-if",!0),(li(!0),pi(ni,null,pr(s.disks,((e,t)=>(li(),pi("div",{class:"table-row",key:t},[wi("div",Mg,[Si(pe(e.type.toUppercase())+" "+pe(e.name)+" ",1),On(wi("div",jg,"└─ Degraded mode",512),[[Ds,e.degraded]]),On(wi("div",null,"   └─ "+pe(e.config),513),[[Ds,e.degraded]]),On(wi("div",{class:"critical"},"└─ Status "+pe(e.status),513),[[Ds,e.inactive]]),e.inactive?(li(!0),pi(ni,{key:0},pr(e.components,((t,n)=>(li(),pi("div",{key:n},"    "+pe(n===e.components.length-1?"└─":"├─")+" disk "+pe(t.number)+": "+pe(t.name),1)))),128)):Ti("v-if",!0)]),On(wi("div",{class:ce(["table-cell",s.getAlert(e)])},pe(e.used),3),[[Ds,!e.inactive]]),On(wi("div",{class:ce(["table-cell",s.getAlert(e)])},pe(e.available),3),[[Ds,!e.inactive]])])))),128))])}]]),Bg={id:"smart",class:"plugin"},Ug=wi("div",{class:"table-row"},[wi("div",{class:"table-cell text-left title"},"SMART disks"),wi("div",{class:"table-cell"}),wi("div",{class:"table-cell"})],-1),Fg={class:"table-row"},zg={class:"table-cell text-left text-truncate"},$g=wi("div",{class:"table-cell"},null,-1),Hg=wi("div",{class:"table-cell"},null,-1),Vg={class:"table-cell text-left"},Gg=wi("div",{class:"table-cell"},null,-1),Wg={class:"table-cell text-truncate"};const Zg={props:{data:{type:Object}},computed:{stats(){return this.data.stats.smart},drives(){return(Array.isArray(this.stats)?this.stats:[]).map((e=>{const t=e.DeviceName,n=Object.entries(e).filter((([e])=>"DeviceName"!==e)).sort((([,e],[,t])=>e.namet.name?1:0)).map((([e,t])=>t));return{name:t,details:n}}))}}},Kg=(0,nc.Z)(Zg,[["render",function(e,t,n,r,i,s){return li(),pi("section",Bg,[Ug,(li(!0),pi(ni,null,pr(s.drives,((e,t)=>(li(),pi(ni,{key:t},[wi("div",Fg,[wi("div",zg,pe(e.name),1),$g,Hg]),(li(!0),pi(ni,null,pr(e.details,((e,t)=>(li(),pi("div",{key:t,class:"table-row"},[wi("div",Vg,"  "+pe(e.name),1),Gg,wi("div",Wg,[wi("span",null,pe(e.raw),1)])])))),128))],64)))),128))])}]]),Qg={class:"plugin",id:"sensors"},Xg={key:0,class:"table-row"},Jg=[wi("div",{class:"table-cell text-left title"},"SENSORS",-1)],Yg={class:"table-cell text-left"},em={class:"table-cell"};const tm={props:{data:{type:Object}},data:()=>({store:Uo}),computed:{args(){return this.store.args||{}},stats(){return this.data.stats.sensors},sensors(){return this.stats.filter((e=>!(Array.isArray(e.value)&&0===e.value.length||0===e.value))).map((e=>(this.args.fahrenheit&&"battery"!=e.type&&"fan_speed"!=e.type&&(e.value=parseFloat(1.8*e.value+32).toFixed(1),e.unit="F"),e)))}},methods:{getAlert(e){const t="battery"==e.type?100-e.value:e.value;return $o.getAlert("sensors","sensors_"+e.type+"_",t)}}},nm=(0,nc.Z)(tm,[["render",function(e,t,n,r,i,s){return li(),pi("section",Qg,[s.sensors.length>0?(li(),pi("div",Xg,Jg)):Ti("v-if",!0),(li(!0),pi(ni,null,pr(s.sensors,((e,t)=>(li(),pi("div",{class:"table-row",key:t},[wi("div",Yg,pe(e.label),1),wi("div",em,pe(e.unit),1),wi("div",{class:ce(["table-cell",s.getAlert(e)])},pe(e.value),3)])))),128))])}]]),rm={class:"plugin",id:"system"},im={key:0,class:"critical"},sm={class:"title"},om={key:1,class:"hidden-xs hidden-sm"},am={key:2,class:"hidden-xs hidden-sm"};const lm={props:{data:{type:Object}},data:()=>({store:Uo}),computed:{stats(){return this.data.stats.system},isLinux(){return this.data.isLinux},hostname(){return this.stats.hostname},platform(){return this.stats.platform},os(){return{name:this.stats.os_name,version:this.stats.os_version}},humanReadableName(){return this.stats.hr_name},isDisconnected(){return"FAILURE"===this.store.status}}},cm=(0,nc.Z)(lm,[["render",function(e,t,n,r,i,s){return li(),pi("section",rm,[s.isDisconnected?(li(),pi("span",im,"Disconnected from")):Ti("v-if",!0),wi("span",sm,pe(s.hostname),1),s.isLinux?(li(),pi("span",om," ("+pe(s.humanReadableName)+" / "+pe(s.os.name)+" "+pe(s.os.version)+") ",1)):Ti("v-if",!0),s.isLinux?Ti("v-if",!0):(li(),pi("span",am," ("+pe(s.os.name)+" "+pe(s.os.version)+" "+pe(s.platform)+") ",1))])}]]),um={class:"plugin",id:"uptime"};const dm={props:{data:{type:Object}},computed:{value(){return this.data.stats.uptime}}},fm=(0,nc.Z)(dm,[["render",function(e,t,n,r,i,s){return li(),pi("section",um,[wi("span",null,"Uptime: "+pe(s.value),1)])}]]),pm={class:"plugin",id:"wifi"},hm={key:0,class:"table-row"},gm=[wi("div",{class:"table-cell text-left title"},"WIFI",-1),wi("div",{class:"table-cell"},null,-1),wi("div",{class:"table-cell"},"dBm",-1)],mm={class:"table-cell text-left"},bm=wi("div",{class:"table-cell"},null,-1);const vm={props:{data:{type:Object}},computed:{stats(){return this.data.stats.wifi},view(){return this.data.views.wifi},hotspots(){const e=this.stats.map((e=>{if(""!==e.ssid)return{ssid:e.ssid,signal:e.signal,security:e.security}})).filter(Boolean);return(0,dc.orderBy)(e,["ssid"])}},methods:{getDecoration(e,t){if(void 0!==this.view[e.ssid][t])return this.view[e.ssid][t].decoration.toLowerCase()}}},ym=(0,nc.Z)(vm,[["render",function(e,t,n,r,i,s){return li(),pi("section",pm,[s.hotspots.length>0?(li(),pi("div",hm,gm)):Ti("v-if",!0),(li(!0),pi(ni,null,pr(s.hotspots,((t,n)=>(li(),pi("div",{class:"table-row",key:n},[wi("div",mm,[Si(pe(e.$filters.limitTo(t.ssid,20))+" ",1),wi("span",null,pe(t.security),1)]),bm,wi("div",{class:ce(["table-cell",s.getDecoration(t,"signal")])},pe(t.signal),3)])))),128))])}]]),wm=JSON.parse('{"t":["network","wifi","connections","ports","diskio","fs","irq","folders","raid","smart","sensors","now"]}'),xm={components:{GlancesHelp:rc,GlancesPluginAlert:pc,GlancesPluginCloud:bc,GlancesPluginConnections:Uc,GlancesPluginCpu:Lu,GlancesPluginDiskio:td,GlancesPluginContainers:Sd,GlancesPluginFolders:Nd,GlancesPluginFs:zd,GlancesPluginGpu:af,GlancesPluginIp:gf,GlancesPluginIrq:kf,GlancesPluginLoad:Rf,GlancesPluginMem:Xf,GlancesPluginMemMore:pp,GlancesPluginMemswap:Ap,GlancesPluginNetwork:Vp,GlancesPluginNow:Qp,GlancesPluginPercpu:fh,GlancesPluginPorts:Sh,GlancesPluginProcess:rg,GlancesPluginQuicklook:Pg,GlancesPluginRaid:qg,GlancesPluginSensors:nm,GlancesPluginSmart:Kg,GlancesPluginSystem:cm,GlancesPluginUptime:fm,GlancesPluginWifi:ym},data:()=>({store:Uo}),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:e}=this,t=e.stats&&e.stats.system&&e.stats.system.hostname||"";return t?`${t} - Glances`:"Glances"},leftMenu(){return void 0!==this.config.outputs.left_menu?this.config.outputs.left_menu.split(","):wm.t}},watch:{title(){document&&(document.title=this.title)}},methods:{setupHotKeys(){jo("a",(()=>{this.store.args.sort_processes_key=null})),jo("c",(()=>{this.store.args.sort_processes_key="cpu_percent"})),jo("m",(()=>{this.store.args.sort_processes_key="memory_percent"})),jo("u",(()=>{this.store.args.sort_processes_key="username"})),jo("p",(()=>{this.store.args.sort_processes_key="name"})),jo("i",(()=>{this.store.args.sort_processes_key="io_counters"})),jo("t",(()=>{this.store.args.sort_processes_key="timemillis"})),jo("shift+A",(()=>{this.store.args.disable_amps=!this.store.args.disable_amps})),jo("d",(()=>{this.store.args.disable_diskio=!this.store.args.disable_diskio})),jo("shift+Q",(()=>{this.store.args.enable_irq=!this.store.args.enable_irq})),jo("f",(()=>{this.store.args.disable_fs=!this.store.args.disable_fs})),jo("j",(()=>{this.store.args.programs=!this.store.args.programs})),jo("k",(()=>{this.store.args.disable_connections=!this.store.args.disable_connections})),jo("n",(()=>{this.store.args.disable_network=!this.store.args.disable_network})),jo("s",(()=>{this.store.args.disable_sensors=!this.store.args.disable_sensors})),jo("2",(()=>{this.store.args.disable_left_sidebar=!this.store.args.disable_left_sidebar})),jo("z",(()=>{this.store.args.disable_process=!this.store.args.disable_process})),jo("shift+S",(()=>{this.store.args.process_short_name=!this.store.args.process_short_name})),jo("shift+D",(()=>{this.store.args.disable_containers=!this.store.args.disable_containers})),jo("b",(()=>{this.store.args.byte=!this.store.args.byte})),jo("shift+B",(()=>{this.store.args.diskio_iops=!this.store.args.diskio_iops})),jo("l",(()=>{this.store.args.disable_alert=!this.store.args.disable_alert})),jo("1",(()=>{this.store.args.percpu=!this.store.args.percpu})),jo("h",(()=>{this.store.args.help_tag=!this.store.args.help_tag})),jo("shift+T",(()=>{this.store.args.network_sum=!this.store.args.network_sum})),jo("shift+U",(()=>{this.store.args.network_cumul=!this.store.args.network_cumul})),jo("shift+F",(()=>{this.store.args.fs_free_space=!this.store.args.fs_free_space})),jo("3",(()=>{this.store.args.disable_quicklook=!this.store.args.disable_quicklook})),jo("6",(()=>{this.store.args.meangpu=!this.store.args.meangpu})),jo("shift+G",(()=>{this.store.args.disable_gpu=!this.store.args.disable_gpu})),jo("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})),jo("shift+I",(()=>{this.store.args.disable_ip=!this.store.args.disable_ip})),jo("shift+P",(()=>{this.store.args.disable_ports=!this.store.args.disable_ports})),jo("shift+W",(()=>{this.store.args.disable_wifi=!this.store.args.disable_wifi}))}},mounted(){const e=window.__GLANCES__||{},t=isFinite(e["refresh-time"])?parseInt(e["refresh-time"],10):void 0;Ho.init(t),this.setupHotKeys()},beforeUnmount(){jo.unbind()}};const _m=((...e)=>{const t=qs().createApp(...e);const{mount:n}=t;return t.mount=e=>{const r=Bs(e);if(!r)return;const i=t._component;L(i)||i.render||i.template||(i.template=r.innerHTML),r.innerHTML="";const s=n(r,!1,r instanceof SVGElement);return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),s},t})((0,nc.Z)(xm,[["render",function(e,t,n,r,i,s){const o=cr("glances-help"),a=cr("glances-plugin-system"),l=cr("glances-plugin-ip"),c=cr("glances-plugin-uptime"),u=cr("glances-plugin-cloud"),d=cr("glances-plugin-quicklook"),f=cr("glances-plugin-cpu"),p=cr("glances-plugin-percpu"),h=cr("glances-plugin-gpu"),g=cr("glances-plugin-mem"),m=cr("glances-plugin-mem-more"),b=cr("glances-plugin-memswap"),v=cr("glances-plugin-load"),y=cr("glances-plugin-containers"),w=cr("glances-plugin-process"),x=cr("glances-plugin-alert");return s.dataLoaded?s.args.help_tag?(li(),hi(o,{key:1})):(li(),pi("main",zs,[wi("div",$s,[wi("div",Hs,[wi("div",Vs,[wi("div",Gs,[xi(a,{data:s.data},null,8,["data"])]),s.args.disable_ip?Ti("v-if",!0):(li(),pi("div",Ws,[xi(l,{data:s.data},null,8,["data"])])),wi("div",Zs,[xi(c,{data:s.data},null,8,["data"])])])])]),wi("div",Ks,[wi("div",Qs,[wi("div",Xs,[wi("div",Js,[xi(u,{data:s.data},null,8,["data"])])])]),s.args.enable_separator?(li(),pi("div",Ys)):Ti("v-if",!0),wi("div",eo,[s.args.disable_quicklook?Ti("v-if",!0):(li(),pi("div",to,[xi(d,{data:s.data},null,8,["data"])])),s.args.disable_cpu||s.args.percpu?Ti("v-if",!0):(li(),pi("div",no,[xi(f,{data:s.data},null,8,["data"])])),!s.args.disable_cpu&&s.args.percpu?(li(),pi("div",ro,[xi(p,{data:s.data},null,8,["data"])])):Ti("v-if",!0),!s.args.disable_gpu&&s.hasGpu?(li(),pi("div",io,[xi(h,{data:s.data},null,8,["data"])])):Ti("v-if",!0),s.args.disable_mem?Ti("v-if",!0):(li(),pi("div",so,[xi(g,{data:s.data},null,8,["data"])])),Ti(" NOTE: display if MEM enabled and GPU disabled "),s.args.disable_mem||!s.args.disable_gpu&&s.hasGpu?Ti("v-if",!0):(li(),pi("div",oo,[xi(m,{data:s.data},null,8,["data"])])),s.args.disable_memswap?Ti("v-if",!0):(li(),pi("div",ao,[xi(b,{data:s.data},null,8,["data"])])),s.args.disable_load?Ti("v-if",!0):(li(),pi("div",lo,[xi(v,{data:s.data},null,8,["data"])]))]),s.args.enable_separator?(li(),pi("div",co)):Ti("v-if",!0)]),wi("div",uo,[wi("div",fo,[s.args.disable_left_sidebar?Ti("v-if",!0):(li(),pi("div",po,[wi("div",ho,[Ti(" When they exist on the same node, v-if has a higher priority than v-for.\n That means the v-if condition will not have access to variables from the\n scope of the v-for "),(li(!0),pi(ni,null,pr(s.leftMenu,(e=>{return li(),pi(ni,null,[s.args[`disable_${e}`]?Ti("v-if",!0):(li(),hi((t=`glances-plugin-${e}`,D(t)?dr(lr,t,!1)||t:t||ur),{key:0,id:`plugin-${e}`,class:"plugin table-row-group",data:s.data},null,8,["id","data"]))],64);var t})),256))])])),wi("div",go,[s.args.disable_containers?Ti("v-if",!0):(li(),hi(y,{key:0,data:s.data},null,8,["data"])),xi(w,{data:s.data},null,8,["data"]),s.args.disable_alert?Ti("v-if",!0):(li(),hi(x,{key:1,data:s.data},null,8,["data"]))])])])])):(li(),pi("div",Us,Fs))}]]));_m.config.globalProperties.$filters=e,_m.mount("#app")})()})(); \ No newline at end of file diff --git a/glances/plugins/load/__init__.py b/glances/plugins/load/__init__.py index cc936078..0191321f 100644 --- a/glances/plugins/load/__init__.py +++ b/glances/plugins/load/__init__.py @@ -198,6 +198,6 @@ def get_load_average(percent: bool = False): pass if load_average and percent: - return tuple([i / get_nb_log_core() * 100 for i in load_average]) + return tuple([round(i / get_nb_log_core() * 100, 1) for i in load_average]) else: return load_average From 5092475d7f0414726abae26cfafff0d55d61d230 Mon Sep 17 00:00:00 2001 From: nicolargo Date: Sat, 27 Jan 2024 11:20:44 +0100 Subject: [PATCH 6/7] Make the Quicklook stats list configurable (TODO on the WebUI) --- conf/glances.conf | 8 +++- glances/outputs/glances_bars.py | 20 ++++++--- glances/outputs/glances_sparklines.py | 10 +++-- glances/plugins/quicklook/__init__.py | 63 +++++++++++++++------------ 4 files changed, 64 insertions(+), 37 deletions(-) diff --git a/conf/glances.conf b/conf/glances.conf index 75512743..1a489815 100644 --- a/conf/glances.conf +++ b/conf/glances.conf @@ -45,8 +45,11 @@ max_processes_display=25 # Set to true to disable a plugin # Note: you can also disable it from the command line (see --disable-plugin ) disable=False -# Graphical percentage char used in the terminal user interface (default is |) -percentage_char=| +# Stats list (default is cpu,mem,load) +# Available stats are: cpu,mem,load,swap +list=cpu,mem,load +# Graphical bar char used in the terminal user interface (default is |) +bar_char=| # Define CPU, MEM and SWAP thresholds in % cpu_careful=50 cpu_warning=70 @@ -58,6 +61,7 @@ swap_careful=50 swap_warning=70 swap_critical=90 # Source: http://blog.scoutapp.com/articles/2009/07/31/understanding-load-averages +# With 1 CPU core, the load should be lower than 1.00 (100%) load_careful=70 load_warning=100 load_critical=500 diff --git a/glances/outputs/glances_bars.py b/glances/outputs/glances_bars.py index f6466a9b..171099bf 100644 --- a/glances/outputs/glances_bars.py +++ b/glances/outputs/glances_bars.py @@ -28,10 +28,14 @@ class Bar(object): """ def __init__(self, size, - percentage_char='|', empty_char=' ', pre_char='[', post_char=']', - display_value=True, min_value=0, max_value=100): + bar_char='|', + empty_char=' ', + pre_char='[', post_char=']', + unit_char='%', + display_value=True, + min_value=0, max_value=100): # Build curses_bars - self.__curses_bars = [empty_char] * 5 + [percentage_char] * 5 + self.__curses_bars = [empty_char] * 5 + [bar_char] * 5 # Bar size self.__size = size # Bar current percent @@ -43,6 +47,8 @@ class Bar(object): self.__pre_char = pre_char self.__post_char = post_char self.__empty_char = empty_char + self.__unit_char = unit_char + # Value should be displayed ? self.__display_value = display_value @property @@ -82,9 +88,13 @@ class Bar(object): ret += self.__empty_char * int(self.size - whole) if self.__display_value: if self.percent > self.max_value: - ret = '{}>{:4.0f}%'.format(ret, self.max_value) + ret = '{}>{:4.0f}{}'.format(ret, + self.max_value, + self.__unit_char) else: - ret = '{}{:5.1f}%'.format(ret, self.percent) + ret = '{}{:5.1f}{}'.format(ret, + self.percent, + self.__unit_char) if overwrite and len(overwrite) < len(ret) - 6: ret = overwrite + ret[len(overwrite):] return ret diff --git a/glances/outputs/glances_sparklines.py b/glances/outputs/glances_sparklines.py index 29c0fbf0..3a5dabf8 100644 --- a/glances/outputs/glances_sparklines.py +++ b/glances/outputs/glances_sparklines.py @@ -35,7 +35,8 @@ class Sparkline(object): """Manage sparklines (see https://pypi.org/project/sparklines/).""" def __init__(self, size, - pre_char='[', post_char=']', empty_char=' ', + pre_char='[', post_char=']', + unit_char='%', display_value=True): # If the sparklines python module available ? self.__available = sparklines_module @@ -46,7 +47,8 @@ class Sparkline(object): # Char used for the decoration self.__pre_char = pre_char self.__post_char = post_char - self.__empty_char = empty_char + self.__unit_char = unit_char + # Value should be displayed ? self.__display_value = display_value @property @@ -83,7 +85,9 @@ class Sparkline(object): if self.__display_value: percents_without_none = [x for x in self.percents if x is not None] if len(percents_without_none) > 0: - ret = '{}{:5.1f}%'.format(ret, percents_without_none[-1]) + ret = '{}{:5.1f}{}'.format(ret, + percents_without_none[-1], + self.__unit_char) ret = nativestr(ret) if overwrite and len(overwrite) < len(ret) - 6: ret = overwrite + ret[len(overwrite):] diff --git a/glances/plugins/quicklook/__init__.py b/glances/plugins/quicklook/__init__.py index 1cfd5682..b1e53bda 100644 --- a/glances/plugins/quicklook/__init__.py +++ b/glances/plugins/quicklook/__init__.py @@ -71,6 +71,9 @@ class PluginModel(GlancesPluginModel): 'stats' is a dictionary. """ + AVAILABLE_STATS_LIST = ['cpu', 'mem', 'swap', 'load'] + DEFAULT_STATS_LIST = ['cpu', 'mem', 'load'] + def __init__(self, args=None, config=None): """Init the quicklook plugin.""" super(PluginModel, self).__init__( @@ -81,6 +84,12 @@ class PluginModel(GlancesPluginModel): # We want to display the stat in the curse interface self.display_curse = True + # Define the stats list + self.stats_list = self.get_conf_value('list', default=self.DEFAULT_STATS_LIST) + if not set(self.stats_list).issubset(self.AVAILABLE_STATS_LIST): + logger.warning('Quicklook plugin: Invalid stats list: {}'.format(self.stats_list)) + self.stats_list = self.AVAILABLE_STATS_LIST + @GlancesPluginModel._check_decorator @GlancesPluginModel._log_result_decorator def update(self): @@ -115,7 +124,7 @@ class PluginModel(GlancesPluginModel): stats['cpucore'] = get_nb_log_core() try: # Load average is a tuple (1 min, 5 min, 15 min) - # Process only the 15 min value + # Process only the 15 min value (index 2) stats['load'] = get_load_average(percent=True)[2] except (TypeError, IndexError): stats['load'] = None @@ -135,7 +144,7 @@ class PluginModel(GlancesPluginModel): super(PluginModel, self).update_views() # Alert for CPU, MEM and SWAP - for key in ['cpu', 'mem', 'swap']: + for key in self.stats_list: if key in self.stats: self.views[key]['decoration'] = self.get_alert(self.stats[key], header=key) @@ -159,14 +168,14 @@ class PluginModel(GlancesPluginModel): return ret # Define the data: Bar (default behavior) or Sparkline - sparkline_tag = False - if self.args.sparkline and self.history_enable() and not self.args.client: - data = Sparkline(max_width) - sparkline_tag = data.available - if not sparkline_tag: - # Fallback to bar if Sparkline module is not installed - data = Bar(max_width, - percentage_char=self.get_conf_value('percentage_char', default=['|'])[0]) + data = dict() + for key in self.stats_list: + if self.args.sparkline and self.history_enable() and not self.args.client: + data[key] = Sparkline(max_width) + else: + # Fallback to bar if Sparkline module is not installed + data[key] = Bar(max_width, + bar_char=self.get_conf_value('bar_char', default=['|'])[0]) # Build the string message ########################## @@ -186,36 +195,36 @@ class PluginModel(GlancesPluginModel): ret.append(self.curse_new_line()) # Loop over CPU, MEM and LOAD - for key in ['cpu', 'mem', 'load']: + for key in self.stats_list: if key == 'cpu' and args.percpu: - if sparkline_tag: - raw_cpu = self.get_raw_history(item='percpu', nb=data.size) + if type(data[key]).__name__ == 'Sparkline': + raw_cpu = self.get_raw_history(item='percpu', nb=data[key].size) for cpu_index, cpu in enumerate(self.stats['percpu']): - if sparkline_tag: + if type(data[key]).__name__ == 'Sparkline': # Sparkline display an history - data.percents = [i[1][cpu_index]['total'] for i in raw_cpu] + data[key].percents = [i[1][cpu_index]['total'] for i in raw_cpu] # A simple padding in order to align metrics to the right - data.percents += [None] * (data.size - len(data.percents)) + data[key].percents += [None] * (data[key].size - len(data[key].percents)) else: # Bar only the last value - data.percent = cpu['total'] + data[key].percent = cpu['total'] if cpu[cpu['key']] < 10: msg = '{:3}{} '.format(key.upper(), cpu['cpu_number']) else: msg = '{:4} '.format(cpu['cpu_number']) - ret.extend(self._msg_create_line(msg, data, key)) + ret.extend(self._msg_create_line(msg, data[key], key)) ret.append(self.curse_new_line()) else: - if sparkline_tag: + if type(data[key]).__name__ == 'Sparkline': # Sparkline display an history - data.percents = [i[1] for i in self.get_raw_history(item=key, nb=data.size)] + data[key].percents = [i[1] for i in self.get_raw_history(item=key, nb=data[key].size)] # A simple padding in order to align metrics to the right - data.percents += [None] * (data.size - len(data.percents)) + data[key].percents += [None] * (data[key].size - len(data[key].percents)) else: # Bar only the last value - data.percent = self.stats[key] + data[key].percent = self.stats[key] msg = '{:4} '.format(key.upper()) - ret.extend(self._msg_create_line(msg, data, key)) + ret.extend(self._msg_create_line(msg, data[key], key)) ret.append(self.curse_new_line()) # Remove the last new line @@ -226,10 +235,10 @@ class PluginModel(GlancesPluginModel): def _msg_create_line(self, msg, data, key): """Create a new line to the Quick view.""" - if key == 'mem' and self.get_alert(self.stats['swap'], header='swap') != 'DEFAULT': - overwrite = 'SWAP' - else: - overwrite = '' + # if key == 'mem' and self.get_alert(self.stats['swap'], header='swap') != 'DEFAULT': + # overwrite = 'SWAP' + # else: + overwrite = '' return [ self.curse_add_line(msg), self.curse_add_line(data.pre_char, decoration='BOLD'), From 1623c27f4e8e460d99c8d64aa2cef39a1c51a2dd Mon Sep 17 00:00:00 2001 From: nicolargo Date: Sun, 28 Jan 2024 10:42:20 +0100 Subject: [PATCH 7/7] Quicklook plugin lst is also configurable and taken into account in the WebUI --- conf/glances.conf | 2 +- docs/aoa/quicklook.rst | 10 +- docs/api.rst | 418 +++++++++--------- docs/man/glances.1 | 2 +- .../static/js/components/plugin-quicklook.vue | 44 +- glances/outputs/static/package-lock.json | 12 +- glances/outputs/static/public/glances.js | 2 +- glances/plugins/quicklook/__init__.py | 3 + 8 files changed, 229 insertions(+), 264 deletions(-) diff --git a/conf/glances.conf b/conf/glances.conf index 1a489815..35122262 100644 --- a/conf/glances.conf +++ b/conf/glances.conf @@ -61,7 +61,7 @@ swap_careful=50 swap_warning=70 swap_critical=90 # Source: http://blog.scoutapp.com/articles/2009/07/31/understanding-load-averages -# With 1 CPU core, the load should be lower than 1.00 (100%) +# With 1 CPU core, the load should be lower than 1.00 ~ 100% load_careful=70 load_warning=100 load_critical=500 diff --git a/docs/aoa/quicklook.rst b/docs/aoa/quicklook.rst index 093a7814..82fac3aa 100644 --- a/docs/aoa/quicklook.rst +++ b/docs/aoa/quicklook.rst @@ -4,7 +4,7 @@ Quick Look ========== The ``quicklook`` plugin is only displayed on wide screen and proposes a -bar view for CPU and memory (virtual and swap). +bar view for cpu, memory, swap and load (this list is configurable). In the terminal interface, click on ``3`` to enable/disable it. @@ -27,10 +27,14 @@ client/server mode (see issue ). Limit values can be overwritten in the configuration file under the ``[quicklook]`` section. -You can also configure the percentage char used in the terminal user interface. +You can also configure the stats list and the bat character used in the +user interface. .. code-block:: ini [quicklook] + # Stats list (default is cpu,mem,load) + # Available stats are: cpu,mem,load,swap + list=cpu,mem,load # Graphical percentage char used in the terminal user interface (default is |) - percentage_char=@ + bar_char=| diff --git a/docs/api.rst b/docs/api.rst index 62509320..a892492a 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -109,16 +109,16 @@ GET alert Get plugin stats:: # curl http://localhost:61208/api/4/alert - [{"avg": 75.58190732727591, - "begin": 1705242982.0, + [{"avg": 81.2863503930515, + "begin": 1706434886.0, "count": 1, "desc": "", "end": -1, - "max": 75.58190732727591, - "min": 75.58190732727591, + "max": 81.2863503930515, + "min": 81.2863503930515, "sort": "memory_percent", "state": "WARNING", - "sum": 75.58190732727591, + "sum": 81.2863503930515, "top": [], "type": "MEM"}] @@ -140,21 +140,21 @@ Fields descriptions: Get a specific field:: # curl http://localhost:61208/api/4/alert/begin - {"begin": [1705242982.0]} + {"begin": [1706434886.0]} Get a specific item when field matches the given value:: - # curl http://localhost:61208/api/4/alert/begin/1705242982.0 - {"1705242982.0": [{"avg": 75.58190732727591, - "begin": 1705242982.0, + # curl http://localhost:61208/api/4/alert/begin/1706434886.0 + {"1706434886.0": [{"avg": 81.2863503930515, + "begin": 1706434886.0, "count": 1, "desc": "", "end": -1, - "max": 75.58190732727591, - "min": 75.58190732727591, + "max": 81.2863503930515, + "min": 81.2863503930515, "sort": "memory_percent", "state": "WARNING", - "sum": 75.58190732727591, + "sum": 81.2863503930515, "top": [], "type": "MEM"}]} @@ -172,7 +172,7 @@ Get plugin stats:: "refresh": 3.0, "regex": True, "result": None, - "timer": 0.19934892654418945}, + "timer": 0.36128687858581543}, {"count": 0, "countmax": 20.0, "countmin": None, @@ -181,7 +181,7 @@ Get plugin stats:: "refresh": 3.0, "regex": True, "result": None, - "timer": 0.19925165176391602}] + "timer": 0.36110568046569824}] Fields descriptions: @@ -209,7 +209,7 @@ Get a specific item when field matches the given value:: "refresh": 3.0, "regex": True, "result": None, - "timer": 0.19934892654418945}]} + "timer": 0.36128687858581543}]} GET connections --------------- @@ -243,8 +243,8 @@ Get plugin stats:: # curl http://localhost:61208/api/4/containers [{"command": "top", - "cpu": {"total": 1.8635523677666806e-06}, - "cpu_percent": 1.8635523677666806e-06, + "cpu": {"total": 2.4258436881746593e-06}, + "cpu_percent": 2.4258436881746593e-06, "created": "2023-12-09T10:45:34.339489876+01:00", "engine": "podman", "id": "481d6ffb7eef284d062628cf350bdd9ce0a803db8a2a505d75565ed24322b714", @@ -253,8 +253,8 @@ Get plugin stats:: "io_rx": 0.0, "io_wx": 0.0, "key": "name", - "memory": {"limit": 7823585280.0, "usage": 1306624.0}, - "memory_usage": 1306624.0, + "memory": {"limit": 7823585280.0, "usage": 1212416.0}, + "memory_usage": 1212416.0, "name": "sad_darwin", "network": {"rx": 0.0, "time_since_update": 1, "tx": 0.0}, "network_rx": 0.0, @@ -264,8 +264,8 @@ Get plugin stats:: "status": "running", "uptime": "1 months"}, {"command": "", - "cpu": {"total": 3.4505346487574547e-10}, - "cpu_percent": 3.4505346487574547e-10, + "cpu": {"total": 3.5348550629383954e-10}, + "cpu_percent": 3.5348550629383954e-10, "created": "2022-10-22T14:23:03.120912374+02:00", "engine": "podman", "id": "9491515251edcd5bb5dc17205d7ee573c0be96fe0b08b0a12a7e2cea874565ea", @@ -274,8 +274,8 @@ Get plugin stats:: "io_rx": 0.0, "io_wx": 0.0, "key": "name", - "memory": {"limit": 7823585280.0, "usage": 290816.0}, - "memory_usage": 290816.0, + "memory": {"limit": 7823585280.0, "usage": 237568.0}, + "memory_usage": 237568.0, "name": "8d0f1c783def-infra", "network": {"rx": 0.0, "time_since_update": 1, "tx": 0.0}, "network_rx": 0.0, @@ -313,8 +313,8 @@ Get a specific item when field matches the given value:: # curl http://localhost:61208/api/4/containers/name/sad_darwin {"sad_darwin": [{"command": "top", - "cpu": {"total": 1.8635523677666806e-06}, - "cpu_percent": 1.8635523677666806e-06, + "cpu": {"total": 2.4258436881746593e-06}, + "cpu_percent": 2.4258436881746593e-06, "created": "2023-12-09T10:45:34.339489876+01:00", "engine": "podman", "id": "481d6ffb7eef284d062628cf350bdd9ce0a803db8a2a505d75565ed24322b714", @@ -323,8 +323,8 @@ Get a specific item when field matches the given value:: "io_rx": 0.0, "io_wx": 0.0, "key": "name", - "memory": {"limit": 7823585280.0, "usage": 1306624.0}, - "memory_usage": 1306624.0, + "memory": {"limit": 7823585280.0, "usage": 1212416.0}, + "memory_usage": 1212416.0, "name": "sad_darwin", "network": {"rx": 0.0, "time_since_update": 1, "tx": 0.0}, "network_rx": 0.0, @@ -362,7 +362,7 @@ Get plugin stats:: "ctx_switches": 0, "guest": 0.0, "guest_nice": 0.0, - "idle": 74.6, + "idle": 43.4, "interrupts": 0, "iowait": 0.0, "irq": 0.0, @@ -371,10 +371,10 @@ Get plugin stats:: "softirq": 0.0, "steal": 0.0, "syscalls": 0, - "system": 3.3, + "system": 7.8, "time_since_update": 1, - "total": 25.4, - "user": 22.1} + "total": 56.6, + "user": 48.8} Fields descriptions: @@ -397,7 +397,7 @@ Fields descriptions: Get a specific field:: # curl http://localhost:61208/api/4/cpu/total - {"total": 25.4} + {"total": 56.6} GET diskio ---------- @@ -454,13 +454,13 @@ Get plugin stats:: # curl http://localhost:61208/api/4/fs [{"alias": "Root", "device_name": "/dev/mapper/ubuntu--gnome--vg-root", - "free": 19083309056, + "free": 17195761664, "fs_type": "ext4", "key": "mnt_point", "mnt_point": "/", - "percent": 91.7, + "percent": 92.6, "size": 243334156288, - "used": 211863392256}, + "used": 213750939648}, {"device_name": "zsfpool", "free": 31195136, "fs_type": "zfs", @@ -490,13 +490,13 @@ Get a specific item when field matches the given value:: # curl http://localhost:61208/api/4/fs/mnt_point// {"/": [{"alias": "Root", "device_name": "/dev/mapper/ubuntu--gnome--vg-root", - "free": 19083309056, + "free": 17195761664, "fs_type": "ext4", "key": "mnt_point", "mnt_point": "/", - "percent": 91.7, + "percent": 92.6, "size": 243334156288, - "used": 211863392256}]} + "used": 213750939648}]} GET ip ------ @@ -504,11 +504,11 @@ GET ip Get plugin stats:: # curl http://localhost:61208/api/4/ip - {"address": "192.168.0.32", - "gateway": "192.168.0.254", + {"address": "192.168.1.14", + "gateway": "192.168.1.1", "mask": "255.255.255.0", "mask_cidr": 24, - "public_address": "91.166.228.228", + "public_address": "92.151.148.66", "public_info_human": ""} Fields descriptions: @@ -523,7 +523,7 @@ Fields descriptions: Get a specific field:: # curl http://localhost:61208/api/4/ip/gateway - {"gateway": "192.168.0.254"} + {"gateway": "192.168.1.1"} GET load -------- @@ -531,10 +531,7 @@ GET load Get plugin stats:: # curl http://localhost:61208/api/4/load - {"cpucore": 4, - "min1": 1.00927734375, - "min15": 0.66259765625, - "min5": 0.7548828125} + {"cpucore": 4, "min1": 2.142578125, "min15": 2.2412109375, "min5": 2.296875} Fields descriptions: @@ -546,7 +543,7 @@ Fields descriptions: Get a specific field:: # curl http://localhost:61208/api/4/load/min1 - {"min1": 1.00927734375} + {"min1": 2.142578125} GET mem ------- @@ -554,16 +551,16 @@ GET mem Get plugin stats:: # curl http://localhost:61208/api/4/mem - {"active": 2827825152, - "available": 1910370304, - "buffers": 442753024, - "cached": 1887649792, - "free": 1910370304, - "inactive": 3567714304, - "percent": 75.6, - "shared": 457003008, + {"active": 2943950848, + "available": 1464078336, + "buffers": 63561728, + "cached": 1855676416, + "free": 1464078336, + "inactive": 3364462592, + "percent": 81.3, + "shared": 513527808, "total": 7823585280, - "used": 5913214976} + "used": 6359506944} Fields descriptions: @@ -590,13 +587,13 @@ GET memswap Get plugin stats:: # curl http://localhost:61208/api/4/memswap - {"free": 3856048128, - "percent": 52.3, - "sin": 14772441088, - "sout": 22269526016, + {"free": 3434184704, + "percent": 57.5, + "sin": 21763555328, + "sout": 30277906432, "time_since_update": 1, "total": 8082419712, - "used": 4226371584} + "used": 4648235008} Fields descriptions: @@ -620,26 +617,26 @@ Get plugin stats:: # curl http://localhost:61208/api/4/network [{"alias": None, - "cumulative_cx": 2537577204, - "cumulative_rx": 1268788602, - "cumulative_tx": 1268788602, - "cx": 0, + "cumulative_cx": 2734623262, + "cumulative_rx": 1367311631, + "cumulative_tx": 1367311631, + "cx": 576, "interface_name": "lo", "is_up": True, "key": "interface_name", - "rx": 0, + "rx": 288, "speed": 0, "time_since_update": 1, - "tx": 0}, + "tx": 288}, {"alias": "WIFI", - "cumulative_cx": 14514673497, - "cumulative_rx": 11339647204, - "cumulative_tx": 3175026293, - "cx": 224, + "cumulative_cx": 16571979029, + "cumulative_rx": 13260033314, + "cumulative_tx": 3311945715, + "cx": 186, "interface_name": "wlp2s0", "is_up": True, "key": "interface_name", - "rx": 98, + "rx": 60, "speed": 0, "time_since_update": 1, "tx": 126}] @@ -666,24 +663,24 @@ Get a specific field:: "br-40875d2e2716", "docker0", "br_grafana", - "veth55598fc", - "mpqemubr0"]} + "mpqemubr0", + "vethbeef843"]} Get a specific item when field matches the given value:: # curl http://localhost:61208/api/4/network/interface_name/lo {"lo": [{"alias": None, - "cumulative_cx": 2537577204, - "cumulative_rx": 1268788602, - "cumulative_tx": 1268788602, - "cx": 0, + "cumulative_cx": 2734623262, + "cumulative_rx": 1367311631, + "cumulative_tx": 1367311631, + "cx": 576, "interface_name": "lo", "is_up": True, "key": "interface_name", - "rx": 0, + "rx": 288, "speed": 0, "time_since_update": 1, - "tx": 0}]} + "tx": 288}]} GET now ------- @@ -691,7 +688,7 @@ GET now Get plugin stats:: # curl http://localhost:61208/api/4/now - "2024-01-14 15:36:22 CET" + "2024-01-28 10:41:26 CET" GET percpu ---------- @@ -700,19 +697,6 @@ Get plugin stats:: # curl http://localhost:61208/api/4/percpu [{"cpu_number": 0, - "guest": 0.0, - "guest_nice": 0.0, - "idle": 20.0, - "iowait": 0.0, - "irq": 0.0, - "key": "cpu_number", - "nice": 0.0, - "softirq": 0.0, - "steal": 0.0, - "system": 2.0, - "total": 80.0, - "user": 9.0}, - {"cpu_number": 1, "guest": 0.0, "guest_nice": 0.0, "idle": 23.0, @@ -722,9 +706,22 @@ Get plugin stats:: "nice": 0.0, "softirq": 0.0, "steal": 0.0, - "system": 2.0, + "system": 5.0, "total": 77.0, - "user": 7.0}] + "user": 22.0}, + {"cpu_number": 1, + "guest": 0.0, + "guest_nice": 0.0, + "idle": 16.0, + "iowait": 0.0, + "irq": 0.0, + "key": "cpu_number", + "nice": 0.0, + "softirq": 0.0, + "steal": 0.0, + "system": 4.0, + "total": 84.0, + "user": 31.0}] Fields descriptions: @@ -753,12 +750,12 @@ Get plugin stats:: # curl http://localhost:61208/api/4/ports [{"description": "DefaultGateway", - "host": "192.168.0.254", + "host": "192.168.1.1", "indice": "port_0", "port": 0, "refresh": 30, "rtt_warning": None, - "status": 0.005277, + "status": 0.007028, "timeout": 3}] Fields descriptions: @@ -775,19 +772,19 @@ Fields descriptions: Get a specific field:: # curl http://localhost:61208/api/4/ports/host - {"host": ["192.168.0.254"]} + {"host": ["192.168.1.1"]} Get a specific item when field matches the given value:: - # curl http://localhost:61208/api/4/ports/host/192.168.0.254 - {"192.168.0.254": [{"description": "DefaultGateway", - "host": "192.168.0.254", - "indice": "port_0", - "port": 0, - "refresh": 30, - "rtt_warning": None, - "status": 0.005277, - "timeout": 3}]} + # curl http://localhost:61208/api/4/ports/host/192.168.1.1 + {"192.168.1.1": [{"description": "DefaultGateway", + "host": "192.168.1.1", + "indice": "port_0", + "port": 0, + "refresh": 30, + "rtt_warning": None, + "status": 0.007028, + "timeout": 3}]} GET processcount ---------------- @@ -795,7 +792,7 @@ GET processcount Get plugin stats:: # curl http://localhost:61208/api/4/processcount - {"pid_max": 0, "running": 1, "sleeping": 326, "thread": 1611, "total": 392} + {"pid_max": 0, "running": 1, "sleeping": 336, "thread": 1717, "total": 412} Fields descriptions: @@ -808,7 +805,7 @@ Fields descriptions: Get a specific field:: # curl http://localhost:61208/api/4/processcount/total - {"total": 392} + {"total": 412} GET psutilversion ----------------- @@ -824,25 +821,14 @@ GET quicklook Get plugin stats:: # curl http://localhost:61208/api/4/quicklook - {"cpu": 25.4, - "cpu_hz": 3000000000.0, - "cpu_hz_current": 2723398750.0000005, + {"cpu": 56.6, + "cpu_hz": 2025000000.0, + "cpu_hz_current": 1723932000.0, "cpu_name": "Intel(R) Core(TM) i7-4500U CPU @ 1.80GHz", - "mem": 75.6, + "cpucore": 4, + "load": 56.0, + "mem": 81.3, "percpu": [{"cpu_number": 0, - "guest": 0.0, - "guest_nice": 0.0, - "idle": 20.0, - "iowait": 0.0, - "irq": 0.0, - "key": "cpu_number", - "nice": 0.0, - "softirq": 0.0, - "steal": 0.0, - "system": 2.0, - "total": 80.0, - "user": 9.0}, - {"cpu_number": 1, "guest": 0.0, "guest_nice": 0.0, "idle": 23.0, @@ -852,50 +838,64 @@ Get plugin stats:: "nice": 0.0, "softirq": 0.0, "steal": 0.0, - "system": 2.0, + "system": 5.0, "total": 77.0, - "user": 7.0}, + "user": 22.0}, + {"cpu_number": 1, + "guest": 0.0, + "guest_nice": 0.0, + "idle": 16.0, + "iowait": 0.0, + "irq": 0.0, + "key": "cpu_number", + "nice": 0.0, + "softirq": 0.0, + "steal": 0.0, + "system": 4.0, + "total": 84.0, + "user": 31.0}, {"cpu_number": 2, "guest": 0.0, "guest_nice": 0.0, - "idle": 21.0, + "idle": 27.0, "iowait": 0.0, "irq": 0.0, "key": "cpu_number", "nice": 0.0, "softirq": 0.0, "steal": 0.0, - "system": 1.0, - "total": 79.0, - "user": 9.0}, + "system": 4.0, + "total": 73.0, + "user": 21.0}, {"cpu_number": 3, "guest": 0.0, "guest_nice": 0.0, - "idle": 28.0, + "idle": 24.0, "iowait": 0.0, "irq": 0.0, "key": "cpu_number", "nice": 0.0, "softirq": 0.0, "steal": 0.0, - "system": 1.0, - "total": 72.0, - "user": 3.0}], - "swap": 52.3} + "system": 3.0, + "total": 76.0, + "user": 25.0}], + "swap": 57.5} Fields descriptions: * **cpu**: CPU percent usage (unit is *percent*) * **mem**: MEM percent usage (unit is *percent*) * **swap**: SWAP percent usage (unit is *percent*) +* **load**: LOAD percent usage (unit is *percent*) * **cpu_name**: CPU name (unit is *None*) * **cpu_hz_current**: CPU current frequency (unit is *hertz*) * **cpu_hz**: CPU max frequency (unit is *hertz*) Get a specific field:: - # curl http://localhost:61208/api/4/quicklook/cpu - {"cpu": 25.4} + # curl http://localhost:61208/api/4/quicklook/cpu_name + {"cpu_name": "Intel(R) Core(TM) i7-4500U CPU @ 1.80GHz"} GET sensors ----------- @@ -984,7 +984,7 @@ GET uptime Get plugin stats:: # curl http://localhost:61208/api/4/uptime - "50 days, 6:38:24" + "64 days, 1:43:26" GET version ----------- @@ -1009,85 +1009,63 @@ Get top 2 processes of the processlist plugin:: # curl http://localhost:61208/api/4/processlist/top/2 [{"cmdline": ["/usr/share/code/code", + "--ms-enable-electron-run-as-node", + "/home/nicolargo/.vscode/extensions/vue.volar-1.8.25/server.js", + "--node-ipc", + "--clientProcessId=391253"], + "cpu_percent": 0.0, + "cpu_times": {"children_system": 0.0, + "children_user": 0.0, + "iowait": 0.0, + "system": 182.3, + "user": 3586.33}, + "gids": {"effective": 1000, "real": 1000, "saved": 1000}, + "io_counters": [1702031360, 0, 0, 0, 0], + "key": "pid", + "memory_info": {"data": 792121344, + "dirty": 0, + "lib": 0, + "rss": 578248704, + "shared": 17330176, + "text": 120565760, + "vms": 1205534920704}, + "memory_percent": 7.391096067914275, + "name": "code", + "nice": 0, + "num_threads": 8, + "pid": 391764, + "status": "S", + "time_since_update": 1, + "username": "nicolargo"}, + {"cmdline": ["/usr/share/code/code", "--ms-enable-electron-run-as-node", "/home/nicolargo/.vscode/extensions/ms-python.vscode-pylance-2023.12.1/dist/server.bundle.js", "--cancellationReceive=file:810abd06604ca203178b3fa9390087012fbf550dba", "--node-ipc", "--clientProcessId=391253"], "cpu_percent": 0.0, - "cpu_times": {"children_system": 0.78, - "children_user": 6.15, + "cpu_times": {"children_system": 0.85, + "children_user": 6.34, "iowait": 0.0, - "system": 360.08, - "user": 6010.89}, + "system": 466.27, + "user": 7859.93}, "gids": {"effective": 1000, "real": 1000, "saved": 1000}, - "io_counters": [1231159296, 2641920, 0, 0, 0], + "io_counters": [2126852096, 2703360, 0, 0, 0], "key": "pid", - "memory_info": {"data": 899014656, + "memory_info": {"data": 944828416, "dirty": 0, "lib": 0, - "rss": 511119360, - "shared": 26382336, + "rss": 531513344, + "shared": 17362944, "text": 120565760, "vms": 1207768694784}, - "memory_percent": 6.533057948593103, + "memory_percent": 6.793731070571267, "name": "code", "nice": 0, "num_threads": 13, "pid": 391817, "status": "S", "time_since_update": 1, - "username": "nicolargo"}, - {"cmdline": ["/usr/share/code/code", - "--type=renderer", - "--crashpad-handler-pid=391157", - "--enable-crash-reporter=721e05a9-6035-4dcb-bd58-68097aa48dd0,no_channel", - "--user-data-dir=/home/nicolargo/.config/Code", - "--standard-schemes=vscode-webview,vscode-file", - "--enable-sandbox", - "--secure-schemes=vscode-webview,vscode-file", - "--bypasscsp-schemes", - "--cors-schemes=vscode-webview,vscode-file", - "--fetch-schemes=vscode-webview,vscode-file", - "--service-worker-schemes=vscode-webview", - "--streaming-schemes", - "--app-path=/usr/share/code/resources/app", - "--enable-sandbox", - "--enable-blink-features=HighlightAPI", - "--first-renderer-process", - "--lang=en-US", - "--num-raster-threads=2", - "--enable-main-frame-before-activation", - "--renderer-client-id=4", - "--time-ticks-at-unix-epoch=-1702561657662203", - "--launch-time-ticks=95866298101", - "--shared-files=v8_context_snapshot_data:100", - "--field-trial-handle=0,i,2865222574050452096,10380804405300286374,262144", - "--disable-features=CalculateNativeWinOcclusion,SpareRendererForSitePerProcess", - "--vscode-window-config=vscode:a08b576a-4b00-4480-bfc3-390d8aea727c"], - "cpu_percent": 0.0, - "cpu_times": {"children_system": 0.0, - "children_user": 0.0, - "iowait": 0.0, - "system": 872.37, - "user": 12288.82}, - "gids": {"effective": 1000, "real": 1000, "saved": 1000}, - "io_counters": [1207435264, 3117056, 0, 0, 0], - "key": "pid", - "memory_info": {"data": 1501626368, - "dirty": 0, - "lib": 0, - "rss": 484990976, - "shared": 76034048, - "text": 120565760, - "vms": 1220702756864}, - "memory_percent": 6.199088507922547, - "name": "code", - "nice": 0, - "num_threads": 15, - "pid": 391192, - "status": "S", - "time_since_update": 1, "username": "nicolargo"}] Note: Only work for plugin with a list of items @@ -1116,34 +1094,34 @@ GET stats history History of a plugin:: # curl http://localhost:61208/api/4/cpu/history - {"system": [["2024-01-14T15:36:24.814316", 3.3], - ["2024-01-14T15:36:25.828843", 1.8], - ["2024-01-14T15:36:26.982020", 1.8]], - "user": [["2024-01-14T15:36:24.814299", 22.1], - ["2024-01-14T15:36:25.828836", 9.7], - ["2024-01-14T15:36:26.982006", 9.7]]} + {"system": [["2024-01-28T10:41:28.116797", 7.8], + ["2024-01-28T10:41:29.140407", 3.1], + ["2024-01-28T10:41:30.368579", 3.1]], + "user": [["2024-01-28T10:41:28.116785", 48.8], + ["2024-01-28T10:41:29.140398", 17.3], + ["2024-01-28T10:41:30.368565", 17.3]]} Limit history to last 2 values:: # curl http://localhost:61208/api/4/cpu/history/2 - {"system": [["2024-01-14T15:36:25.828843", 1.8], - ["2024-01-14T15:36:26.982020", 1.8]], - "user": [["2024-01-14T15:36:25.828836", 9.7], - ["2024-01-14T15:36:26.982006", 9.7]]} + {"system": [["2024-01-28T10:41:29.140407", 3.1], + ["2024-01-28T10:41:30.368579", 3.1]], + "user": [["2024-01-28T10:41:29.140398", 17.3], + ["2024-01-28T10:41:30.368565", 17.3]]} History for a specific field:: # curl http://localhost:61208/api/4/cpu/system/history - {"system": [["2024-01-14T15:36:22.968267", 3.3], - ["2024-01-14T15:36:24.814316", 3.3], - ["2024-01-14T15:36:25.828843", 1.8], - ["2024-01-14T15:36:26.982020", 1.8]]} + {"system": [["2024-01-28T10:41:26.512718", 7.8], + ["2024-01-28T10:41:28.116797", 7.8], + ["2024-01-28T10:41:29.140407", 3.1], + ["2024-01-28T10:41:30.368579", 3.1]]} Limit history for a specific field to last 2 values:: # curl http://localhost:61208/api/4/cpu/system/history - {"system": [["2024-01-14T15:36:25.828843", 1.8], - ["2024-01-14T15:36:26.982020", 1.8]]} + {"system": [["2024-01-28T10:41:29.140407", 3.1], + ["2024-01-28T10:41:30.368579", 3.1]]} GET limits (used for thresholds) -------------------------------- @@ -1301,14 +1279,18 @@ All limits/thresholds:: "19"]}, "psutilversion": {"history_size": 1200.0}, "quicklook": {"history_size": 1200.0, + "quicklook_bar_char": ["|"], "quicklook_cpu_careful": 50.0, "quicklook_cpu_critical": 90.0, "quicklook_cpu_warning": 70.0, "quicklook_disable": ["False"], + "quicklook_list": ["cpu", "mem", "load"], + "quicklook_load_careful": 70.0, + "quicklook_load_critical": 500.0, + "quicklook_load_warning": 100.0, "quicklook_mem_careful": 50.0, "quicklook_mem_critical": 90.0, "quicklook_mem_warning": 70.0, - "quicklook_percentage_char": ["|"], "quicklook_swap_careful": 50.0, "quicklook_swap_critical": 90.0, "quicklook_swap_warning": 70.0}, diff --git a/docs/man/glances.1 b/docs/man/glances.1 index 0e7ba5cf..aa91312b 100644 --- a/docs/man/glances.1 +++ b/docs/man/glances.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "GLANCES" "1" "Jan 14, 2024" "4.0.0_beta01" "Glances" +.TH "GLANCES" "1" "Jan 28, 2024" "4.0.0_beta01" "Glances" .SH NAME glances \- An eye on your system .SH SYNOPSIS diff --git a/glances/outputs/static/js/components/plugin-quicklook.vue b/glances/outputs/static/js/components/plugin-quicklook.vue index fd607de0..637b91d8 100644 --- a/glances/outputs/static/js/components/plugin-quicklook.vue +++ b/glances/outputs/static/js/components/plugin-quicklook.vue @@ -42,41 +42,23 @@
{{ percpu.total }}%
-
-
MEM
+
+
{{ key.toUpperCase() }}
 
-
{{ mem }}%
-
-
-
LOAD
-
-
-
-   -
-
-
-
{{ load }}%
+
{{ stats[key] }}%
@@ -106,12 +88,6 @@ export default { view() { return this.data.views['quicklook']; }, - mem() { - return this.stats.mem; - }, - load() { - return this.stats.load; - }, cpu() { return this.stats.cpu; }, @@ -124,15 +100,15 @@ export default { cpu_hz() { return this.stats.cpu_hz; }, - swap() { - return this.stats.swap; - }, percpus() { return this.stats.percpu.map(({ cpu_number: number, total }) => ({ number, total })); - } + }, + stats_list_after_cpu() { + return this.view.list.filter((key) => !key.includes('cpu')); + }, }, methods: { getDecoration(value) { diff --git a/glances/outputs/static/package-lock.json b/glances/outputs/static/package-lock.json index 00e73156..85e76ff0 100644 --- a/glances/outputs/static/package-lock.json +++ b/glances/outputs/static/package-lock.json @@ -2336,9 +2336,9 @@ "dev": true }, "node_modules/follow-redirects": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", - "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "version": "1.15.5", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz", + "integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==", "dev": true, "funding": [ { @@ -7584,9 +7584,9 @@ "dev": true }, "follow-redirects": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", - "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "version": "1.15.5", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz", + "integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==", "dev": true }, "forwarded": { diff --git a/glances/outputs/static/public/glances.js b/glances/outputs/static/public/glances.js index 5bfc2ce1..c8884558 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=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;s0,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;a1&&(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;r1&&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=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"};const Nu={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},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()}}},Lu=(0,nc.Z)(Nu,[["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&&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&&s.syscalls?(li(),pi("div",yu,[wu,wi("div",xu,pe(s.syscalls),1)])):Ti("v-if",!0)])]),wi("div",_u,[wi("div",ku,[Ti(" If not already display instead of nice, then display ctx_switches "),null!=s.nice&&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&&s.interrupts?(li(),pi("div",Tu,[Au,wi("div",Eu,pe(s.interrupts),1)])):Ti("v-if",!0),s.isWindows||s.isSunOS||!s.soft_interrupts?Ti("v-if",!0):(li(),pi("div",Ou,[Iu,wi("div",Pu,pe(s.soft_interrupts),1)]))])])])])}]]),Du={class:"plugin",id:"diskio"},Mu={key:0,class:"table-row"},ju=wi("div",{class:"table-cell text-left title"},"DISK I/O",-1),Ru={class:"table-cell"},qu={class:"table-cell"},Bu={class:"table-cell"},Uu={class:"table-cell"},Fu={class:"table-cell text-left"};var zu=n(1036),$u=n.n(zu);function Hu(e,t){return Vu(e=8*Math.round(e),t)+"b"}function Vu(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;i1){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 Gu(e){return void 0===e||""===e?"?":e}function Wu(e,t,n){return t=t||0,n=n||" ",String(e).padStart(t,n)}function Zu(e,t){return"function"!=typeof e.slice&&(e=String(e)),e.slice(0,t)}function Ku(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 Qu(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,"
");return $u()(n)}function Xu(e,t){return new Intl.NumberFormat(void 0,"number"==typeof t?{maximumFractionDigits:t}:t).format(e)}function Ju(e){for(var t=0,n=0;n({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:Vu(e.read_bytes/t),rxps:Vu(e.write_bytes/t)},count:{txps:Vu(e.read_count/t),rxps:Vu(e.write_count/t)},alias:void 0!==e.alias?e.alias:null}}));return(0,dc.orderBy)(e,["name"])}}},td=(0,nc.Z)(ed,[["render",function(e,t,n,r,i,s){return li(),pi("section",Du,[s.disks.length>0?(li(),pi("div",Mu,[ju,On(wi("div",Ru,"R/s",512),[[Ds,!s.args.diskio_iops]]),On(wi("div",qu,"W/s",512),[[Ds,!s.args.diskio_iops]]),On(wi("div",Bu,"IOR/s",512),[[Ds,s.args.diskio_iops]]),On(wi("div",Uu,"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",Fu,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))])}]]),nd={key:0,id:"containers-plugin",class:"plugin"},rd=wi("span",{class:"title"},"CONTAINERS",-1),id={class:"table"},sd={class:"table-row"},od=wi("div",{class:"table-cell text-left"},"Engine",-1),ad=wi("div",{class:"table-cell text-left"},"Pod",-1),ld=wi("div",{class:"table-cell"},"Status",-1),cd=wi("div",{class:"table-cell"},"Uptime",-1),ud=Ci('
/MAX
IOR/s
IOW/s
RX/s
TX/s
Command
',6),dd={class:"table-cell text-left"},fd={class:"table-cell text-left"},pd={class:"table-cell text-left"},hd={class:"table-cell"},gd={class:"table-cell"},md={class:"table-cell"},bd={class:"table-cell"},vd={class:"table-cell"},yd={class:"table-cell"},wd={class:"table-cell"},xd={class:"table-cell"},_d={class:"table-cell text-left"};const kd={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}})}}}},Sd=(0,nc.Z)(kd,[["render",function(e,t,n,r,i,s){return s.containers.length?(li(),pi("section",nd,[rd,Si(" "+pe(s.containers.length)+" sorted by "+pe(i.sorter.getColumnLabel(i.sorter.column))+" ",1),wi("div",id,[wi("div",sd,[od,ad,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),ld,cd,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),ud]),(li(!0),pi(ni,null,pr(s.containers,((t,n)=>(li(),pi("div",{class:"table-row",key:n},[wi("div",dd,pe(t.engine),1),wi("div",fd,pe(t.pod_id||"-"),1),wi("div",pd,pe(t.name),1),wi("div",{class:ce(["table-cell","Paused"==t.status?"careful":"ok"])},pe(t.status),3),wi("div",hd,pe(t.uptime),1),wi("div",gd,pe(e.$filters.number(t.cpu_percent,1)),1),wi("div",md,pe(e.$filters.bytes(t.memory_usage)),1),wi("div",bd,pe(e.$filters.bytes(t.limit)),1),wi("div",vd,pe(e.$filters.bytes(t.io_rx)),1),wi("div",yd,pe(e.$filters.bytes(t.io_wx)),1),wi("div",wd,pe(e.$filters.bits(t.network_rx)),1),wi("div",xd,pe(e.$filters.bits(t.network_tx)),1),wi("div",_d,pe(t.command),1)])))),128))])])):Ti("v-if",!0)}]]),Cd={class:"plugin",id:"folders"},Td={key:0,class:"table-row"},Ad=[wi("div",{class:"table-cell text-left title"},"FOLDERS",-1),wi("div",{class:"table-cell"},null,-1),wi("div",{class:"table-cell"},"Size",-1)],Ed={class:"table-cell text-left"},Od=wi("div",{class:"table-cell"},null,-1),Id={key:0,class:"visible-lg-inline"};const Pd={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"}},Nd=(0,nc.Z)(Pd,[["render",function(e,t,n,r,i,s){return li(),pi("section",Cd,[s.folders.length>0?(li(),pi("div",Td,Ad)):Ti("v-if",!0),(li(!0),pi(ni,null,pr(s.folders,((t,n)=>(li(),pi("div",{class:"table-row",key:n},[wi("div",Ed,pe(t.path),1),Od,wi("div",{class:ce(["table-cell",s.getDecoration(t)])},[t.errno>0?(li(),pi("span",Id," ? ")):Ti("v-if",!0),Si(" "+pe(e.$filters.bytes(t.size)),1)],2)])))),128))])}]]),Ld={class:"plugin",id:"fs"},Dd={class:"table-row"},Md=wi("div",{class:"table-cell text-left title"},"FILE SYS",-1),jd={class:"table-cell"},Rd=wi("div",{class:"table-cell"},"Total",-1),qd={class:"table-cell text-left"},Bd={key:0,class:"visible-lg-inline"},Ud={class:"table-cell"};const Fd={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()}}},zd=(0,nc.Z)(Fd,[["render",function(e,t,n,r,i,s){return li(),pi("section",Ld,[wi("div",Dd,[Md,wi("div",jd,[On(wi("span",null,"Used",512),[[Ds,!s.args.fs_free_space]]),On(wi("span",null,"Free",512),[[Ds,s.args.fs_free_space]])]),Rd]),(li(!0),pi(ni,null,pr(s.fileSystems,((t,n)=>(li(),pi("div",{class:"table-row",key:n},[wi("div",qd,[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",Bd," ("+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",Ud,pe(e.$filters.bytes(t.size)),1)])))),128))])}]]),$d={id:"gpu",class:"plugin"},Hd={class:"gpu-name title"},Vd={class:"table"},Gd={key:0,class:"table-row"},Wd=wi("div",{class:"table-cell text-left"},"proc:",-1),Zd={key:1,class:"table-cell"},Kd={key:1,class:"table-row"},Qd=wi("div",{class:"table-cell text-left"},"mem:",-1),Xd={key:1,class:"table-cell"},Jd={key:2,class:"table-row"},Yd=wi("div",{class:"table-cell text-left"},"temperature:",-1),ef={key:1,class:"table-cell"},tf={class:"table-cell text-left"},nf={key:1},rf={key:3},sf={key:5};const of={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)}}},af=(0,nc.Z)(of,[["render",function(e,t,n,r,i,s){return li(),pi("section",$d,[wi("div",Hd,pe(s.name),1),wi("div",Vd,[s.args.meangpu||1===s.gpus.length?(li(),pi("div",Gd,[Wd,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",Zd,"N/A")):Ti("v-if",!0)])):Ti("v-if",!0),s.args.meangpu||1===s.gpus.length?(li(),pi("div",Kd,[Qd,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",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.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",ef,"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",tf,[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",nf,"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",rf,"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",sf,"N/A")):Ti("v-if",!0)])])))),128)):Ti("v-if",!0)])])}]]),lf={key:0,class:"plugin",id:"ip"},cf={key:0,class:"title"},uf={key:1},df={key:2,class:"title"},ff={key:3},pf={key:4};const hf={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}}},gf=(0,nc.Z)(hf,[["render",function(e,t,n,r,i,s){return null!=s.address?(li(),pi("section",lf,[null!=s.address?(li(),pi("span",cf,"IP")):Ti("v-if",!0),null!=s.address?(li(),pi("span",uf,pe(s.address)+"/"+pe(s.maskCdir),1)):Ti("v-if",!0),null!=s.publicAddress?(li(),pi("span",df,"Pub")):Ti("v-if",!0),null!=s.publicAddress?(li(),pi("span",ff,pe(s.publicAddress),1)):Ti("v-if",!0),null!=s.publicInfo?(li(),pi("span",pf,pe(s.publicInfo),1)):Ti("v-if",!0)])):Ti("v-if",!0)}]]),mf={class:"plugin",id:"irq"},bf={key:0,class:"table-row"},vf=[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)],yf={class:"table-cell text-left"},wf=wi("div",{class:"table-cell"},null,-1),xf={class:"table-cell"};const _f={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})))}}},kf=(0,nc.Z)(_f,[["render",function(e,t,n,r,i,s){return li(),pi("section",mf,[s.irqs.length>0?(li(),pi("div",bf,vf)):Ti("v-if",!0),(li(!0),pi(ni,null,pr(s.irqs,((e,t)=>(li(),pi("div",{class:"table-row",key:t},[wi("div",yf,pe(e.irq_line),1),wf,wi("div",xf,[wi("span",null,pe(e.irq_rate),1)])])))),128))])}]]),Sf={key:0,id:"load",class:"plugin"},Cf={class:"table"},Tf={class:"table-row"},Af=wi("div",{class:"table-cell text-left title"},"LOAD",-1),Ef={class:"table-cell"},Of={class:"table-row"},If=wi("div",{class:"table-cell text-left"},"1 min:",-1),Pf={class:"table-cell"},Nf={class:"table-row"},Lf=wi("div",{class:"table-cell text-left"},"5 min:",-1),Df={class:"table-row"},Mf=wi("div",{class:"table-cell text-left"},"15 min:",-1);const jf={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()}}},Rf=(0,nc.Z)(jf,[["render",function(e,t,n,r,i,s){return null!=s.cpucore?(li(),pi("section",Sf,[wi("div",Cf,[wi("div",Tf,[Af,wi("div",Ef,pe(s.cpucore)+"-core",1)]),wi("div",Of,[If,wi("div",Pf,pe(e.$filters.number(s.min1,2)),1)]),wi("div",Nf,[Lf,wi("div",{class:ce(["table-cell",s.getDecoration("min5")])},pe(e.$filters.number(s.min5,2)),3)]),wi("div",Df,[Mf,wi("div",{class:ce(["table-cell",s.getDecoration("min15")])},pe(e.$filters.number(s.min15,2)),3)])])])):Ti("v-if",!0)}]]),qf={id:"mem",class:"plugin"},Bf={class:"table"},Uf={class:"table-row"},Ff=wi("div",{class:"table-cell text-left title"},"MEM",-1),zf={class:"table-row"},$f=wi("div",{class:"table-cell text-left"},"total:",-1),Hf={class:"table-cell"},Vf={class:"table-row"},Gf=wi("div",{class:"table-cell text-left"},"used:",-1),Wf={class:"table-row"},Zf=wi("div",{class:"table-cell text-left"},"free:",-1),Kf={class:"table-cell"};const Qf={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()}}},Xf=(0,nc.Z)(Qf,[["render",function(e,t,n,r,i,s){return li(),pi("section",qf,[wi("div",Bf,[wi("div",Uf,[Ff,wi("div",{class:ce(["table-cell",s.getDecoration("percent")])},pe(s.percent)+"%",3)]),wi("div",zf,[$f,wi("div",Hf,pe(e.$filters.bytes(s.total)),1)]),wi("div",Vf,[Gf,wi("div",{class:ce(["table-cell",s.getDecoration("used")])},pe(e.$filters.bytes(s.used,2)),3)]),wi("div",Wf,[Zf,wi("div",Kf,pe(e.$filters.bytes(s.free)),1)])])])}]]),Jf={id:"mem-more",class:"plugin"},Yf={class:"table"},ep={class:"table-row"},tp=wi("div",{class:"table-cell text-left"},"active:",-1),np={class:"table-cell"},rp={class:"table-row"},ip=wi("div",{class:"table-cell text-left"},"inactive:",-1),sp={class:"table-cell"},op={class:"table-row"},ap=wi("div",{class:"table-cell text-left"},"buffers:",-1),lp={class:"table-cell"},cp={class:"table-row"},up=wi("div",{class:"table-cell text-left"},"cached:",-1),dp={class:"table-cell"};const fp={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}}},pp=(0,nc.Z)(fp,[["render",function(e,t,n,r,i,s){return li(),pi("section",Jf,[wi("div",Yf,[On(wi("div",ep,[tp,wi("div",np,pe(e.$filters.bytes(s.active)),1)],512),[[Ds,null!=s.active]]),On(wi("div",rp,[ip,wi("div",sp,pe(e.$filters.bytes(s.inactive)),1)],512),[[Ds,null!=s.inactive]]),On(wi("div",op,[ap,wi("div",lp,pe(e.$filters.bytes(s.buffers)),1)],512),[[Ds,null!=s.buffers]]),On(wi("div",cp,[up,wi("div",dp,pe(e.$filters.bytes(s.cached)),1)],512),[[Ds,null!=s.cached]])])])}]]),hp={id:"memswap",class:"plugin"},gp={class:"table"},mp={class:"table-row"},bp=wi("div",{class:"table-cell text-left title"},"SWAP",-1),vp={class:"table-row"},yp=wi("div",{class:"table-cell text-left"},"total:",-1),wp={class:"table-cell"},xp={class:"table-row"},_p=wi("div",{class:"table-cell text-left"},"used:",-1),kp={class:"table-row"},Sp=wi("div",{class:"table-cell text-left"},"free:",-1),Cp={class:"table-cell"};const Tp={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()}}},Ap=(0,nc.Z)(Tp,[["render",function(e,t,n,r,i,s){return li(),pi("section",hp,[wi("div",gp,[wi("div",mp,[bp,wi("div",{class:ce(["table-cell",s.getDecoration("percent")])},pe(s.percent)+"%",3)]),wi("div",vp,[yp,wi("div",wp,pe(e.$filters.bytes(s.total)),1)]),wi("div",xp,[_p,wi("div",{class:ce(["table-cell",s.getDecoration("used")])},pe(e.$filters.bytes(s.used)),3)]),wi("div",kp,[Sp,wi("div",Cp,pe(e.$filters.bytes(s.free)),1)])])])}]]),Ep={class:"plugin",id:"network"},Op={class:"table-row"},Ip=wi("div",{class:"table-cell text-left title"},"NETWORK",-1),Pp={class:"table-cell"},Np={class:"table-cell"},Lp={class:"table-cell"},Dp={class:"table-cell"},Mp={class:"table-cell"},jp={class:"table-cell"},Rp={class:"table-cell"},qp={class:"table-cell"},Bp={class:"table-cell text-left"},Up={class:"visible-lg-inline"},Fp={class:"hidden-lg"},zp={class:"table-cell"},$p={class:"table-cell"};const Hp={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,rx:e.rx,tx:e.tx,cx:e.cx,time_since_update:e.time_since_update,cumulativeRx:e.cumulative_rx,cumulativeTx:e.cumulative_tx,cumulativeCx:e.cumulative_cx}}));return(0,dc.orderBy)(e,["interfaceName"])}}},Vp=(0,nc.Z)(Hp,[["render",function(e,t,n,r,i,s){return li(),pi("section",Ep,[wi("div",Op,[Ip,On(wi("div",Pp,"Rx/s",512),[[Ds,!s.args.network_cumul&&!s.args.network_sum]]),On(wi("div",Np,"Tx/s",512),[[Ds,!s.args.network_cumul&&!s.args.network_sum]]),On(wi("div",Lp,null,512),[[Ds,!s.args.network_cumul&&s.args.network_sum]]),On(wi("div",Dp,"Rx+Tx/s",512),[[Ds,!s.args.network_cumul&&s.args.network_sum]]),On(wi("div",Mp,"Rx",512),[[Ds,s.args.network_cumul&&!s.args.network_sum]]),On(wi("div",jp,"Tx",512),[[Ds,s.args.network_cumul&&!s.args.network_sum]]),On(wi("div",Rp,null,512),[[Ds,s.args.network_cumul&&s.args.network_sum]]),On(wi("div",qp,"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",Bp,[wi("span",Up,pe(t.ifname),1),wi("span",Fp,pe(e.$filters.minSize(t.ifname)),1)]),On(wi("div",{class:"table-cell"},pe(s.args.byte?e.$filters.bytes(t.rx/t.time_since_update):e.$filters.bits(t.rx/t.time_since_update)),513),[[Ds,!s.args.network_cumul&&!s.args.network_sum]]),On(wi("div",{class:"table-cell"},pe(s.args.byte?e.$filters.bytes(t.tx/t.time_since_update):e.$filters.bits(t.tx/t.time_since_update)),513),[[Ds,!s.args.network_cumul&&!s.args.network_sum]]),On(wi("div",zp,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.cx/t.time_since_update):e.$filters.bits(t.cx/t.time_since_update)),513),[[Ds,!s.args.network_cumul&&s.args.network_sum]]),On(wi("div",{class:"table-cell"},pe(s.args.byte?e.$filters.bytes(t.cumulativeRx):e.$filters.bits(t.cumulativeRx)),513),[[Ds,s.args.network_cumul&&!s.args.network_sum]]),On(wi("div",{class:"table-cell"},pe(s.args.byte?e.$filters.bytes(t.cumulativeTx):e.$filters.bits(t.cumulativeTx)),513),[[Ds,s.args.network_cumul&&!s.args.network_sum]]),On(wi("div",$p,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.cumulativeCx):e.$filters.bits(t.cumulativeCx)),513),[[Ds,s.args.network_cumul&&s.args.network_sum]])])))),128))])}]]),Gp={id:"now",class:"plugin"},Wp={class:"table-row"},Zp={class:"table-cell text-left"};const Kp={props:{data:{type:Object}},computed:{value(){return this.data.stats.now}}},Qp=(0,nc.Z)(Kp,[["render",function(e,t,n,r,i,s){return li(),pi("section",Gp,[wi("div",Wp,[wi("div",Zp,pe(s.value),1)])])}]]),Xp={id:"percpu",class:"plugin"},Jp={class:"table-row"},Yp={class:"table-cell text-left title"},eh={key:0},th={class:"table-row"},nh=wi("div",{class:"table-cell text-left"},"user:",-1),rh={class:"table-row"},ih=wi("div",{class:"table-cell text-left"},"system:",-1),sh={class:"table-row"},oh=wi("div",{class:"table-cell text-left"},"idle:",-1),ah={key:0,class:"table-row"},lh=wi("div",{class:"table-cell text-left"},"iowait:",-1),ch={key:1,class:"table-row"},uh=wi("div",{class:"table-cell text-left"},"steal:",-1);const dh={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)}},fh=(0,nc.Z)(dh,[["render",function(e,t,n,r,i,s){return li(),pi("section",Xp,[(li(!0),pi(ni,null,pr(s.cpusChunks,((e,t)=>(li(),pi("div",{class:"table",key:t},[wi("div",Jp,[wi("div",Yp,[0===t?(li(),pi("span",eh,"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",th,[nh,(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",rh,[ih,(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",sh,[oh,(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",ah,[lh,(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",ch,[uh,(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))])}]]),ph={class:"plugin",id:"ports"},hh={class:"table-cell text-left"},gh=wi("div",{class:"table-cell"},null,-1),mh={key:0},bh={key:1},vh={key:2},yh={key:3},wh={key:0},xh={key:1},_h={key:2};const kh={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.status>e.rtt_warning?"warning":"ok",getWebDecoration:e=>null===e.status?"careful":-1===[200,301,302].indexOf(e.status)?"critical":null!==e.rtt_warning&&e.elapsed>e.rtt_warning?"warning":"ok"}},Sh=(0,nc.Z)(kh,[["render",function(e,t,n,r,i,s){return li(),pi("section",ph,[(li(!0),pi(ni,null,pr(s.ports,((t,n)=>(li(),pi("div",{class:"table-row",key:n},[wi("div",hh,[Ti(" prettier-ignore "),Si(" "+pe(e.$filters.minSize(t.description?t.description:t.host+" "+t.port,20)),1)]),gh,t.host?(li(),pi("div",{key:0,class:ce([s.getPortDecoration(t),"table-cell"])},["null"==t.status?(li(),pi("span",mh,"Scanning")):"false"==t.status?(li(),pi("span",bh,"Timeout")):"true"==t.status?(li(),pi("span",vh,"Open")):(li(),pi("span",yh,pe(e.$filters.number(1e3*t.status,0))+"ms",1))],2)):Ti("v-if",!0),t.url?(li(),pi("div",{key:1,class:ce([s.getWebDecoration(t),"table-cell"])},["null"==t.status?(li(),pi("span",wh,"Scanning")):"Error"==t.status?(li(),pi("span",xh,"Error")):(li(),pi("span",_h,"Code "+pe(t.status),1))],2)):Ti("v-if",!0)])))),128))])}]]),Ch={key:0},Th={key:1},Ah={key:0,class:"row"},Eh={class:"col-lg-18"};const Oh={id:"amps",class:"plugin"},Ih={class:"table"},Ph={key:0,class:"table-cell text-left"},Nh=["innerHTML"];const Lh={props:{data:{type:Object}},computed:{stats(){return this.data.stats.amps},processes(){return this.stats.filter((e=>null!==e.result))}},methods:{getNameDecoration(e){const t=e.count,n=e.countmin,r=e.countmax;let i="ok";return i=t>0?(null===n||t>=n)&&(null===r||t<=r)?"ok":"careful":null===n?"ok":"critical",i}}},Dh=(0,nc.Z)(Lh,[["render",function(e,t,n,r,i,s){return li(),pi("section",Oh,[wi("div",Ih,[(li(!0),pi(ni,null,pr(s.processes,((t,n)=>(li(),pi("div",{class:"table-row",key:n},[wi("div",{class:ce(["table-cell text-left",s.getNameDecoration(t)])},pe(t.name),3),t.regex?(li(),pi("div",Ph,pe(t.count),1)):Ti("v-if",!0),wi("div",{class:"table-cell text-left process-result",innerHTML:e.$filters.nl2br(t.result)},null,8,Nh)])))),128))])])}]]),Mh={id:"processcount",class:"plugin"},jh=wi("span",{class:"title"},"TASKS",-1),Rh={class:"title"};const qh={props:{data:{type:Object},sorter:{type:Object}},data:()=>({store:Uo}),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}}},Bh=(0,nc.Z)(qh,[["render",function(e,t,n,r,i,s){return li(),pi("section",Mh,[jh,wi("span",null,pe(s.total)+" ("+pe(s.thread)+" thr),",1),wi("span",null,pe(s.running)+" run,",1),wi("span",null,pe(s.sleeping)+" slp,",1),wi("span",null,pe(s.stopped)+" oth",1),wi("span",null,pe(s.args.programs?"Programs":"Threads"),1),wi("span",Rh,pe(n.sorter.auto?"sorted automatically":"sorted"),1),wi("span",null,"by "+pe(n.sorter.getColumnLabel(n.sorter.column)),1)])}]]),Uh={id:"processlist-plugin",class:"plugin"},Fh={class:"table"},zh={class:"table-row"},$h=wi("div",{class:"table-cell width-80 hidden-xs hidden-sm"},"VIRT",-1),Hh=wi("div",{class:"table-cell width-80 hidden-xs hidden-sm"},"RES",-1),Vh=wi("div",{class:"table-cell width-80"},"PID",-1),Gh=wi("div",{class:"table-cell width-60"},"NI",-1),Wh=wi("div",{class:"table-cell width-60"},"S",-1),Zh={class:"table-cell width-80"},Kh={class:"table-cell width-80"},Qh={class:"table-cell width-80"},Xh={class:"table-cell width-100 text-left"},Jh={key:0,class:"table-cell width-100 hidden-xs hidden-sm"},Yh={key:1,class:"table-cell width-80 hidden-xs hidden-sm"},eg={class:"table-cell width-80 text-left hidden-xs hidden-sm"};const tg={props:{data:{type:Object},sorter:{type:Object}},data:()=>({store:Uo}),computed:{args(){return this.store.args||{}},config(){return this.store.config||{}},stats(){return this.data.stats.processlist},processes(){const{sorter:e}=this,t=this.data.stats.isWindows,n=(this.stats||[]).map((e=>(e.memvirt="?",e.memres="?",e.memory_info&&(e.memvirt=e.memory_info.vms,e.memres=e.memory_info.rss),t&&null!==e.username&&(e.username=(0,dc.last)(e.username.split("\\"))),e.timeplus="?",e.timemillis="?",e.cpu_times&&(e.timeplus=Yu(e.cpu_times),e.timemillis=Ju(e.cpu_times)),null===e.num_threads&&(e.num_threads=-1),null===e.cpu_percent&&(e.cpu_percent=-1),null===e.memory_percent&&(e.memory_percent=-1),e.io_read=null,e.io_write=null,e.io_counters&&(e.io_read=(e.io_counters[0]-e.io_counters[2])/e.time_since_update,e.io_write=(e.io_counters[1]-e.io_counters[3])/e.time_since_update),e.isNice=void 0!==e.nice&&(t&&32!=e.nice||!t&&0!=e.nice),Array.isArray(e.cmdline)&&(e.cmdline=e.cmdline.join(" ").replace(/\n/g," ")),null!==e.cmdline&&0!==e.cmdline.length||(e.cmdline=e.name),e)));return(0,dc.orderBy)(n,[e.column].reduce(((e,t)=>("io_counters"===t&&(t=["io_read","io_write"]),e.concat(t))),[]),[e.isReverseColumn(e.column)?"desc":"asc"]).slice(0,this.limit)},ioReadWritePresent(){return(this.stats||[]).some((({io_counters:e})=>e))},limit(){return void 0!==this.config.outputs?this.config.outputs.max_processes_display:void 0}},methods:{getCpuPercentAlert:e=>$o.getAlert("processlist","processlist_cpu_",e.cpu_percent),getMemoryPercentAlert:e=>$o.getAlert("processlist","processlist_mem_",e.cpu_percent)}},ng={components:{GlancesPluginAmps:Dh,GlancesPluginProcesscount:Bh,GlancesPluginProcesslist:(0,nc.Z)(tg,[["render",function(e,t,n,r,i,s){return li(),pi(ni,null,[Ti(" prettier-ignore "),wi("section",Uh,[wi("div",Fh,[wi("div",zh,[wi("div",{class:ce(["table-cell width-60",["sortable","cpu_percent"===n.sorter.column&&"sort"]]),onClick:t[0]||(t[0]=t=>e.$emit("update:sorter","cpu_percent"))}," CPU% ",2),wi("div",{class:ce(["table-cell width-60",["sortable","memory_percent"===n.sorter.column&&"sort"]]),onClick:t[1]||(t[1]=t=>e.$emit("update:sorter","memory_percent"))}," MEM% ",2),$h,Hh,Vh,wi("div",{class:ce(["table-cell width-100 text-left",["sortable","username"===n.sorter.column&&"sort"]]),onClick:t[2]||(t[2]=t=>e.$emit("update:sorter","username"))}," USER ",2),wi("div",{class:ce(["table-cell width-100 hidden-xs hidden-sm",["sortable","timemillis"===n.sorter.column&&"sort"]]),onClick:t[3]||(t[3]=t=>e.$emit("update:sorter","timemillis"))}," TIME+ ",2),wi("div",{class:ce(["table-cell width-80 text-left hidden-xs hidden-sm",["sortable","num_threads"===n.sorter.column&&"sort"]]),onClick:t[4]||(t[4]=t=>e.$emit("update:sorter","num_threads"))}," THR ",2),Gh,Wh,On(wi("div",{class:ce(["table-cell width-80 hidden-xs hidden-sm",["sortable","io_counters"===n.sorter.column&&"sort"]]),onClick:t[5]||(t[5]=t=>e.$emit("update:sorter","io_counters"))}," IOR/s ",2),[[Ds,s.ioReadWritePresent]]),On(wi("div",{class:ce(["table-cell width-80 text-left hidden-xs hidden-sm",["sortable","io_counters"===n.sorter.column&&"sort"]]),onClick:t[6]||(t[6]=t=>e.$emit("update:sorter","io_counters"))}," IOW/s ",2),[[Ds,s.ioReadWritePresent]]),wi("div",{class:ce(["table-cell text-left",["sortable","name"===n.sorter.column&&"sort"]]),onClick:t[7]||(t[7]=t=>e.$emit("update:sorter","name"))}," Command ",2)]),(li(!0),pi(ni,null,pr(s.processes,((t,n)=>(li(),pi("div",{class:"table-row",key:n},[wi("div",{class:ce(["table-cell width-60",s.getCpuPercentAlert(t)])},pe(-1==t.cpu_percent?"?":e.$filters.number(t.cpu_percent,1)),3),wi("div",{class:ce(["table-cell width-60",s.getMemoryPercentAlert(t)])},pe(-1==t.memory_percent?"?":e.$filters.number(t.memory_percent,1)),3),wi("div",Zh,pe(e.$filters.bytes(t.memvirt)),1),wi("div",Kh,pe(e.$filters.bytes(t.memres)),1),wi("div",Qh,pe(t.pid),1),wi("div",Xh,pe(t.username),1),"?"!=t.timeplus?(li(),pi("div",Jh,[On(wi("span",{class:"highlight"},pe(t.timeplus.hours)+"h",513),[[Ds,t.timeplus.hours>0]]),Si(" "+pe(e.$filters.leftPad(t.timeplus.minutes,2,"0"))+":"+pe(e.$filters.leftPad(t.timeplus.seconds,2,"0"))+" ",1),On(wi("span",null,"."+pe(e.$filters.leftPad(t.timeplus.milliseconds,2,"0")),513),[[Ds,t.timeplus.hours<=0]])])):Ti("v-if",!0),"?"==t.timeplus?(li(),pi("div",Yh,"?")):Ti("v-if",!0),wi("div",eg,pe(-1==t.num_threads?"?":t.num_threads),1),wi("div",{class:ce(["table-cell width-60",{nice:t.isNice}])},pe(e.$filters.exclamation(t.nice)),3),wi("div",{class:ce(["table-cell width-60",{status:"R"==t.status}])},pe(t.status),3),On(wi("div",{class:"table-cell width-80 hidden-xs hidden-sm"},pe(e.$filters.bytes(t.io_read)),513),[[Ds,s.ioReadWritePresent]]),On(wi("div",{class:"table-cell width-80 text-left hidden-xs hidden-sm"},pe(e.$filters.bytes(t.io_write)),513),[[Ds,s.ioReadWritePresent]]),On(wi("div",{class:"table-cell text-left"},pe(t.name),513),[[Ds,s.args.process_short_name]]),On(wi("div",{class:"table-cell text-left"},pe(t.cmdline),513),[[Ds,!s.args.process_short_name]])])))),128))])])],2112)}]])},props:{data:{type:Object}},data:()=>({store:Uo,sorter:void 0}),computed:{args(){return this.store.args||{}},sortProcessesKey(){return this.args.sort_processes_key}},watch:{sortProcessesKey:{immediate:!0,handler(e){e&&!["cpu_percent","memory_percent","username","timemillis","num_threads","io_counters","name"].includes(e)||(this.sorter={column:this.args.sort_processes_key||"cpu_percent",auto:!this.args.sort_processes_key,isReverseColumn:function(e){return!["username","name"].includes(e)},getColumnLabel:function(e){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"}[e]||e}})}}}},rg=(0,nc.Z)(ng,[["render",function(e,t,n,r,i,s){const o=cr("glances-plugin-processcount"),a=cr("glances-plugin-amps"),l=cr("glances-plugin-processlist");return s.args.disable_process?(li(),pi("div",Ch,"PROCESSES DISABLED (press 'z' to display)")):(li(),pi("div",Th,[xi(o,{sorter:i.sorter,data:n.data},null,8,["sorter","data"]),s.args.disable_amps?Ti("v-if",!0):(li(),pi("div",Ah,[wi("div",Eh,[xi(a,{data:n.data},null,8,["data"])])])),xi(l,{sorter:i.sorter,data:n.data,"onUpdate:sorter":t[0]||(t[0]=e=>s.args.sort_processes_key=e)},null,8,["sorter","data"])]))}]]),ig={id:"quicklook",class:"plugin"},sg={class:"cpu-name"},og={class:"table"},ag={key:0,class:"table-row"},lg=wi("div",{class:"table-cell text-left"},"CPU",-1),cg={class:"table-cell"},ug={class:"progress"},dg=["aria-valuenow"],fg={class:"table-cell"},pg={class:"table-cell text-left"},hg={class:"table-cell"},gg={class:"progress"},mg=["aria-valuenow"],bg={class:"table-cell"},vg={class:"table-row"},yg=wi("div",{class:"table-cell text-left"},"MEM",-1),wg={class:"table-cell"},xg={class:"progress"},_g=["aria-valuenow"],kg={class:"table-cell"},Sg={class:"table-row"},Cg=wi("div",{class:"table-cell text-left"},"LOAD",-1),Tg={class:"table-cell"},Ag={class:"progress"},Eg=["aria-valuenow"],Og={class:"table-cell"};const Ig={props:{data:{type:Object}},data:()=>({store:Uo}),computed:{args(){return this.store.args||{}},stats(){return this.data.stats.quicklook},view(){return this.data.views.quicklook},mem(){return this.stats.mem},load(){return this.stats.load},cpu(){return this.stats.cpu},cpu_name(){return this.stats.cpu_name},cpu_hz_current(){return this.stats.cpu_hz_current},cpu_hz(){return this.stats.cpu_hz},swap(){return this.stats.swap},percpus(){return this.stats.percpu.map((({cpu_number:e,total:t})=>({number:e,total:t})))}},methods:{getDecoration(e){if(void 0!==this.view[e])return this.view[e].decoration.toLowerCase()}}},Pg=(0,nc.Z)(Ig,[["render",function(e,t,n,r,i,s){return li(),pi("section",ig,[wi("div",sg,pe(s.cpu_name),1),wi("div",og,[s.args.percpu?Ti("v-if",!0):(li(),pi("div",ag,[lg,wi("div",cg,[wi("div",ug,[wi("div",{class:ce(`progress-bar progress-bar-${s.getDecoration("cpu")}`),role:"progressbar","aria-valuenow":s.cpu,"aria-valuemin":"0","aria-valuemax":"100",style:ie(`width: ${s.cpu}%;`)},"   ",14,dg)])]),wi("div",fg,pe(s.cpu)+"%",1)])),s.args.percpu?(li(!0),pi(ni,{key:1},pr(s.percpus,((e,t)=>(li(),pi("div",{class:"table-row",key:t},[wi("div",pg,"CPU"+pe(e.number),1),wi("div",hg,[wi("div",gg,[wi("div",{class:ce(`progress-bar progress-bar-${s.getDecoration("cpu")}`),role:"progressbar","aria-valuenow":e.total,"aria-valuemin":"0","aria-valuemax":"100",style:ie(`width: ${e.total}%;`)},"   ",14,mg)])]),wi("div",bg,pe(e.total)+"%",1)])))),128)):Ti("v-if",!0),wi("div",vg,[yg,wi("div",wg,[wi("div",xg,[wi("div",{class:ce(`progress-bar progress-bar-${s.getDecoration("mem")}`),role:"progressbar","aria-valuenow":s.mem,"aria-valuemin":"0","aria-valuemax":"100",style:ie(`width: ${s.mem}%;`)},"   ",14,_g)])]),wi("div",kg,pe(s.mem)+"%",1)]),wi("div",Sg,[Cg,wi("div",Tg,[wi("div",Ag,[wi("div",{class:ce(`progress-bar progress-bar-${s.getDecoration("load")}`),role:"progressbar","aria-valuenow":s.load,"aria-valuemin":"0","aria-valuemax":"100",style:ie(`width: ${s.load}%;`)},"   ",14,Eg)])]),wi("div",Og,pe(s.load)+"%",1)])])])}]]),Ng={class:"plugin",id:"raid"},Lg={key:0,class:"table-row"},Dg=[wi("div",{class:"table-cell text-left title"},"RAID disks",-1),wi("div",{class:"table-cell"},"Used",-1),wi("div",{class:"table-cell"},"Total",-1)],Mg={class:"table-cell text-left"},jg={class:"warning"};const Rg={props:{data:{type:Object}},computed:{stats(){return this.data.stats.raid},disks(){const e=Object.entries(this.stats).map((([e,t])=>{const n=Object.entries(t.components).map((([e,t])=>({number:t,name:e})));return{name:e,type:null==t.type?"UNKNOWN":t.type,used:t.used,available:t.available,status:t.status,degraded:t.used0}},methods:{getAlert:e=>e.inactive?"critical":e.degraded?"warning":"ok"}},qg=(0,nc.Z)(Rg,[["render",function(e,t,n,r,i,s){return li(),pi("section",Ng,[s.hasDisks?(li(),pi("div",Lg,Dg)):Ti("v-if",!0),(li(!0),pi(ni,null,pr(s.disks,((e,t)=>(li(),pi("div",{class:"table-row",key:t},[wi("div",Mg,[Si(pe(e.type.toUppercase())+" "+pe(e.name)+" ",1),On(wi("div",jg,"└─ Degraded mode",512),[[Ds,e.degraded]]),On(wi("div",null,"   └─ "+pe(e.config),513),[[Ds,e.degraded]]),On(wi("div",{class:"critical"},"└─ Status "+pe(e.status),513),[[Ds,e.inactive]]),e.inactive?(li(!0),pi(ni,{key:0},pr(e.components,((t,n)=>(li(),pi("div",{key:n},"    "+pe(n===e.components.length-1?"└─":"├─")+" disk "+pe(t.number)+": "+pe(t.name),1)))),128)):Ti("v-if",!0)]),On(wi("div",{class:ce(["table-cell",s.getAlert(e)])},pe(e.used),3),[[Ds,!e.inactive]]),On(wi("div",{class:ce(["table-cell",s.getAlert(e)])},pe(e.available),3),[[Ds,!e.inactive]])])))),128))])}]]),Bg={id:"smart",class:"plugin"},Ug=wi("div",{class:"table-row"},[wi("div",{class:"table-cell text-left title"},"SMART disks"),wi("div",{class:"table-cell"}),wi("div",{class:"table-cell"})],-1),Fg={class:"table-row"},zg={class:"table-cell text-left text-truncate"},$g=wi("div",{class:"table-cell"},null,-1),Hg=wi("div",{class:"table-cell"},null,-1),Vg={class:"table-cell text-left"},Gg=wi("div",{class:"table-cell"},null,-1),Wg={class:"table-cell text-truncate"};const Zg={props:{data:{type:Object}},computed:{stats(){return this.data.stats.smart},drives(){return(Array.isArray(this.stats)?this.stats:[]).map((e=>{const t=e.DeviceName,n=Object.entries(e).filter((([e])=>"DeviceName"!==e)).sort((([,e],[,t])=>e.namet.name?1:0)).map((([e,t])=>t));return{name:t,details:n}}))}}},Kg=(0,nc.Z)(Zg,[["render",function(e,t,n,r,i,s){return li(),pi("section",Bg,[Ug,(li(!0),pi(ni,null,pr(s.drives,((e,t)=>(li(),pi(ni,{key:t},[wi("div",Fg,[wi("div",zg,pe(e.name),1),$g,Hg]),(li(!0),pi(ni,null,pr(e.details,((e,t)=>(li(),pi("div",{key:t,class:"table-row"},[wi("div",Vg,"  "+pe(e.name),1),Gg,wi("div",Wg,[wi("span",null,pe(e.raw),1)])])))),128))],64)))),128))])}]]),Qg={class:"plugin",id:"sensors"},Xg={key:0,class:"table-row"},Jg=[wi("div",{class:"table-cell text-left title"},"SENSORS",-1)],Yg={class:"table-cell text-left"},em={class:"table-cell"};const tm={props:{data:{type:Object}},data:()=>({store:Uo}),computed:{args(){return this.store.args||{}},stats(){return this.data.stats.sensors},sensors(){return this.stats.filter((e=>!(Array.isArray(e.value)&&0===e.value.length||0===e.value))).map((e=>(this.args.fahrenheit&&"battery"!=e.type&&"fan_speed"!=e.type&&(e.value=parseFloat(1.8*e.value+32).toFixed(1),e.unit="F"),e)))}},methods:{getAlert(e){const t="battery"==e.type?100-e.value:e.value;return $o.getAlert("sensors","sensors_"+e.type+"_",t)}}},nm=(0,nc.Z)(tm,[["render",function(e,t,n,r,i,s){return li(),pi("section",Qg,[s.sensors.length>0?(li(),pi("div",Xg,Jg)):Ti("v-if",!0),(li(!0),pi(ni,null,pr(s.sensors,((e,t)=>(li(),pi("div",{class:"table-row",key:t},[wi("div",Yg,pe(e.label),1),wi("div",em,pe(e.unit),1),wi("div",{class:ce(["table-cell",s.getAlert(e)])},pe(e.value),3)])))),128))])}]]),rm={class:"plugin",id:"system"},im={key:0,class:"critical"},sm={class:"title"},om={key:1,class:"hidden-xs hidden-sm"},am={key:2,class:"hidden-xs hidden-sm"};const lm={props:{data:{type:Object}},data:()=>({store:Uo}),computed:{stats(){return this.data.stats.system},isLinux(){return this.data.isLinux},hostname(){return this.stats.hostname},platform(){return this.stats.platform},os(){return{name:this.stats.os_name,version:this.stats.os_version}},humanReadableName(){return this.stats.hr_name},isDisconnected(){return"FAILURE"===this.store.status}}},cm=(0,nc.Z)(lm,[["render",function(e,t,n,r,i,s){return li(),pi("section",rm,[s.isDisconnected?(li(),pi("span",im,"Disconnected from")):Ti("v-if",!0),wi("span",sm,pe(s.hostname),1),s.isLinux?(li(),pi("span",om," ("+pe(s.humanReadableName)+" / "+pe(s.os.name)+" "+pe(s.os.version)+") ",1)):Ti("v-if",!0),s.isLinux?Ti("v-if",!0):(li(),pi("span",am," ("+pe(s.os.name)+" "+pe(s.os.version)+" "+pe(s.platform)+") ",1))])}]]),um={class:"plugin",id:"uptime"};const dm={props:{data:{type:Object}},computed:{value(){return this.data.stats.uptime}}},fm=(0,nc.Z)(dm,[["render",function(e,t,n,r,i,s){return li(),pi("section",um,[wi("span",null,"Uptime: "+pe(s.value),1)])}]]),pm={class:"plugin",id:"wifi"},hm={key:0,class:"table-row"},gm=[wi("div",{class:"table-cell text-left title"},"WIFI",-1),wi("div",{class:"table-cell"},null,-1),wi("div",{class:"table-cell"},"dBm",-1)],mm={class:"table-cell text-left"},bm=wi("div",{class:"table-cell"},null,-1);const vm={props:{data:{type:Object}},computed:{stats(){return this.data.stats.wifi},view(){return this.data.views.wifi},hotspots(){const e=this.stats.map((e=>{if(""!==e.ssid)return{ssid:e.ssid,signal:e.signal,security:e.security}})).filter(Boolean);return(0,dc.orderBy)(e,["ssid"])}},methods:{getDecoration(e,t){if(void 0!==this.view[e.ssid][t])return this.view[e.ssid][t].decoration.toLowerCase()}}},ym=(0,nc.Z)(vm,[["render",function(e,t,n,r,i,s){return li(),pi("section",pm,[s.hotspots.length>0?(li(),pi("div",hm,gm)):Ti("v-if",!0),(li(!0),pi(ni,null,pr(s.hotspots,((t,n)=>(li(),pi("div",{class:"table-row",key:n},[wi("div",mm,[Si(pe(e.$filters.limitTo(t.ssid,20))+" ",1),wi("span",null,pe(t.security),1)]),bm,wi("div",{class:ce(["table-cell",s.getDecoration(t,"signal")])},pe(t.signal),3)])))),128))])}]]),wm=JSON.parse('{"t":["network","wifi","connections","ports","diskio","fs","irq","folders","raid","smart","sensors","now"]}'),xm={components:{GlancesHelp:rc,GlancesPluginAlert:pc,GlancesPluginCloud:bc,GlancesPluginConnections:Uc,GlancesPluginCpu:Lu,GlancesPluginDiskio:td,GlancesPluginContainers:Sd,GlancesPluginFolders:Nd,GlancesPluginFs:zd,GlancesPluginGpu:af,GlancesPluginIp:gf,GlancesPluginIrq:kf,GlancesPluginLoad:Rf,GlancesPluginMem:Xf,GlancesPluginMemMore:pp,GlancesPluginMemswap:Ap,GlancesPluginNetwork:Vp,GlancesPluginNow:Qp,GlancesPluginPercpu:fh,GlancesPluginPorts:Sh,GlancesPluginProcess:rg,GlancesPluginQuicklook:Pg,GlancesPluginRaid:qg,GlancesPluginSensors:nm,GlancesPluginSmart:Kg,GlancesPluginSystem:cm,GlancesPluginUptime:fm,GlancesPluginWifi:ym},data:()=>({store:Uo}),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:e}=this,t=e.stats&&e.stats.system&&e.stats.system.hostname||"";return t?`${t} - Glances`:"Glances"},leftMenu(){return void 0!==this.config.outputs.left_menu?this.config.outputs.left_menu.split(","):wm.t}},watch:{title(){document&&(document.title=this.title)}},methods:{setupHotKeys(){jo("a",(()=>{this.store.args.sort_processes_key=null})),jo("c",(()=>{this.store.args.sort_processes_key="cpu_percent"})),jo("m",(()=>{this.store.args.sort_processes_key="memory_percent"})),jo("u",(()=>{this.store.args.sort_processes_key="username"})),jo("p",(()=>{this.store.args.sort_processes_key="name"})),jo("i",(()=>{this.store.args.sort_processes_key="io_counters"})),jo("t",(()=>{this.store.args.sort_processes_key="timemillis"})),jo("shift+A",(()=>{this.store.args.disable_amps=!this.store.args.disable_amps})),jo("d",(()=>{this.store.args.disable_diskio=!this.store.args.disable_diskio})),jo("shift+Q",(()=>{this.store.args.enable_irq=!this.store.args.enable_irq})),jo("f",(()=>{this.store.args.disable_fs=!this.store.args.disable_fs})),jo("j",(()=>{this.store.args.programs=!this.store.args.programs})),jo("k",(()=>{this.store.args.disable_connections=!this.store.args.disable_connections})),jo("n",(()=>{this.store.args.disable_network=!this.store.args.disable_network})),jo("s",(()=>{this.store.args.disable_sensors=!this.store.args.disable_sensors})),jo("2",(()=>{this.store.args.disable_left_sidebar=!this.store.args.disable_left_sidebar})),jo("z",(()=>{this.store.args.disable_process=!this.store.args.disable_process})),jo("shift+S",(()=>{this.store.args.process_short_name=!this.store.args.process_short_name})),jo("shift+D",(()=>{this.store.args.disable_containers=!this.store.args.disable_containers})),jo("b",(()=>{this.store.args.byte=!this.store.args.byte})),jo("shift+B",(()=>{this.store.args.diskio_iops=!this.store.args.diskio_iops})),jo("l",(()=>{this.store.args.disable_alert=!this.store.args.disable_alert})),jo("1",(()=>{this.store.args.percpu=!this.store.args.percpu})),jo("h",(()=>{this.store.args.help_tag=!this.store.args.help_tag})),jo("shift+T",(()=>{this.store.args.network_sum=!this.store.args.network_sum})),jo("shift+U",(()=>{this.store.args.network_cumul=!this.store.args.network_cumul})),jo("shift+F",(()=>{this.store.args.fs_free_space=!this.store.args.fs_free_space})),jo("3",(()=>{this.store.args.disable_quicklook=!this.store.args.disable_quicklook})),jo("6",(()=>{this.store.args.meangpu=!this.store.args.meangpu})),jo("shift+G",(()=>{this.store.args.disable_gpu=!this.store.args.disable_gpu})),jo("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})),jo("shift+I",(()=>{this.store.args.disable_ip=!this.store.args.disable_ip})),jo("shift+P",(()=>{this.store.args.disable_ports=!this.store.args.disable_ports})),jo("shift+W",(()=>{this.store.args.disable_wifi=!this.store.args.disable_wifi}))}},mounted(){const e=window.__GLANCES__||{},t=isFinite(e["refresh-time"])?parseInt(e["refresh-time"],10):void 0;Ho.init(t),this.setupHotKeys()},beforeUnmount(){jo.unbind()}};const _m=((...e)=>{const t=qs().createApp(...e);const{mount:n}=t;return t.mount=e=>{const r=Bs(e);if(!r)return;const i=t._component;L(i)||i.render||i.template||(i.template=r.innerHTML),r.innerHTML="";const s=n(r,!1,r instanceof SVGElement);return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),s},t})((0,nc.Z)(xm,[["render",function(e,t,n,r,i,s){const o=cr("glances-help"),a=cr("glances-plugin-system"),l=cr("glances-plugin-ip"),c=cr("glances-plugin-uptime"),u=cr("glances-plugin-cloud"),d=cr("glances-plugin-quicklook"),f=cr("glances-plugin-cpu"),p=cr("glances-plugin-percpu"),h=cr("glances-plugin-gpu"),g=cr("glances-plugin-mem"),m=cr("glances-plugin-mem-more"),b=cr("glances-plugin-memswap"),v=cr("glances-plugin-load"),y=cr("glances-plugin-containers"),w=cr("glances-plugin-process"),x=cr("glances-plugin-alert");return s.dataLoaded?s.args.help_tag?(li(),hi(o,{key:1})):(li(),pi("main",zs,[wi("div",$s,[wi("div",Hs,[wi("div",Vs,[wi("div",Gs,[xi(a,{data:s.data},null,8,["data"])]),s.args.disable_ip?Ti("v-if",!0):(li(),pi("div",Ws,[xi(l,{data:s.data},null,8,["data"])])),wi("div",Zs,[xi(c,{data:s.data},null,8,["data"])])])])]),wi("div",Ks,[wi("div",Qs,[wi("div",Xs,[wi("div",Js,[xi(u,{data:s.data},null,8,["data"])])])]),s.args.enable_separator?(li(),pi("div",Ys)):Ti("v-if",!0),wi("div",eo,[s.args.disable_quicklook?Ti("v-if",!0):(li(),pi("div",to,[xi(d,{data:s.data},null,8,["data"])])),s.args.disable_cpu||s.args.percpu?Ti("v-if",!0):(li(),pi("div",no,[xi(f,{data:s.data},null,8,["data"])])),!s.args.disable_cpu&&s.args.percpu?(li(),pi("div",ro,[xi(p,{data:s.data},null,8,["data"])])):Ti("v-if",!0),!s.args.disable_gpu&&s.hasGpu?(li(),pi("div",io,[xi(h,{data:s.data},null,8,["data"])])):Ti("v-if",!0),s.args.disable_mem?Ti("v-if",!0):(li(),pi("div",so,[xi(g,{data:s.data},null,8,["data"])])),Ti(" NOTE: display if MEM enabled and GPU disabled "),s.args.disable_mem||!s.args.disable_gpu&&s.hasGpu?Ti("v-if",!0):(li(),pi("div",oo,[xi(m,{data:s.data},null,8,["data"])])),s.args.disable_memswap?Ti("v-if",!0):(li(),pi("div",ao,[xi(b,{data:s.data},null,8,["data"])])),s.args.disable_load?Ti("v-if",!0):(li(),pi("div",lo,[xi(v,{data:s.data},null,8,["data"])]))]),s.args.enable_separator?(li(),pi("div",co)):Ti("v-if",!0)]),wi("div",uo,[wi("div",fo,[s.args.disable_left_sidebar?Ti("v-if",!0):(li(),pi("div",po,[wi("div",ho,[Ti(" When they exist on the same node, v-if has a higher priority than v-for.\n That means the v-if condition will not have access to variables from the\n scope of the v-for "),(li(!0),pi(ni,null,pr(s.leftMenu,(e=>{return li(),pi(ni,null,[s.args[`disable_${e}`]?Ti("v-if",!0):(li(),hi((t=`glances-plugin-${e}`,D(t)?dr(lr,t,!1)||t:t||ur),{key:0,id:`plugin-${e}`,class:"plugin table-row-group",data:s.data},null,8,["id","data"]))],64);var t})),256))])])),wi("div",go,[s.args.disable_containers?Ti("v-if",!0):(li(),hi(y,{key:0,data:s.data},null,8,["data"])),xi(w,{data:s.data},null,8,["data"]),s.args.disable_alert?Ti("v-if",!0):(li(),hi(x,{key:1,data:s.data},null,8,["data"]))])])])])):(li(),pi("div",Us,Fs))}]]));_m.config.globalProperties.$filters=e,_m.mount("#app")})()})(); \ No newline at end of file +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=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;s0,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;a1&&(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;r1&&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=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"};const Nu={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},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()}}},Lu=(0,nc.Z)(Nu,[["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&&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&&s.syscalls?(li(),pi("div",yu,[wu,wi("div",xu,pe(s.syscalls),1)])):Ti("v-if",!0)])]),wi("div",_u,[wi("div",ku,[Ti(" If not already display instead of nice, then display ctx_switches "),null!=s.nice&&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&&s.interrupts?(li(),pi("div",Tu,[Au,wi("div",Eu,pe(s.interrupts),1)])):Ti("v-if",!0),s.isWindows||s.isSunOS||!s.soft_interrupts?Ti("v-if",!0):(li(),pi("div",Ou,[Iu,wi("div",Pu,pe(s.soft_interrupts),1)]))])])])])}]]),Du={class:"plugin",id:"diskio"},Mu={key:0,class:"table-row"},ju=wi("div",{class:"table-cell text-left title"},"DISK I/O",-1),Ru={class:"table-cell"},qu={class:"table-cell"},Bu={class:"table-cell"},Uu={class:"table-cell"},Fu={class:"table-cell text-left"};var zu=n(1036),$u=n.n(zu);function Hu(e,t){return Vu(e=8*Math.round(e),t)+"b"}function Vu(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;i1){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 Gu(e){return void 0===e||""===e?"?":e}function Wu(e,t,n){return t=t||0,n=n||" ",String(e).padStart(t,n)}function Zu(e,t){return"function"!=typeof e.slice&&(e=String(e)),e.slice(0,t)}function Ku(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 Qu(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,"
");return $u()(n)}function Xu(e,t){return new Intl.NumberFormat(void 0,"number"==typeof t?{maximumFractionDigits:t}:t).format(e)}function Ju(e){for(var t=0,n=0;n({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:Vu(e.read_bytes/t),rxps:Vu(e.write_bytes/t)},count:{txps:Vu(e.read_count/t),rxps:Vu(e.write_count/t)},alias:void 0!==e.alias?e.alias:null}}));return(0,dc.orderBy)(e,["name"])}}},td=(0,nc.Z)(ed,[["render",function(e,t,n,r,i,s){return li(),pi("section",Du,[s.disks.length>0?(li(),pi("div",Mu,[ju,On(wi("div",Ru,"R/s",512),[[Ds,!s.args.diskio_iops]]),On(wi("div",qu,"W/s",512),[[Ds,!s.args.diskio_iops]]),On(wi("div",Bu,"IOR/s",512),[[Ds,s.args.diskio_iops]]),On(wi("div",Uu,"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",Fu,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))])}]]),nd={key:0,id:"containers-plugin",class:"plugin"},rd=wi("span",{class:"title"},"CONTAINERS",-1),id={class:"table"},sd={class:"table-row"},od=wi("div",{class:"table-cell text-left"},"Engine",-1),ad=wi("div",{class:"table-cell text-left"},"Pod",-1),ld=wi("div",{class:"table-cell"},"Status",-1),cd=wi("div",{class:"table-cell"},"Uptime",-1),ud=Ci('
/MAX
IOR/s
IOW/s
RX/s
TX/s
Command
',6),dd={class:"table-cell text-left"},fd={class:"table-cell text-left"},pd={class:"table-cell text-left"},hd={class:"table-cell"},gd={class:"table-cell"},md={class:"table-cell"},bd={class:"table-cell"},vd={class:"table-cell"},yd={class:"table-cell"},wd={class:"table-cell"},xd={class:"table-cell"},_d={class:"table-cell text-left"};const kd={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}})}}}},Sd=(0,nc.Z)(kd,[["render",function(e,t,n,r,i,s){return s.containers.length?(li(),pi("section",nd,[rd,Si(" "+pe(s.containers.length)+" sorted by "+pe(i.sorter.getColumnLabel(i.sorter.column))+" ",1),wi("div",id,[wi("div",sd,[od,ad,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),ld,cd,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),ud]),(li(!0),pi(ni,null,pr(s.containers,((t,n)=>(li(),pi("div",{class:"table-row",key:n},[wi("div",dd,pe(t.engine),1),wi("div",fd,pe(t.pod_id||"-"),1),wi("div",pd,pe(t.name),1),wi("div",{class:ce(["table-cell","Paused"==t.status?"careful":"ok"])},pe(t.status),3),wi("div",hd,pe(t.uptime),1),wi("div",gd,pe(e.$filters.number(t.cpu_percent,1)),1),wi("div",md,pe(e.$filters.bytes(t.memory_usage)),1),wi("div",bd,pe(e.$filters.bytes(t.limit)),1),wi("div",vd,pe(e.$filters.bytes(t.io_rx)),1),wi("div",yd,pe(e.$filters.bytes(t.io_wx)),1),wi("div",wd,pe(e.$filters.bits(t.network_rx)),1),wi("div",xd,pe(e.$filters.bits(t.network_tx)),1),wi("div",_d,pe(t.command),1)])))),128))])])):Ti("v-if",!0)}]]),Cd={class:"plugin",id:"folders"},Td={key:0,class:"table-row"},Ad=[wi("div",{class:"table-cell text-left title"},"FOLDERS",-1),wi("div",{class:"table-cell"},null,-1),wi("div",{class:"table-cell"},"Size",-1)],Ed={class:"table-cell text-left"},Od=wi("div",{class:"table-cell"},null,-1),Id={key:0,class:"visible-lg-inline"};const Pd={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"}},Nd=(0,nc.Z)(Pd,[["render",function(e,t,n,r,i,s){return li(),pi("section",Cd,[s.folders.length>0?(li(),pi("div",Td,Ad)):Ti("v-if",!0),(li(!0),pi(ni,null,pr(s.folders,((t,n)=>(li(),pi("div",{class:"table-row",key:n},[wi("div",Ed,pe(t.path),1),Od,wi("div",{class:ce(["table-cell",s.getDecoration(t)])},[t.errno>0?(li(),pi("span",Id," ? ")):Ti("v-if",!0),Si(" "+pe(e.$filters.bytes(t.size)),1)],2)])))),128))])}]]),Ld={class:"plugin",id:"fs"},Dd={class:"table-row"},Md=wi("div",{class:"table-cell text-left title"},"FILE SYS",-1),jd={class:"table-cell"},Rd=wi("div",{class:"table-cell"},"Total",-1),qd={class:"table-cell text-left"},Bd={key:0,class:"visible-lg-inline"},Ud={class:"table-cell"};const Fd={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()}}},zd=(0,nc.Z)(Fd,[["render",function(e,t,n,r,i,s){return li(),pi("section",Ld,[wi("div",Dd,[Md,wi("div",jd,[On(wi("span",null,"Used",512),[[Ds,!s.args.fs_free_space]]),On(wi("span",null,"Free",512),[[Ds,s.args.fs_free_space]])]),Rd]),(li(!0),pi(ni,null,pr(s.fileSystems,((t,n)=>(li(),pi("div",{class:"table-row",key:n},[wi("div",qd,[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",Bd," ("+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",Ud,pe(e.$filters.bytes(t.size)),1)])))),128))])}]]),$d={id:"gpu",class:"plugin"},Hd={class:"gpu-name title"},Vd={class:"table"},Gd={key:0,class:"table-row"},Wd=wi("div",{class:"table-cell text-left"},"proc:",-1),Zd={key:1,class:"table-cell"},Kd={key:1,class:"table-row"},Qd=wi("div",{class:"table-cell text-left"},"mem:",-1),Xd={key:1,class:"table-cell"},Jd={key:2,class:"table-row"},Yd=wi("div",{class:"table-cell text-left"},"temperature:",-1),ef={key:1,class:"table-cell"},tf={class:"table-cell text-left"},nf={key:1},rf={key:3},sf={key:5};const of={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)}}},af=(0,nc.Z)(of,[["render",function(e,t,n,r,i,s){return li(),pi("section",$d,[wi("div",Hd,pe(s.name),1),wi("div",Vd,[s.args.meangpu||1===s.gpus.length?(li(),pi("div",Gd,[Wd,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",Zd,"N/A")):Ti("v-if",!0)])):Ti("v-if",!0),s.args.meangpu||1===s.gpus.length?(li(),pi("div",Kd,[Qd,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",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.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",ef,"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",tf,[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",nf,"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",rf,"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",sf,"N/A")):Ti("v-if",!0)])])))),128)):Ti("v-if",!0)])])}]]),lf={key:0,class:"plugin",id:"ip"},cf={key:0,class:"title"},uf={key:1},df={key:2,class:"title"},ff={key:3},pf={key:4};const hf={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}}},gf=(0,nc.Z)(hf,[["render",function(e,t,n,r,i,s){return null!=s.address?(li(),pi("section",lf,[null!=s.address?(li(),pi("span",cf,"IP")):Ti("v-if",!0),null!=s.address?(li(),pi("span",uf,pe(s.address)+"/"+pe(s.maskCdir),1)):Ti("v-if",!0),null!=s.publicAddress?(li(),pi("span",df,"Pub")):Ti("v-if",!0),null!=s.publicAddress?(li(),pi("span",ff,pe(s.publicAddress),1)):Ti("v-if",!0),null!=s.publicInfo?(li(),pi("span",pf,pe(s.publicInfo),1)):Ti("v-if",!0)])):Ti("v-if",!0)}]]),mf={class:"plugin",id:"irq"},bf={key:0,class:"table-row"},vf=[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)],yf={class:"table-cell text-left"},wf=wi("div",{class:"table-cell"},null,-1),xf={class:"table-cell"};const _f={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})))}}},kf=(0,nc.Z)(_f,[["render",function(e,t,n,r,i,s){return li(),pi("section",mf,[s.irqs.length>0?(li(),pi("div",bf,vf)):Ti("v-if",!0),(li(!0),pi(ni,null,pr(s.irqs,((e,t)=>(li(),pi("div",{class:"table-row",key:t},[wi("div",yf,pe(e.irq_line),1),wf,wi("div",xf,[wi("span",null,pe(e.irq_rate),1)])])))),128))])}]]),Sf={key:0,id:"load",class:"plugin"},Cf={class:"table"},Tf={class:"table-row"},Af=wi("div",{class:"table-cell text-left title"},"LOAD",-1),Ef={class:"table-cell"},Of={class:"table-row"},If=wi("div",{class:"table-cell text-left"},"1 min:",-1),Pf={class:"table-cell"},Nf={class:"table-row"},Lf=wi("div",{class:"table-cell text-left"},"5 min:",-1),Df={class:"table-row"},Mf=wi("div",{class:"table-cell text-left"},"15 min:",-1);const jf={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()}}},Rf=(0,nc.Z)(jf,[["render",function(e,t,n,r,i,s){return null!=s.cpucore?(li(),pi("section",Sf,[wi("div",Cf,[wi("div",Tf,[Af,wi("div",Ef,pe(s.cpucore)+"-core",1)]),wi("div",Of,[If,wi("div",Pf,pe(e.$filters.number(s.min1,2)),1)]),wi("div",Nf,[Lf,wi("div",{class:ce(["table-cell",s.getDecoration("min5")])},pe(e.$filters.number(s.min5,2)),3)]),wi("div",Df,[Mf,wi("div",{class:ce(["table-cell",s.getDecoration("min15")])},pe(e.$filters.number(s.min15,2)),3)])])])):Ti("v-if",!0)}]]),qf={id:"mem",class:"plugin"},Bf={class:"table"},Uf={class:"table-row"},Ff=wi("div",{class:"table-cell text-left title"},"MEM",-1),zf={class:"table-row"},$f=wi("div",{class:"table-cell text-left"},"total:",-1),Hf={class:"table-cell"},Vf={class:"table-row"},Gf=wi("div",{class:"table-cell text-left"},"used:",-1),Wf={class:"table-row"},Zf=wi("div",{class:"table-cell text-left"},"free:",-1),Kf={class:"table-cell"};const Qf={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()}}},Xf=(0,nc.Z)(Qf,[["render",function(e,t,n,r,i,s){return li(),pi("section",qf,[wi("div",Bf,[wi("div",Uf,[Ff,wi("div",{class:ce(["table-cell",s.getDecoration("percent")])},pe(s.percent)+"%",3)]),wi("div",zf,[$f,wi("div",Hf,pe(e.$filters.bytes(s.total)),1)]),wi("div",Vf,[Gf,wi("div",{class:ce(["table-cell",s.getDecoration("used")])},pe(e.$filters.bytes(s.used,2)),3)]),wi("div",Wf,[Zf,wi("div",Kf,pe(e.$filters.bytes(s.free)),1)])])])}]]),Jf={id:"mem-more",class:"plugin"},Yf={class:"table"},ep={class:"table-row"},tp=wi("div",{class:"table-cell text-left"},"active:",-1),np={class:"table-cell"},rp={class:"table-row"},ip=wi("div",{class:"table-cell text-left"},"inactive:",-1),sp={class:"table-cell"},op={class:"table-row"},ap=wi("div",{class:"table-cell text-left"},"buffers:",-1),lp={class:"table-cell"},cp={class:"table-row"},up=wi("div",{class:"table-cell text-left"},"cached:",-1),dp={class:"table-cell"};const fp={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}}},pp=(0,nc.Z)(fp,[["render",function(e,t,n,r,i,s){return li(),pi("section",Jf,[wi("div",Yf,[On(wi("div",ep,[tp,wi("div",np,pe(e.$filters.bytes(s.active)),1)],512),[[Ds,null!=s.active]]),On(wi("div",rp,[ip,wi("div",sp,pe(e.$filters.bytes(s.inactive)),1)],512),[[Ds,null!=s.inactive]]),On(wi("div",op,[ap,wi("div",lp,pe(e.$filters.bytes(s.buffers)),1)],512),[[Ds,null!=s.buffers]]),On(wi("div",cp,[up,wi("div",dp,pe(e.$filters.bytes(s.cached)),1)],512),[[Ds,null!=s.cached]])])])}]]),hp={id:"memswap",class:"plugin"},gp={class:"table"},mp={class:"table-row"},bp=wi("div",{class:"table-cell text-left title"},"SWAP",-1),vp={class:"table-row"},yp=wi("div",{class:"table-cell text-left"},"total:",-1),wp={class:"table-cell"},xp={class:"table-row"},_p=wi("div",{class:"table-cell text-left"},"used:",-1),kp={class:"table-row"},Sp=wi("div",{class:"table-cell text-left"},"free:",-1),Cp={class:"table-cell"};const Tp={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()}}},Ap=(0,nc.Z)(Tp,[["render",function(e,t,n,r,i,s){return li(),pi("section",hp,[wi("div",gp,[wi("div",mp,[bp,wi("div",{class:ce(["table-cell",s.getDecoration("percent")])},pe(s.percent)+"%",3)]),wi("div",vp,[yp,wi("div",wp,pe(e.$filters.bytes(s.total)),1)]),wi("div",xp,[_p,wi("div",{class:ce(["table-cell",s.getDecoration("used")])},pe(e.$filters.bytes(s.used)),3)]),wi("div",kp,[Sp,wi("div",Cp,pe(e.$filters.bytes(s.free)),1)])])])}]]),Ep={class:"plugin",id:"network"},Op={class:"table-row"},Ip=wi("div",{class:"table-cell text-left title"},"NETWORK",-1),Pp={class:"table-cell"},Np={class:"table-cell"},Lp={class:"table-cell"},Dp={class:"table-cell"},Mp={class:"table-cell"},jp={class:"table-cell"},Rp={class:"table-cell"},qp={class:"table-cell"},Bp={class:"table-cell text-left"},Up={class:"visible-lg-inline"},Fp={class:"hidden-lg"},zp={class:"table-cell"},$p={class:"table-cell"};const Hp={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,rx:e.rx,tx:e.tx,cx:e.cx,time_since_update:e.time_since_update,cumulativeRx:e.cumulative_rx,cumulativeTx:e.cumulative_tx,cumulativeCx:e.cumulative_cx}}));return(0,dc.orderBy)(e,["interfaceName"])}}},Vp=(0,nc.Z)(Hp,[["render",function(e,t,n,r,i,s){return li(),pi("section",Ep,[wi("div",Op,[Ip,On(wi("div",Pp,"Rx/s",512),[[Ds,!s.args.network_cumul&&!s.args.network_sum]]),On(wi("div",Np,"Tx/s",512),[[Ds,!s.args.network_cumul&&!s.args.network_sum]]),On(wi("div",Lp,null,512),[[Ds,!s.args.network_cumul&&s.args.network_sum]]),On(wi("div",Dp,"Rx+Tx/s",512),[[Ds,!s.args.network_cumul&&s.args.network_sum]]),On(wi("div",Mp,"Rx",512),[[Ds,s.args.network_cumul&&!s.args.network_sum]]),On(wi("div",jp,"Tx",512),[[Ds,s.args.network_cumul&&!s.args.network_sum]]),On(wi("div",Rp,null,512),[[Ds,s.args.network_cumul&&s.args.network_sum]]),On(wi("div",qp,"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",Bp,[wi("span",Up,pe(t.ifname),1),wi("span",Fp,pe(e.$filters.minSize(t.ifname)),1)]),On(wi("div",{class:"table-cell"},pe(s.args.byte?e.$filters.bytes(t.rx/t.time_since_update):e.$filters.bits(t.rx/t.time_since_update)),513),[[Ds,!s.args.network_cumul&&!s.args.network_sum]]),On(wi("div",{class:"table-cell"},pe(s.args.byte?e.$filters.bytes(t.tx/t.time_since_update):e.$filters.bits(t.tx/t.time_since_update)),513),[[Ds,!s.args.network_cumul&&!s.args.network_sum]]),On(wi("div",zp,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.cx/t.time_since_update):e.$filters.bits(t.cx/t.time_since_update)),513),[[Ds,!s.args.network_cumul&&s.args.network_sum]]),On(wi("div",{class:"table-cell"},pe(s.args.byte?e.$filters.bytes(t.cumulativeRx):e.$filters.bits(t.cumulativeRx)),513),[[Ds,s.args.network_cumul&&!s.args.network_sum]]),On(wi("div",{class:"table-cell"},pe(s.args.byte?e.$filters.bytes(t.cumulativeTx):e.$filters.bits(t.cumulativeTx)),513),[[Ds,s.args.network_cumul&&!s.args.network_sum]]),On(wi("div",$p,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.cumulativeCx):e.$filters.bits(t.cumulativeCx)),513),[[Ds,s.args.network_cumul&&s.args.network_sum]])])))),128))])}]]),Gp={id:"now",class:"plugin"},Wp={class:"table-row"},Zp={class:"table-cell text-left"};const Kp={props:{data:{type:Object}},computed:{value(){return this.data.stats.now}}},Qp=(0,nc.Z)(Kp,[["render",function(e,t,n,r,i,s){return li(),pi("section",Gp,[wi("div",Wp,[wi("div",Zp,pe(s.value),1)])])}]]),Xp={id:"percpu",class:"plugin"},Jp={class:"table-row"},Yp={class:"table-cell text-left title"},eh={key:0},th={class:"table-row"},nh=wi("div",{class:"table-cell text-left"},"user:",-1),rh={class:"table-row"},ih=wi("div",{class:"table-cell text-left"},"system:",-1),sh={class:"table-row"},oh=wi("div",{class:"table-cell text-left"},"idle:",-1),ah={key:0,class:"table-row"},lh=wi("div",{class:"table-cell text-left"},"iowait:",-1),ch={key:1,class:"table-row"},uh=wi("div",{class:"table-cell text-left"},"steal:",-1);const dh={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)}},fh=(0,nc.Z)(dh,[["render",function(e,t,n,r,i,s){return li(),pi("section",Xp,[(li(!0),pi(ni,null,pr(s.cpusChunks,((e,t)=>(li(),pi("div",{class:"table",key:t},[wi("div",Jp,[wi("div",Yp,[0===t?(li(),pi("span",eh,"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",th,[nh,(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",rh,[ih,(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",sh,[oh,(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",ah,[lh,(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",ch,[uh,(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))])}]]),ph={class:"plugin",id:"ports"},hh={class:"table-cell text-left"},gh=wi("div",{class:"table-cell"},null,-1),mh={key:0},bh={key:1},vh={key:2},yh={key:3},wh={key:0},xh={key:1},_h={key:2};const kh={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.status>e.rtt_warning?"warning":"ok",getWebDecoration:e=>null===e.status?"careful":-1===[200,301,302].indexOf(e.status)?"critical":null!==e.rtt_warning&&e.elapsed>e.rtt_warning?"warning":"ok"}},Sh=(0,nc.Z)(kh,[["render",function(e,t,n,r,i,s){return li(),pi("section",ph,[(li(!0),pi(ni,null,pr(s.ports,((t,n)=>(li(),pi("div",{class:"table-row",key:n},[wi("div",hh,[Ti(" prettier-ignore "),Si(" "+pe(e.$filters.minSize(t.description?t.description:t.host+" "+t.port,20)),1)]),gh,t.host?(li(),pi("div",{key:0,class:ce([s.getPortDecoration(t),"table-cell"])},["null"==t.status?(li(),pi("span",mh,"Scanning")):"false"==t.status?(li(),pi("span",bh,"Timeout")):"true"==t.status?(li(),pi("span",vh,"Open")):(li(),pi("span",yh,pe(e.$filters.number(1e3*t.status,0))+"ms",1))],2)):Ti("v-if",!0),t.url?(li(),pi("div",{key:1,class:ce([s.getWebDecoration(t),"table-cell"])},["null"==t.status?(li(),pi("span",wh,"Scanning")):"Error"==t.status?(li(),pi("span",xh,"Error")):(li(),pi("span",_h,"Code "+pe(t.status),1))],2)):Ti("v-if",!0)])))),128))])}]]),Ch={key:0},Th={key:1},Ah={key:0,class:"row"},Eh={class:"col-lg-18"};const Oh={id:"amps",class:"plugin"},Ih={class:"table"},Ph={key:0,class:"table-cell text-left"},Nh=["innerHTML"];const Lh={props:{data:{type:Object}},computed:{stats(){return this.data.stats.amps},processes(){return this.stats.filter((e=>null!==e.result))}},methods:{getNameDecoration(e){const t=e.count,n=e.countmin,r=e.countmax;let i="ok";return i=t>0?(null===n||t>=n)&&(null===r||t<=r)?"ok":"careful":null===n?"ok":"critical",i}}},Dh=(0,nc.Z)(Lh,[["render",function(e,t,n,r,i,s){return li(),pi("section",Oh,[wi("div",Ih,[(li(!0),pi(ni,null,pr(s.processes,((t,n)=>(li(),pi("div",{class:"table-row",key:n},[wi("div",{class:ce(["table-cell text-left",s.getNameDecoration(t)])},pe(t.name),3),t.regex?(li(),pi("div",Ph,pe(t.count),1)):Ti("v-if",!0),wi("div",{class:"table-cell text-left process-result",innerHTML:e.$filters.nl2br(t.result)},null,8,Nh)])))),128))])])}]]),Mh={id:"processcount",class:"plugin"},jh=wi("span",{class:"title"},"TASKS",-1),Rh={class:"title"};const qh={props:{data:{type:Object},sorter:{type:Object}},data:()=>({store:Uo}),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}}},Bh=(0,nc.Z)(qh,[["render",function(e,t,n,r,i,s){return li(),pi("section",Mh,[jh,wi("span",null,pe(s.total)+" ("+pe(s.thread)+" thr),",1),wi("span",null,pe(s.running)+" run,",1),wi("span",null,pe(s.sleeping)+" slp,",1),wi("span",null,pe(s.stopped)+" oth",1),wi("span",null,pe(s.args.programs?"Programs":"Threads"),1),wi("span",Rh,pe(n.sorter.auto?"sorted automatically":"sorted"),1),wi("span",null,"by "+pe(n.sorter.getColumnLabel(n.sorter.column)),1)])}]]),Uh={id:"processlist-plugin",class:"plugin"},Fh={class:"table"},zh={class:"table-row"},$h=wi("div",{class:"table-cell width-80 hidden-xs hidden-sm"},"VIRT",-1),Hh=wi("div",{class:"table-cell width-80 hidden-xs hidden-sm"},"RES",-1),Vh=wi("div",{class:"table-cell width-80"},"PID",-1),Gh=wi("div",{class:"table-cell width-60"},"NI",-1),Wh=wi("div",{class:"table-cell width-60"},"S",-1),Zh={class:"table-cell width-80"},Kh={class:"table-cell width-80"},Qh={class:"table-cell width-80"},Xh={class:"table-cell width-100 text-left"},Jh={key:0,class:"table-cell width-100 hidden-xs hidden-sm"},Yh={key:1,class:"table-cell width-80 hidden-xs hidden-sm"},eg={class:"table-cell width-80 text-left hidden-xs hidden-sm"};const tg={props:{data:{type:Object},sorter:{type:Object}},data:()=>({store:Uo}),computed:{args(){return this.store.args||{}},config(){return this.store.config||{}},stats(){return this.data.stats.processlist},processes(){const{sorter:e}=this,t=this.data.stats.isWindows,n=(this.stats||[]).map((e=>(e.memvirt="?",e.memres="?",e.memory_info&&(e.memvirt=e.memory_info.vms,e.memres=e.memory_info.rss),t&&null!==e.username&&(e.username=(0,dc.last)(e.username.split("\\"))),e.timeplus="?",e.timemillis="?",e.cpu_times&&(e.timeplus=Yu(e.cpu_times),e.timemillis=Ju(e.cpu_times)),null===e.num_threads&&(e.num_threads=-1),null===e.cpu_percent&&(e.cpu_percent=-1),null===e.memory_percent&&(e.memory_percent=-1),e.io_read=null,e.io_write=null,e.io_counters&&(e.io_read=(e.io_counters[0]-e.io_counters[2])/e.time_since_update,e.io_write=(e.io_counters[1]-e.io_counters[3])/e.time_since_update),e.isNice=void 0!==e.nice&&(t&&32!=e.nice||!t&&0!=e.nice),Array.isArray(e.cmdline)&&(e.cmdline=e.cmdline.join(" ").replace(/\n/g," ")),null!==e.cmdline&&0!==e.cmdline.length||(e.cmdline=e.name),e)));return(0,dc.orderBy)(n,[e.column].reduce(((e,t)=>("io_counters"===t&&(t=["io_read","io_write"]),e.concat(t))),[]),[e.isReverseColumn(e.column)?"desc":"asc"]).slice(0,this.limit)},ioReadWritePresent(){return(this.stats||[]).some((({io_counters:e})=>e))},limit(){return void 0!==this.config.outputs?this.config.outputs.max_processes_display:void 0}},methods:{getCpuPercentAlert:e=>$o.getAlert("processlist","processlist_cpu_",e.cpu_percent),getMemoryPercentAlert:e=>$o.getAlert("processlist","processlist_mem_",e.cpu_percent)}},ng={components:{GlancesPluginAmps:Dh,GlancesPluginProcesscount:Bh,GlancesPluginProcesslist:(0,nc.Z)(tg,[["render",function(e,t,n,r,i,s){return li(),pi(ni,null,[Ti(" prettier-ignore "),wi("section",Uh,[wi("div",Fh,[wi("div",zh,[wi("div",{class:ce(["table-cell width-60",["sortable","cpu_percent"===n.sorter.column&&"sort"]]),onClick:t[0]||(t[0]=t=>e.$emit("update:sorter","cpu_percent"))}," CPU% ",2),wi("div",{class:ce(["table-cell width-60",["sortable","memory_percent"===n.sorter.column&&"sort"]]),onClick:t[1]||(t[1]=t=>e.$emit("update:sorter","memory_percent"))}," MEM% ",2),$h,Hh,Vh,wi("div",{class:ce(["table-cell width-100 text-left",["sortable","username"===n.sorter.column&&"sort"]]),onClick:t[2]||(t[2]=t=>e.$emit("update:sorter","username"))}," USER ",2),wi("div",{class:ce(["table-cell width-100 hidden-xs hidden-sm",["sortable","timemillis"===n.sorter.column&&"sort"]]),onClick:t[3]||(t[3]=t=>e.$emit("update:sorter","timemillis"))}," TIME+ ",2),wi("div",{class:ce(["table-cell width-80 text-left hidden-xs hidden-sm",["sortable","num_threads"===n.sorter.column&&"sort"]]),onClick:t[4]||(t[4]=t=>e.$emit("update:sorter","num_threads"))}," THR ",2),Gh,Wh,On(wi("div",{class:ce(["table-cell width-80 hidden-xs hidden-sm",["sortable","io_counters"===n.sorter.column&&"sort"]]),onClick:t[5]||(t[5]=t=>e.$emit("update:sorter","io_counters"))}," IOR/s ",2),[[Ds,s.ioReadWritePresent]]),On(wi("div",{class:ce(["table-cell width-80 text-left hidden-xs hidden-sm",["sortable","io_counters"===n.sorter.column&&"sort"]]),onClick:t[6]||(t[6]=t=>e.$emit("update:sorter","io_counters"))}," IOW/s ",2),[[Ds,s.ioReadWritePresent]]),wi("div",{class:ce(["table-cell text-left",["sortable","name"===n.sorter.column&&"sort"]]),onClick:t[7]||(t[7]=t=>e.$emit("update:sorter","name"))}," Command ",2)]),(li(!0),pi(ni,null,pr(s.processes,((t,n)=>(li(),pi("div",{class:"table-row",key:n},[wi("div",{class:ce(["table-cell width-60",s.getCpuPercentAlert(t)])},pe(-1==t.cpu_percent?"?":e.$filters.number(t.cpu_percent,1)),3),wi("div",{class:ce(["table-cell width-60",s.getMemoryPercentAlert(t)])},pe(-1==t.memory_percent?"?":e.$filters.number(t.memory_percent,1)),3),wi("div",Zh,pe(e.$filters.bytes(t.memvirt)),1),wi("div",Kh,pe(e.$filters.bytes(t.memres)),1),wi("div",Qh,pe(t.pid),1),wi("div",Xh,pe(t.username),1),"?"!=t.timeplus?(li(),pi("div",Jh,[On(wi("span",{class:"highlight"},pe(t.timeplus.hours)+"h",513),[[Ds,t.timeplus.hours>0]]),Si(" "+pe(e.$filters.leftPad(t.timeplus.minutes,2,"0"))+":"+pe(e.$filters.leftPad(t.timeplus.seconds,2,"0"))+" ",1),On(wi("span",null,"."+pe(e.$filters.leftPad(t.timeplus.milliseconds,2,"0")),513),[[Ds,t.timeplus.hours<=0]])])):Ti("v-if",!0),"?"==t.timeplus?(li(),pi("div",Yh,"?")):Ti("v-if",!0),wi("div",eg,pe(-1==t.num_threads?"?":t.num_threads),1),wi("div",{class:ce(["table-cell width-60",{nice:t.isNice}])},pe(e.$filters.exclamation(t.nice)),3),wi("div",{class:ce(["table-cell width-60",{status:"R"==t.status}])},pe(t.status),3),On(wi("div",{class:"table-cell width-80 hidden-xs hidden-sm"},pe(e.$filters.bytes(t.io_read)),513),[[Ds,s.ioReadWritePresent]]),On(wi("div",{class:"table-cell width-80 text-left hidden-xs hidden-sm"},pe(e.$filters.bytes(t.io_write)),513),[[Ds,s.ioReadWritePresent]]),On(wi("div",{class:"table-cell text-left"},pe(t.name),513),[[Ds,s.args.process_short_name]]),On(wi("div",{class:"table-cell text-left"},pe(t.cmdline),513),[[Ds,!s.args.process_short_name]])])))),128))])])],2112)}]])},props:{data:{type:Object}},data:()=>({store:Uo,sorter:void 0}),computed:{args(){return this.store.args||{}},sortProcessesKey(){return this.args.sort_processes_key}},watch:{sortProcessesKey:{immediate:!0,handler(e){e&&!["cpu_percent","memory_percent","username","timemillis","num_threads","io_counters","name"].includes(e)||(this.sorter={column:this.args.sort_processes_key||"cpu_percent",auto:!this.args.sort_processes_key,isReverseColumn:function(e){return!["username","name"].includes(e)},getColumnLabel:function(e){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"}[e]||e}})}}}},rg=(0,nc.Z)(ng,[["render",function(e,t,n,r,i,s){const o=cr("glances-plugin-processcount"),a=cr("glances-plugin-amps"),l=cr("glances-plugin-processlist");return s.args.disable_process?(li(),pi("div",Ch,"PROCESSES DISABLED (press 'z' to display)")):(li(),pi("div",Th,[xi(o,{sorter:i.sorter,data:n.data},null,8,["sorter","data"]),s.args.disable_amps?Ti("v-if",!0):(li(),pi("div",Ah,[wi("div",Eh,[xi(a,{data:n.data},null,8,["data"])])])),xi(l,{sorter:i.sorter,data:n.data,"onUpdate:sorter":t[0]||(t[0]=e=>s.args.sort_processes_key=e)},null,8,["sorter","data"])]))}]]),ig={id:"quicklook",class:"plugin"},sg={class:"cpu-name"},og={class:"table"},ag={key:0,class:"table-row"},lg=wi("div",{class:"table-cell text-left"},"CPU",-1),cg={class:"table-cell"},ug={class:"progress"},dg=["aria-valuenow"],fg={class:"table-cell"},pg={class:"table-cell text-left"},hg={class:"table-cell"},gg={class:"progress"},mg=["aria-valuenow"],bg={class:"table-cell"},vg={class:"table-row"},yg={class:"table-cell text-left"},wg={class:"table-cell"},xg={class:"progress"},_g=["aria-valuenow"],kg={class:"table-cell"};const Sg={props:{data:{type:Object}},data:()=>({store:Uo}),computed:{args(){return this.store.args||{}},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},cpu_hz(){return this.stats.cpu_hz},percpus(){return this.stats.percpu.map((({cpu_number:e,total:t})=>({number:e,total:t})))},stats_list_after_cpu(){return this.view.list.filter((e=>!e.includes("cpu")))}},methods:{getDecoration(e){if(void 0!==this.view[e])return this.view[e].decoration.toLowerCase()}}},Cg=(0,nc.Z)(Sg,[["render",function(e,t,n,r,i,s){return li(),pi("section",ig,[wi("div",sg,pe(s.cpu_name),1),wi("div",og,[s.args.percpu?Ti("v-if",!0):(li(),pi("div",ag,[lg,wi("div",cg,[wi("div",ug,[wi("div",{class:ce(`progress-bar progress-bar-${s.getDecoration("cpu")}`),role:"progressbar","aria-valuenow":s.cpu,"aria-valuemin":"0","aria-valuemax":"100",style:ie(`width: ${s.cpu}%;`)},"   ",14,dg)])]),wi("div",fg,pe(s.cpu)+"%",1)])),s.args.percpu?(li(!0),pi(ni,{key:1},pr(s.percpus,((e,t)=>(li(),pi("div",{class:"table-row",key:t},[wi("div",pg,"CPU"+pe(e.number),1),wi("div",hg,[wi("div",gg,[wi("div",{class:ce(`progress-bar progress-bar-${s.getDecoration("cpu")}`),role:"progressbar","aria-valuenow":e.total,"aria-valuemin":"0","aria-valuemax":"100",style:ie(`width: ${e.total}%;`)},"   ",14,mg)])]),wi("div",bg,pe(e.total)+"%",1)])))),128)):Ti("v-if",!0),(li(!0),pi(ni,null,pr(s.stats_list_after_cpu,(e=>(li(),pi("div",vg,[wi("div",yg,pe(e.toUpperCase()),1),wi("div",wg,[wi("div",xg,[wi("div",{class:ce(`progress-bar progress-bar-${s.getDecoration(e)}`),role:"progressbar","aria-valuenow":s.stats[e],"aria-valuemin":"0","aria-valuemax":"100",style:ie(`width: ${s.stats[e]}%;`)},"   ",14,_g)])]),wi("div",kg,pe(s.stats[e])+"%",1)])))),256))])])}]]),Tg={class:"plugin",id:"raid"},Ag={key:0,class:"table-row"},Eg=[wi("div",{class:"table-cell text-left title"},"RAID disks",-1),wi("div",{class:"table-cell"},"Used",-1),wi("div",{class:"table-cell"},"Total",-1)],Og={class:"table-cell text-left"},Ig={class:"warning"};const Pg={props:{data:{type:Object}},computed:{stats(){return this.data.stats.raid},disks(){const e=Object.entries(this.stats).map((([e,t])=>{const n=Object.entries(t.components).map((([e,t])=>({number:t,name:e})));return{name:e,type:null==t.type?"UNKNOWN":t.type,used:t.used,available:t.available,status:t.status,degraded:t.used0}},methods:{getAlert:e=>e.inactive?"critical":e.degraded?"warning":"ok"}},Ng=(0,nc.Z)(Pg,[["render",function(e,t,n,r,i,s){return li(),pi("section",Tg,[s.hasDisks?(li(),pi("div",Ag,Eg)):Ti("v-if",!0),(li(!0),pi(ni,null,pr(s.disks,((e,t)=>(li(),pi("div",{class:"table-row",key:t},[wi("div",Og,[Si(pe(e.type.toUppercase())+" "+pe(e.name)+" ",1),On(wi("div",Ig,"└─ Degraded mode",512),[[Ds,e.degraded]]),On(wi("div",null,"   └─ "+pe(e.config),513),[[Ds,e.degraded]]),On(wi("div",{class:"critical"},"└─ Status "+pe(e.status),513),[[Ds,e.inactive]]),e.inactive?(li(!0),pi(ni,{key:0},pr(e.components,((t,n)=>(li(),pi("div",{key:n},"    "+pe(n===e.components.length-1?"└─":"├─")+" disk "+pe(t.number)+": "+pe(t.name),1)))),128)):Ti("v-if",!0)]),On(wi("div",{class:ce(["table-cell",s.getAlert(e)])},pe(e.used),3),[[Ds,!e.inactive]]),On(wi("div",{class:ce(["table-cell",s.getAlert(e)])},pe(e.available),3),[[Ds,!e.inactive]])])))),128))])}]]),Lg={id:"smart",class:"plugin"},Dg=wi("div",{class:"table-row"},[wi("div",{class:"table-cell text-left title"},"SMART disks"),wi("div",{class:"table-cell"}),wi("div",{class:"table-cell"})],-1),Mg={class:"table-row"},jg={class:"table-cell text-left text-truncate"},Rg=wi("div",{class:"table-cell"},null,-1),qg=wi("div",{class:"table-cell"},null,-1),Bg={class:"table-cell text-left"},Ug=wi("div",{class:"table-cell"},null,-1),Fg={class:"table-cell text-truncate"};const zg={props:{data:{type:Object}},computed:{stats(){return this.data.stats.smart},drives(){return(Array.isArray(this.stats)?this.stats:[]).map((e=>{const t=e.DeviceName,n=Object.entries(e).filter((([e])=>"DeviceName"!==e)).sort((([,e],[,t])=>e.namet.name?1:0)).map((([e,t])=>t));return{name:t,details:n}}))}}},$g=(0,nc.Z)(zg,[["render",function(e,t,n,r,i,s){return li(),pi("section",Lg,[Dg,(li(!0),pi(ni,null,pr(s.drives,((e,t)=>(li(),pi(ni,{key:t},[wi("div",Mg,[wi("div",jg,pe(e.name),1),Rg,qg]),(li(!0),pi(ni,null,pr(e.details,((e,t)=>(li(),pi("div",{key:t,class:"table-row"},[wi("div",Bg,"  "+pe(e.name),1),Ug,wi("div",Fg,[wi("span",null,pe(e.raw),1)])])))),128))],64)))),128))])}]]),Hg={class:"plugin",id:"sensors"},Vg={key:0,class:"table-row"},Gg=[wi("div",{class:"table-cell text-left title"},"SENSORS",-1)],Wg={class:"table-cell text-left"},Zg={class:"table-cell"};const Kg={props:{data:{type:Object}},data:()=>({store:Uo}),computed:{args(){return this.store.args||{}},stats(){return this.data.stats.sensors},sensors(){return this.stats.filter((e=>!(Array.isArray(e.value)&&0===e.value.length||0===e.value))).map((e=>(this.args.fahrenheit&&"battery"!=e.type&&"fan_speed"!=e.type&&(e.value=parseFloat(1.8*e.value+32).toFixed(1),e.unit="F"),e)))}},methods:{getAlert(e){const t="battery"==e.type?100-e.value:e.value;return $o.getAlert("sensors","sensors_"+e.type+"_",t)}}},Qg=(0,nc.Z)(Kg,[["render",function(e,t,n,r,i,s){return li(),pi("section",Hg,[s.sensors.length>0?(li(),pi("div",Vg,Gg)):Ti("v-if",!0),(li(!0),pi(ni,null,pr(s.sensors,((e,t)=>(li(),pi("div",{class:"table-row",key:t},[wi("div",Wg,pe(e.label),1),wi("div",Zg,pe(e.unit),1),wi("div",{class:ce(["table-cell",s.getAlert(e)])},pe(e.value),3)])))),128))])}]]),Xg={class:"plugin",id:"system"},Jg={key:0,class:"critical"},Yg={class:"title"},em={key:1,class:"hidden-xs hidden-sm"},tm={key:2,class:"hidden-xs hidden-sm"};const nm={props:{data:{type:Object}},data:()=>({store:Uo}),computed:{stats(){return this.data.stats.system},isLinux(){return this.data.isLinux},hostname(){return this.stats.hostname},platform(){return this.stats.platform},os(){return{name:this.stats.os_name,version:this.stats.os_version}},humanReadableName(){return this.stats.hr_name},isDisconnected(){return"FAILURE"===this.store.status}}},rm=(0,nc.Z)(nm,[["render",function(e,t,n,r,i,s){return li(),pi("section",Xg,[s.isDisconnected?(li(),pi("span",Jg,"Disconnected from")):Ti("v-if",!0),wi("span",Yg,pe(s.hostname),1),s.isLinux?(li(),pi("span",em," ("+pe(s.humanReadableName)+" / "+pe(s.os.name)+" "+pe(s.os.version)+") ",1)):Ti("v-if",!0),s.isLinux?Ti("v-if",!0):(li(),pi("span",tm," ("+pe(s.os.name)+" "+pe(s.os.version)+" "+pe(s.platform)+") ",1))])}]]),im={class:"plugin",id:"uptime"};const sm={props:{data:{type:Object}},computed:{value(){return this.data.stats.uptime}}},om=(0,nc.Z)(sm,[["render",function(e,t,n,r,i,s){return li(),pi("section",im,[wi("span",null,"Uptime: "+pe(s.value),1)])}]]),am={class:"plugin",id:"wifi"},lm={key:0,class:"table-row"},cm=[wi("div",{class:"table-cell text-left title"},"WIFI",-1),wi("div",{class:"table-cell"},null,-1),wi("div",{class:"table-cell"},"dBm",-1)],um={class:"table-cell text-left"},dm=wi("div",{class:"table-cell"},null,-1);const fm={props:{data:{type:Object}},computed:{stats(){return this.data.stats.wifi},view(){return this.data.views.wifi},hotspots(){const e=this.stats.map((e=>{if(""!==e.ssid)return{ssid:e.ssid,signal:e.signal,security:e.security}})).filter(Boolean);return(0,dc.orderBy)(e,["ssid"])}},methods:{getDecoration(e,t){if(void 0!==this.view[e.ssid][t])return this.view[e.ssid][t].decoration.toLowerCase()}}},pm=(0,nc.Z)(fm,[["render",function(e,t,n,r,i,s){return li(),pi("section",am,[s.hotspots.length>0?(li(),pi("div",lm,cm)):Ti("v-if",!0),(li(!0),pi(ni,null,pr(s.hotspots,((t,n)=>(li(),pi("div",{class:"table-row",key:n},[wi("div",um,[Si(pe(e.$filters.limitTo(t.ssid,20))+" ",1),wi("span",null,pe(t.security),1)]),dm,wi("div",{class:ce(["table-cell",s.getDecoration(t,"signal")])},pe(t.signal),3)])))),128))])}]]),hm=JSON.parse('{"t":["network","wifi","connections","ports","diskio","fs","irq","folders","raid","smart","sensors","now"]}'),gm={components:{GlancesHelp:rc,GlancesPluginAlert:pc,GlancesPluginCloud:bc,GlancesPluginConnections:Uc,GlancesPluginCpu:Lu,GlancesPluginDiskio:td,GlancesPluginContainers:Sd,GlancesPluginFolders:Nd,GlancesPluginFs:zd,GlancesPluginGpu:af,GlancesPluginIp:gf,GlancesPluginIrq:kf,GlancesPluginLoad:Rf,GlancesPluginMem:Xf,GlancesPluginMemMore:pp,GlancesPluginMemswap:Ap,GlancesPluginNetwork:Vp,GlancesPluginNow:Qp,GlancesPluginPercpu:fh,GlancesPluginPorts:Sh,GlancesPluginProcess:rg,GlancesPluginQuicklook:Cg,GlancesPluginRaid:Ng,GlancesPluginSensors:Qg,GlancesPluginSmart:$g,GlancesPluginSystem:rm,GlancesPluginUptime:om,GlancesPluginWifi:pm},data:()=>({store:Uo}),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:e}=this,t=e.stats&&e.stats.system&&e.stats.system.hostname||"";return t?`${t} - Glances`:"Glances"},leftMenu(){return void 0!==this.config.outputs.left_menu?this.config.outputs.left_menu.split(","):hm.t}},watch:{title(){document&&(document.title=this.title)}},methods:{setupHotKeys(){jo("a",(()=>{this.store.args.sort_processes_key=null})),jo("c",(()=>{this.store.args.sort_processes_key="cpu_percent"})),jo("m",(()=>{this.store.args.sort_processes_key="memory_percent"})),jo("u",(()=>{this.store.args.sort_processes_key="username"})),jo("p",(()=>{this.store.args.sort_processes_key="name"})),jo("i",(()=>{this.store.args.sort_processes_key="io_counters"})),jo("t",(()=>{this.store.args.sort_processes_key="timemillis"})),jo("shift+A",(()=>{this.store.args.disable_amps=!this.store.args.disable_amps})),jo("d",(()=>{this.store.args.disable_diskio=!this.store.args.disable_diskio})),jo("shift+Q",(()=>{this.store.args.enable_irq=!this.store.args.enable_irq})),jo("f",(()=>{this.store.args.disable_fs=!this.store.args.disable_fs})),jo("j",(()=>{this.store.args.programs=!this.store.args.programs})),jo("k",(()=>{this.store.args.disable_connections=!this.store.args.disable_connections})),jo("n",(()=>{this.store.args.disable_network=!this.store.args.disable_network})),jo("s",(()=>{this.store.args.disable_sensors=!this.store.args.disable_sensors})),jo("2",(()=>{this.store.args.disable_left_sidebar=!this.store.args.disable_left_sidebar})),jo("z",(()=>{this.store.args.disable_process=!this.store.args.disable_process})),jo("shift+S",(()=>{this.store.args.process_short_name=!this.store.args.process_short_name})),jo("shift+D",(()=>{this.store.args.disable_containers=!this.store.args.disable_containers})),jo("b",(()=>{this.store.args.byte=!this.store.args.byte})),jo("shift+B",(()=>{this.store.args.diskio_iops=!this.store.args.diskio_iops})),jo("l",(()=>{this.store.args.disable_alert=!this.store.args.disable_alert})),jo("1",(()=>{this.store.args.percpu=!this.store.args.percpu})),jo("h",(()=>{this.store.args.help_tag=!this.store.args.help_tag})),jo("shift+T",(()=>{this.store.args.network_sum=!this.store.args.network_sum})),jo("shift+U",(()=>{this.store.args.network_cumul=!this.store.args.network_cumul})),jo("shift+F",(()=>{this.store.args.fs_free_space=!this.store.args.fs_free_space})),jo("3",(()=>{this.store.args.disable_quicklook=!this.store.args.disable_quicklook})),jo("6",(()=>{this.store.args.meangpu=!this.store.args.meangpu})),jo("shift+G",(()=>{this.store.args.disable_gpu=!this.store.args.disable_gpu})),jo("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})),jo("shift+I",(()=>{this.store.args.disable_ip=!this.store.args.disable_ip})),jo("shift+P",(()=>{this.store.args.disable_ports=!this.store.args.disable_ports})),jo("shift+W",(()=>{this.store.args.disable_wifi=!this.store.args.disable_wifi}))}},mounted(){const e=window.__GLANCES__||{},t=isFinite(e["refresh-time"])?parseInt(e["refresh-time"],10):void 0;Ho.init(t),this.setupHotKeys()},beforeUnmount(){jo.unbind()}};const mm=((...e)=>{const t=qs().createApp(...e);const{mount:n}=t;return t.mount=e=>{const r=Bs(e);if(!r)return;const i=t._component;L(i)||i.render||i.template||(i.template=r.innerHTML),r.innerHTML="";const s=n(r,!1,r instanceof SVGElement);return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),s},t})((0,nc.Z)(gm,[["render",function(e,t,n,r,i,s){const o=cr("glances-help"),a=cr("glances-plugin-system"),l=cr("glances-plugin-ip"),c=cr("glances-plugin-uptime"),u=cr("glances-plugin-cloud"),d=cr("glances-plugin-quicklook"),f=cr("glances-plugin-cpu"),p=cr("glances-plugin-percpu"),h=cr("glances-plugin-gpu"),g=cr("glances-plugin-mem"),m=cr("glances-plugin-mem-more"),b=cr("glances-plugin-memswap"),v=cr("glances-plugin-load"),y=cr("glances-plugin-containers"),w=cr("glances-plugin-process"),x=cr("glances-plugin-alert");return s.dataLoaded?s.args.help_tag?(li(),hi(o,{key:1})):(li(),pi("main",zs,[wi("div",$s,[wi("div",Hs,[wi("div",Vs,[wi("div",Gs,[xi(a,{data:s.data},null,8,["data"])]),s.args.disable_ip?Ti("v-if",!0):(li(),pi("div",Ws,[xi(l,{data:s.data},null,8,["data"])])),wi("div",Zs,[xi(c,{data:s.data},null,8,["data"])])])])]),wi("div",Ks,[wi("div",Qs,[wi("div",Xs,[wi("div",Js,[xi(u,{data:s.data},null,8,["data"])])])]),s.args.enable_separator?(li(),pi("div",Ys)):Ti("v-if",!0),wi("div",eo,[s.args.disable_quicklook?Ti("v-if",!0):(li(),pi("div",to,[xi(d,{data:s.data},null,8,["data"])])),s.args.disable_cpu||s.args.percpu?Ti("v-if",!0):(li(),pi("div",no,[xi(f,{data:s.data},null,8,["data"])])),!s.args.disable_cpu&&s.args.percpu?(li(),pi("div",ro,[xi(p,{data:s.data},null,8,["data"])])):Ti("v-if",!0),!s.args.disable_gpu&&s.hasGpu?(li(),pi("div",io,[xi(h,{data:s.data},null,8,["data"])])):Ti("v-if",!0),s.args.disable_mem?Ti("v-if",!0):(li(),pi("div",so,[xi(g,{data:s.data},null,8,["data"])])),Ti(" NOTE: display if MEM enabled and GPU disabled "),s.args.disable_mem||!s.args.disable_gpu&&s.hasGpu?Ti("v-if",!0):(li(),pi("div",oo,[xi(m,{data:s.data},null,8,["data"])])),s.args.disable_memswap?Ti("v-if",!0):(li(),pi("div",ao,[xi(b,{data:s.data},null,8,["data"])])),s.args.disable_load?Ti("v-if",!0):(li(),pi("div",lo,[xi(v,{data:s.data},null,8,["data"])]))]),s.args.enable_separator?(li(),pi("div",co)):Ti("v-if",!0)]),wi("div",uo,[wi("div",fo,[s.args.disable_left_sidebar?Ti("v-if",!0):(li(),pi("div",po,[wi("div",ho,[Ti(" When they exist on the same node, v-if has a higher priority than v-for.\n That means the v-if condition will not have access to variables from the\n scope of the v-for "),(li(!0),pi(ni,null,pr(s.leftMenu,(e=>{return li(),pi(ni,null,[s.args[`disable_${e}`]?Ti("v-if",!0):(li(),hi((t=`glances-plugin-${e}`,D(t)?dr(lr,t,!1)||t:t||ur),{key:0,id:`plugin-${e}`,class:"plugin table-row-group",data:s.data},null,8,["id","data"]))],64);var t})),256))])])),wi("div",go,[s.args.disable_containers?Ti("v-if",!0):(li(),hi(y,{key:0,data:s.data},null,8,["data"])),xi(w,{data:s.data},null,8,["data"]),s.args.disable_alert?Ti("v-if",!0):(li(),hi(x,{key:1,data:s.data},null,8,["data"]))])])])])):(li(),pi("div",Us,Fs))}]]));mm.config.globalProperties.$filters=e,mm.mount("#app")})()})(); \ No newline at end of file diff --git a/glances/plugins/quicklook/__init__.py b/glances/plugins/quicklook/__init__.py index b1e53bda..5fc46ac2 100644 --- a/glances/plugins/quicklook/__init__.py +++ b/glances/plugins/quicklook/__init__.py @@ -153,6 +153,9 @@ class PluginModel(GlancesPluginModel): self.stats['load'], header='load' ) + # Define the list of stats to display + self.views['list'] = self.stats_list + def msg_curse(self, args=None, max_width=10): """Return the list to display in the UI.""" # Init the return message