aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--interface/css/rspamd.css7
-rw-r--r--interface/index.html1
-rw-r--r--interface/js/app/graph.js4
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