From 25036c9384fcec4d36f4cfc69fe2b86e4ef2c9c6 Mon Sep 17 00:00:00 2001 From: osmiy Date: Tue, 14 Mar 2006 15:21:27 +0000 Subject: - added "Data overview" for screens - added "Triggers overview" for screens (Eugene) - added blinking into Trigger overview (Eugene) - added screen displaying in other screen (Eugene) - improved Overview table header, vertical text added (Eugene) - developed "ZABBIX Clock" module for screens (Eugene) - developed "ZABBIX server info" module for screens (Eugene) - developed "Triggers info" module for screens (Eugene) - developed "Host info" module for screens (Eugene) - improved screens displaying, added item alignment (Eugene) - improved ZABBIX server report (Eugene) - improved images configuration (Eugene) - added onserver image resizing for thumbs by php (Eugene) - developed acknowledges system (Eugene) - added icons displaying for maps (Eugene) - added maps displaying for maps (Eugene) - improved maps (Eugene) git-svn-id: svn://svn.zabbix.com/trunk@2699 97f52cf1-0a1b-0410-bd0e-c28be96e8082 --- frontends/php/maps.php | 128 ++++++++++++++++++++----------------------------- 1 file changed, 51 insertions(+), 77 deletions(-) (limited to 'frontends/php/maps.php') diff --git a/frontends/php/maps.php b/frontends/php/maps.php index 8dd7eb5e..bd628901 100644 --- a/frontends/php/maps.php +++ b/frontends/php/maps.php @@ -23,26 +23,17 @@ $page["title"] = "S_NETWORK_MAPS"; $page["file"] = "maps.php"; - $nomenu=0; - if(isset($_REQUEST["fullscreen"])) - { - $nomenu=1; - } - if(isset($_REQUEST["sysmapid"])) - { - show_header($page["title"],1,$nomenu); - } - else - { - show_header($page["title"],0,$nomenu); - } + $_REQUEST["fullscreen"] = get_request("fullscreen", 0); + + show_header($page["title"],1, $_REQUEST["fullscreen"] > 0 ? 1 : 0); + ?> array(T_ZBX_INT, O_OPT, P_SYS|P_NZERO, BETWEEN(0,65535), NULL), - "fullscreen"=> array(T_ZBX_INT, O_OPT, P_SYS, IN("1"), NULL) + "sysmapid"=> array(T_ZBX_INT, O_OPT, P_SYS|P_NZERO, DB_ID, NULL), + "fullscreen"=> array(T_ZBX_INT, O_OPT, P_SYS, IN("0,1"), NULL) ); check_fields($fields); @@ -50,7 +41,21 @@ ?> 0 && !check_right("Network map","R",$_REQUEST["sysmapid"])) { show_table_header("".S_NO_PERMISSIONS.""); show_page_footer(); @@ -58,81 +63,50 @@ } ?> - 0) { + $sysmap = get_sysmap_by_sysmapid($_REQUEST["sysmapid"]); - if(isset($_REQUEST["sysmapid"])) - { - $result=get_map_by_sysmapid($_REQUEST["sysmapid"]); - $h1=$result["name"]; - $h1=iif(isset($_REQUEST["fullscreen"]), - "".$h1."", - "".$h1.""); - } - else - { - $h1=S_SELECT_MAP_TO_DISPLAY; - } - - $h1=S_NETWORK_MAPS_BIG.nbsp(" / ").$h1; - - $h2=""; - - if(isset($_REQUEST["fullscreen"])) - { - $h2=$h2.""; - } - - if(isset($_REQUEST["sysmapid"])&&($_REQUEST["sysmapid"]==0)) - { - unset($_REQUEST["sysmapid"]); - } + $url = "maps.php?sysmapid=".$_REQUEST["sysmapid"]; + if($_REQUEST["fullscreen"]==0) + $url .= "&fullscreen=1"; - $h2=$h2.""; + $form = new CForm(); + if($_REQUEST["fullscreen"]>=1) + $form->AddVar("fullscreen",$_REQUEST["fullscreen"]); - show_header2($h1,$h2,"
","
"); + $cmbMaps = new CComboBox("sysmapid",$_REQUEST["sysmapid"],"submit()"); + $result=DBselect("select sysmapid,name from sysmaps order by name"); + while($row=DBfetch($result)) + { + if(!check_right("Network map","R",$row["sysmapid"])) continue; + $cmbMaps->AddItem($row["sysmapid"],$row["name"]); } + $form->AddItem($cmbMaps); + + show_header2($text,$form); ?> "; - echo ""; - echo ""; - echo ""; - if(isset($_REQUEST["sysmapid"])) + $table = new CTable(NULL,"map"); + if($_REQUEST["sysmapid"] > 0) { - echo get_map_imagemap($_REQUEST["sysmapid"]); - echo ""; - } - else - { - echo "..."; + $action_map = get_action_map_by_sysmapid($_REQUEST["sysmapid"]); + $table->AddRow($action_map); + + $imgMap = new CImg("map.php?noedit=1&sysmapid=".$_REQUEST["sysmapid"]); + $imgMap->SetMap($action_map->GetName()); + $table->AddRow($imgMap); + } - echo ""; - echo ""; - echo ""; + $table->Show(); ?> - -- cgit