From 0db5010365e68d85776cc095012f95d6b2cdcd60 Mon Sep 17 00:00:00 2001 From: hugetoad Date: Sun, 24 Jun 2001 17:14:02 +0000 Subject: Change of sysmap information became possible. git-svn-id: svn://svn.zabbix.com/trunk@107 97f52cf1-0a1b-0410-bd0e-c28be96e8082 --- frontends/php/sysmap.html | 81 +++++++++++++++++++++++++++++++---------------- 1 file changed, 54 insertions(+), 27 deletions(-) (limited to 'frontends/php/sysmap.html') diff --git a/frontends/php/sysmap.html b/frontends/php/sysmap.html index cebe1de5..5b7b196d 100644 --- a/frontends/php/sysmap.html +++ b/frontends/php/sysmap.html @@ -17,6 +17,10 @@ { add_host_to_sysmap($sysmapid,$hostid,$label,$x,$y); } + if($register=="update") + { + update_sysmap_host($shostid,$sysmapid,$hostid,$label,$x,$y); + } if($register=="add link") { add_link($sysmapid,$shostid1,$shostid2); @@ -35,7 +39,7 @@ echo ""; echo ""; echo ""; echo ""; echo "
"; - echo ""; + echo ""; echo "
"; @@ -65,18 +69,18 @@ } $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); + $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); echo "$host"; - echo "$label"; - echo "$x"; - echo "$y"; - echo "Delete"; + echo "$label_"; + echo "$x_"; + echo "$y_"; + echo "Change - Delete"; echo ""; } echo ""; @@ -85,13 +89,12 @@ "; - echo "ID"; echo "Host 1"; echo "Host 2"; echo "Actions"; echo ""; - $result=DBselect("select linkid,shostid1,shostid2 from sysmaps_links order by linkid"); + $result=DBselect("select linkid,shostid1,shostid2 from sysmaps_links where sysmapid=$sysmapid order by linkid"); echo "
"; $col=0; for($i=0;$i$linkid"; echo "$label1"; echo "$label2"; echo "Delete"; @@ -124,49 +126,74 @@ echo ""; ?> - - - - - - - "; + echo ""; + + if(isset($shostid)) + { + $result=DBselect("select hostid,label,x,y from sysmaps_hosts where shostid=$shostid"); + $hostid=DBget_field($result,0,0); + $label=DBget_field($result,0,1); + $x=DBget_field($result,0,2); + $y=DBget_field($result,0,3); + } + else + { + $label=""; + $x=0; + $y=0; + } + show_table2_header_begin(); echo "New host to display"; show_table2_v_delimiter(); echo "
"; + if(isset($shostid)) + { + echo ""; + } echo "Host"; show_table2_h_delimiter(); $result=DBselect("select hostid,host from hosts order by host"); echo ""; show_table2_v_delimiter(); echo "Label"; show_table2_h_delimiter(); - echo ""; + echo ""; show_table2_v_delimiter(); echo "Coordinate X"; show_table2_h_delimiter(); - echo ""; + echo ""; show_table2_v_delimiter(); echo "Coordinate Y"; show_table2_h_delimiter(); - echo ""; + echo ""; show_table2_v_delimiter2(); echo ""; + if(isset($shostid)) + { + echo ""; + } show_table2_header_end(); ?> -- cgit