summaryrefslogtreecommitdiffstats
path: root/frontends/php/sysmap.html
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2001-07-01 11:34:17 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2001-07-01 11:34:17 +0000
commit9914a035650ffb324655e1187f1bc822e4823b64 (patch)
treed4c7a0010dbc0c8af22a9a49ab28da6720559387 /frontends/php/sysmap.html
parentd1f643e5097215db8c0e4ac0ba472b5ebc6ba945 (diff)
downloadzabbix-9914a035650ffb324655e1187f1bc822e4823b64.tar.gz
zabbix-9914a035650ffb324655e1187f1bc822e4823b64.tar.xz
zabbix-9914a035650ffb324655e1187f1bc822e4823b64.zip
Hosts displayed in network maps became clickable.
git-svn-id: svn://svn.zabbix.com/trunk@118 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/sysmap.html')
-rw-r--r--frontends/php/sysmap.html27
1 files changed, 24 insertions, 3 deletions
diff --git a/frontends/php/sysmap.html b/frontends/php/sysmap.html
index 5b7b196d..1214da97 100644
--- a/frontends/php/sysmap.html
+++ b/frontends/php/sysmap.html
@@ -1,12 +1,12 @@
<?
include "include/config.inc";
- $page["title"] = "Configuration of system map";
+ $page["title"] = "Configuration of network map";
$page["file"] = "sysmap.html";
show_header($page["title"],0);
?>
<?
- show_table_header("CONFIGURATION OF SYSTEM MAP");
+ show_table_header("CONFIGURATION OF NETWORK MAP");
echo "<br>";
?>
@@ -39,7 +39,28 @@
echo "<TABLE BORDER=0 COLS=4 WIDTH=\"100%\" BGCOLOR=\"#CCCCCC\" cellspacing=1 cellpadding=3>";
echo "<TR BGCOLOR=#DDDDDD>";
echo "<TD ALIGN=CENTER>";
- echo "<IMG SRC=\"map.html?sysmapid=$sysmapid\">";
+ if(isset($sysmapid))
+ {
+ $map="\n<map name=links>";
+ $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=$sysmapid and h.hostid=sh.hostid");
+ for($i=0;$i<DBnum_rows($result);$i++)
+ {
+ $host_=DBget_field($result,$i,0);
+ $shostid_=DBget_field($result,$i,1);
+ $sysmapid_=DBget_field($result,$i,2);
+ $hostid_=DBget_field($result,$i,3);
+ $label_=DBget_field($result,$i,4);
+ $x_=DBget_field($result,$i,5);
+ $y_=DBget_field($result,$i,6);
+ $status_=DBget_field($result,$i,7);
+
+ $map=$map."\n<area shape=rect coords=$x_,$y_,".($x_+32).",".($y_+32)." href=\"sysmap.html?sysmapid=$sysmapid_&shostid=$shostid_#form\" alt=\"$host_\">";
+ }
+ $map=$map."\n</map>";
+ echo $map;
+ echo "<IMG SRC=\"map.html?sysmapid=$sysmapid\" border=0 usemap=#links>";
+ }
+
echo "</TD>";
echo "</TR>";
echo "</TABLE>";