From 90833776ee859b44478f42891070eb83a05a43c4 Mon Sep 17 00:00:00 2001 From: Adam Amstrong Date: Sun, 1 Aug 2010 00:38:01 +0000 Subject: [PATCH] fix permissions on device_port_* graphs (woo, we now have some graph security!) and fix some bugs with graph naming git-svn-id: http://www.observium.org/svn/observer/trunk@1596 61d68cd4-352d-0410-923a-c4978735b2b8 --- html/includes/functions.inc.php | 4 ++-- .../graphs/port/adsl_attainable.inc.php | 14 +------------ .../graphs/port/adsl_attenuation.inc.php | 13 +----------- html/includes/graphs/port/adsl_power.inc.php | 13 +----------- html/includes/graphs/port/adsl_snr.inc.php | 13 +----------- html/includes/graphs/port/adsl_speed.inc.php | 13 +----------- html/includes/graphs/port/auth.inc.php | 14 +++++++------ html/includes/graphs/port/bits.inc.php | 13 +----------- html/includes/graphs/port/errors.inc.php | 13 +----------- html/includes/graphs/port/etherlike.inc.php | 13 ++++-------- html/includes/graphs/port/nupkts.inc.php | 21 ++++++------------- html/includes/graphs/port/pagp_bits.inc.php | 4 +--- html/includes/graphs/port/upkts.inc.php | 13 +----------- html/includes/print-interface.inc.php | 6 +++--- html/pages/device/ports.inc.php | 4 ++-- 15 files changed, 34 insertions(+), 137 deletions(-) diff --git a/html/includes/functions.inc.php b/html/includes/functions.inc.php index c0c26f5be..20189f67b 100644 --- a/html/includes/functions.inc.php +++ b/html/includes/functions.inc.php @@ -238,7 +238,7 @@ function generate_if_link($args, $text = NULL) $graph_array['height'] = "100"; $graph_array['width'] = "340"; $graph_array['from'] = $config['day']; - $graph_array['port'] = $args['interface_id']; + $graph_array['id'] = $args['interface_id']; $content .= generate_graph_tag($graph_array); $graph_array['from'] = $config['week']; $content .= generate_graph_tag($graph_array); @@ -261,7 +261,7 @@ function generate_if_link($args, $text = NULL) function generate_port_thumbnail($args) { if(!$args['bg']) { $args['bg'] = "FFFFF"; } - $args['content'] = ""; + $args['content'] = ""; $output = generate_if_link($args, $args['content']); echo $output; } diff --git a/html/includes/graphs/port/adsl_attainable.inc.php b/html/includes/graphs/port/adsl_attainable.inc.php index 370b4fe77..684f3f21c 100644 --- a/html/includes/graphs/port/adsl_attainable.inc.php +++ b/html/includes/graphs/port/adsl_attainable.inc.php @@ -1,17 +1,6 @@ diff --git a/html/includes/graphs/port/bits.inc.php b/html/includes/graphs/port/bits.inc.php index 9366de267..fc10efceb 100644 --- a/html/includes/graphs/port/bits.inc.php +++ b/html/includes/graphs/port/bits.inc.php @@ -1,17 +1,6 @@ ", $interface['graph_type'])); + echo(generateiflink($interface, "", $interface['graph_type'])); $interface['graph_type'] = "port_upkts"; - echo(generateiflink($interface, "",$interface['graph_type'])); + echo(generateiflink($interface, "",$interface['graph_type'])); $interface['graph_type'] = "port_errors"; - echo(generateiflink($interface, "",$interface['graph_type'])); + echo(generateiflink($interface, "",$interface['graph_type'])); } echo(""); diff --git a/html/pages/device/ports.inc.php b/html/pages/device/ports.inc.php index 18f3e7def..b0a83edda 100644 --- a/html/pages/device/ports.inc.php +++ b/html/pages/device/ports.inc.php @@ -42,9 +42,9 @@ if($_GET['optc'] == thumbs) { ".$device['hostname']." - ".$interface['ifDescr']."\ ".$interface['ifAlias']." \ - \ + \ ', CENTER, LEFT, FGCOLOR, '#e5e5e5', BGCOLOR, '#e5e5e5', WIDTH, 400, HEIGHT, 150);\" onmouseout=\"return nd();\" >". - " + "
".truncate(short_port_descr($interface['ifAlias']), 32, '')."
");