mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
webui: Update wifi_clients graph (#4846)
This commit is contained in:
committed by
Neil Lathwood
parent
e362f057b7
commit
b4b1c8ab5a
@@ -1,24 +1,21 @@
|
||||
<?php
|
||||
|
||||
require 'includes/graphs/common.inc.php';
|
||||
$colours = 'mixed';
|
||||
$unit_text = 'Clients';
|
||||
$scale_min = '0';
|
||||
|
||||
$rrd_options .= ' -l 0 -E ';
|
||||
|
||||
$radio1 = rrd_name($device['hostname'], 'wificlients-radio1');
|
||||
$radio2 = rrd_name($device['hostname'], 'wificlients-radio2');
|
||||
$i = 1;
|
||||
$rrd_filename = rrd_name($device['hostname'], "wificlients-radio$i");
|
||||
while (rrdtool_check_rrd_exists($rrd_filename)) {
|
||||
$rrd_list[$i] =
|
||||
array(
|
||||
'filename' => $rrd_filename,
|
||||
'ds' => 'wificlients',
|
||||
'descr' => "Radio$i Clients",
|
||||
);
|
||||
$i++;
|
||||
$rrd_filename = rrd_name($device['hostname'], "wificlients-radio$i");
|
||||
};
|
||||
|
||||
if (file_exists($radio1)) {
|
||||
$rrd_options .= " COMMENT:' Cur Min Max\\n'";
|
||||
$rrd_options .= ' DEF:wificlients1='.$radio1.':wificlients:AVERAGE ';
|
||||
$rrd_options .= " LINE1:wificlients1#CC0000:'Clients on Radio1 ' ";
|
||||
$rrd_options .= ' GPRINT:wificlients1:LAST:%3.0lf ';
|
||||
$rrd_options .= ' GPRINT:wificlients1:MIN:%3.0lf ';
|
||||
$rrd_options .= ' GPRINT:wificlients1:MAX:%3.0lf\l ';
|
||||
if (file_exists($radio2)) {
|
||||
$rrd_options .= ' DEF:wificlients2='.$radio2.':wificlients:AVERAGE ';
|
||||
$rrd_options .= " LINE1:wificlients2#008C00:'Clients on Radio2 ' ";
|
||||
$rrd_options .= ' GPRINT:wificlients2:LAST:%3.0lf ';
|
||||
$rrd_options .= ' GPRINT:wificlients2:MIN:%3.0lf ';
|
||||
$rrd_options .= ' GPRINT:wificlients2:MAX:%3.0lf\l ';
|
||||
}
|
||||
}
|
||||
require 'includes/graphs/generic_multi_line.inc.php';
|
||||
|
Reference in New Issue
Block a user