diff --git a/Makefile b/Makefile index be2d9da6..95dae853 100644 --- a/Makefile +++ b/Makefile @@ -133,18 +133,18 @@ endef profiling-gprof: CPROF = glances.cprof profiling-gprof: ## Callgraph profiling (need "apt install graphviz") $(DISPLAY-BANNER) - $(PYTHON) -m cProfile -o $(CPROF) run-venv.py --stop-after $(TIMES) - $(venv_full)/gprof2dot -f pstats $(CPROF) | dot -Tsvg -o $(OUT_DIR)/glances-cgraph.svg + $(PYTHON) -m cProfile -o $(CPROF) run-venv.py -C $(CONF) --stop-after $(TIMES) + $(venv_dev)/gprof2dot -f pstats $(CPROF) | dot -Tsvg -o $(OUT_DIR)/glances-cgraph.svg rm -f $(CPROF) profiling-pyinstrument: ## PyInstrument profiling $(DISPLAY-BANNER) $(PIP) install pyinstrument - $(PYTHON) -m pyinstrument -r html -o $(OUT_DIR)/glances-pyinstrument.html -m glances --stop-after $(TIMES) + $(PYTHON) -m pyinstrument -r html -o $(OUT_DIR)/glances-pyinstrument.html -m glances -C $(CONF) --stop-after $(TIMES) profiling-pyspy: ## Flame profiling $(DISPLAY-BANNER) - $(venv_full)/py-spy record -o $(OUT_DIR)/glances-flame.svg -d 60 -s -- $(PYTHON) run-venv.py --stop-after $(TIMES) + $(venv_dev)/py-spy record -o $(OUT_DIR)/glances-flame.svg -d 60 -s -- $(PYTHON) run-venv.py -C $(CONF) --stop-after $(TIMES) profiling: profiling-gprof profiling-pyinstrument profiling-pyspy ## Profiling of the Glances software diff --git a/NEWS.rst b/NEWS.rst index 5674d1f3..bf366d4f 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -2,6 +2,81 @@ Glances ChangeLog ============================================================================== +=============== +Version 4.3.0.3 +=============== + +Continuous integration and documentation: + +* Pin Alpine image to 3.20 (3.21 is not compliant with Netifaces) Related to #3053 + +=============== +Version 4.3.0.2 +=============== + +Enhancements: + +* Revert "Replace netifaces by netifaces-plus" #3053 because it break build on Alpine Image + +=============== +Version 4.3.0.1 +=============== + +Enhancements: + +* Replace netifaces by netifaces-plus #3053 + +Bug corrected: + +* CONTAINERS section missing in 4.3.0 WebUI #3052 + +=============== +Version 4.3.0 +=============== + +Enhancements: + +* Web Based Glances Central Browser #1121 +* Ability to specify hide or show for smart plugin #2996 +* Thread mode ('j' hotkey) is not taken into accound in the WebUI #3019 +* [WEBUI] Clear old alert messages in the WebUI #3042 +* Raise an (Alert) Event for a group of sensors #3049 +* Allow processlist columns to be selected in config file #1524 +* Allow containers columns to be selected in config file #2722 +* [WebUI] Unecessary space between Processcount and processlist #3032 +* Add comparable NVML_LIB check for Windows #3000 +* Change the default path for graph export to /tmp/glances +* Improve CCS of WebUI #3024 + +Bug corrected: + +* Thresholds not displayed in the WebUI for the DiskIO plugin #1498 +* FS module alias configuration do not taken into account everytime #3010 +* Unexpected behaviour while running glances in docker with --export influxdb2 #2904 +* Correct issue when key name contains space - Related to #2983 +* Issue with ports plugin (for URL request) #3008 +* Network problem when no bitrate available #3014 +* SyntaxError: f-string: unmatched '[' in server list (on the DEVELOP branch only) #3018 +* Uptime for Docker containers not working #3021 +* WebUI doesn't display valid time for process list #2902 +* Bug In the Web-UI, Timestamps for 'Warning or critical alerts' are showing incorrect month #3023 +* Correct display issue on Containers plugin in WebUI #3028 + +Continuous integration and documentation: + +* Bumped minimal Python version to 3.9 #3005 +* Make the glances/outputs/static/js/uiconfig.json generated automaticaly from the make webui task +* Update unit-test for Glances Central Browser +* Add unit-test for new entry point in the API (plugin/item/key) +* Add a target to start Glances with Htop features +* Try new build and publish to Pypi CI actions + +Thanks to all contributors and bug reporters ! + +Special thanks to: + +* Ariel Otilibili for code quality improvements #2801 + =============== Version 4.2.1 =============== diff --git a/README.rst b/README.rst index 447d43a5..4e7a5f56 100644 --- a/README.rst +++ b/README.rst @@ -112,7 +112,7 @@ Optional dependencies: - ``influxdb-client`` (for the InfluxDB version 2 export module) - ``jinja2`` (for templating, used under the hood by FastAPI) - ``kafka-python`` (for the Kafka export module) -- ``netifaces`` (for the IP plugin) +- ``netifaces-plus`` (for the IP plugin) - ``nvidia-ml-py`` (for the GPU plugin) - ``pycouchdb`` (for the CouchDB export module) - ``pika`` (for the RabbitMQ/ActiveMQ export module) diff --git a/docker-compose/glances.conf b/docker-compose/glances.conf index e3143536..90edd5a0 100755 --- a/docker-compose/glances.conf +++ b/docker-compose/glances.conf @@ -320,7 +320,7 @@ critical=90 # Allow additional file system types (comma-separated FS type) #allow=shm # Alias for root file system -#alias=/:Root +#alias=/:Root,/zsfpool:ZSF [irq] # Documentation: https://glances.readthedocs.io/en/latest/aoa/irq.html @@ -518,7 +518,6 @@ max_name_size=20 ; disable_stats=diskio,networkio # Thresholds for CPU and MEM (in %) ; cpu_careful=50 -# Thresholds for CPU and MEM (in %) ; cpu_warning=70 ; cpu_critical=90 ; mem_careful=20 diff --git a/docker-files/alpine.Dockerfile b/docker-files/alpine.Dockerfile index 981c6f4b..6d17ee82 100644 --- a/docker-files/alpine.Dockerfile +++ b/docker-files/alpine.Dockerfile @@ -10,6 +10,8 @@ # Alpine 3.18 tag is a link to the latest 3.18.x version. # Be aware that if you change the Alpine version, you may have to change the Python version. +# Netifaces (and Netifaces-plus) are not compliant with GCC embeded in Alpine 3.21 +# See: https://github.com/tsukumijima/netifaces-plus/issues/9 ARG IMAGE_VERSION=3.20 ARG PYTHON_VERSION=3.12 diff --git a/docker-files/ubuntu.Dockerfile b/docker-files/ubuntu.Dockerfile index 93320faa..fa3256d2 100644 --- a/docker-files/ubuntu.Dockerfile +++ b/docker-files/ubuntu.Dockerfile @@ -9,7 +9,7 @@ # Note: ENV is for future running containers. ARG for building your Docker image. ARG IMAGE_VERSION=24.04 -ARG PYTHON_VERSION=3.12 +ARG PYTHON_VERSION=3.13 ############################################################################## # Base layer to be used for building dependencies and the release images diff --git a/docs/_static/glances-cgraph.svg b/docs/_static/glances-cgraph.svg index e6234d78..d1735d9d 100644 --- a/docs/_static/glances-cgraph.svg +++ b/docs/_static/glances-cgraph.svg @@ -4,1752 +4,1384 @@ - - + + %3 - - + + -16 +26 - -model:1149:wrapper -16.36% -(0.02%) -459× + +model:1121:wrapper +10.40% +(0.01%) +684× - + -324 - - -__init__:152:update -6.26% -(0.00%) -16× +2393 + + +glances_curses:275:__catch_key +88.72% +(0.01%) +538× - + -16->324 - - -6.26% -16× +26->2393 + + +2.13% +14× - + + +3464 + + +glances_curses:244:get_key +88.71% +(0.00%) +538× + + + + + +2393->3464 + + +0.76% + + + -821 - - -__init__:105:update -1.08% -(0.00%) -16× +30 + + +subprocess:2062:_communicate +5.34% +(0.00%) +34× - - -16->821 - - -0.35% - - - + -1900 - - -__init__:71:update -1.99% -(0.00%) -16× +169 + + +selectors:402:select +5.33% +(0.00%) +68× - - -16->1900 - - -1.99% -16× + + +30->169 + + +5.33% +68× - - -2501 - - -__init__:77:update -2.80% -(0.00%) -16× - - - - - -16->2501 - - -1.40% - - - - -2785 - - -__init__:133:update -0.51% -(0.00%) -16× - - - - - -16->2785 - - -0.51% -16× - - - -266 - - -multipass:92:update -6.26% -(0.00%) -16× - - - - - -324->266 - - -6.26% -16× - - - -152 - - -processes:405:update -2.80% -(0.06%) -16× - - - - - -2501->152 - - -1.40% - - - - -2713 - - -__init__:155:get_stats_for_local_input -0.51% -(0.00%) -16× - - - - - -2785->2713 - - -0.51% -16× - - - -29 - - -__init__:1491:process_iter -2.26% -(0.03%) -7192× - - - - - -1353 - - -__init__:545:as_dict -2.18% -(0.18%) -7184× - - - - - -29->1353 - - -1.09% -3596× - - - -34 - - -selectors:402:select -7.59% -(0.00%) -96× - - - - - -60 - - -~:0:<method 'poll' of 'select.poll' objects> -7.59% -(6.66%) -126× - - - - - -34->60 - - -0.49% - - - - -37 - - -subprocess:1165:communicate -8.07% -(0.00%) -53× - - - - - -38 - - -subprocess:2062:_communicate -7.58% -(0.00%) -48× - - - - - -37->38 - - -0.49% - - - - -38->34 - - -0.49% - - - + -194 - - -_pslinux:853:get_proc_inodes -0.96% -(0.13%) -7190× +1727 + + +~:0:<method 'poll' of 'select.poll' objects> +5.33% +(5.53%) +98× - - -38->194 - - -0.25% -2250× + + +169->1727 + + +5.33% +68× - - -284 - - -_pslinux:212:readlink -0.65% -(0.12%) -60818× + + +31 + + +client:1082:_send_output +4.56% +(0.00%) +34× - - -194->284 - - -0.44% -60763× - - - -39 - - -_pslinux:1495:sensors_fans -0.98% -(0.00%) - + + +136 + + +~:0:<method 'acquire' of '_thread.lock' objects> +3.04% +(0.00%) +575× - - -42 - - -client:1082:_send_output -4.66% -(0.00%) -35× + + +138 + + +<frozen importlib:1304:_find_and_load_unlocked +0.54% +(0.00%) +656× - - -44 - - -glances_curses:265:__catch_key -90.24% -(0.01%) -525× + + +410 + + +<frozen importlib:911:_load_unlocked +0.54% +(0.00%) +628× - - -273 - - -glances_curses:234:get_key -90.24% -(0.00%) -525× - + + +138->410 + + +0.54% +40× - - - -44->273 - - -2.80% -18× - - - -3966 - - -~:0:<method 'getch' of '_curses.window' objects> -90.23% -(81.14%) -525× - - - - - -273->3966 - - -2.80% -18× - - - -46 - - -__init__:358:update -2.68% -(0.00%) -16× - - - - - -47 - - -thread:53:run -2.70% -(0.00%) -32× - - - - - -283 - - -_common:849:bcat -4.04% -(0.03%) -19459× - - - - - -47->283 - - -0.12% -13× - - - -295 - - -_common:832:cat -4.03% -(0.05%) -20197× - - - - - -283->295 - - -0.40% -1938× - - - -48 - - -__init__:343:__fetch_psutil -3.04% -(0.00%) -18× - - - - - -191 - - -__init__:2281:sensors_temperatures -2.99% -(0.00%) - - - - - - -48->191 - - -0.31% - - - - -199 - - -_pslinux:1377:sensors_temperatures -2.98% -(0.01%) - - - - - - -191->199 - - -0.31% - - - - -152->29 - - -1.15% -3604× - - - -153 - - -threading:1016:_bootstrap -10.79% -(0.00%) -70× - - - - - -153->29 - - -0.12% -430× - - - -927 - - -stats:256:__update_plugin -16.75% -(0.01%) -930× - - - - - -153->927 - - -0.11% -40× - - - -927->16 - - -0.12% -62× - - - -156 - - -~:0:<method 'acquire' of '_thread.lock' objects> -4.06% -(0.01%) -740× - - - - - -158 - - -<frozen importlib:1304:_find_and_load_unlocked -0.95% -(0.00%) -668× - - - - - -443 - - -<frozen importlib:911:_load_unlocked -0.94% -(0.00%) -638× - - - - - -158->443 - - -0.94% -38× - - - -1692 - - -stats:262:update -11.68% -(0.00%) -31× - - - - - -158->1692 - - -1.71% - - - - -842 - - -<frozen importlib:989:exec_module -0.94% -(0.00%) -589× - - - - - -443->842 - - -0.94% -38× - - - -1692->44 - - -2.33% -15× - - - -1692->927 - - -2.26% -46× - - - -164 - - -threading:1056:_bootstrap_inner -8.75% -(0.00%) -70× - - - - - -164->283 - - -0.34% -39× - - - -199->283 - - -0.30% -166× - - + -240 - - -__init__:46:update -2.44% -(0.00%) -16× +2071 + + +<frozen importlib:989:exec_module +0.54% +(0.00%) +579× - - -241 - - -__init__:424:get_process_curses_data -1.43% -(0.28%) -13459× + + +410->2071 + + +0.54% +40× + + + +143 + + +threading:1056:_bootstrap_inner +6.86% +(0.00%) +40× - - -246 - - -battery:106:update -2.11% -(0.00%) - + + +167 + + +__init__:2281:sensors_temperatures +2.56% +(0.00%) +10× - - -250 - - -thread:69:_worker -2.70% -(0.00%) -32× + + +174 + + +_pslinux:1376:sensors_temperatures +2.56% +(0.00%) +10× - - -250->283 - - -0.24% -26× + + +167->174 + + +0.21% + - - -264 - - -amp:184:update_wrapper -2.44% -(0.00%) -32× + + +1834 + + +threading:1115:join +3.05% +(0.00%) +36× - - -265 - - -__init__:141:__get_sensor_data -2.70% -(0.00%) -32× + + +167->1834 + + +0.35% + + + + +1623 + + +_common:849:bcat +2.34% +(0.02%) +25517× - - -397 - - -multipass:34:update_version -2.60% -(0.00%) -16× + + +174->1623 + + +0.20% +166× + + + +780 + + +_common:832:cat +2.42% +(0.04%) +26337× - - -266->397 - - -2.60% -16× + + +1623->780 + + +0.28% +2424× - - -398 - - -multipass:48:update_info -3.66% -(0.00%) -16× + + +175 + + +_pslinux:1494:sensors_fans +0.99% +(0.00%) +10× - - -266->398 - - -3.66% -16× - - - -329 - - -secure:17:secure_popen -8.61% -(0.00%) -48× + + +210 + + +__init__:471:get_process_curses_data +2.38% +(0.56%) +30024× - - -397->329 - - -2.60% -16× - - - -398->329 - - -3.66% -16× - - - -1897 - - -~:0:<method 'read' of '_io.BufferedReader' objects> -3.89% -(2.65%) -27005× + + +218 + + +battery:106:update +0.72% +(0.00%) +10× - - -295->1897 - - -0.37% -1843× + + +235 + + +thread:53:run +2.36% +(0.00%) +36× + + + + + +236 + + +multipass:92:update +5.38% +(0.00%) +17× + + + + + +359 + + +multipass:48:update_info +3.06% +(0.00%) +17× + + + + + +236->359 + + +3.06% +17× + + + +361 + + +multipass:34:update_version +2.32% +(0.00%) +17× + + + + + +236->361 + + +2.32% +17× + + + +668 + + +secure:17:secure_popen +5.38% +(0.00%) +34× + + + + + +359->668 + + +3.06% +17× + + + +361->668 + + +2.32% +17× + + + +238 + + +__init__:141:__get_sensor_data +2.36% +(0.00%) +36× + + + + + +239 + + +__init__:352:__fetch_psutil +2.60% +(0.00%) +20× + + + + + +239->167 + + +0.21% + + + + +263 + + +threading:1016:_bootstrap +8.16% +(0.00%) +40× + + + + + +270 + + +threading:999:run +2.36% +(0.00%) +36× + + - + 286 - - -_pslinux:879:get_all_inodes -0.97% -(0.01%) -16× + + +__init__:152:update +5.38% +(0.00%) +17× - - -289 - - -__init__:2321:sensors_fans -1.08% -(0.00%) - + + +286->236 + + +5.38% +17× + + + +287 + + +__init__:507:msg_curse +2.44% +(0.02%) +60× - - -304 - - -threading:1115:join -4.16% -(0.00%) -32× + + +287->210 + + +2.38% +30024× + + + +288 + + +__init__:167:update +2.36% +(0.00%) + - + + +303 + + +subprocess:1165:communicate +5.36% +(0.00%) +37× + + + + + +303->30 + + +5.34% +34× + + + +321 + + +<frozen importlib:1349:_find_and_load +0.55% +(0.00%) +659× + + + + + +321->138 + + +0.54% +39× + + + +349 + + +sessions:673:send +4.66% +(0.00%) +34× + + + + + +655 + + +secure:33:__secure_popen +5.38% +(0.00%) +34× + + + + + +668->655 + + +5.38% +34× + + -307 - - -threading:999:run -4.35% -(0.00%) -65× +1243 + + +<frozen importlib:480:_call_with_frames_removed +0.53% +(0.00%) +1377× - - -307->283 - - -0.26% -39× + + +2071->1243 + + +0.53% +40× - - -322 - - -model:1131:wrapper -16.27% -(0.01%) -746× + + +433 + + +__init__:1491:process_iter +1.73% +(0.02%) +9545× - - -325 - - -__init__:519:msg_curse -1.48% -(0.02%) -30× + + +440 + + +stats:256:__update_plugin +11.07% +(0.01%) +899× - - -325->241 - - -1.43% -13459× - - - -700 - - -secure:33:__secure_popen -8.58% -(0.00%) -48× + + +511 + + +sessions:500:request +4.71% +(0.00%) +34× - - -329->700 - - -0.50% - - - - -700->37 - - -6.21% -32× - - - -356 - - -<frozen importlib:1349:_find_and_load -0.95% -(0.01%) -670× + + +561 + + +glances_batpercent:98:update +0.67% +(0.00%) + - - -356->158 - - -0.94% -37× - - - -386 - - -sessions:673:send -4.79% -(0.00%) -34× + + +564 + + +model:1139:wrapper +10.46% +(0.02%) +449× - - -1311 - - -<frozen importlib:480:_call_with_frames_removed -0.93% -(0.00%) -1400× + + +564->286 + + +5.38% +17× + + + +564->288 + + +2.36% + + + + +618 + + +connection:27:create_connection +4.56% +(0.00%) + - - -842->1311 - - -0.93% -39× - - - -447 - - -client:1027:send -4.66% -(0.00%) -35× - - - - - -473 - - -__init__:167:update -2.92% -(0.00%) - - - - - - -546 - - -sessions:500:request -4.86% -(0.00%) -34× - - - - - -597 - - -_pslinux:1026:retrieve -1.05% -(0.00%) -16× - - - - - -604 - - -glances_batpercent:98:update -2.03% -(0.00%) - - - - - - -607 - - -glances_batpercent:62:update -2.13% -(0.00%) - - - + + +655->303 + + +5.34% +34× - + 662 - - -connection:27:create_connection -4.66% -(0.00%) - + + +thread:69:_worker +2.36% +(0.00%) +36× - - -823 - - -_pslinux:1065:net_connections -1.06% -(0.00%) -16× + + +1795 + + +~:0:<method 'read' of '_io.BufferedReader' objects> +2.21% +(2.46%) +35321× - - -824 - - -__init__:2179:net_connections -1.07% -(0.00%) -16× + + +780->1795 + + +0.31% +2334× + + + +794 + + +__init__:143:main +96.39% +(0.00%) + - - -1343 - - -~:0:<built-in method builtins.exec> -100.00% -(0.04%) -830× + + +2109 + + +__init__:77:start +96.37% +(0.00%) + - - -1311->1343 - - -0.93% -40× + + +794->2109 + + +96.37% + - - -853 - - -__init__:143:main -99.83% -(0.00%) - + + +2109->321 + + +0.16% + + + + +801 + + +connectionpool:592:urlopen +4.64% +(0.00%) +34× - - -2215 - - -__init__:77:start -99.79% -(0.00%) - + + +817 + + +client:1320:endheaders +4.56% +(0.00%) +34× - - -853->2215 - - -99.79% - - - - -2215->356 - - -0.27% - - - - -860 - - -connectionpool:598:urlopen -4.77% -(0.00%) -34× + + +1276 + + +~:0:<built-in method builtins.exec> +96.48% +(0.03%) +826× - - -862 - - -adapters:613:send -4.78% -(0.00%) -34× + + +1243->1276 + + +0.53% +40× + + + +1653 + + +run-venv:1:<module> +96.48% +(0.00%) + - - -867 - - -api:62:get -4.66% -(0.00%) - + + +1276->1653 + + +96.48% + + + + +1653->794 + + +96.39% + + + + +1287 + + +__init__:545:as_dict +1.65% +(0.14%) +9531× - - -883 - - -__init__:73:import_module -0.51% -(0.00%) -39× + + +2290 + + +_common:498:wrapper +0.82% +(0.08%) +98106× - - -2214 - - -<frozen importlib:1375:_gcd_import -0.51% -(0.00%) -40× + + +1287->2290 + + +0.28% +19055× + + + +1301 + + +stats:95:_load_plugin +0.62% +(0.00%) +34× - - -883->2214 - - -0.51% -32× - - - -2214->356 - - -0.51% -32× - - - -1736 - - -run-venv:1:<module> -100.00% -(0.00%) - + + +1362 + + +client:1027:send +4.56% +(0.00%) +34× - - -1343->1736 - - -100.00% - - - - -1736->356 - - -0.17% - - - - -1736->853 - - -99.83% - - - - -1368 - - -stats:95:_load_plugin -1.00% -(0.00%) -33× + + +1377 + + +model:873:get_stats_display +2.50% +(0.00%) +1020× - - -1368->883 - - -0.50% -31× + + +1377->287 + + +2.44% +60× - - -1373 - - -connectionpool:380:_make_request -4.75% -(0.00%) -34× + + +1447 + + +adapters:613:send +4.65% +(0.00%) +34× - - -1385 - - -api:14:request -4.66% -(0.00%) - + + +1464 + + +api:14:request +4.57% +(0.00%) + - - -1449 - - -model:882:get_stats_display -1.57% -(0.00%) -990× + + +1597 + + +glances_curses:476:__get_stat_display +2.50% +(0.00%) +30× - - -1449->325 - - -1.48% -30× + + +1597->1377 + + +2.49% +990× - + + +1608 + + +glances_curses:1093:update +90.24% +(0.02%) +30× + + + + + +1608->2393 + + +0.76% + + + + +2400 + + +glances_curses:1079:flush +2.63% +(0.02%) +30× + + + + + +1608->2400 + + +2.63% +30× + + -1681 +2385 - -glances_curses:466:__get_stat_display -1.57% -(0.00%) -30× + +glances_curses:511:display +2.60% +(0.00%) +30× - - -1681->1449 - - -1.56% -960× + + +2400->2385 + + +2.60% +30× - - -1691 - - -glances_curses:1083:update -90.94% -(0.02%) -30× + + +1609 + + +stats:262:update +11.06% +(0.00%) +31× - - -1691->44 - - -2.80% -18× + + +1609->2393 + + +1.52% +10× - - -2507 - - -glances_curses:1069:flush -1.77% -(0.02%) -30× + + +1689 + + +~:0:<function socket.close at 0x7ec66a36d3a0> +4.56% +(0.00%) +12× - - -1691->2507 - - -1.77% -30× - - - -2505 - - -glances_curses:501:display -1.74% -(0.00%) -30× + + +1690 + + +socket:496:_real_close +4.56% +(0.00%) +12× - - -2507->2505 - - -1.74% -30× - - - -1775 - - -~:0:<method 'connect' of '_socket.socket' objects> -4.66% -(0.07%) -14× + + +1695 + + +threading:1153:_wait_for_tstate_lock +3.04% +(0.00%) +37× - - -1791 - - -connection:324:request -4.67% -(0.00%) -34× + + +1702 + + +connection:369:request +4.57% +(0.00%) +34× - - -1793 - - -queue:92:qsize -0.79% -(0.17%) -184579× + + +1832 + + +__init__:367:update +2.35% +(0.00%) +18× - - -1865 - - -threading:1153:_wait_for_tstate_lock -4.15% -(0.00%) -34× + + +1849 + + +_pslinux:1713:wrapper +1.30% +(0.14%) +170567× - - -1895 - - -~:0:<built-in method _io.open> -0.52% -(0.41%) -47125× + + +1850 + + +__init__:77:update +2.19% +(0.00%) +17× - + + +1891 + + +processes:539:update +2.19% +(0.01%) +17× + + + + + +1944 + + +thread:219:shutdown +2.36% +(0.00%) + + + + + + +1945 + + +glances_batpercent:62:update +0.67% +(0.00%) + + + + + + +1998 + + +battery:35:__init__ +0.72% +(0.00%) +10× + + + + + +2019 + + +connectionpool:377:_make_request +4.63% +(0.00%) +34× + + + + + +2280 + + +socket:500:close +4.56% +(0.00%) +12× + + + + + +2282 + + +processes:427:build_process_list +2.01% +(0.01%) +17× + + + + + +2298 + + +standalone:136:__serve_once +100.00% +(0.00%) +30× + + + + + +2298->1609 + + +5.18% +15× + + + +2300 + + +__init__:2321:sensors_fans +0.99% +(0.00%) +10× + + + + + +2380 + + +standalone:174:serve_n +96.21% +(0.00%) + + + + + + +2385->1597 + + +2.50% +30× + + -1953 - - -_pslinux:1714:wrapper -1.69% -(0.17%) -127711× +3974 + + +~:0:<method 'getch' of '_curses.window' objects> +88.71% +(84.72%) +538× - + + +3464->3974 + + +0.76% + + + + +2394 + + +standalone:31:__init__ +0.64% +(0.00%) + + + + + + +2481 + + +connection:192:_new_conn +4.56% +(0.00%) + + + + + + +2486 + + +connection:275:connect +4.56% +(0.00%) + + + + + + +2594 + + +_base:646:__exit__ +2.36% +(0.00%) + + + + + + +2612 + + +__init__:153:run +4.57% +(0.00%) + + + + + + +3367 + + +api:62:get +4.57% +(0.00%) + + + + + -2395 - - -_common:498:wrapper -1.05% -(0.10%) -73134× - - - - - -1953->2395 - - -0.36% -26058× - - - -2048 - - -thread:219:shutdown -2.78% -(0.00%) - - - - - - -2102 - - -_base:646:__exit__ -2.92% -(0.00%) - - - - - - -2103 - - -battery:35:__init__ -2.20% -(0.00%) - - - - - - -2177 - - -connection:192:_new_conn -4.66% -(0.00%) - - - - - - -2301 - - -connection:237:connect -4.66% -(0.00%) - - - - - - -2304 - - -client:1320:endheaders -4.66% -(0.00%) -35× - - - - - -2321 - - -__init__:243:get -0.50% -(0.00%) - - - - - - -2403 - - -standalone:136:__serve_once -99.52% -(0.00%) -30× - - - - - -2403->1691 - - -11.80% - - - - -2469 - - -__init__:259:_get_ip_public_info -0.50% -(0.00%) - - - - - - -2491 - - -standalone:174:serve_n -99.52% -(0.00%) - - - - - - -2503 - - -standalone:31:__init__ -1.71% -(0.00%) - - - - - - -2505->1681 - - -1.57% -30× - - - -2707 - - -__init__:115:get_public_ip -0.51% -(0.00%) -16× - - - - - -2707->2321 - - -0.50% - - - - -2713->2707 - - -0.51% -16× - - - -2714 - - -__init__:153:run -4.66% -(0.00%) - - - - - - -4174 - - -standalone:181:serve_forever -99.52% -(0.00%) - +4248 + + +standalone:181:serve_forever +96.21% +(0.00%) + diff --git a/docs/_static/glances-flame.svg b/docs/_static/glances-flame.svg index 5977d546..3ea04946 100644 --- a/docs/_static/glances-flame.svg +++ b/docs/_static/glances-flame.svg @@ -1,4 +1,4 @@ - \ No newline at end of file diff --git a/docs/_static/glances-pyinstrument.html b/docs/_static/glances-pyinstrument.html index 41b20e58..a0e2ff0b 100644 --- a/docs/_static/glances-pyinstrument.html +++ b/docs/_static/glances-pyinstrument.html @@ -25,7 +25,7 @@ diff --git a/docs/api.rst b/docs/api.rst index 39af21c4..62922d54 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -160,7 +160,7 @@ Get plugin stats:: "refresh": 3.0, "regex": True, "result": None, - "timer": 0.7241387367248535}, + "timer": 1.5811219215393066}, {"count": 0, "countmax": 20.0, "countmin": None, @@ -169,7 +169,7 @@ Get plugin stats:: "refresh": 3.0, "regex": True, "result": None, - "timer": 0.7240409851074219}] + "timer": 1.5810198783874512}] Fields descriptions: @@ -197,7 +197,7 @@ Get a specific item when field matches the given value:: "refresh": 3.0, "regex": True, "result": None, - "timer": 0.7241387367248535}]} + "timer": 1.5811219215393066}]} GET cloud --------- @@ -241,9 +241,9 @@ Get plugin stats:: [{"command": "/bin/sh -c /venv/bin/python3 -m glances $GLANCES_OPT", "cpu": {"total": 0.0}, "cpu_percent": 0.0, - "created": "2024-12-23T09:57:24.74297362Z", + "created": "2024-12-27T20:26:22.152530491Z", "engine": "docker", - "id": "53ab35eea82df261a8eb592da7896c5b04f4483765c8b72f720d4c946f1f997f", + "id": "ecb033c676e126298414075dbdaa3c19d16fe1a7ecccd7b892463bf4d366bb15", "image": ["glances:local-alpine-minimal"], "io": {}, "io_rx": None, @@ -252,12 +252,12 @@ Get plugin stats:: "memory": {}, "memory_percent": None, "memory_usage": None, - "name": "serene_shannon", + "name": "intelligent_bell", "network": {}, "network_rx": None, "network_tx": None, "status": "running", - "uptime": "53 mins"}] + "uptime": "29 mins"}] Fields descriptions: @@ -281,32 +281,32 @@ Fields descriptions: Get a specific field:: # curl http://localhost:61208/api/4/containers/name - {"name": ["serene_shannon"]} + {"name": ["intelligent_bell"]} Get a specific item when field matches the given value:: - # curl http://localhost:61208/api/4/containers/name/value/serene_shannon - {"serene_shannon": [{"command": "/bin/sh -c /venv/bin/python3 -m glances " - "$GLANCES_OPT", - "cpu": {"total": 0.0}, - "cpu_percent": 0.0, - "created": "2024-12-23T09:57:24.74297362Z", - "engine": "docker", - "id": "53ab35eea82df261a8eb592da7896c5b04f4483765c8b72f720d4c946f1f997f", - "image": ["glances:local-alpine-minimal"], - "io": {}, - "io_rx": None, - "io_wx": None, - "key": "name", - "memory": {}, - "memory_percent": None, - "memory_usage": None, - "name": "serene_shannon", - "network": {}, - "network_rx": None, - "network_tx": None, - "status": "running", - "uptime": "53 mins"}]} + # curl http://localhost:61208/api/4/containers/name/value/intelligent_bell + {"intelligent_bell": [{"command": "/bin/sh -c /venv/bin/python3 -m glances " + "$GLANCES_OPT", + "cpu": {"total": 0.0}, + "cpu_percent": 0.0, + "created": "2024-12-27T20:26:22.152530491Z", + "engine": "docker", + "id": "ecb033c676e126298414075dbdaa3c19d16fe1a7ecccd7b892463bf4d366bb15", + "image": ["glances:local-alpine-minimal"], + "io": {}, + "io_rx": None, + "io_wx": None, + "key": "name", + "memory": {}, + "memory_percent": None, + "memory_usage": None, + "name": "intelligent_bell", + "network": {}, + "network_rx": None, + "network_tx": None, + "status": "running", + "uptime": "29 mins"}]} GET core -------- @@ -333,19 +333,19 @@ Get plugin stats:: # curl http://localhost:61208/api/4/cpu {"cpucore": 16, - "ctx_switches": 186200231, + "ctx_switches": 442920407, "guest": 0.2, - "idle": 90.9, - "interrupts": 141380121, - "iowait": 0.3, + "idle": 91.4, + "interrupts": 314302192, + "iowait": 0.4, "irq": 0.0, "nice": 0.0, - "soft_interrupts": 51824793, + "soft_interrupts": 125188157, "steal": 0.0, "syscalls": 0, - "system": 3.3, - "total": 9.9, - "user": 5.4} + "system": 4.7, + "total": 8.6, + "user": 3.5} Fields descriptions: @@ -378,7 +378,7 @@ Fields descriptions: Get a specific field:: # curl http://localhost:61208/api/4/cpu/total - {"total": 9.9} + {"total": 8.6} GET diskio ---------- @@ -388,14 +388,14 @@ Get plugin stats:: # curl http://localhost:61208/api/4/diskio [{"disk_name": "nvme0n1", "key": "disk_name", - "read_bytes": 7481031168, - "read_count": 335905, - "write_bytes": 334967751680, - "write_count": 3293171}, + "read_bytes": 9757108736, + "read_count": 430677, + "write_bytes": 358053864448, + "write_count": 4363876}, {"disk_name": "nvme0n1p1", "key": "disk_name", - "read_bytes": 14223360, - "read_count": 1124, + "read_bytes": 18552832, + "read_count": 1231, "write_bytes": 5120, "write_count": 3}] @@ -431,10 +431,10 @@ Get a specific item when field matches the given value:: # curl http://localhost:61208/api/4/diskio/disk_name/value/nvme0n1 {"nvme0n1": [{"disk_name": "nvme0n1", "key": "disk_name", - "read_bytes": 7481031168, - "read_count": 335905, - "write_bytes": 334967751680, - "write_count": 3293171}]} + "read_bytes": 9757108736, + "read_count": 430677, + "write_bytes": 358053864448, + "write_count": 4363876}]} GET folders ----------- @@ -461,13 +461,13 @@ Get plugin stats:: # curl http://localhost:61208/api/4/fs [{"device_name": "/dev/mapper/ubuntu--vg-ubuntu--lv", - "free": 847175311360, + "free": 844432867328, "fs_type": "ext4", "key": "mnt_point", "mnt_point": "/", - "percent": 11.1, + "percent": 11.4, "size": 1003736440832, - "used": 105498624000}, + "used": 108241068032}, {"device_name": "zsfpool", "free": 41811968, "fs_type": "zfs", @@ -496,13 +496,13 @@ Get a specific item when field matches the given value:: # curl http://localhost:61208/api/4/fs/mnt_point/value// {"/": [{"device_name": "/dev/mapper/ubuntu--vg-ubuntu--lv", - "free": 847175311360, + "free": 844432867328, "fs_type": "ext4", "key": "mnt_point", "mnt_point": "/", - "percent": 11.1, + "percent": 11.4, "size": 1003736440832, - "used": 105498624000}]} + "used": 108241068032}]} GET gpu ------- @@ -535,8 +535,8 @@ GET ip Get plugin stats:: # curl http://localhost:61208/api/4/ip - {"address": "192.168.1.26", - "gateway": "192.168.1.1", + {"address": "192.168.0.28", + "gateway": "192.168.0.254", "mask": "255.255.255.0", "mask_cidr": 24, "public_address": "", @@ -554,7 +554,7 @@ Fields descriptions: Get a specific field:: # curl http://localhost:61208/api/4/ip/gateway - {"gateway": "192.168.1.1"} + {"gateway": "192.168.0.254"} GET irq ------- @@ -576,9 +576,9 @@ Get plugin stats:: # curl http://localhost:61208/api/4/load {"cpucore": 16, - "min1": 1.9677734375, - "min15": 1.3525390625, - "min5": 1.74951171875} + "min1": 0.98876953125, + "min15": 0.9111328125, + "min5": 0.83837890625} Fields descriptions: @@ -590,7 +590,7 @@ Fields descriptions: Get a specific field:: # curl http://localhost:61208/api/4/load/min1 - {"min1": 1.9677734375} + {"min1": 0.98876953125} GET mem ------- @@ -598,16 +598,16 @@ GET mem Get plugin stats:: # curl http://localhost:61208/api/4/mem - {"active": 6198247424, - "available": 6979837952, - "buffers": 238018560, - "cached": 4485349376, - "free": 6979837952, - "inactive": 4703682560, - "percent": 57.5, - "shared": 929169408, + {"active": 8635580416, + "available": 6203834368, + "buffers": 249393152, + "cached": 6872862720, + "free": 6203834368, + "inactive": 4822306816, + "percent": 62.2, + "shared": 1167765504, "total": 16422453248, - "used": 9442615296} + "used": 10218618880} Fields descriptions: @@ -634,13 +634,13 @@ GET memswap Get plugin stats:: # curl http://localhost:61208/api/4/memswap - {"free": 3374575616, - "percent": 21.4, - "sin": 45301760, - "sout": 927838208, + {"free": 2600464384, + "percent": 39.5, + "sin": 117788672, + "sout": 1828995072, "time_since_update": 1, "total": 4294963200, - "used": 920387584} + "used": 1694498816} Fields descriptions: @@ -665,26 +665,26 @@ Get plugin stats:: # curl http://localhost:61208/api/4/network [{"alias": None, "bytes_all": 0, - "bytes_all_gauge": 1973241032, + "bytes_all_gauge": 7117365935, "bytes_recv": 0, - "bytes_recv_gauge": 1792308988, + "bytes_recv_gauge": 6785492572, "bytes_sent": 0, - "bytes_sent_gauge": 180932044, + "bytes_sent_gauge": 331873363, "interface_name": "wlp0s20f3", "key": "interface_name", "speed": 0, - "time_since_update": 0.7332046031951904}, + "time_since_update": 1.583664894104004}, {"alias": None, "bytes_all": 0, - "bytes_all_gauge": 20154200, + "bytes_all_gauge": 34030517, "bytes_recv": 0, - "bytes_recv_gauge": 4852300, + "bytes_recv_gauge": 6247319, "bytes_sent": 0, - "bytes_sent_gauge": 15301900, + "bytes_sent_gauge": 27783198, "interface_name": "mpqemubr0", "key": "interface_name", "speed": 10485760000, - "time_since_update": 0.7332046031951904}] + "time_since_update": 1.583664894104004}] Fields descriptions: @@ -713,15 +713,15 @@ Get a specific item when field matches the given value:: # curl http://localhost:61208/api/4/network/interface_name/value/wlp0s20f3 {"wlp0s20f3": [{"alias": None, "bytes_all": 0, - "bytes_all_gauge": 1973241032, + "bytes_all_gauge": 7117365935, "bytes_recv": 0, - "bytes_recv_gauge": 1792308988, + "bytes_recv_gauge": 6785492572, "bytes_sent": 0, - "bytes_sent_gauge": 180932044, + "bytes_sent_gauge": 331873363, "interface_name": "wlp0s20f3", "key": "interface_name", "speed": 0, - "time_since_update": 0.7332046031951904}]} + "time_since_update": 1.583664894104004}]} GET now ------- @@ -729,7 +729,7 @@ GET now Get plugin stats:: # curl http://localhost:61208/api/4/now - {"custom": "2024-12-23 11:50:25 CET", "iso": "2024-12-23T11:50:25+01:00"} + {"custom": "2024-12-27 21:55:32 CET", "iso": "2024-12-27T21:55:32+01:00"} Fields descriptions: @@ -739,7 +739,7 @@ Fields descriptions: Get a specific field:: # curl http://localhost:61208/api/4/now/iso - {"iso": "2024-12-23T11:50:25+01:00"} + {"iso": "2024-12-27T21:55:32+01:00"} GET percpu ---------- @@ -751,7 +751,7 @@ Get plugin stats:: "dpc": None, "guest": 0.0, "guest_nice": 0.0, - "idle": 43.0, + "idle": 44.0, "interrupt": None, "iowait": 0.0, "irq": 0.0, @@ -759,14 +759,14 @@ Get plugin stats:: "nice": 0.0, "softirq": 0.0, "steal": 0.0, - "system": 0.0, - "total": 57.0, - "user": 2.0}, + "system": 2.0, + "total": 56.0, + "user": 1.0}, {"cpu_number": 1, "dpc": None, "guest": 0.0, "guest_nice": 0.0, - "idle": 36.0, + "idle": 38.0, "interrupt": None, "iowait": 0.0, "irq": 0.0, @@ -775,7 +775,7 @@ Get plugin stats:: "softirq": 0.0, "steal": 0.0, "system": 8.0, - "total": 64.0, + "total": 62.0, "user": 0.0}] Fields descriptions: @@ -807,12 +807,13 @@ Get plugin stats:: # curl http://localhost:61208/api/4/ports [{"description": "DefaultGateway", - "host": "192.168.1.1", + "host": "192.168.0.254", "indice": "port_0", + "key": "indice", "port": 0, "refresh": 30, "rtt_warning": None, - "status": 0.005522, + "status": 0.006327, "timeout": 3}] Fields descriptions: @@ -828,20 +829,21 @@ Fields descriptions: Get a specific field:: - # curl http://localhost:61208/api/4/ports/host - {"host": ["192.168.1.1"]} + # curl http://localhost:61208/api/4/ports/indice + {"indice": ["port_0"]} Get a specific item when field matches the given value:: - # curl http://localhost:61208/api/4/ports/host/value/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.005522, - "timeout": 3}]} + # curl http://localhost:61208/api/4/ports/indice/value/port_0 + {"port_0": [{"description": "DefaultGateway", + "host": "192.168.0.254", + "indice": "port_0", + "key": "indice", + "port": 0, + "refresh": 30, + "rtt_warning": None, + "status": 0.006327, + "timeout": 3}]} GET processcount ---------------- @@ -849,7 +851,7 @@ GET processcount Get plugin stats:: # curl http://localhost:61208/api/4/processcount - {"pid_max": 0, "running": 1, "sleeping": 422, "thread": 2003, "total": 562} + {"pid_max": 0, "running": 1, "sleeping": 427, "thread": 2087, "total": 565} Fields descriptions: @@ -862,7 +864,7 @@ Fields descriptions: Get a specific field:: # curl http://localhost:61208/api/4/processcount/total - {"total": 562} + {"total": 565} GET processlist --------------- @@ -901,19 +903,19 @@ Get plugin stats:: "cpu_times": {"children_system": 0.0, "children_user": 0.0, "iowait": 0.0, - "system": 32.98, - "user": 207.67}, + "system": 87.02, + "user": 419.57}, "gids": {"effective": 0, "real": 0, "saved": 0}, "io_counters": [0, 0, 0, 0, 0], "key": "pid", - "memory_info": {"data": 1394343936, + "memory_info": {"data": 1395154944, "dirty": 0, "lib": 0, - "rss": 994623488, + "rss": 927035392, "shared": 4194304, "text": 6172672, - "vms": 3956453376}, - "memory_percent": 6.056485428698844, + "vms": 4359106560}, + "memory_percent": 5.644926357838154, "name": "qemu-system-x86_64", "nice": 0, "num_threads": 4, @@ -921,28 +923,151 @@ Get plugin stats:: "status": "S", "time_since_update": 1, "username": "root"}, - {"cmdline": ["/snap/firefox/5361/usr/lib/firefox/firefox"], + {"cmdline": ["/snap/code/172/usr/share/code/code", + "/home/nicolargo/.vscode/extensions/ms-python.vscode-pylance-2024.12.1/dist/server.bundle.js", + "--cancellationReceive=file:2270db0b977df856f09230673763706254e8fcbbc9", + "--node-ipc", + "--clientProcessId=11100"], "cpu_percent": 0.0, - "cpu_times": {"children_system": 181.12, - "children_user": 938.84, + "cpu_times": {"children_system": 0.31, + "children_user": 1.89, "iowait": 0.0, - "system": 464.81, - "user": 1529.14}, + "system": 75.53, + "user": 1217.99}, "gids": {"effective": 1000, "real": 1000, "saved": 1000}, - "io_counters": [857285632, 3413405696, 0, 0, 0], + "io_counters": [81861632, + 970752, + 0, + 0, + 0, + 48105472, + 3362816, + 0, + 0, + 0, + 485559296, + 212156416, + 0, + 0, + 0, + 14929920, + 0, + 0, + 0, + 0, + 69419008, + 0, + 0, + 0, + 0, + 2304000, + 0, + 0, + 0, + 0, + 116996096, + 323682304, + 0, + 0, + 0, + 2487296, + 0, + 0, + 0, + 0, + 7642112, + 0, + 0, + 0, + 0, + 52054016, + 554795008, + 0, + 0, + 0, + 4978688, + 0, + 0, + 0, + 0, + 240640, + 0, + 0, + 0, + 0, + 36348928, + 0, + 0, + 0, + 0, + 16163840, + 0, + 0, + 0, + 0, + 5557248, + 6262784, + 0, + 0, + 0, + 646144, + 0, + 0, + 0, + 0, + 7017472, + 0, + 0, + 0, + 0, + 394240, + 0, + 0, + 0, + 0, + 845824, + 0, + 0, + 0, + 0, + 344064, + 0, + 0, + 0, + 0, + 217088, + 0, + 0, + 0, + 0, + 5934080, + 8896512, + 0, + 0, + 0, + 27805696, + 348160, + 0, + 0, + 0, + 951296, + 0, + 0, + 0, + 0], "key": "pid", - "memory_info": {"data": 1195474944, + "memory_info": {"data": 1122275328, "dirty": 0, "lib": 0, - "rss": 813187072, - "shared": 271319040, - "text": 942080, - "vms": 21575331840}, - "memory_percent": 4.951678410769923, - "name": "firefox", + "rss": 736038912, + "shared": 66584576, + "text": 132239360, + "vms": 1219821342720}, + "memory_percent": 4.481905966696164, + "name": "code", "nice": 0, - "num_threads": 144, - "pid": 5518, + "num_threads": 14, + "pid": 11631, "status": "S", "time_since_update": 1, "username": "nicolargo"}] @@ -975,17 +1100,17 @@ Get plugin stats:: "cpu_times": {"children_system": 0.0, "children_user": 0.0, "iowait": 0.0, - "system": 32.98, - "user": 207.67}, + "system": 87.02, + "user": 419.57}, "io_counters": [0, 0, 0, 0, 0], - "memory_info": {"data": 1394343936, + "memory_info": {"data": 1395154944, "dirty": 0, "lib": 0, - "rss": 994623488, + "rss": 927035392, "shared": 4194304, "text": 6172672, - "vms": 3956453376}, - "memory_percent": 6.056485428698844, + "vms": 4359106560}, + "memory_percent": 5.644926357838154, "name": "qemu-system-x86_64", "nice": 0, "nprocs": 1, @@ -994,27 +1119,166 @@ Get plugin stats:: "status": "S", "time_since_update": 1, "username": "root"}, - {"childrens": [5518], - "cmdline": ["firefox"], + {"childrens": [11631, + 11003, + 11100, + 17962, + 11819, + 293018, + 10919, + 293017, + 187970, + 11098, + 187968, + 308704, + 11099, + 11630, + 293033, + 826951, + 11056, + 470255, + 11382, + 826952, + 11849, + 10969, + 10922, + 10921], + "cmdline": ["code"], "cpu_percent": 0, - "cpu_times": {"children_system": 181.12, - "children_user": 938.84, - "iowait": 0.0, - "system": 464.81, - "user": 1529.14}, - "io_counters": [857285632, 3413405696, 0, 0, 0], - "memory_info": {"data": 1195474944, - "dirty": 0, - "lib": 0, - "rss": 813187072, - "shared": 271319040, - "text": 942080, - "vms": 21575331840}, - "memory_percent": 4.951678410769923, - "name": "firefox", + "cpu_times": {"children_system": 2537.03, + "children_user": 1840.72, + "system": 1853.3900000000003, + "user": 9950.630000000001}, + "io_counters": [81861632, + 970752, + 0, + 0, + 0, + 48105472, + 3362816, + 0, + 0, + 0, + 485559296, + 212156416, + 0, + 0, + 0, + 14929920, + 0, + 0, + 0, + 0, + 69419008, + 0, + 0, + 0, + 0, + 2304000, + 0, + 0, + 0, + 0, + 116996096, + 323682304, + 0, + 0, + 0, + 2487296, + 0, + 0, + 0, + 0, + 7642112, + 0, + 0, + 0, + 0, + 52054016, + 554795008, + 0, + 0, + 0, + 4978688, + 0, + 0, + 0, + 0, + 240640, + 0, + 0, + 0, + 0, + 36348928, + 0, + 0, + 0, + 0, + 16163840, + 0, + 0, + 0, + 0, + 5557248, + 6262784, + 0, + 0, + 0, + 646144, + 0, + 0, + 0, + 0, + 7017472, + 0, + 0, + 0, + 0, + 394240, + 0, + 0, + 0, + 0, + 845824, + 0, + 0, + 0, + 0, + 344064, + 0, + 0, + 0, + 0, + 217088, + 0, + 0, + 0, + 0, + 5934080, + 8896512, + 0, + 0, + 0, + 27805696, + 348160, + 0, + 0, + 0, + 951296, + 0, + 0, + 0, + 0], + "memory_info": {"data": 7607742464, + "rss": 4582584320, + "shared": 1622130688, + "text": 3173744640, + "vms": 24468858753024}, + "memory_percent": 27.90438341213173, + "name": "code", "nice": 0, - "nprocs": 1, - "num_threads": 144, + "nprocs": 24, + "num_threads": 307, "pid": "_", "status": "S", "time_since_update": 1, @@ -1042,7 +1306,7 @@ GET psutilversion Get plugin stats:: # curl http://localhost:61208/api/4/psutilversion - "6.1.0" + "6.1.1" GET quicklook ------------- @@ -1050,240 +1314,15 @@ GET quicklook Get plugin stats:: # curl http://localhost:61208/api/4/quicklook - {"cpu": 9.9, + {"cpu": 8.6, "cpu_hz": 4475000000.0, - "cpu_hz_current": 678087125.0, + "cpu_hz_current": 763765500.0, "cpu_log_core": 16, "cpu_name": "13th Gen Intel(R) Core(TM) i7-13620H", "cpu_phys_core": 10, - "load": 8.5, - "mem": 57.5, + "load": 5.7, + "mem": 62.2, "percpu": [{"cpu_number": 0, - "dpc": None, - "guest": 0.0, - "guest_nice": 0.0, - "idle": 43.0, - "interrupt": None, - "iowait": 0.0, - "irq": 0.0, - "key": "cpu_number", - "nice": 0.0, - "softirq": 0.0, - "steal": 0.0, - "system": 0.0, - "total": 57.0, - "user": 2.0}, - {"cpu_number": 1, - "dpc": None, - "guest": 0.0, - "guest_nice": 0.0, - "idle": 36.0, - "interrupt": None, - "iowait": 0.0, - "irq": 0.0, - "key": "cpu_number", - "nice": 0.0, - "softirq": 0.0, - "steal": 0.0, - "system": 8.0, - "total": 64.0, - "user": 0.0}, - {"cpu_number": 2, - "dpc": None, - "guest": 0.0, - "guest_nice": 0.0, - "idle": 43.0, - "interrupt": None, - "iowait": 0.0, - "irq": 0.0, - "key": "cpu_number", - "nice": 0.0, - "softirq": 0.0, - "steal": 0.0, - "system": 0.0, - "total": 57.0, - "user": 1.0}, - {"cpu_number": 3, - "dpc": None, - "guest": 0.0, - "guest_nice": 0.0, - "idle": 45.0, - "interrupt": None, - "iowait": 0.0, - "irq": 0.0, - "key": "cpu_number", - "nice": 0.0, - "softirq": 0.0, - "steal": 0.0, - "system": 0.0, - "total": 55.0, - "user": 0.0}, - {"cpu_number": 4, - "dpc": None, - "guest": 0.0, - "guest_nice": 0.0, - "idle": 31.0, - "interrupt": None, - "iowait": 0.0, - "irq": 0.0, - "key": "cpu_number", - "nice": 0.0, - "softirq": 0.0, - "steal": 0.0, - "system": 7.0, - "total": 69.0, - "user": 5.0}, - {"cpu_number": 5, - "dpc": None, - "guest": 0.0, - "guest_nice": 0.0, - "idle": 45.0, - "interrupt": None, - "iowait": 0.0, - "irq": 0.0, - "key": "cpu_number", - "nice": 0.0, - "softirq": 0.0, - "steal": 0.0, - "system": 0.0, - "total": 55.0, - "user": 1.0}, - {"cpu_number": 6, - "dpc": None, - "guest": 0.0, - "guest_nice": 0.0, - "idle": 36.0, - "interrupt": None, - "iowait": 3.0, - "irq": 0.0, - "key": "cpu_number", - "nice": 0.0, - "softirq": 0.0, - "steal": 0.0, - "system": 5.0, - "total": 64.0, - "user": 2.0}, - {"cpu_number": 7, - "dpc": None, - "guest": 0.0, - "guest_nice": 0.0, - "idle": 26.0, - "interrupt": None, - "iowait": 0.0, - "irq": 0.0, - "key": "cpu_number", - "nice": 0.0, - "softirq": 0.0, - "steal": 0.0, - "system": 3.0, - "total": 74.0, - "user": 16.0}, - {"cpu_number": 8, - "dpc": None, - "guest": 0.0, - "guest_nice": 0.0, - "idle": 41.0, - "interrupt": None, - "iowait": 0.0, - "irq": 0.0, - "key": "cpu_number", - "nice": 0.0, - "softirq": 0.0, - "steal": 0.0, - "system": 2.0, - "total": 59.0, - "user": 1.0}, - {"cpu_number": 9, - "dpc": None, - "guest": 0.0, - "guest_nice": 0.0, - "idle": 45.0, - "interrupt": None, - "iowait": 0.0, - "irq": 0.0, - "key": "cpu_number", - "nice": 0.0, - "softirq": 0.0, - "steal": 0.0, - "system": 0.0, - "total": 55.0, - "user": 0.0}, - {"cpu_number": 10, - "dpc": None, - "guest": 0.0, - "guest_nice": 0.0, - "idle": 39.0, - "interrupt": None, - "iowait": 0.0, - "irq": 0.0, - "key": "cpu_number", - "nice": 0.0, - "softirq": 0.0, - "steal": 0.0, - "system": 1.0, - "total": 61.0, - "user": 5.0}, - {"cpu_number": 11, - "dpc": None, - "guest": 0.0, - "guest_nice": 0.0, - "idle": 45.0, - "interrupt": None, - "iowait": 0.0, - "irq": 0.0, - "key": "cpu_number", - "nice": 0.0, - "softirq": 0.0, - "steal": 0.0, - "system": 0.0, - "total": 55.0, - "user": 0.0}, - {"cpu_number": 12, - "dpc": None, - "guest": 0.0, - "guest_nice": 0.0, - "idle": 43.0, - "interrupt": None, - "iowait": 0.0, - "irq": 0.0, - "key": "cpu_number", - "nice": 0.0, - "softirq": 0.0, - "steal": 0.0, - "system": 0.0, - "total": 57.0, - "user": 1.0}, - {"cpu_number": 13, - "dpc": None, - "guest": 0.0, - "guest_nice": 0.0, - "idle": 42.0, - "interrupt": None, - "iowait": 0.0, - "irq": 0.0, - "key": "cpu_number", - "nice": 0.0, - "softirq": 0.0, - "steal": 0.0, - "system": 0.0, - "total": 58.0, - "user": 3.0}, - {"cpu_number": 14, - "dpc": None, - "guest": 0.0, - "guest_nice": 0.0, - "idle": 43.0, - "interrupt": None, - "iowait": 2.0, - "irq": 0.0, - "key": "cpu_number", - "nice": 0.0, - "softirq": 0.0, - "steal": 0.0, - "system": 1.0, - "total": 57.0, - "user": 0.0}, - {"cpu_number": 15, "dpc": None, "guest": 0.0, "guest_nice": 0.0, @@ -1295,10 +1334,235 @@ Get plugin stats:: "nice": 0.0, "softirq": 0.0, "steal": 0.0, - "system": 1.0, + "system": 2.0, "total": 56.0, - "user": 0.0}], - "swap": 21.4} + "user": 1.0}, + {"cpu_number": 1, + "dpc": None, + "guest": 0.0, + "guest_nice": 0.0, + "idle": 38.0, + "interrupt": None, + "iowait": 0.0, + "irq": 0.0, + "key": "cpu_number", + "nice": 0.0, + "softirq": 0.0, + "steal": 0.0, + "system": 8.0, + "total": 62.0, + "user": 0.0}, + {"cpu_number": 2, + "dpc": None, + "guest": 0.0, + "guest_nice": 0.0, + "idle": 47.0, + "interrupt": None, + "iowait": 0.0, + "irq": 0.0, + "key": "cpu_number", + "nice": 0.0, + "softirq": 0.0, + "steal": 0.0, + "system": 0.0, + "total": 53.0, + "user": 1.0}, + {"cpu_number": 3, + "dpc": None, + "guest": 0.0, + "guest_nice": 0.0, + "idle": 48.0, + "interrupt": None, + "iowait": 0.0, + "irq": 0.0, + "key": "cpu_number", + "nice": 0.0, + "softirq": 0.0, + "steal": 0.0, + "system": 0.0, + "total": 52.0, + "user": 0.0}, + {"cpu_number": 4, + "dpc": None, + "guest": 0.0, + "guest_nice": 0.0, + "idle": 18.0, + "interrupt": None, + "iowait": 2.0, + "irq": 0.0, + "key": "cpu_number", + "nice": 0.0, + "softirq": 0.0, + "steal": 0.0, + "system": 16.0, + "total": 82.0, + "user": 12.0}, + {"cpu_number": 5, + "dpc": None, + "guest": 0.0, + "guest_nice": 0.0, + "idle": 42.0, + "interrupt": None, + "iowait": 0.0, + "irq": 0.0, + "key": "cpu_number", + "nice": 0.0, + "softirq": 0.0, + "steal": 0.0, + "system": 1.0, + "total": 58.0, + "user": 5.0}, + {"cpu_number": 6, + "dpc": None, + "guest": 0.0, + "guest_nice": 0.0, + "idle": 29.0, + "interrupt": None, + "iowait": 0.0, + "irq": 0.0, + "key": "cpu_number", + "nice": 0.0, + "softirq": 0.0, + "steal": 0.0, + "system": 8.0, + "total": 71.0, + "user": 11.0}, + {"cpu_number": 7, + "dpc": None, + "guest": 0.0, + "guest_nice": 0.0, + "idle": 48.0, + "interrupt": None, + "iowait": 0.0, + "irq": 0.0, + "key": "cpu_number", + "nice": 0.0, + "softirq": 0.0, + "steal": 0.0, + "system": 0.0, + "total": 52.0, + "user": 1.0}, + {"cpu_number": 8, + "dpc": None, + "guest": 0.0, + "guest_nice": 0.0, + "idle": 47.0, + "interrupt": None, + "iowait": 0.0, + "irq": 0.0, + "key": "cpu_number", + "nice": 0.0, + "softirq": 0.0, + "steal": 0.0, + "system": 0.0, + "total": 53.0, + "user": 1.0}, + {"cpu_number": 9, + "dpc": None, + "guest": 0.0, + "guest_nice": 0.0, + "idle": 48.0, + "interrupt": None, + "iowait": 0.0, + "irq": 0.0, + "key": "cpu_number", + "nice": 0.0, + "softirq": 0.0, + "steal": 0.0, + "system": 0.0, + "total": 52.0, + "user": 1.0}, + {"cpu_number": 10, + "dpc": None, + "guest": 0.0, + "guest_nice": 0.0, + "idle": 38.0, + "interrupt": None, + "iowait": 0.0, + "irq": 0.0, + "key": "cpu_number", + "nice": 0.0, + "softirq": 0.0, + "steal": 0.0, + "system": 4.0, + "total": 62.0, + "user": 7.0}, + {"cpu_number": 11, + "dpc": None, + "guest": 0.0, + "guest_nice": 0.0, + "idle": 48.0, + "interrupt": None, + "iowait": 0.0, + "irq": 0.0, + "key": "cpu_number", + "nice": 0.0, + "softirq": 0.0, + "steal": 0.0, + "system": 0.0, + "total": 52.0, + "user": 0.0}, + {"cpu_number": 12, + "dpc": None, + "guest": 0.0, + "guest_nice": 0.0, + "idle": 46.0, + "interrupt": None, + "iowait": 0.0, + "irq": 0.0, + "key": "cpu_number", + "nice": 0.0, + "softirq": 0.0, + "steal": 0.0, + "system": 1.0, + "total": 54.0, + "user": 1.0}, + {"cpu_number": 13, + "dpc": None, + "guest": 0.0, + "guest_nice": 0.0, + "idle": 46.0, + "interrupt": None, + "iowait": 0.0, + "irq": 0.0, + "key": "cpu_number", + "nice": 0.0, + "softirq": 0.0, + "steal": 0.0, + "system": 1.0, + "total": 54.0, + "user": 1.0}, + {"cpu_number": 14, + "dpc": None, + "guest": 0.0, + "guest_nice": 0.0, + "idle": 47.0, + "interrupt": None, + "iowait": 0.0, + "irq": 0.0, + "key": "cpu_number", + "nice": 0.0, + "softirq": 0.0, + "steal": 0.0, + "system": 0.0, + "total": 53.0, + "user": 0.0}, + {"cpu_number": 15, + "dpc": None, + "guest": 0.0, + "guest_nice": 0.0, + "idle": 47.0, + "interrupt": None, + "iowait": 0.0, + "irq": 0.0, + "key": "cpu_number", + "nice": 0.0, + "softirq": 0.0, + "steal": 0.0, + "system": 0.0, + "total": 53.0, + "user": 1.0}], + "swap": 39.5} Fields descriptions: @@ -1336,14 +1600,14 @@ Get plugin stats:: "label": "Ambient", "type": "temperature_core", "unit": "C", - "value": 35, + "value": 34, "warning": 0}, {"critical": None, "key": "label", "label": "Ambient 3", "type": "temperature_core", "unit": "C", - "value": 29, + "value": 28, "warning": 0}] Fields descriptions: @@ -1404,7 +1668,7 @@ Get a specific item when field matches the given value:: "label": "Ambient", "type": "temperature_core", "unit": "C", - "value": 35, + "value": 34, "warning": 0}]} GET smart @@ -1448,7 +1712,7 @@ GET uptime Get plugin stats:: # curl http://localhost:61208/api/4/uptime - "1 day, 22:42:15" + "6 days, 8:47:13" GET version ----------- @@ -1456,7 +1720,7 @@ GET version Get plugin stats:: # curl http://localhost:61208/api/4/version - "4.3.0_dev06" + "4.3.0.3" GET vms ------- @@ -1474,7 +1738,7 @@ Get plugin stats:: "load_1min": 0, "load_5min": 0, "memory_total": 1002471424, - "memory_usage": 300982272, + "memory_usage": 301858816, "name": "upstanding-sparrow", "release": "Ubuntu 24.04.1 LTS", "status": "running"}] @@ -1513,7 +1777,7 @@ Get a specific item when field matches the given value:: "load_1min": 0, "load_5min": 0, "memory_total": 1002471424, - "memory_usage": 300982272, + "memory_usage": 301858816, "name": "upstanding-sparrow", "release": "Ubuntu 24.04.1 LTS", "status": "running"}]} @@ -1525,8 +1789,8 @@ Get plugin stats:: # curl http://localhost:61208/api/4/wifi [{"key": "ssid", - "quality_level": -60.0, - "quality_link": 50.0, + "quality_level": -69.0, + "quality_link": 41.0, "ssid": "wlp0s20f3"}] Get a specific field:: @@ -1538,8 +1802,8 @@ Get a specific item when field matches the given value:: # curl http://localhost:61208/api/4/wifi/ssid/value/wlp0s20f3 {"wlp0s20f3": [{"key": "ssid", - "quality_level": -60.0, - "quality_link": 50.0, + "quality_level": -69.0, + "quality_link": 41.0, "ssid": "wlp0s20f3"}]} GET all stats @@ -1584,34 +1848,34 @@ GET stats history History of a plugin:: # curl http://localhost:61208/api/4/cpu/history - {"system": [["2024-12-23T11:50:26.665965", 3.3], - ["2024-12-23T11:50:28.011008", 1.1], - ["2024-12-23T11:50:29.031680", 1.1]], - "user": [["2024-12-23T11:50:26.665960", 5.4], - ["2024-12-23T11:50:28.011004", 1.8], - ["2024-12-23T11:50:29.031676", 1.8]]} + {"system": [["2024-12-27T21:55:33.234554", 4.7], + ["2024-12-27T21:55:34.515353", 2.0], + ["2024-12-27T21:55:35.623140", 2.0]], + "user": [["2024-12-27T21:55:33.234551", 3.5], + ["2024-12-27T21:55:34.515349", 1.8], + ["2024-12-27T21:55:35.623138", 1.8]]} Limit history to last 2 values:: # curl http://localhost:61208/api/4/cpu/history/2 - {"system": [["2024-12-23T11:50:28.011008", 1.1], - ["2024-12-23T11:50:29.031680", 1.1]], - "user": [["2024-12-23T11:50:28.011004", 1.8], - ["2024-12-23T11:50:29.031676", 1.8]]} + {"system": [["2024-12-27T21:55:34.515353", 2.0], + ["2024-12-27T21:55:35.623140", 2.0]], + "user": [["2024-12-27T21:55:34.515349", 1.8], + ["2024-12-27T21:55:35.623138", 1.8]]} History for a specific field:: # curl http://localhost:61208/api/4/cpu/system/history - {"system": [["2024-12-23T11:50:25.516696", 3.3], - ["2024-12-23T11:50:26.665965", 3.3], - ["2024-12-23T11:50:28.011008", 1.1], - ["2024-12-23T11:50:29.031680", 1.1]]} + {"system": [["2024-12-27T21:55:31.844531", 4.7], + ["2024-12-27T21:55:33.234554", 4.7], + ["2024-12-27T21:55:34.515353", 2.0], + ["2024-12-27T21:55:35.623140", 2.0]]} Limit history for a specific field to last 2 values:: # curl http://localhost:61208/api/4/cpu/system/history - {"system": [["2024-12-23T11:50:28.011008", 1.1], - ["2024-12-23T11:50:29.031680", 1.1]]} + {"system": [["2024-12-27T21:55:34.515353", 2.0], + ["2024-12-27T21:55:35.623140", 2.0]]} GET limits (used for thresholds) -------------------------------- @@ -1623,7 +1887,6 @@ All limits/thresholds:: "amps": {"amps_disable": ["False"], "history_size": 1200.0}, "containers": {"containers_all": ["False"], "containers_disable": ["False"], - "containers_disable_stats": ["diskio", "networkio"], "containers_max_name_size": 20.0, "history_size": 1200.0}, "core": {"history_size": 1200.0}, diff --git a/docs/man/glances.1 b/docs/man/glances.1 index 6ac88b24..eddeef5d 100644 --- a/docs/man/glances.1 +++ b/docs/man/glances.1 @@ -1,3 +1,4 @@ +'\" t .\" Man page generated from reStructuredText. . . @@ -27,7 +28,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" "Dec 23, 2024" "4.3.0_dev06" "Glances" +.TH "GLANCES" "1" "Dec 27, 2024" "4.3.0.3" "Glances" .SH NAME glances \- An eye on your system .SH SYNOPSIS @@ -559,9 +560,8 @@ A template is available in the \fB/usr{,/local}/share/doc/glances\fP .sp You can place your \fBglances.conf\fP file in the following locations: .TS -center; -|l|l|. -_ +box center; +l|l. T{ \fBLinux\fP, \fBSunOS\fP T} T{ @@ -594,7 +594,6 @@ T} T{ /share/doc/glances/ .UNINDENT T} -_ .TE .INDENT 0.0 .IP \(bu 2 @@ -613,8 +612,7 @@ A first section (called global) is available: .INDENT 0.0 .INDENT 3.5 .sp -.nf -.ft C +.EX [global] # Refresh rate (default is a minimum of 2 seconds) # Can be overwritten by the \-t option @@ -630,8 +628,7 @@ history_size=1200 # Define external directory for loading additional plugins # The layout follows the glances standard for plugin definitions #plugin_dir=/home/user/dev/plugins -.ft P -.fi +.EE .UNINDENT .UNINDENT .sp @@ -639,8 +636,7 @@ than a second one concerning the user interface: .INDENT 0.0 .INDENT 3.5 .sp -.nf -.ft C +.EX [outputs] # Options for all UIs #\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- @@ -677,8 +673,7 @@ max_processes_display=25 # Comma separated list of HTTP request headers that should be supported for cross\-origin requests. # Default is * #cors_headers=* -.ft P -.fi +.EE .UNINDENT .UNINDENT .sp @@ -687,8 +682,7 @@ have a section. Below is an example for the CPU plugin: .INDENT 0.0 .INDENT 3.5 .sp -.nf -.ft C +.EX [cpu] disable=False refresh=3 @@ -704,8 +698,7 @@ system_critical=90 steal_careful=50 steal_warning=70 steal_critical=90 -.ft P -.fi +.EE .UNINDENT .UNINDENT .sp @@ -713,8 +706,7 @@ an InfluxDB export module: .INDENT 0.0 .INDENT 3.5 .sp -.nf -.ft C +.EX [influxdb] # Configuration for the \-\-export influxdb option # https://influxdb.com/ @@ -725,8 +717,7 @@ password=root db=glances prefix=localhost #tags=foo:bar,spam:eggs -.ft P -.fi +.EE .UNINDENT .UNINDENT .sp @@ -734,8 +725,7 @@ or a Nginx AMP: .INDENT 0.0 .INDENT 3.5 .sp -.nf -.ft C +.EX [amp_nginx] # Nginx status page should be enabled (https://easyengine.io/tutorials/nginx/status\-page/) enable=true @@ -743,8 +733,7 @@ regex=\e/usr\e/sbin\e/nginx refresh=60 one_line=false status_url=http://localhost/nginx_status -.ft P -.fi +.EE .UNINDENT .UNINDENT .sp @@ -754,13 +743,11 @@ of an InfluxDB export to the current hostname, use: .INDENT 0.0 .INDENT 3.5 .sp -.nf -.ft C +.EX [influxdb] \&... prefix=\(gahostname\(ga -.ft P -.fi +.EE .UNINDENT .UNINDENT .sp @@ -768,13 +755,11 @@ Or if you want to add the Operating System name as a tag: .INDENT 0.0 .INDENT 3.5 .sp -.nf -.ft C +.EX [influxdb] \&... tags=system:\(gauname \-a\(ga -.ft P -.fi +.EE .UNINDENT .UNINDENT .SH LOGGING @@ -797,8 +782,7 @@ format): .INDENT 0.0 .INDENT 3.5 .sp -.nf -.ft C +.EX { \(dqversion\(dq: 1, \(dqdisable_existing_loggers\(dq: \(dqFalse\(dq, @@ -857,8 +841,7 @@ format): } } } -.ft P -.fi +.EE .UNINDENT .UNINDENT .sp @@ -866,11 +849,9 @@ and start Glances using the following command line: .INDENT 0.0 .INDENT 3.5 .sp -.nf -.ft C +.EX LOG_CFG=/glances.json glances -.ft P -.fi +.EE .UNINDENT .UNINDENT .sp diff --git a/glances/__init__.py b/glances/__init__.py index 6ba31ded..dcf3bb47 100644 --- a/glances/__init__.py +++ b/glances/__init__.py @@ -19,7 +19,7 @@ import tracemalloc # Global name # Version should start and end with a numerical char # See https://packaging.python.org/specifications/core-metadata/#version -__version__ = "4.3.0_dev06" +__version__ = "4.3.0.3" __apiversion__ = '4' __author__ = 'Nicolas Hennion ' __license__ = 'LGPLv3' diff --git a/glances/outputs/static/js/components/plugin-containers.vue b/glances/outputs/static/js/components/plugin-containers.vue index 99eb3068..91dff2c6 100644 --- a/glances/outputs/static/js/components/plugin-containers.vue +++ b/glances/outputs/static/js/components/plugin-containers.vue @@ -74,6 +74,7 @@
 

For an exhaustive list of key bindings, click here.

API documentation / OpenAPI file

 

Press h to came back to Glances.

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

For an exhaustive list of key bindings, click here.

 

Press h to came back to Glances.

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