diff options
| author | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2005-06-24 16:38:04 +0000 |
|---|---|---|
| committer | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2005-06-24 16:38:04 +0000 |
| commit | 923e05b9533aaa3b1b109ccab4341e7555147fcb (patch) | |
| tree | 1a4ec818b490ec8657c6e3db609e90d8abd88810 /frontends/php/include/classes.inc.php | |
| parent | 40bb7ff3f4273fc81b759d40bced2e2e6dddc7f7 (diff) | |
| download | zabbix-923e05b9533aaa3b1b109ccab4341e7555147fcb.tar.gz zabbix-923e05b9533aaa3b1b109ccab4341e7555147fcb.tar.xz zabbix-923e05b9533aaa3b1b109ccab4341e7555147fcb.zip | |
- draw graph's timeline even if no data exists (Alexei)
git-svn-id: svn://svn.zabbix.com/trunk@1889 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/classes.inc.php')
| -rw-r--r-- | frontends/php/include/classes.inc.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/frontends/php/include/classes.inc.php b/frontends/php/include/classes.inc.php index 20f3c400..774b6ff7 100644 --- a/frontends/php/include/classes.inc.php +++ b/frontends/php/include/classes.inc.php @@ -299,7 +299,9 @@ } // Some data exists, so draw time line - if($this->nodata==0) + +// Draw the grid regardless of data +// if($this->nodata==0) { $old_day=-1; for($i=0;$i<=24;$i++) @@ -333,7 +335,7 @@ { $this->drawGrid(); - ImageString($this->im, 2,$this->sizeX/2-50, $this->sizeY+$this->shiftY+3, "NO DATA FOUND FOR THIS PERIOD" , $this->colors["Dark Red No Alpha"]); + ImageString($this->im, 2,$this->sizeX/2-50, $this->sizeY+$this->shiftY+40, "NO DATA FOUND FOR THIS PERIOD" , $this->colors["Dark Red No Alpha"]); ImageStringUp($this->im,0,imagesx($this->im)-10,imagesy($this->im)-50, "http://www.zabbix.com", $this->colors["Gray"]); ImageOut($this->im); ImageDestroy($this->im); @@ -548,8 +550,8 @@ // $this->im = imagecreate($this->sizeX+$this->shiftX+61,$this->sizeY+2*$this->shiftY+40); - Header( "Content-type: text/html"); -// Header( "Content-type: image/png"); +// Header( "Content-type: text/html"); + Header( "Content-type: image/png"); Header( "Expires: Mon, 17 Aug 1998 12:51:50 GMT"); check_authorisation(); @@ -574,11 +576,11 @@ $this->checkPermissions(); $this->selectData(); + if($this->nodata==1) { $this->noDataFound(); } - $this->drawGrid(); $maxX=900; |
