From 619b6c98fd7035451f76fee222dfeab49663d468 Mon Sep 17 00:00:00 2001 From: Adam Amstrong Date: Thu, 22 Sep 2011 16:44:58 +0000 Subject: [PATCH] fix some stuff with the ports/graph page. git-svn-id: http://www.observium.org/svn/observer/trunk@2544 61d68cd4-352d-0410-923a-c4978735b2b8 --- html/pages/ports/graph.inc.php | 38 +++++++++++++++++++++++++++------- 1 file changed, 30 insertions(+), 8 deletions(-) diff --git a/html/pages/ports/graph.inc.php b/html/pages/ports/graph.inc.php index 6d85fd99d8..ca1f93cb62 100644 --- a/html/pages/ports/graph.inc.php +++ b/html/pages/ports/graph.inc.php @@ -21,14 +21,36 @@ foreach ($ports as $port) $graph_type = "port_" . $subformat; - echo("
- ".$device['hostname']." - ".$port['ifDescr']."
\ - \ - ', CENTER, LEFT, FGCOLOR, '#e5e5e5', BGCOLOR, '#e5e5e5', WIDTH, 400, HEIGHT, 150);\" onmouseout=\"return nd();\" >". - " - - "); + $graph_array = array(); + $graph_array['height'] = "100"; + $graph_array['width'] = "210"; + $graph_array['to'] = $now; + $graph_array['id'] = $port['interface_id']; + $graph_array['type'] = $graph_type; + $graph_array['from'] = $day; + $graph_array['legend'] = "no"; + + $link_array = $graph_array; + $link_array['page'] = "graphs"; + unset($link_array['height'], $link_array['width'], $link_array['legend']); + $link = generate_url($link_array); + $overlib_content = generate_overlib_content($graph_array, $device['hostname'] . " - " . $port['ifDescr']); + $graph_array['title'] = "yes"; + $graph_array['width'] = 315; $graph_array['height'] = 119; + $graph = generate_graph_tag($graph_array); + + echo("
"); + echo(overlib_link($link, $graph, $overlib_content)); + echo("
"); + +# echo("
+# ".$device['hostname']." - ".$port['ifDescr']."
\ +# \ +# ', CENTER, LEFT, FGCOLOR, '#e5e5e5', BGCOLOR, '#e5e5e5', WIDTH, 400, HEIGHT, 150);\" onmouseout=\"return nd();\" >". +# " +# +# "); } } ?>