make widescreen better. made graphs change on devices page to fill widescreen.

fix generic_multi_bits_separated. rrdtool_graph is so complicated! Thanks monrad.


git-svn-id: http://www.observium.org/svn/observer/trunk@2537 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2011-09-21 13:22:27 +00:00
parent c1fe765a86
commit 51d7ea9292
4 changed files with 10 additions and 7 deletions

View File

@@ -247,12 +247,14 @@ if($format == "graph")
{
$graph_type = "device_".$subformat;
echo("<div style='display: block; padding: 1px; margin: 2px; min-width: 393px; max-width:393px; min-height:170px; max-height:170px; text-align: center; float: left; background-color: #f5f5f5;'>
if($_SESSION['widescreen']) { $width=270; } else { $width=315; }
echo("<div style='display: block; padding: 1px; margin: 2px; min-width: ".($width+78)."px; max-width:".($width+78)."px; min-height:170px; max-height:170px; text-align: center; float: left; background-color: #f5f5f5;'>
<a href='device/device=".$device['device_id']."/' onmouseover=\"return overlib('\
<div style=\'font-size: 16px; padding:5px; font-weight: bold; color: #e5e5e5;\'>".$device['hostname']." - ".$interface['ifDescr']."</div>\
<img src=\'graph.php?type=$graph_type&amp;id=".$device['device_id']."&amp;from=".$config['time']['day']."&amp;to=".$config['time']['now']."&amp;width=450&amp;height=150&amp;title=yes\'>\
', CENTER, LEFT, FGCOLOR, '#e5e5e5', BGCOLOR, '#e5e5e5', WIDTH, 400, HEIGHT, 150);\" onmouseout=\"return nd();\" >".
"<img src='graph.php?type=$graph_type&amp;id=".$device['device_id']."&amp;from=".$config['time']['day']."&amp;to=".$config['time']['now']."&amp;width=315&amp;height=110&amp;legend=no&amp;title=yes'>
"<img src='graph.php?type=$graph_type&amp;id=".$device['device_id']."&amp;from=".$config['time']['day']."&amp;to=".$config['time']['now']."&amp;width=".$width."&amp;height=110&amp;legend=no&amp;title=yes'>
</a>
</div>");
}