summaryrefslogtreecommitdiffstats
path: root/frontends/php/sysmap.php
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2004-09-13 13:59:16 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2004-09-13 13:59:16 +0000
commit6982fb3d2443946171de306f5078925dfaeae359 (patch)
tree704951b6c60210abddd4b1570c70a12e2aa25b9f /frontends/php/sysmap.php
parentf7f74958b31cb3c8009d5946497911bfcf00cac0 (diff)
downloadzabbix-6982fb3d2443946171de306f5078925dfaeae359.tar.gz
zabbix-6982fb3d2443946171de306f5078925dfaeae359.tar.xz
zabbix-6982fb3d2443946171de306f5078925dfaeae359.zip
- different icons depending on a triger status for sysmaps (Alexei)
- added column sysmaps_hosts.icon_on (Alexei) - hierarchial maps (Alexei) - added column sysmaps_hosts.url (Alexei) - upgrades/dbpatches/1.0_to_1.1alpha1/data/images/ (Alexei) git-svn-id: svn://svn.zabbix.com/trunk@1421 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/sysmap.php')
-rw-r--r--frontends/php/sysmap.php59
1 files changed, 32 insertions, 27 deletions
diff --git a/frontends/php/sysmap.php b/frontends/php/sysmap.php
index e1acb432..f3c45a9f 100644
--- a/frontends/php/sysmap.php
+++ b/frontends/php/sysmap.php
@@ -44,12 +44,12 @@
{
if($_GET["register"]=="add")
{
- $result=add_host_to_sysmap($_GET["sysmapid"],$_GET["hostid"],$_GET["label"],$_GET["x"],$_GET["y"],$_GET["icon"]);
+ $result=add_host_to_sysmap($_GET["sysmapid"],$_GET["hostid"],$_GET["label"],$_GET["x"],$_GET["y"],$_GET["icon"],$_GET["url"],$_GET["icon_on"]);
show_messages($result,"Host added","Cannot add host");
}
if($_GET["register"]=="update")
{
- $result=update_sysmap_host($_GET["shostid"],$_GET["sysmapid"],$_GET["hostid"],$_GET["label"],$_GET["x"],$_GET["y"],$_GET["icon"]);
+ $result=update_sysmap_host($_GET["shostid"],$_GET["sysmapid"],$_GET["hostid"],$_GET["label"],$_GET["x"],$_GET["y"],$_GET["icon"],$_GET["url"],$_GET["icon_on"]);
show_messages($result,"Host updated","Cannot update host");
}
if($_GET["register"]=="add link")
@@ -219,18 +219,23 @@
if(isset($_GET["shostid"]))
{
- $result=DBselect("select hostid,label,x,y,icon from sysmaps_hosts where shostid=".$_GET["shostid"]);
+ $result=DBselect("select hostid,label,x,y,icon,url,icon_on from sysmaps_hosts where shostid=".$_GET["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);
$icon=DBget_field($result,0,4);
+ $url=DBget_field($result,0,5);
+ $icon_on=DBget_field($result,0,6);
}
else
{
$label="";
$x=0;
$y=0;
+ $icon="";
+ $url="";
+ $icon_on="";
}
show_table2_header_begin();
@@ -267,38 +272,33 @@
echo "</SELECT>";
show_table2_v_delimiter();
- echo "Icon";
+ echo "Icon (OFF)";
show_table2_h_delimiter();
echo "<select class=\"biginput\" name=\"icon\" size=1>";
-/* $icons=array();
- if(function_exists("imagecreatetruecolor")&&@imagecreatetruecolor(1,1))
+ $result=DBselect("select name from images where imagetype=1 order by name");
+ for($i=0;$i<DBnum_rows($result);$i++)
{
- $icons[0]="Server";
- $icons[1]="Workstation";
- $icons[2]="Notebook";
- $icons[3]="Printer";
- $icons[4]="Hub";
- $icons[5]="UPS";
- $icons[6]="Network";
- $icons[7]="Phone";
- $icons[8]="Satellite";
- $num=9;
+ $name=DBget_field($result,$i,0);
+ if(isset($_GET["shostid"]) && ($icon==$name))
+ {
+ echo "<OPTION VALUE='".$name."' SELECTED>".$name;
+ }
+ else
+ {
+ echo "<OPTION VALUE='".$name."'>".$name;
+ }
}
- else
- {
- $icons[0]="Server";
- $icons[1]="Workstation";
- $icons[2]="Printer";
- $icons[3]="Hub";
- $num=4;
- }*/
+ echo "</SELECT>";
+
+ show_table2_v_delimiter();
+ echo "Icon (ON)";
+ show_table2_h_delimiter();
+ echo "<select class=\"biginput\" name=\"icon_on\" size=1>";
$result=DBselect("select name from images where imagetype=1 order by name");
-/* for($i=0;$i<$num;$i++)*/
for($i=0;$i<DBnum_rows($result);$i++)
{
$name=DBget_field($result,$i,0);
- if(isset($_GET["shostid"]) && ($icon==$name))
-// if(isset($_GET["hostid"]) && ($_GET["icon"]==$icons[$i]))
+ if(isset($_GET["shostid"]) && ($icon_on==$name))
{
echo "<OPTION VALUE='".$name."' SELECTED>".$name;
}
@@ -324,6 +324,11 @@
show_table2_h_delimiter();
echo "<input class=\"biginput\" name=\"y\" size=5 value=\"$y\">";
+ show_table2_v_delimiter();
+ echo nbsp("URL");
+ show_table2_h_delimiter();
+ echo "<input class=\"biginput\" name=\"url\" size=64 value=\"$url\">";
+
show_table2_v_delimiter2();
echo "<input class=\"button\" type=\"submit\" name=\"register\" value=\"add\">";
if(isset($_GET["shostid"]))