aboutsummaryrefslogtreecommitdiffstats
path: root/interface/js/app/stats.js
diff options
context:
space:
mode:
authormoisseev <moiseev@mezonplus.ru>2020-06-13 10:54:02 +0300
committermoisseev <moiseev@mezonplus.ru>2020-06-13 10:54:41 +0300
commitdab8443f0c728a44f6f182820744ab313f1c2253 (patch)
tree225bef22898cbedf00829929e8814cf037be0a5d /interface/js/app/stats.js
parentdd8e32fdabe01b7d0b4ba60cd306d54d021f59ce (diff)
downloadrspamd-dab8443f0c728a44f6f182820744ab313f1c2253.tar.gz
rspamd-dab8443f0c728a44f6f182820744ab313f1c2253.zip
[WebUI] Rework cluster members table
and change status tab layout
Diffstat (limited to 'interface/js/app/stats.js')
-rw-r--r--interface/js/app/stats.js18
1 files changed, 10 insertions, 8 deletions
diff --git a/interface/js/app/stats.js b/interface/js/app/stats.js
index 5cce2ecb9..7c5d7b577 100644
--- a/interface/js/app/stats.js
+++ b/interface/js/app/stats.js
@@ -106,22 +106,24 @@ define(["jquery", "d3pie"],
$("#clusterTable tbody").empty();
$("#selSrv").empty();
$.each(servers, function (key, val) {
- var glyph_status = "glyphicon glyphicon-remove-circle";
+ var row_class = "danger";
+ var glyph_status = "glyphicon glyphicon-remove";
var short_id = "???";
if (!("config_id" in val.data)) {
val.data.config_id = "";
}
if (val.status) {
- glyph_status = "glyphicon glyphicon-ok-circle";
+ row_class = "success";
+ glyph_status = "glyphicon glyphicon-ok";
short_id = val.data.config_id.substring(0, 8);
}
- $("#clusterTable tbody").append("<tr>" +
- "<td class=\"col1\" title=\"Radio\"><input type=\"radio\" class=\"form-control radio\" name=\"clusterName\" value=\"" + key + "\"></td>" +
- "<td class=\"col2\" title=\"SNAme\">" + key + "</td>" +
- "<td class=\"col3\" title=\"SHost\">" + val.host + "</td>" +
- "<td class=\"col4\" title=\"SStatus\"><span class=\"icon\"><i class=\"" + glyph_status + "\"></i></span></td>" +
- "<td class=\"col5\" title=\"short_id\">" + short_id + "</td></tr>");
+ $("#clusterTable tbody").append("<tr class=\"" + row_class + "\">" +
+ "<td><input type=\"radio\" class=\"form-control radio\" name=\"clusterName\" value=\"" + key + "\"></td>" +
+ "<td>" + key + "</td>" +
+ "<td>" + val.host + "</td>" +
+ "<td class=\"text-center\"><span class=\"icon\"><i class=\"" + glyph_status + "\"></i></span></td>" +
+ "<td>" + short_id + "</td></tr>");
$("#selSrv").append($("<option value=\"" + key + "\">" + key + "</option>"));