From: moisseev Date: Sat, 13 Jun 2020 07:54:02 +0000 (+0300) Subject: [WebUI] Rework cluster members table X-Git-Tag: 2.6~323^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fpull%2F3402%2Fhead;p=rspamd.git [WebUI] Rework cluster members table and change status tab layout --- diff --git a/interface/css/rspamd.css b/interface/css/rspamd.css index eb5f2af1a..515270573 100644 --- a/interface/css/rspamd.css +++ b/interface/css/rspamd.css @@ -305,71 +305,6 @@ table#symbolsTable input[type="number"] { text-shadow: 0 1px 0 #ffffff; } -.table-log { - table-layout: fixed; - border: 0 !important; -} -.table-log .col1 { - width: 130px; -} -.table-log .col2, -.table-log .col6 { - width: 100%; -} -.table-log .col3, -.table-log .col4, -.table-log .col5 { - width: 100px; -} -.table-log th { - padding: 4px 10px; - font-size: 10px; - color: #666666; - white-space: nowrap; - background-color: #efefef; - border-bottom: 1px solid #ddd; - border-left: 1px solid #cdcdcd; -} -.table-log td, -.table-log td .label { - font-family: "Trebuchet MS", Helvetica, sans-serif; - font-size: 11px; -} -.table-log thead th, -.table-log tbody td { - text-align: left; - line-height: 16px; - vertical-align: top; -} -.table-log th:first-child, -.table-log td:first-child { - border-left: 0; -} -.table-log .cell-overflow { - white-space: nowrap; - overflow: hidden; - -o-text-overflow: ellipsis; - text-overflow: ellipsis; -} -.table-log th.header { - cursor: pointer; -} -.table-log th:first-child { - border-left: 0; -} -.table-log th.headerSortUp, -.table-log th.headerSortDown { - background-color: #fefefe; - background-position: 100% 12px; - background-repeat: no-repeat; -} -.table-log th.headerSortUp { - background-image: url('../img/asc.png'); -} -.table-log th.headerSortDown { - background-image: url('../img/desc.png'); -} - /* Symbols coloring */ .symbol-default { border-radius: 2px; @@ -529,35 +464,13 @@ input.radio { box-shadow: none !important; } -.glyphicon-ok-circle { +.glyphicon-ok { color: #468847; } - -.glyphicon-remove-circle { +.glyphicon-remove { color: #b94a48; } -#clusterTable .col1 { - width: 40px; -} - -#clusterTable .col4 { - width: 50px; - text-align: center; -} - -#clusterTable .col5 { - width: 100px; -} - -#clusterTable .col2 { - width: 30%; -} - -#clusterTable .col3 { - width: 50%; -} - #nprogress .bar { height: 1px; } @@ -569,3 +482,13 @@ input.radio { .has-success .form-control { background-color: #eef9e7; } + +/* Bootstrap 4 spacing */ +.mb-0 { + margin-bottom: 0 !important; +} + +/* Custom sizing */ +.w-1 { + width: 1% !important; +} diff --git a/interface/index.html b/interface/index.html index 3dc35d20c..a84336a66 100644 --- a/interface/index.html +++ b/interface/index.html @@ -86,41 +86,46 @@ - -
-
- -
Statistics
-
-
-
-
- Loading.. - +
+
+
+
+ +
Servers
-
-
-
-
- -
- +
+
- - - - - + + + + + -
Server nameHostStatusConfiguration IDServer nameHostStatusConfiguration ID
+ +
+
+
+
+
+
+ +
Statistics
+
+
+
+
+ Loading.. + +
+
+
+
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("" + - "" + - "" + key + "" + - "" + val.host + "" + - "" + - "" + short_id + ""); + $("#clusterTable tbody").append("" + + "" + + "" + key + "" + + "" + val.host + "" + + "" + + "" + short_id + ""); $("#selSrv").append($(""));