From 9824a8a8d761d0b0192603799bb833a64d976ff4 Mon Sep 17 00:00:00 2001 From: hugetoad Date: Thu, 23 Dec 2004 20:36:15 +0000 Subject: - fixed problem with blank graphs (Alexei) git-svn-id: svn://svn.zabbix.com/trunk@1560 97f52cf1-0a1b-0410-bd0e-c28be96e8082 --- frontends/php/include/classes.inc.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'frontends/php/include/classes.inc.php') diff --git a/frontends/php/include/classes.inc.php b/frontends/php/include/classes.inc.php index 0b7b35c3..3616a1d2 100644 --- a/frontends/php/include/classes.inc.php +++ b/frontends/php/include/classes.inc.php @@ -609,9 +609,18 @@ // if($this->clock[$item][$i]-$this->clock[$item][$j]<4*$this->items[$item]["delay"]) // echo 8*($this->to_time-$this->from_time)/900,"
"; // echo $this->clock[$item][$i]-$this->clock[$item][$j],"
"; - if($this->clock[$item][$i]-$this->clock[$item][$j]<8*($this->to_time-$this->from_time)/900) + $diff=$this->clock[$item][$i]-$this->clock[$item][$j]; + $cell=($this->to_time-$this->from_time)/900; + $delay=$this->items[$item]["delay"]; + if($cell>$delay) { - $this->drawElement($item, $x1+$this->shiftX,$y1+$this->shiftY,$x2+$this->shiftX+1,$y2+$this->shiftY); + if($diff<16*$cell) + $this->drawElement($item, $x1+$this->shiftX,$y1+$this->shiftY,$x2+$this->shiftX+1,$y2+$this->shiftY); + } + else + { + if($diff<4*$delay) + $this->drawElement($item, $x1+$this->shiftX,$y1+$this->shiftY,$x2+$this->shiftX+1,$y2+$this->shiftY); } break; } -- cgit