diff options
author | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2005-08-29 11:25:06 +0000 |
---|---|---|
committer | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2005-08-29 11:25:06 +0000 |
commit | eaa70f1fbce932a6963c592916326380abda823c (patch) | |
tree | 1f146e5e98ab673baab837eb75d0bc243d1bc400 /frontends/php/sysmap.php | |
parent | a4355fb9ffa28b415af379f5d459e3ccdfe46576 (diff) | |
download | zabbix-eaa70f1fbce932a6963c592916326380abda823c.tar.gz zabbix-eaa70f1fbce932a6963c592916326380abda823c.tar.xz zabbix-eaa70f1fbce932a6963c592916326380abda823c.zip |
Minor changes.
git-svn-id: svn://svn.zabbix.com/trunk@2011 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/sysmap.php')
-rw-r--r-- | frontends/php/sysmap.php | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/frontends/php/sysmap.php b/frontends/php/sysmap.php index 96583b9a..ae4a5848 100644 --- a/frontends/php/sysmap.php +++ b/frontends/php/sysmap.php @@ -83,7 +83,7 @@ if(isset($_GET["sysmapid"])) { $map="\n<map name=links".$_GET["sysmapid"]."_".rand(0,100000).">"; - $result=DBselect("select h.host,sh.shostid,sh.sysmapid,sh.hostid,sh.label,sh.x,sh.y,h.status from sysmaps_hosts sh,hosts h where sh.sysmapid=".$_GET["sysmapid"]." and h.hostid=sh.hostid"); + $result=DBselect("select h.host,sh.shostid,sh.sysmapid,sh.hostid,sh.label,sh.x,sh.y,h.status from sysmaps_hosts sh,hosts h where sh.sysmapid=".$_GET["sysmapid"]." and h.status not in (".HOST_STATUS_DELETED.") and h.hostid=sh.hostid"); for($i=0;$i<DBnum_rows($result);$i++) { $host_=DBget_field($result,$i,0); @@ -117,7 +117,7 @@ table_begin(); table_header(array(S_HOST,S_LABEL,S_X,S_Y,S_ICON,S_ACTIONS)); - $result=DBselect("select h.host,sh.shostid,sh.sysmapid,sh.hostid,sh.label,sh.x,sh.y,sh.icon from sysmaps_hosts sh,hosts h where sh.sysmapid=".$_GET["sysmapid"]." and h.hostid=sh.hostid order by h.host"); + $result=DBselect("select h.host,sh.shostid,sh.sysmapid,sh.hostid,sh.label,sh.x,sh.y,sh.icon from sysmaps_hosts sh,hosts h where sh.sysmapid=".$_GET["sysmapid"]." and h.status not in (".HOST_STATUS_DELETED.") and h.hostid=sh.hostid order by h.host"); $col=0; while($row=DBfetch($result)) { @@ -206,7 +206,7 @@ } echo "Host"; show_table2_h_delimiter(); - $result=DBselect("select hostid,host from hosts order by host"); + $result=DBselect("select hostid,host from hosts where status not in (".HOST_STATUS_DELETED.") order by host"); echo "<select class=\"biginput\" name=\"hostid\" size=1>"; for($i=0;$i<DBnum_rows($result);$i++) { @@ -293,7 +293,7 @@ ?> <?php - $result=DBselect("select shostid,label from sysmaps_hosts where sysmapid=".$_GET["sysmapid"]." order by label"); + $result=DBselect("select shostid,label,hostid from sysmaps_hosts where sysmapid=".$_GET["sysmapid"]." order by label"); if(DBnum_rows($result)>1) { show_form_begin("sysmap.connector"); @@ -310,13 +310,14 @@ { $shostid_=DBget_field($result,$i,0); $label=DBget_field($result,$i,1); + $host=get_host_by_hostid(DBget_field($result,$i,2)); if(isset($_GET["shostid"])&&($_GET["shostid"]==$shostid_)) { - echo "<OPTION VALUE='$shostid_' SELECTED>$label"; + echo "<OPTION VALUE='$shostid_' SELECTED>".$host["host"].":$label"; } else { - echo "<OPTION VALUE='$shostid_'>$label"; + echo "<OPTION VALUE='$shostid_'>".$host["host"].":$label"; } } echo "</SELECT>"; @@ -330,7 +331,8 @@ { $shostid_=DBget_field($result,$i,0); $label=DBget_field($result,$i,1); - echo "<OPTION VALUE='$shostid_'>$label"; + $host=get_host_by_hostid(DBget_field($result,$i,2)); + echo "<OPTION VALUE='$shostid_'>".$host["host"].":$label"; } echo "</SELECT>"; |