web: display additional dupecheck thread counters

This commit is contained in:
Heikki Hannikainen 2012-10-26 08:39:38 +03:00
parent 1ded25f96e
commit daebdc20c8
3 changed files with 31 additions and 2 deletions

View File

@ -9,6 +9,10 @@ body {
.red { color: #ff5370; }
.rxerr { color: #0000ff; cursor: pointer; }
.rxerr_red { color: #ff5370; cursor: pointer; }
.link { color: #0000ff; cursor: pointer; }
/* show/hide buttons */
.show { color: #0000ff; cursor: pointer; }
.hide { color: #0000ff; cursor: pointer; display: none; }
div.page_title {
color: #000;
@ -84,3 +88,9 @@ div.ttip {
display: none;
}
/* specific tables */
div#dupecheck_more {
display: none;
margin-left: 20px;
}

View File

@ -158,7 +158,8 @@ function conv_none(s)
return s;
}
var listeners_table, uplinks_table, peers_table, clients_table, memory_table, dupecheck_table, totals_table;
var listeners_table, uplinks_table, peers_table, clients_table, memory_table,
dupecheck_table, dupecheck_more_table, totals_table;
var rx_err_strings = {
"unknown": 'Unknown error',
@ -194,6 +195,13 @@ var key_translate = {
'dupes_dropped': 'Duplicate packets dropped',
'uniques_out': 'Unique packets seen',
// dupecheck_more (variations) block
'exact': 'Exact duplicates',
'space_trim': 'Dupes with spaces trimmed from end',
'8bit_strip': 'Dupes with 8-bit chars stripped out',
'8bit_clear': 'Dupes with 8th bit set to 0',
'8bit_spaced': 'Dupes with 8-bit characters replaced with spaces',
// totals block
'clients': 'Clients',
'connects': 'Connects',
@ -626,6 +634,8 @@ function render(d)
u['dupes_dropped'] = calc_rate('dupecheck.dupes_dropped', u['dupes_dropped']);
u['uniques_out'] = calc_rate('dupecheck.uniques_out', u['uniques_out']);
render_block('dupecheck', dupecheck_table, u);
if (u['variations'])
render_block(0, dupecheck_more_table, u['variations']);
}
if (d['totals']) {
@ -815,6 +825,13 @@ function gr_switch(id)
load_graph();
}
function toggle(id)
{
$('#' + id + '_show').toggle(100);
$('#' + id + '_hide').toggle(100);
$('#' + id).toggle(200);
}
function init()
{
listeners_table = $('#listeners');
@ -823,6 +840,7 @@ function init()
clients_table = $('#clients');
memory_table = $('#memory');
dupecheck_table = $('#dupecheck');
dupecheck_more_table = $('#dupecheck_more');
totals_table = $('#totals');
server_table = $('#server');

View File

@ -22,8 +22,9 @@
<div style='float: right; clear: right; height: 230px; width: 600px;' id='graph'></div>
<div id='totals'></div>
<h3>Duplicate filter</h3>
<h3>Duplicate filter <span class='show' id='dupecheck_more_show' onclick='toggle("dupecheck_more")'>+</span><span class='hide' id='dupecheck_more_hide' onclick='toggle("dupecheck_more")'>-</span></h3>
<div id='dupecheck'></div>
<div id='dupecheck_more'></div>
<h3>Port listeners</h3>
<div id='listeners'></div>