summaryrefslogtreecommitdiffstats
path: root/frontends/php/include
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-01-30 08:56:26 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-01-30 08:56:26 +0000
commita678780a5405b247b28649d7852814ef8f6c73f9 (patch)
tree8956c1e0d6269f432394170a3c8d0e054ff8771d /frontends/php/include
parent11c71af449e0f8d5afc482f631cd7411663529b0 (diff)
- added support of icon label locations (Alexei)
- added new column sysmaps.label_location (Alexei) - better processing of server startup/shutdown (Alexei) git-svn-id: svn://svn.zabbix.com/trunk@2569 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include')
-rw-r--r--frontends/php/include/defines.inc.php5
-rw-r--r--frontends/php/include/forms.inc.php10
-rw-r--r--frontends/php/include/locales/en_gb.inc.php3
-rw-r--r--frontends/php/include/maps.inc.php8
4 files changed, 22 insertions, 4 deletions
diff --git a/frontends/php/include/defines.inc.php b/frontends/php/include/defines.inc.php
index dadc08f3..315171f2 100644
--- a/frontends/php/include/defines.inc.php
+++ b/frontends/php/include/defines.inc.php
@@ -101,6 +101,11 @@
define("MAP_LABEL_TYPE_STATUS",3);
define("MAP_LABEL_TYPE_NOTHING",4);
+ define("MAP_LABEL_LOC_BOTTOM", 0);
+ define("MAP_LABEL_LOC_LEFT", 1);
+ define("MAP_LABEL_LOC_RIGHT", 2);
+ define("MAP_LABEL_LOC_TOP", 3);
+
define("ITEM_TYPE_ZABBIX",0);
define("ITEM_TYPE_SNMPV1",1);
define("ITEM_TYPE_TRAPPER",2);
diff --git a/frontends/php/include/forms.inc.php b/frontends/php/include/forms.inc.php
index b0ed0e8d..bf6926ff 100644
--- a/frontends/php/include/forms.inc.php
+++ b/frontends/php/include/forms.inc.php
@@ -1976,6 +1976,7 @@
$height = $row["height"];
$background = $row["background"];
$label_type = $row["label_type"];
+ $label_location = $row["label_location"];
}
else
{
@@ -1984,6 +1985,7 @@
$height = get_request("height",600);
$background = get_request("background","");
$label_type = get_request("label_type",0);
+ $label_location = get_request("label_location",0);
}
@@ -2012,6 +2014,14 @@
$cmbLabel->AddItem(4,S_NOTHING);
$frmMap->AddRow(S_ICON_LABEL_TYPE,$cmbLabel);
+ $cmbLocation = new CComboBox("label_location",$label_location);
+
+ $cmbLocation->AddItem(0,S_BOTTOM);
+ $cmbLocation->AddItem(1,S_LEFT);
+ $cmbLocation->AddItem(2,S_RIGHT);
+ $cmbLocation->AddItem(3,S_TOP);
+ $frmMap->AddRow(S_ICON_LABEL_LOCATION,$cmbLocation);
+
$frmMap->AddItemToBottomRow(new CButton("save",S_SAVE));
if(isset($_REQUEST["sysmapid"]))
{
diff --git a/frontends/php/include/locales/en_gb.inc.php b/frontends/php/include/locales/en_gb.inc.php
index 060e00c3..afd7e0fc 100644
--- a/frontends/php/include/locales/en_gb.inc.php
+++ b/frontends/php/include/locales/en_gb.inc.php
@@ -474,6 +474,9 @@
"S_NO_MAPS_DEFINED"=> "No maps defined",
"S_CONFIGURATION_OF_NETWORK_MAPS"=> "CONFIGURATION OF NETWORK MAPS",
"S_CREATE_MAP"=> "Create Map",
+ "S_ICON_LABEL_LOCATION"=> "Icon label location",
+ "S_BOTTOM"=> "Bottom",
+ "S_TOP"=> "Top",
// map.php
"S_OK_BIG"=> "OK",
diff --git a/frontends/php/include/maps.inc.php b/frontends/php/include/maps.inc.php
index 90a08797..7169e26e 100644
--- a/frontends/php/include/maps.inc.php
+++ b/frontends/php/include/maps.inc.php
@@ -71,7 +71,7 @@
# Update System Map
- function update_sysmap($sysmapid,$name,$width,$height,$background,$label_type)
+ function update_sysmap($sysmapid,$name,$width,$height,$background,$label_type,$label_location)
{
if(!check_right("Network map","U",$sysmapid))
{
@@ -79,13 +79,13 @@
return 0;
}
- $sql="update sysmaps set name='$name',width=$width,height=$height,background='$background',label_type=$label_type where sysmapid=$sysmapid";
+ $sql="update sysmaps set name='$name',width=$width,height=$height,background='$background',label_type=$label_type,label_location=$label_location where sysmapid=$sysmapid";
return DBexecute($sql);
}
# Add System Map
- function add_sysmap($name,$width,$height,$background,$label_type)
+ function add_sysmap($name,$width,$height,$background,$label_type,$label_location)
{
if(!check_right("Network map","A",0))
{
@@ -93,7 +93,7 @@
return 0;
}
- $sql="insert into sysmaps (name,width,height,background,label_type) values ('$name',$width,$height,'$background',$label_type)";
+ $sql="insert into sysmaps (name,width,height,background,label_type,label_location) values ('$name',$width,$height,'$background',$label_type,$label_location)";
return DBexecute($sql);
}