diff options
author | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-01-31 11:43:21 +0000 |
---|---|---|
committer | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-01-31 11:43:21 +0000 |
commit | 23a26fe8f5409070c9a4e4502e9973e47389433a (patch) | |
tree | d362a441952c53172a3f0242f6bb5b3f165fb2db /frontends/php/sysmap.php | |
parent | 4c4d305c9f216a5c1046c960642bcfa387d509a4 (diff) | |
download | zabbix-23a26fe8f5409070c9a4e4502e9973e47389433a.tar.gz zabbix-23a26fe8f5409070c9a4e4502e9973e47389433a.tar.xz zabbix-23a26fe8f5409070c9a4e4502e9973e47389433a.zip |
- Bug fixing (Eugene)
git-svn-id: svn://svn.zabbix.com/trunk@2589 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/sysmap.php')
-rw-r--r-- | frontends/php/sysmap.php | 34 |
1 files changed, 29 insertions, 5 deletions
diff --git a/frontends/php/sysmap.php b/frontends/php/sysmap.php index 4d426872..c7794515 100644 --- a/frontends/php/sysmap.php +++ b/frontends/php/sysmap.php @@ -127,7 +127,8 @@ if(function_exists("imagecreatetruecolor")&&@imagecreatetruecolor(1,1)) { $map .= "\n<area shape=rect coords=$x_,$y_,".($x_+48).",".($y_+48). - " href=\"sysmap.php?sysmapid=$sysmapid_&shostid=$shostid_#form\"". + " href=\"sysmap.php?form=Add+Host&sysmapid=$sysmapid_". + "&shostid=$shostid_#form\"". " alt=\"$host_\">"; } else @@ -198,22 +199,45 @@ " where sysmapid=".$_REQUEST["sysmapid"]." order by linkid"); while($row=DBfetch($result)) { + /* prepare label 1 */ + $db_hosts = DBselect("select h.*". + " from sysmaps_hosts sh,hosts h". + " where sh.sysmapid=".$_REQUEST["sysmapid"]. + " and h.hostid=sh.hostid". + " and h.status not in (".HOST_STATUS_DELETED.")". + " and sh.shostid=".$row["shostid1"]); + if(DBnum_rows($db_hosts)==0) continue; $result1=DBselect("select label from sysmaps_hosts where shostid=".$row["shostid1"]); $row1=DBfetch($result1); $label1=$row1["label"]; + if($label1==""){ + $db_host = DBfetch($db_hosts); + $label1 = $db_host['host']; + } + + /* prepare label 2 */ + $db_hosts = DBselect("select h.*". + " from sysmaps_hosts sh,hosts h". + " where sh.sysmapid=".$_REQUEST["sysmapid"]. + " and h.hostid=sh.hostid". + " and h.status not in (".HOST_STATUS_DELETED.")". + " and sh.shostid=".$row["shostid2"]); + if(DBnum_rows($db_hosts)==0) continue; $result1=DBselect("select label from sysmaps_hosts where shostid=".$row["shostid2"]); $row1=DBfetch($result1); $label2=$row1["label"]; + if($label2==""){ + $db_host = DBfetch($db_hosts); + $label2 = $db_host['host']; + } + /* prepare description */ if(isset($row["triggerid"])) - { $description=expand_trigger_description($row["triggerid"]); - } else - { $description="-"; - } + /* draw row */ $table->addRow(array( $label1, $label2, |