Browse Source

[WebUI] Add messages total to throughput summary

tags/1.7.3
Alexander Moisseev 6 years ago
parent
commit
72eb849b21
3 changed files with 12 additions and 0 deletions
  1. 7
    0
      interface/css/rspamd.css
  2. 1
    0
      interface/index.html
  3. 4
    0
      interface/js/app/graph.js

+ 7
- 0
interface/css/rspamd.css View File

@@ -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 {

+ 1
- 0
interface/index.html View File

@@ -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>


+ 4
- 0
interface/js/app/graph.js View File

@@ -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

Loading…
Cancel
Save