summaryrefslogtreecommitdiffstats
path: root/frontends/php/chart.php
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2002-08-04 16:53:24 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2002-08-04 16:53:24 +0000
commit2f691b3628c4589fe258def9564d78cd134d3ebb (patch)
tree278a676e3e5540977348c86b9d7a96ccc105902d /frontends/php/chart.php
parent89d810024288866e72586c1774dec254db9aa884 (diff)
downloadzabbix-2f691b3628c4589fe258def9564d78cd134d3ebb.tar.gz
zabbix-2f691b3628c4589fe258def9564d78cd134d3ebb.tar.xz
zabbix-2f691b3628c4589fe258def9564d78cd134d3ebb.zip
- added upgrades/dbpatches/1.0beta4_to_1.0beta5/ with patches (Alexei)
- added support for disktotal[*] (Alexei) - added support for inodetotal[*] (Alexei) - added support for *,/,+, and - in trigger expressions (Alexei) - removed frontends/php/chart4.php (Alexei) - update item status to UNSUPPORTED in case if SNMP support was not included into zabbix_suckerd (Alexei) - added mysql_init() to DBconnect() (Alexei) - fixed Next100 and Prev100 for case if some hosts are hidden (Alexei) - added select for latest values (Alexei) - delete related services if trigger is deleted (Alexei) - fixed problem with substitution of macros for messages (Alexei) - eliminated DBis_empty() by replacing to DBnum_rows() (Alexei) - MAX_STRING_LEN increased to 4096 (Alexei) - fixed zabbix_log(). Possible coredump if data contains %s, etc (Alexei) git-svn-id: svn://svn.zabbix.com/trunk@445 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/chart.php')
-rw-r--r--frontends/php/chart.php16
1 files changed, 7 insertions, 9 deletions
diff --git a/frontends/php/chart.php b/frontends/php/chart.php
index ec50e7a6..d99f2d20 100644
--- a/frontends/php/chart.php
+++ b/frontends/php/chart.php
@@ -21,7 +21,7 @@
$sizeY=200;
$shiftX=10;
- $shiftY=13;
+ $shiftY=17;
$nodata=1;
@@ -59,8 +59,11 @@
}
$item=get_item_by_itemid($itemid);
$host=get_host_by_hostid($item["hostid"]);
- ImageString($im, 4,$sizeX/2-50,-1, $host["host"].":".$item["description"] , $darkred);
-// ImageStringUp($im,1,0,$sizeY, $host["host"].":".$item["description"], $darkred);
+
+ $str=$host["host"].":".$item["description"];
+ $x=imagesx($im)/2-ImageFontWidth(4)*strlen($str)/2;
+ ImageString($im, 4,$x,1, $str , $darkred);
+// ImageString($im, 4,$sizeX/2-50,1, $host["host"].":".$item["description"] , $darkred);
$from_time = time(NULL)-$period-3600*$from;
$to_time = time(NULL)-3600*$from;
@@ -103,12 +106,7 @@
$y1=$sizeY-$y1;
$y2=$sizeY-$y2;
-// echo $x1," - ",$x2," - ",$y1," - ",$y2,"<Br>";
ImageLine($im,$x1+$shiftX,$y1+$shiftY,$x2+$shiftX,$y2+$shiftY,$darkgreen);
-// ImageSetPixel($im,$x2+$shiftX,$y2+$shiftY,$darkred);
-// ImageSetPixel($im,$x2+$shiftX+1,$y2+$shiftY,$darkred);
-// ImageSetPixel($im,$x2+$shiftX-1,$y2+$shiftY,$darkred);
-// ImageSetPixel($im,$x2+$shiftX,$y2+$shiftY+1,$darkred);
// ImageSetPixel($im,$x2+$shiftX,$y2+$shiftY-1,$darkred);
}
}
@@ -139,7 +137,7 @@
ImageString($im, 2,$sizeX/2-50, $sizeY+$shiftY+3, "NO DATA FOUND FOR THIS PERIOD" , $darkred);
}
- ImageStringUp($im,0,2*$shiftX+$sizeX+40,$sizeY+2*$shiftY, "http://zabbix.sourceforge.net", $gray);
+ ImageStringUp($im,0,imagesx($im)-10,imagesy($im)-50, "http://zabbix.sourceforge.net", $gray);
ImagePng($im);
ImageDestroy($im);