commit 261ab4e: [WebUI] Highlight uptime of restarted servers

moisseev moiseev at mezonplus.ru
Sun Aug 9 18:28:12 UTC 2020


Author: moisseev
Date: 2020-08-09 17:50:13 +0300
URL: https://github.com/rspamd/rspamd/commit/261ab4ee5202dc982da9923e1ed37345af9f104e (refs/pull/3466/head)

[WebUI] Highlight uptime of restarted servers

---
 interface/css/rspamd.css  | 3 +++
 interface/js/app/stats.js | 4 +++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/interface/css/rspamd.css b/interface/css/rspamd.css
index 6394e449c..51a1bb85b 100644
--- a/interface/css/rspamd.css
+++ b/interface/css/rspamd.css
@@ -57,6 +57,9 @@ small,
 .success > td {
     background-color: #eef9e7;
 }
+td.warning {
+    background-color: #fff8e6;
+}
 
 /* bootstrap 4 additionals */
 .btn-group-xs > .btn,
diff --git a/interface/js/app/stats.js b/interface/js/app/stats.js
index 38578866e..ea1919af5 100644
--- a/interface/js/app/stats.js
+++ b/interface/js/app/stats.js
@@ -128,7 +128,9 @@ define(["jquery", "d3pie"],
                 "<td>" + key + "</td>" +
                 "<td>" + val.host + "</td>" +
                 '<td class="text-center"><span class="icon"><i class="' + glyph_status + '"></i></span></td>' +
-                '<td class="text-right">' + uptime + "</td>" +
+                '<td class="text-right' +
+                  (val.data.uptime < 3600 ? ' warning" title="Has been restarted within the last hour"' : "") +
+                  '">' + uptime + "</td>" +
                 "<td>" + version + "</td>" +
                 "<td>" + short_id + "</td></tr>");
 


More information about the Commits mailing list