fixes to graph widths

git-svn-id: http://www.observium.org/svn/observer/trunk@2874 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2012-02-17 00:19:18 +00:00
parent 6494b0603b
commit 6a6ee9cb7f
3 changed files with 10 additions and 7 deletions

View File

@@ -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("<div style='display: block; padding: 1px; margin: 2px; min-width: 393px; max-width:393px; min-height:180px; max-height:180px; text-align: center; float: left; background-color: #f5f5f5;'>");
echo("<div style='display: block; padding: 1px; margin: 2px; min-width: ".$width_div."px; max-width:".$width_div."px; min-height:180px; max-height:180px; text-align: center; float: left; background-color: #f5f5f5;'>");
echo(overlib_link($link, $graph, $overlib_content));
echo("</div>");

View File

@@ -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('<tr bgcolor="'.$bg_colour.'"' . ($bg_image ? ' background="'.$bg_image.'"' : '') . '"><td colspan="9">');
include("includes/print-quadgraphs.inc.php");

View File

@@ -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";
}
?>
?>