diff --git a/html/includes/graphs/atmvp_bits.inc.php b/html/includes/graphs/atmvp_bits.inc.php new file mode 100644 index 000000000..4000cccc4 --- /dev/null +++ b/html/includes/graphs/atmvp_bits.inc.php @@ -0,0 +1,22 @@ + diff --git a/html/includes/graphs/atmvp_cells.inc.php b/html/includes/graphs/atmvp_cells.inc.php new file mode 100644 index 000000000..88966210e --- /dev/null +++ b/html/includes/graphs/atmvp_cells.inc.php @@ -0,0 +1,33 @@ + diff --git a/html/includes/graphs/atmvp_errors.inc.php b/html/includes/graphs/atmvp_errors.inc.php new file mode 100644 index 000000000..ca72fe05b --- /dev/null +++ b/html/includes/graphs/atmvp_errors.inc.php @@ -0,0 +1,34 @@ + diff --git a/html/includes/graphs/atmvp_packets.inc.php b/html/includes/graphs/atmvp_packets.inc.php new file mode 100644 index 000000000..d67f55daa --- /dev/null +++ b/html/includes/graphs/atmvp_packets.inc.php @@ -0,0 +1,33 @@ + diff --git a/html/pages/device/interface.inc.php b/html/pages/device/interface.inc.php index 5f0a8032d..ce6bd685b 100644 --- a/html/pages/device/interface.inc.php +++ b/html/pages/device/interface.inc.php @@ -68,7 +68,7 @@ echo (" "0"){ echo(" | ATM VPs :"); - echo(" Bits"); + echo(" Bits"); echo(" | Packets"); echo(" | Cells"); echo(" | Errors"); diff --git a/html/pages/device/port/junose-atm-vp.inc.php b/html/pages/device/port/junose-atm-vp.inc.php index e261aa70d..ac1076ea2 100644 --- a/html/pages/device/port/junose-atm-vp.inc.php +++ b/html/pages/device/port/junose-atm-vp.inc.php @@ -1,19 +1,7 @@ "; - -} - + if($_GET['optc']) { $graph_type = "atmvp_".$_GET['optc']; } + if(!$graph_type) { $graph_type = "atmvp_bits"; } echo(""); @@ -23,39 +11,21 @@ function print_graph ($args) { echo(''); echo(''); - $graph_array['height'] = "150"; - $graph_array['width'] = "150"; + $graph_array['height'] = "100"; + $graph_array['width'] = "215"; $graph_array['to'] = $now; $graph_array['id'] = $vp['juniAtmVp_id']; - $graph_array['type'] = "juniAtmVp_".$_GET['optc']; - - - - - if(!$graph_type) { $graph_type = "pagp_bits"; } - - $daily_traffic = $config['base_url'] . "/graph.php?port=" . $interface['interface_id'] . "&type=$graph_type&from=$day&to=$now&width=215&height=100"; - $daily_url = $config['base_url'] . "/graph.php?port=" . $interface['interface_id'] . "&type=$graph_type&from=$day&to=$now&width=500&height=150"; - - $weekly_traffic = $config['base_url'] . "/graph.php?port=" . $interface['interface_id'] . "&type=$graph_type&from=$week&to=$now&width=215&height=100"; - $weekly_url = $config['base_url'] . "/graph.php?port=" . $interface['interface_id'] . "&type=$graph_type&from=$week&to=$now&width=500&height=150"; - - $monthly_traffic = $config['base_url'] . "/graph.php?port=" . $interface['interface_id'] . "&type=$graph_type&from=$month&to=$now&width=215&height=100"; - $monthly_url = $config['base_url'] . "/graph.php?port=" . $interface['interface_id'] . "&type=$graph_type&from=$month&to=$now&width=500&height=150"; - - $yearly_traffic = $config['base_url'] . "/graph.php?port=" . $interface['interface_id'] . "&type=$graph_type&from=$year&to=$now&width=215&height=100"; - $yearly_url = $config['base_url'] . "/graph.php?port=" . $interface['interface_id'] . "&type=$graph_type&from=$year&to=$now&width=500&height=150"; - - echo("', LEFT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\"> - "); - echo("', LEFT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\"> - "); - echo("', LEFT".$config['overlib_defaults'].", WIDTH, 350);\" onmouseout=\"return nd();\"> - "); - echo("', LEFT".$config['overlib_defaults'].", WIDTH, 350);\" onmouseout=\"return nd();\"> - "); + $graph_array['type'] = $graph_type; + $periods = array('day', 'week', 'month', 'year'); + echo(""); }
VP'.$vp['vp_id'].' '.$vp['vp_descr'].'
"); + foreach($periods as $period) { + $graph_array['from'] = $$period; + $graph_array_zoom = $graph_array; $graph_array_zoom['height'] = "150"; $graph_array_zoom['width'] = "400"; + echo(overlib_link($_SERVER['REQUEST_URI'], generate_graph_tag($graph_array), generate_graph_tag($graph_array_zoom), NULL)); + } + echo("