mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Make graph page use session variable to compute graph size
This commit is contained in:
@ -39,8 +39,9 @@ else {
|
||||
|
||||
if($_SESSION['screen_width']) {
|
||||
if($_SESSION['screen_width'] >= 800) {
|
||||
$graph_array['width'] = ($_SESSION['screen_width'] - 400 )/count($periods)+1;
|
||||
}else {
|
||||
$graph_array['width'] = ($_SESSION['screen_width'] - 420 )/count($periods)+1;
|
||||
}
|
||||
else {
|
||||
$graph_array['width'] = $_SESSION['screen_width'] - 155;
|
||||
}
|
||||
}
|
||||
|
@ -112,21 +112,11 @@ else {
|
||||
$graph_array['width'] = $graph_width;
|
||||
|
||||
if($_SESSION['screen_width']) {
|
||||
if($_SESSION['screen_width'] > 800) {
|
||||
$graph_array['width'] = ($_SESSION['screen_width'] - ($_SESSION['screen_width']/10));
|
||||
}
|
||||
else {
|
||||
$graph_array['width'] = ($_SESSION['screen_width'] - ($_SESSION['screen_width']/4));
|
||||
}
|
||||
$graph_array['width'] = ($_SESSION['screen_width'] - ($_SESSION['screen_width']/12));
|
||||
}
|
||||
|
||||
if($_SESSION['screen_height']) {
|
||||
if($_SESSION['screen_height'] > 960 ) {
|
||||
$graph_array['height'] = ($_SESSION['screen_height'] - ($_SESSION['screen_height']/2));
|
||||
}
|
||||
else {
|
||||
$graph_array['height'] = ($_SESSION['screen_height'] - ($_SESSION['screen_height']/1.5));
|
||||
}
|
||||
$graph_array['height'] = ($_SESSION['screen_height'] - ($_SESSION['screen_height']/2));
|
||||
}
|
||||
|
||||
echo("<hr />");
|
||||
|
Reference in New Issue
Block a user