diff options
author | moisseev <moiseev@mezonplus.ru> | 2020-08-08 15:59:17 +0300 |
---|---|---|
committer | moisseev <moiseev@mezonplus.ru> | 2020-08-08 15:59:17 +0300 |
commit | 3e426f8515a7201a32b0810c9f85ef8d8a0fc3ab (patch) | |
tree | 76bf793868714937ced005331d8eedbf51e3239c /interface | |
parent | 1c7d251741b58f976f7fbb2a03bd8369311cbdbd (diff) | |
download | rspamd-3e426f8515a7201a32b0810c9f85ef8d8a0fc3ab.tar.gz rspamd-3e426f8515a7201a32b0810c9f85ef8d8a0fc3ab.zip |
[WebUI] Add uptime and version to servers table
Diffstat (limited to 'interface')
-rw-r--r-- | interface/index.html | 2 | ||||
-rw-r--r-- | interface/js/app/stats.js | 6 |
2 files changed, 8 insertions, 0 deletions
diff --git a/interface/index.html b/interface/index.html index a57033376..480fa79ad 100644 --- a/interface/index.html +++ b/interface/index.html @@ -114,6 +114,8 @@ <th>Server name</th> <th>Host</th> <th class="w-1">Status</th> + <th class="w-1">Uptime</th> + <th class="w-1">Version</th> <th>Configuration ID</th> </tr> </thead> diff --git a/interface/js/app/stats.js b/interface/js/app/stats.js index e2724af47..ebc37ef02 100644 --- a/interface/js/app/stats.js +++ b/interface/js/app/stats.js @@ -111,6 +111,8 @@ define(["jquery", "d3pie"], $.each(servers, function (key, val) { var row_class = "danger"; var glyph_status = "fas fa-times"; + var version = "???"; + var uptime = "???"; var short_id = "???"; if (!("config_id" in val.data)) { val.data.config_id = ""; @@ -118,6 +120,8 @@ define(["jquery", "d3pie"], if (val.status) { row_class = "success"; glyph_status = "fas fa-check"; + uptime = msToTime(val.data.uptime); + version = val.data.version; short_id = val.data.config_id.substring(0, 8); } @@ -126,6 +130,8 @@ 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>" + version + "</td>" + "<td>" + short_id + "</td></tr>"); $("#selSrv").append($("<option value=\"" + key + "\">" + key + "</option>")); |