summaryrefslogtreecommitdiffstats
path: root/frontends/php/map.php
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2003-06-19 10:31:34 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2003-06-19 10:31:34 +0000
commit24e4c0c1e651a3896b966be7ffb03c78e5b86e74 (patch)
treeb1bc101d5f7f99cf5768aec4b311934cc4923a10 /frontends/php/map.php
parentb1cf4f71fb1e55fe840887e09aac2317e0c3ea9e (diff)
downloadzabbix-24e4c0c1e651a3896b966be7ffb03c78e5b86e74.tar.gz
zabbix-24e4c0c1e651a3896b966be7ffb03c78e5b86e74.tar.xz
zabbix-24e4c0c1e651a3896b966be7ffb03c78e5b86e74.zip
- link map's connector to a trigger, other changes
git-svn-id: svn://svn.zabbix.com/trunk@830 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/map.php')
-rw-r--r--frontends/php/map.php20
1 files changed, 18 insertions, 2 deletions
diff --git a/frontends/php/map.php b/frontends/php/map.php
index b599b3a7..5eb1243f 100644
--- a/frontends/php/map.php
+++ b/frontends/php/map.php
@@ -66,11 +66,12 @@
# Draw connectors
- $result=DBselect("select shostid1,shostid2 from sysmaps_links where sysmapid=".$HTTP_GET_VARS["sysmapid"]);
+ $result=DBselect("select shostid1,shostid2,triggerid from sysmaps_links where sysmapid=".$HTTP_GET_VARS["sysmapid"]);
for($i=0;$i<DBnum_rows($result);$i++)
{
$shostid1=DBget_field($result,$i,0);
$shostid2=DBget_field($result,$i,1);
+ $triggerid=DBget_field($result,$i,2);
$result1=DBselect("select x,y from sysmaps_hosts where shostid=$shostid1");
$x1=DBget_field($result1,0,0);
@@ -80,7 +81,22 @@
$x2=DBget_field($result1,0,0);
$y2=DBget_field($result1,0,1);
- ImageLine($im,$x1+16,$y1+16,$x2+16,$y2+16,$black);
+ if(isset($triggerid))
+ {
+ $trigger=get_trigger_by_triggerid($triggerid);
+ if($trigger["value"] == TRIGGER_VALUE_TRUE)
+ {
+ ImageLine($im,$x1+16,$y1+16,$x2+16,$y2+16,$red);
+ }
+ else
+ {
+ ImageLine($im,$x1+16,$y1+16,$x2+16,$y2+16,$black);
+ }
+ }
+ else
+ {
+ ImageLine($im,$x1+16,$y1+16,$x2+16,$y2+16,$black);
+ }
}
# Draw hosts