diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-04-03 16:38:25 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-03 16:38:25 +0100 |
commit | 141ece7c00744f0e6ce53757fd9b99cf9548a619 (patch) | |
tree | c6f3a7eec16e2d22102200a7579cdcaf656df570 | |
parent | 30bf446f8c7a0f831e6b7adba826bb0008dd534a (diff) | |
parent | 72eb849b21f5151295d730d3450eb95e845f15dd (diff) | |
download | rspamd-141ece7c00744f0e6ce53757fd9b99cf9548a619.tar.gz rspamd-141ece7c00744f0e6ce53757fd9b99cf9548a619.zip |
Merge pull request #2142 from moisseev/webui
[WebUI] Add messages total to throughput summary
-rw-r--r-- | interface/css/rspamd.css | 7 | ||||
-rw-r--r-- | interface/index.html | 1 | ||||
-rw-r--r-- | interface/js/app/graph.js | 4 |
3 files changed, 12 insertions, 0 deletions
diff --git a/interface/css/rspamd.css b/interface/css/rspamd.css index 91f39652b..3af8baad7 100644 --- a/interface/css/rspamd.css +++ b/interface/css/rspamd.css @@ -573,6 +573,7 @@ td.maps-cell { width: 100%; } #rrd-table { + margin-bottom: 2px; width: 100% !important; text-align: left; font-size: 12px; @@ -582,6 +583,12 @@ td.maps-cell { padding-top: 2px; padding-bottom: 2px; } +#rrd-total { + padding-left: 8px; + margin-bottom: 10px; + text-align: left; + font-size: 12px; +} /* Throughput graph controls */ #graph_controls select { diff --git a/interface/index.html b/interface/index.html index 17f39b087..85794a49d 100644 --- a/interface/index.html +++ b/interface/index.html @@ -119,6 +119,7 @@ <div class="col-fluid"> <table id="rrd-table" class="table table-striped table-hover"></table> <div id="rrd-table_toggle"></div> + <div id="rrd-total">Total messages: <span id="rrd-total-value"></span></div> </div> </div> diff --git a/interface/js/app/graph.js b/interface/js/app/graph.js index bc5802995..9ae6a9297 100644 --- a/interface/js/app/graph.js +++ b/interface/js/app/graph.js @@ -135,7 +135,9 @@ function($, D3Evolution, unused) { } function drawRrdTable(data, unit) { + var total_messages = 0; var rows = data.map(function (curr, i) { + total_messages += curr.value; return { options: { style: { @@ -146,6 +148,8 @@ function($, D3Evolution, unused) { }; }, []); + document.getElementById('rrd-total-value').innerHTML = total_messages; + $('#rrd-table').footable({ sorting: { enabled: true |