mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Merge pull request #2510 from Alucardfh/useMoreWidthRebased
Use more width rebased
This commit is contained in:
@@ -24,7 +24,7 @@ $image = getImage($device);
|
||||
|
||||
echo '
|
||||
<tr bgcolor="'.$device_colour.'" class="alert '.$class.'">
|
||||
<td width="40" align=center valign=middle style="padding: 21px;">'.$image.'</td>
|
||||
<td width="40" align=center valign=middle style="padding: 21px;"><span class="device_icon">'.$image.'</span></td>
|
||||
<td valign=middle style="padding: 0 15px;"><span style="font-size: 20px;">'.generate_device_link($device).'</span>
|
||||
<br />'.generate_link($device['location'], array('page' => 'devices', 'location' => $device['location'])).'</td>
|
||||
<td>';
|
||||
|
@@ -476,7 +476,7 @@ function generate_lazy_graph_tag($args) {
|
||||
$urlargs[] = $key."=".urlencode($arg);
|
||||
}
|
||||
|
||||
return '<img class="lazy" width="'.$w.'" height="'.$h.'" data-original="graph.php?' . implode('&',$urlargs).'" border="0" />';
|
||||
return '<img class="lazy graphs" width="'.$w.'" height="'.$h.'" data-original="graph.php?' . implode('&',$urlargs).'" border="0" />';
|
||||
|
||||
}//end generate_lazy_graph_tag()
|
||||
|
||||
|
@@ -37,6 +37,22 @@ else {
|
||||
);
|
||||
}//end if
|
||||
|
||||
if($_SESSION['screen_width']) {
|
||||
if($_SESSION['screen_width'] < 1024 && $_SESSION['screen_width'] > 700) {
|
||||
$graph_array['width'] = round(($_SESSION['screen_width'] - 90 )/2,0);
|
||||
}
|
||||
else {
|
||||
if($_SESSION['screen_width'] > 1024) {
|
||||
$graph_array['width'] = round(($_SESSION['screen_width'] - 90 )/count($periods)+1,0);
|
||||
}
|
||||
else {
|
||||
$graph_array['width'] = $_SESSION['screen_width'] - 70;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$graph_array['height'] = round($graph_array['width'] /2.15);
|
||||
|
||||
$graph_array['to'] = $config['time']['now'];
|
||||
|
||||
$graph_data = array();
|
||||
|
Reference in New Issue
Block a user