summaryrefslogtreecommitdiffstats
path: root/frontends/php
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2005-02-26 13:17:12 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2005-02-26 13:17:12 +0000
commit3d46f8cd88e6ae75d3c2f5ad151b031d0a275dec (patch)
tree4f8090dca92df6374f2ff917acafc3d424a443f3 /frontends/php
parent77b0f6eeccfb4e183664d8b1bb4023e8075d6290 (diff)
downloadzabbix-3d46f8cd88e6ae75d3c2f5ad151b031d0a275dec.tar.gz
zabbix-3d46f8cd88e6ae75d3c2f5ad151b031d0a275dec.tar.xz
zabbix-3d46f8cd88e6ae75d3c2f5ad151b031d0a275dec.zip
- support for no labels and no status in network maps (Alexei)
git-svn-id: svn://svn.zabbix.com/trunk@1676 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php')
-rw-r--r--frontends/php/hosts.php4
-rw-r--r--frontends/php/include/defines.inc.php3
-rw-r--r--frontends/php/include/local_en.inc.php2
-rw-r--r--frontends/php/map.php14
-rw-r--r--frontends/php/sysmaps.php20
5 files changed, 26 insertions, 17 deletions
diff --git a/frontends/php/hosts.php b/frontends/php/hosts.php
index d8cab2b6..fff0a214 100644
--- a/frontends/php/hosts.php
+++ b/frontends/php/hosts.php
@@ -189,15 +189,13 @@
$h2=$h2."<select class=\"biginput\" name=\"config\" onChange=\"submit()\">";
$h2=$h2."<option value=\"0\" ".iif(isset($_GET["config"])&&$_GET["config"]==0,"selected","").">".S_HOSTS;
$h2=$h2."<option value=\"1\" ".iif(isset($_GET["config"])&&$_GET["config"]==1,"selected","").">".S_HOST_GROUPS;
- $h2=$h2."<option value=\"2\" ".iif(isset($_GET["config"])&&$_GET["config"]==2,"selected","").">".S_TEMPLATES;
+ $h2=$h2."<option value=\"2\" ".iif(isset($_GET["config"])&&$_GET["config"]==2,"selected","").">".S_HOSTS_TEMPLATES_LINKAGE;
$h2=$h2."</select>";
show_header2($h1, $h2, "<form name=\"selection\" method=\"get\" action=\"hosts.php\">", "</form>");
?>
-
-
<?php
if($_GET["config"]==2)
{
diff --git a/frontends/php/include/defines.inc.php b/frontends/php/include/defines.inc.php
index 2011487a..9175dffc 100644
--- a/frontends/php/include/defines.inc.php
+++ b/frontends/php/include/defines.inc.php
@@ -63,7 +63,8 @@
define("MAP_LABEL_TYPE_HOSTLABEL",0);
define("MAP_LABEL_TYPE_IP",1);
define("MAP_LABEL_TYPE_HOSTNAME",2);
- define("MAP_LABEL_TYPE_NOTHING",3);
+ define("MAP_LABEL_TYPE_STATUS",3);
+ define("MAP_LABEL_TYPE_NOTHING",4);
define("ITEM_TYPE_ZABBIX",0);
define("ITEM_TYPE_SNMPV1",1);
diff --git a/frontends/php/include/local_en.inc.php b/frontends/php/include/local_en.inc.php
index bdcafbce..b8fae77f 100644
--- a/frontends/php/include/local_en.inc.php
+++ b/frontends/php/include/local_en.inc.php
@@ -381,6 +381,7 @@
define("S_ICON_LABEL_TYPE", "Icon label type");
define("S_HOST_LABEL", "Host label");
define("S_HOST_NAME", "Host name");
+ define("S_STATUS_ONLY", "Status only");
define("S_NOTHING", "Nothing");
// media.php
@@ -623,6 +624,7 @@
define("S_USER_GROUPS", "User groups");
define("S_MEMBERS", "Members");
define("S_TEMPLATES", "Templates");
+ define("S_HOSTS_TEMPLATES_LINKAGE", "Hosts/templates linkage");
define("S_CONFIGURATION_OF_TEMPLATES_LINKAGE", "CONFIGURATION OF TEMPLATES LINKAGE");
define("S_LINKED_TEMPLATES_BIG", "LINKED TEMPLATES");
define("S_NO_USER_GROUPS_DEFINED", "No user groups defined");
diff --git a/frontends/php/map.php b/frontends/php/map.php
index 669df00e..6e102f41 100644
--- a/frontends/php/map.php
+++ b/frontends/php/map.php
@@ -326,10 +326,7 @@
else
$color=$darkyellow;
-// if( strstr($label,"%s"))
-// {
$label=expand_trigger_description_simple(DBget_field($result1,0,1));
-// }
}
else if($count>1)
{
@@ -348,12 +345,11 @@
{
$y1=$y1+ImageFontHeight(2);
}
- ImageFilledRectangle($im,$x1-2, $y1,$x1+ImageFontWidth(2)*strlen($label), $y1+ImageFontHeight(2),$white);
- ImageString($im, 2, $x1, $y1, $label,$color);
-
-# ImageFilledRectangle($im,$x+ImageSX($img)/2-ImageFontWidth(2)*strlen($label)/2-2, $y+ImageSY($img),$x+ImageSX($img)/2+ImageFontWidth(2)*strlen($label)/2, $y+ImageSY($img)+ImageFontHeight(2),$white);
-# ImageString($im, 2, $x+ImageSX($img)/2-ImageFontWidth(2)*strlen($label)/2, $y+ImageSY($img)+ImageFontHeight(2), $label,$color);
-# ImageDestroy($img);
+ if($label_type!=MAP_LABEL_TYPE_NOTHING)
+ {
+ ImageFilledRectangle($im,$x1-2, $y1,$x1+ImageFontWidth(2)*strlen($label), $y1+ImageFontHeight(2),$white);
+ ImageString($im, 2, $x1, $y1, $label,$color);
+ }
}
ImageStringUp($im,0,imagesx($im)-10,imagesy($im)-50, S_ZABBIX_URL, $gray);
diff --git a/frontends/php/sysmaps.php b/frontends/php/sysmaps.php
index 886658ae..7e4d9c7c 100644
--- a/frontends/php/sysmaps.php
+++ b/frontends/php/sysmaps.php
@@ -169,28 +169,40 @@
echo "<OPTION VALUE='0' SELECTED>".S_HOST_LABEL;
echo "<OPTION VALUE='1'>".S_IP_ADDRESS;
echo "<OPTION VALUE='2'>".S_HOST_NAME;
- echo "<OPTION VALUE='3'>".S_NOTHING;
+ echo "<OPTION VALUE='3'>".S_STATUS_ONLY;
+ echo "<OPTION VALUE='4'>".S_NOTHING;
}
else if($label_type==1)
{
echo "<OPTION VALUE='0'>".S_HOST_LABEL;
echo "<OPTION VALUE='1' SELECTED>".S_IP_ADDRESS;
echo "<OPTION VALUE='2'>".S_HOST_NAME;
- echo "<OPTION VALUE='3'>".S_NOTHING;
+ echo "<OPTION VALUE='3'>".S_STATUS_ONLY;
+ echo "<OPTION VALUE='4'>".S_NOTHING;
}
else if($label_type==2)
{
echo "<OPTION VALUE='0'>".S_HOST_LABEL;
echo "<OPTION VALUE='1'>".S_IP_ADDRESS;
echo "<OPTION VALUE='2' SELECTED>".S_HOST_NAME;
- echo "<OPTION VALUE='3'>".S_NOTHING;
+ echo "<OPTION VALUE='3'>".S_STATUS_ONLY;
+ echo "<OPTION VALUE='4'>".S_NOTHING;
}
else if($label_type==3)
{
echo "<OPTION VALUE='0'>".S_HOST_LABEL;
echo "<OPTION VALUE='1'>".S_IP_ADDRESS;
echo "<OPTION VALUE='2'>".S_HOST_NAME;
- echo "<OPTION VALUE='3' SELECTED>".S_NOTHING;
+ echo "<OPTION VALUE='3' SELECTED>".S_STATUS_ONLY;
+ echo "<OPTION VALUE='4'>".S_NOTHING;
+ }
+ else if($label_type==4)
+ {
+ echo "<OPTION VALUE='0'>".S_HOST_LABEL;
+ echo "<OPTION VALUE='1'>".S_IP_ADDRESS;
+ echo "<OPTION VALUE='2'>".S_HOST_NAME;
+ echo "<OPTION VALUE='3'>".S_STATUS_ONLY;
+ echo "<OPTION VALUE='4' SELECTED>".S_NOTHING;
}
echo "</SELECT>";