summaryrefslogtreecommitdiffstats
path: root/frontends/php/sysmap.php
diff options
context:
space:
mode:
authorartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-07-23 09:37:47 +0000
committerartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-07-23 09:37:47 +0000
commit5c3768ceaa3080321c3bf6481640fcdd380d0025 (patch)
tree172b94421c008b166a1106c5c42f983c2b8fe5b3 /frontends/php/sysmap.php
parent6db9d7bcf88b79ab279dd2b5dc929fabb1a23f1f (diff)
downloadzabbix-5c3768ceaa3080321c3bf6481640fcdd380d0025.tar.gz
zabbix-5c3768ceaa3080321c3bf6481640fcdd380d0025.tar.xz
zabbix-5c3768ceaa3080321c3bf6481640fcdd380d0025.zip
- [DEV-192] added filter to Status of triggers (Artem)
- [DEV-191] monitoring screens inline update preparation (Artem) - [DEV-192] added severity filter in status of triggers (Artem) - [DEV-137] sql fixes for oracle (Artem) - [ZBX-396] fixed error maps message (Artem) - [ZBX-394] fixed showing hosts without group in status of triggers (Artem) - [DEV-137] small fixes (Artem) git-svn-id: svn://svn.zabbix.com/trunk@5841 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/sysmap.php')
-rw-r--r--frontends/php/sysmap.php28
1 files changed, 12 insertions, 16 deletions
diff --git a/frontends/php/sysmap.php b/frontends/php/sysmap.php
index 87a5dc6c..e963cfed 100644
--- a/frontends/php/sysmap.php
+++ b/frontends/php/sysmap.php
@@ -119,7 +119,7 @@ include_once "include/page_header.php";
add_audit_if($result,AUDIT_ACTION_UPDATE,AUDIT_RESOURCE_MAP,'Name ['.$sysmap['name'].'] Link ['.$linkid.'] updated ');
if($result) unset($_REQUEST["form"]);
}
- elseif(isset($_REQUEST["delete"])){
+ else if(isset($_REQUEST["delete"])){
if(isset($_REQUEST["linkid"])){
$result=delete_link($_REQUEST["linkid"]);
@@ -133,8 +133,7 @@ include_once "include/page_header.php";
unset($_REQUEST["form"]);
}
}
- elseif(isset($_REQUEST["selementid"]))
- {
+ else if(isset($_REQUEST["selementid"])){
$result=delete_sysmaps_element($_REQUEST["selementid"]);
show_messages($result,"Element deleted","Cannot delete element");
add_audit_if($result,AUDIT_ACTION_UPDATE,AUDIT_RESOURCE_MAP,
@@ -147,7 +146,6 @@ include_once "include/page_header.php";
}
}
?>
-
<?php
echo SBR;
if(isset($_REQUEST["form"]) && ($_REQUEST["form"]=="add_element" ||
@@ -161,15 +159,13 @@ include_once "include/page_header.php";
($_REQUEST["form"]=="update" && isset($_REQUEST["linkid"]))))
{
$row = DBfetch(DBselect("select count(*) as count from sysmaps_elements where sysmapid=".$_REQUEST["sysmapid"]));
- if($row["count"]>1)
- {
+ if($row["count"]>1){
show_table_header(S_CONNECTORS);
echo SBR;
insert_map_link_form();
}
- else
- {
- info("No elements in this map");
+ else{
+ info('Not enough elements in this map');
}
}
else{
@@ -181,8 +177,7 @@ include_once "include/page_header.php";
$db_elements = DBselect("select * from sysmaps_elements where sysmapid=".$_REQUEST["sysmapid"].
" order by label");
- while($db_element = DBfetch($db_elements))
- {
+ while($db_element = DBfetch($db_elements)){
if( $db_element["elementtype"] == SYSMAP_ELEMENT_TYPE_HOST) $type = S_HOST;
elseif($db_element["elementtype"] == SYSMAP_ELEMENT_TYPE_MAP) $type = S_MAP;
@@ -259,19 +254,19 @@ include_once "include/page_header.php";
}
$table->Show();
}
-
+
+ show_messages();
+
echo SBR;
$map=get_sysmap_by_sysmapid($_REQUEST["sysmapid"]);
show_table_header($map["name"]);
$table = new CTable(NULL,"map");
- if(isset($_REQUEST["sysmapid"]))
- {
+ if(isset($_REQUEST["sysmapid"])){
$linkMap = new CMap("links".$_REQUEST["sysmapid"]."_".rand(0,100000));
$db_elements = DBselect("select * from sysmaps_elements where sysmapid=".$_REQUEST["sysmapid"]);
- while($db_element = DBfetch($db_elements))
- {
+ while($db_element = DBfetch($db_elements)){
$tmp_img = get_png_by_selementid($db_element["selementid"]);
if(!$tmp_img) continue;
@@ -286,6 +281,7 @@ include_once "include/page_header.php";
$db_element["label"]);
}
+
$imgMap = new CImg("map.php?sysmapid=".$_REQUEST["sysmapid"]);
$imgMap->SetMap($linkMap->GetName());
$table->AddRow($linkMap);