From 6e154824bc2a90d748f97f8c66b0bd0efc29e5d8 Mon Sep 17 00:00:00 2001 From: Nicolas Hart Date: Sun, 27 Mar 2016 10:37:52 +0200 Subject: [PATCH] [Web UI] add cpu name in quicklook plugin --- glances/outputs/static/css/style.css | 9 ++++++++- glances/outputs/static/html/plugins/quicklook.html | 3 +++ .../static/js/services/plugins/glances_quicklook.js | 6 ++++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/glances/outputs/static/css/style.css b/glances/outputs/static/css/style.css index cf253470..9eb3c6b9 100644 --- a/glances/outputs/static/css/style.css +++ b/glances/outputs/static/css/style.css @@ -7,6 +7,7 @@ body { .table { display: table; width: 100%; + max-width:100%; } .table-row-group { display: table-row-group @@ -51,7 +52,7 @@ body { /* Theme */ -.title{ +.title { font-weight: bold; color: white; } @@ -126,6 +127,12 @@ body { #quicklook .progress-bar-critical { background-color: #A30000; } +#quicklook .cpu-name { + white-space: nowrap; + overflow: hidden; + width: 100%; + text-overflow: ellipsis; +} #monitor .process-result { max-width: 300px; overflow: hidden; diff --git a/glances/outputs/static/html/plugins/quicklook.html b/glances/outputs/static/html/plugins/quicklook.html index 4048636b..a64523e0 100644 --- a/glances/outputs/static/html/plugins/quicklook.html +++ b/glances/outputs/static/html/plugins/quicklook.html @@ -1,3 +1,6 @@ +
+ {{ statsQuicklook.cpu_name }} +
CPU
diff --git a/glances/outputs/static/js/services/plugins/glances_quicklook.js b/glances/outputs/static/js/services/plugins/glances_quicklook.js index 9f22a9de..75c70d96 100644 --- a/glances/outputs/static/js/services/plugins/glances_quicklook.js +++ b/glances/outputs/static/js/services/plugins/glances_quicklook.js @@ -4,6 +4,9 @@ glancesApp.service('GlancesPluginQuicklook', function() { this.mem = null; this.cpu = null; + this.cpu_name = null; + this.cpu_hz_current = null; + this.cpu_hz = null; this.swap = null; this.percpus = []; @@ -13,6 +16,9 @@ glancesApp.service('GlancesPluginQuicklook', function() { this.mem = data.mem; this.cpu = data.cpu; + this.cpu_name = data.cpu_name; + this.cpu_hz_current = data.cpu_hz_current; + this.cpu_hz = data.cpu_hz; this.swap = data.swap; this.percpus = [];