ok not all graphs, but a few more (atleast cpu, mem and bits for device overlibs)

git-svn-id: http://www.observium.org/svn/observer/trunk@1630 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2010-08-02 22:50:42 +00:00
parent 0d6810c85a
commit c3eae27d25
4 changed files with 27 additions and 22 deletions

View File

@@ -81,7 +81,7 @@ function graph_error ($string)
{
global $width, $height;
header('Content-type: image/png');
if($height > "99") { $width +=79; }
if($height > "99") { $width +=76; }
$im = imagecreate($width, $height);
$orange = imagecolorallocate($im, 255, 225, 225);
$px = (imagesx($im) - 7.5 * strlen($string)) / 2;
@@ -91,7 +91,6 @@ function graph_error ($string)
exit();
}
if(!$auth)
{
if($width < 200)
@@ -101,6 +100,7 @@ if(!$auth)
graph_error("No Authorisation");
}
} else {
$rrd_options .= " HRULE:0#999999";
if($no_file)
{
if($width < 200)
@@ -113,7 +113,6 @@ if(!$auth)
if($rrd_options)
{
if($config['rrdcached']) { $rrd_switches = " --daemon ".$config['rrdcached'] . " "; }
$rrd_options .= " HRULE:0#999999";
$rrd_cmd = $config['rrdtool'] . " graph $graphfile $rrd_options" . $rrd_switches;
$woo = shell_exec($rrd_cmd);
if($_GET['debug']) { echo("<pre>".$rrd_cmd."</pre>"); }