From: Alexander Moisseev Date: Tue, 3 Apr 2018 14:54:27 +0000 (+0300) Subject: [WebUI] Add messages total to throughput summary X-Git-Tag: 1.7.3~42^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=72eb849b21f5151295d730d3450eb95e845f15dd;p=rspamd.git [WebUI] Add messages total to throughput summary --- 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 @@
+
Total messages:
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