From 2c88dcbac3de23650e7fccaa91f003e9ae54550d Mon Sep 17 00:00:00 2001 From: hugetoad Date: Tue, 3 Jul 2001 06:07:26 +0000 Subject: Patches for alpha6->alpha7. Fixed bug with lost status of trigger. git-svn-id: svn://svn.zabbix.com/trunk@122 97f52cf1-0a1b-0410-bd0e-c28be96e8082 --- frontends/php/map.html | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'frontends/php/map.html') diff --git a/frontends/php/map.html b/frontends/php/map.html index 148e9b06..07686ec2 100644 --- a/frontends/php/map.html +++ b/frontends/php/map.html @@ -29,6 +29,7 @@ $cyan=ImageColorAllocate($im,0,255,255); $white=ImageColorAllocate($im,255,255,255); $black=ImageColorAllocate($im,0,0,0); + $gray=ImageColorAllocate($im,150,150,150); $x=imagesx($im); $y=imagesy($im); @@ -103,7 +104,13 @@ { $result1=DBselect("select count(*) from items i,functions f,triggers t,hosts h where h.hostid=i.hostid and i.hostid=$hostid and i.itemid=f.itemid and f.triggerid=t.triggerid and t.istrue=1 and h.status=0"); $count=DBget_field($result1,0,0); - if($count>0) + if($count==1) + { + $color=$red; + $result1=DBselect("select t.description from items i,functions f,triggers t,hosts h where h.hostid=i.hostid and i.hostid=$hostid and i.itemid=f.itemid and f.triggerid=t.triggerid and t.istrue=1 and h.status=0"); + $label=DBget_field($result1,0,0); + } + else if($count>1) { $color=$red; $label="Problems"; @@ -125,6 +132,8 @@ } ImageDestroy($img); + ImageString($im,0,$width-147,$height-10, "http://zabbix.sourceforge.net", $gray); + ImagePng($im); ImageDestroy($im); ?> -- cgit