From 93fc961b467ed18d14ffaa82a1d2746ba1985163 Mon Sep 17 00:00:00 2001 From: nicolargo Date: Sat, 16 Dec 2023 12:32:00 +0100 Subject: Help did not work in WebUI (empty black screen is displayed) --- conf/glances.conf | 2 +- glances/outputs/glances_stdout_apidoc.py | 11 ++- glances/outputs/static/css/style.scss | 10 ++ .../static/js/components/plugin-processlist.vue | 102 ++++++++------------- glances/outputs/static/public/glances.js | 4 +- 5 files changed, 60 insertions(+), 69 deletions(-) diff --git a/conf/glances.conf b/conf/glances.conf index 2ab073e2..4c2e00e6 100644 --- a/conf/glances.conf +++ b/conf/glances.conf @@ -23,7 +23,7 @@ history_size=1200 # Theme name for the Curses interface: black or white curse_theme=black # Limit the number of processes to display (for the WebUI) -max_processes_display=30 +max_processes_display=22 # Set the URL prefix (for the WebUI and the API) # Example: url_prefix=/glances/ => http://localhost/glances/ # The final / is mandatory diff --git a/glances/outputs/glances_stdout_apidoc.py b/glances/outputs/glances_stdout_apidoc.py index c02af535..1eed2fe0 100644 --- a/glances/outputs/glances_stdout_apidoc.py +++ b/glances/outputs/glances_stdout_apidoc.py @@ -2,7 +2,7 @@ # # This file is part of Glances. # -# SPDX-FileCopyrightText: 2022 Nicolas Hennion +# SPDX-FileCopyrightText: 2023 Nicolas Hennion # # SPDX-License-Identifier: LGPL-3.0-only # @@ -53,8 +53,13 @@ For example: will change the root API URL to ``http://localhost:61208/glances/api/{api_version}`` and the Web UI URL to ``http://localhost:61208/glances/`` -Web UI refresh --------------- +API documentation +----------------- + +The API documentation is available at the following URL: ``http://localhost:61208/docs#/``. + +WebUI refresh +------------- It is possible to change the Web UI refresh rate (default is 2 seconds) using the following option in the URL: ``http://localhost:61208/glances/?refresh=5`` diff --git a/glances/outputs/static/css/style.scss b/glances/outputs/static/css/style.scss index 40c8c150..e7656b91 100644 --- a/glances/outputs/static/css/style.scss +++ b/glances/outputs/static/css/style.scss @@ -19,6 +19,15 @@ body { display: table-cell; text-align: right; } +.width-50 { + width: 50px; +} +.width-75 { + width: 75px; +} +.width-100 { + width: 100px; +} .plugin { margin-bottom: 20px; @@ -116,6 +125,7 @@ body { } /* Plugins */ + #processlist-plugin .table-cell { padding: 0px 5px 0px 5px; white-space: nowrap; diff --git a/glances/outputs/static/js/components/plugin-processlist.vue b/glances/outputs/static/js/components/plugin-processlist.vue index 71388066..ca9951bc 100644 --- a/glances/outputs/static/js/components/plugin-processlist.vue +++ b/glances/outputs/static/js/components/plugin-processlist.vue @@ -3,112 +3,88 @@
-
+
CPU%
-
+
MEM%
- - -
PID
-
+ + +
PID
+
USER
- - -
NI
-
S
- +
S
+ - -
+
Command
-
-
+
+
{{ process.cpu_percent == -1 ? '?' : $filters.number(process.cpu_percent, 1) }}
-
+
{{ process.memory_percent == -1 ? '?' : $filters.number(process.memory_percent, 1) }}
-
+
{{ $filters.bytes(process.memvirt) }}
-
+
{{ $filters.bytes(process.memres) }}
-
+
{{ process.pid }}
-
+
{{ process.username }}
-