From 9503ecd473f1f58a47eb6e118c599e65a3cf51f9 Mon Sep 17 00:00:00 2001 From: Adam Amstrong Date: Sun, 18 Jul 2010 08:51:18 +0000 Subject: [PATCH] add ADSL graphs to web interface git-svn-id: http://www.observium.org/svn/observer/trunk@1406 61d68cd4-352d-0410-923a-c4978735b2b8 --- .../graphs/generic_multi_line.inc.php | 4 +- .../graphs/port_adsl_attenuation.inc.php | 38 ++++++++++++++++++ html/includes/graphs/port_adsl_power.inc.php | 38 ++++++++++++++++++ html/includes/graphs/port_adsl_snr.inc.php | 38 ++++++++++++++++++ html/includes/graphs/port_adsl_speed.inc.php | 40 +++++++++++++++++++ html/pages/device/interface.inc.php | 3 +- html/pages/device/port/adsl.inc.php | 39 ++++++++++++++++++ 7 files changed, 197 insertions(+), 3 deletions(-) create mode 100644 html/includes/graphs/port_adsl_attenuation.inc.php create mode 100644 html/includes/graphs/port_adsl_power.inc.php create mode 100644 html/includes/graphs/port_adsl_snr.inc.php create mode 100644 html/includes/graphs/port_adsl_speed.inc.php create mode 100644 html/pages/device/port/adsl.inc.php diff --git a/html/includes/graphs/generic_multi_line.inc.php b/html/includes/graphs/generic_multi_line.inc.php index c84320c3a..995b11ae1 100644 --- a/html/includes/graphs/generic_multi_line.inc.php +++ b/html/includes/graphs/generic_multi_line.inc.php @@ -28,8 +28,8 @@ $rrd_options .= " DEF:".$id."min=$filename:$rra:MIN"; $rrd_options .= " DEF:".$id."max=$filename:$rra:MAX"; $rrd_options .= " LINE1.25:".$id."#".$colour.":'$descr'"; - $rrd_options .= " GPRINT:".$id.":LAST:%6.2lf GPRINT:".$id."min:MIN:%6.2lf"; - $rrd_options .= " GPRINT:".$id."max:MAX:%6.2lf GPRINT:".$id.":AVERAGE:%6.2lf\\\\n"; + $rrd_options .= " GPRINT:".$id.":LAST:%5.2lf%s GPRINT:".$id."min:MIN:%5.2lf%s"; + $rrd_options .= " GPRINT:".$id."max:MAX:%5.2lf%s GPRINT:".$id.":AVERAGE:%5.2lf%s\\\\n"; $i++; $iter++; } diff --git a/html/includes/graphs/port_adsl_attenuation.inc.php b/html/includes/graphs/port_adsl_attenuation.inc.php new file mode 100644 index 000000000..5fb91318d --- /dev/null +++ b/html/includes/graphs/port_adsl_attenuation.inc.php @@ -0,0 +1,38 @@ + diff --git a/html/includes/graphs/port_adsl_power.inc.php b/html/includes/graphs/port_adsl_power.inc.php new file mode 100644 index 000000000..9833c6abc --- /dev/null +++ b/html/includes/graphs/port_adsl_power.inc.php @@ -0,0 +1,38 @@ + diff --git a/html/includes/graphs/port_adsl_snr.inc.php b/html/includes/graphs/port_adsl_snr.inc.php new file mode 100644 index 000000000..afe151823 --- /dev/null +++ b/html/includes/graphs/port_adsl_snr.inc.php @@ -0,0 +1,38 @@ + diff --git a/html/includes/graphs/port_adsl_speed.inc.php b/html/includes/graphs/port_adsl_speed.inc.php new file mode 100644 index 000000000..b4d6232f0 --- /dev/null +++ b/html/includes/graphs/port_adsl_speed.inc.php @@ -0,0 +1,40 @@ + diff --git a/html/pages/device/interface.inc.php b/html/pages/device/interface.inc.php index 79b35f40e..91f6ca0c5 100644 --- a/html/pages/device/interface.inc.php +++ b/html/pages/device/interface.inc.php @@ -84,6 +84,7 @@ echo (""); include("pages/device/port/".mres($_GET['optb']).".inc.php"); - +echo(""); ?> diff --git a/html/pages/device/port/adsl.inc.php b/html/pages/device/port/adsl.inc.php new file mode 100644 index 000000000..57c405fe9 --- /dev/null +++ b/html/pages/device/port/adsl.inc.php @@ -0,0 +1,39 @@ +ADSL Line Speed"); + $graph_type = "port_adsl_speed"; + include("includes/print-interface-graphs.inc.php"); + + echo("
ADSL Line Attenuation
"); + $graph_type = "port_adsl_attenuation"; + include("includes/print-interface-graphs.inc.php"); + + echo("
ADSL Line SNR Margin
"); + $graph_type = "port_adsl_snr"; + include("includes/print-interface-graphs.inc.php"); + + echo("
ADSL Output Powers
"); + $graph_type = "port_adsl_power"; + include("includes/print-interface-graphs.inc.php"); + + + } + +# $graph_array['height'] = "100"; +# $graph_array['width'] = "385"; +# $graph_array['to'] = $now; +# $graph_array['port'] = $ports['fileserver']; +# $graph_array['type'] = "port_bits"; +# $graph_array['from'] = $day; +# $graph_array['legend'] = "no"; + +# $graph_array['popup_title'] = "Central Fileserver"; + +# print_graph_popup($graph_array); + + + +?>