From 44d34bbfddba1f90e3774c4cd6f976998063c54b Mon Sep 17 00:00:00 2001 From: Adam Amstrong Date: Wed, 4 Apr 2007 14:27:20 +0000 Subject: [PATCH] fix git-svn-id: http://www.observium.org/svn/observer/trunk@58 61d68cd4-352d-0410-923a-c4978735b2b8 --- includes/graphing.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/graphing.php b/includes/graphing.php index 414f260fa..ae452de52 100644 --- a/includes/graphing.php +++ b/includes/graphing.php @@ -56,16 +56,16 @@ function graph_device_bits ($device, $graph, $from, $to, $width, $height) while($int = mysql_fetch_row($query)) { - $this_opts = array ("DEF:inoctets" . $int[0] . "=" . $rrd_dir . "/" . $hostname . "." . $int[0] . ".rrd:INOCTETS:AVERAGE", + if(is_file($rrd_dir . "/" . $hostname . "." . $int[0] . ".rrd")) { + $this_opts = array ("DEF:inoctets" . $int[0] . "=" . $rrd_dir . "/" . $hostname . "." . $int[0] . ".rrd:INOCTETS:AVERAGE", "DEF:outoctets" . $int[0] . "=" . $rrd_dir . "/" . $hostname . "." . $int[0] . ".rrd:OUTOCTETS:AVERAGE"); $in_thing .= $seperator . "inoctets" . $int[0] . ",UN,0," . "inoctets" . $int[0] . ",IF"; $out_thing .= $seperator . "outoctets" . $int[0] . ",UN,0," . "outoctets" . $int[0] . ",IF"; $pluses .= $plus; $seperator = ","; $plus = ",+"; - - $opts = array_merge($opts, $this_opts); - + $opts = array_merge($opts, $this_opts); + } } $opts_end = array(