From 6a6ee9cb7f1e86fbd29d8debd31a7be4844d56f1 Mon Sep 17 00:00:00 2001 From: Adam Amstrong Date: Fri, 17 Feb 2012 00:19:18 +0000 Subject: [PATCH] fixes to graph widths git-svn-id: http://www.observium.org/svn/observer/trunk@2874 61d68cd4-352d-0410-923a-c4978735b2b8 --- html/pages/ports/graph.inc.php | 11 +++++++---- html/pages/routing/bgp.inc.php | 2 +- includes/sql-schema/update.php | 4 ++-- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/html/pages/ports/graph.inc.php b/html/pages/ports/graph.inc.php index 9947c04984..015b88641a 100644 --- a/html/pages/ports/graph.inc.php +++ b/html/pages/ports/graph.inc.php @@ -21,9 +21,12 @@ foreach ($ports as $port) $graph_type = "port_" . $subformat; + if ($_SESSION['widescreen']) { $width=357; } else { $width=315; } + if ($_SESSION['widescreen']) { $width_div=438; } else { $width_div=393; } + $graph_array = array(); - $graph_array['height'] = "100"; - $graph_array['width'] = "210"; + $graph_array['height'] = 100; + $graph_array['width'] = 210; $graph_array['to'] = $now; $graph_array['id'] = $port['interface_id']; $graph_array['type'] = $graph_type; @@ -36,10 +39,10 @@ foreach ($ports as $port) $link = generate_url($link_array); $overlib_content = generate_overlib_content($graph_array, $port['hostname'] . " - " . $port['label']); $graph_array['title'] = "yes"; - $graph_array['width'] = 315; $graph_array['height'] = 119; + $graph_array['width'] = $width; $graph_array['height'] = 119; $graph = generate_graph_tag($graph_array); - echo("
"); + echo("
"); echo(overlib_link($link, $graph, $overlib_content)); echo("
"); diff --git a/html/pages/routing/bgp.inc.php b/html/pages/routing/bgp.inc.php index 808175b940..4810c9af13 100644 --- a/html/pages/routing/bgp.inc.php +++ b/html/pages/routing/bgp.inc.php @@ -240,7 +240,7 @@ else if ($peer['graph']) { $graph_array['height'] = "100"; - $graph_array['width'] = "220"; + $graph_array['width'] = "218"; $graph_array['to'] = $now; echo(''); include("includes/print-quadgraphs.inc.php"); diff --git a/includes/sql-schema/update.php b/includes/sql-schema/update.php index 847797d6cc..58c3c2b250 100644 --- a/includes/sql-schema/update.php +++ b/includes/sql-schema/update.php @@ -46,7 +46,7 @@ if ($old_rev = @dbFetchCell("SELECT revision FROM `dbSchema`")) if ($old_rev < 2804) { $db_rev = 5; } dbQuery("ALTER TABLE `dbSchema` ADD `version` INT NOT NULL"); - dbInsert(array('version' => $db_rev), 'dbSchema'); + dbInsert(array('version' => $db_rev), 'dbSchema'); } $updating = 0; @@ -121,4 +121,4 @@ if ($updating) echo "-- Done\n"; } -?> \ No newline at end of file +?>