mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
fix graphs
git-svn-id: http://www.observium.org/svn/observer/trunk@1625 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -19,7 +19,7 @@ if($_GET['bg']) { $rrd_options .= " -c CANVAS#" . mres($_GET['bg']) . " "; }
|
||||
|
||||
#$rrd_options .= " -c BACK#FFFFFF";
|
||||
|
||||
if($height < "99") { $rrd_options .= " --only-graph"; }
|
||||
if($height < "99") { $rrd_options .= " --only-graph"; }
|
||||
if($width <= "300") { $rrd_options .= " --font LEGEND:7:" . $config['mono_font'] . " --font AXIS:6:" . $config['mono_font'];
|
||||
} else { $rrd_options .= " --font LEGEND:8:" . $config['mono_font'] . " --font AXIS:7:" . $config['mono_font']; }
|
||||
|
||||
|
@@ -81,7 +81,8 @@ function graph_error ($string)
|
||||
{
|
||||
global $width, $height;
|
||||
header('Content-type: image/png');
|
||||
$im = imagecreate($width+79, $height);
|
||||
if($height > "99") { $width +=79; }
|
||||
$im = imagecreate($width, $height);
|
||||
$orange = imagecolorallocate($im, 255, 225, 225);
|
||||
$px = (imagesx($im) - 7.5 * strlen($string)) / 2;
|
||||
imagestring($im, 3, $px, $height / 2 - 8, $string, imagecolorallocate($im, 128, 0, 0));
|
||||
|
Reference in New Issue
Block a user