From 74804a063473820c864d90a9683de0d4bd1dc905 Mon Sep 17 00:00:00 2001 From: darode Date: Fri, 23 Jul 2010 10:55:20 +0000 Subject: [PATCH] 2010-07-23 Dario Rodriguez * operation/agentes/ver_agente.php: Changed code to use print_page_header to print de tabs * godmode/agentes/configurar_agente.php: Changed code to use print_page_header to print de tabs git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3056 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 7 + .../godmode/agentes/configurar_agente.php | 141 +++++++++++------ .../operation/agentes/ver_agente.php | 147 ++++++++++-------- 3 files changed, 179 insertions(+), 116 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index b10ea70bf1..51dd68eab1 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,10 @@ +2010-07-23 Dario Rodriguez + + * operation/agentes/ver_agente.php: Changed code to use print_page_header + to print de tabs + * godmode/agentes/configurar_agente.php: Changed code to use print_page_header + to print de tabs + 2010-07-23 Raúl Mateos * godmode/alerts/aler_list*.php: Cleaned code. Removed old title style. diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php index dbb5df67ad..2a8673837b 100644 --- a/pandora_console/godmode/agentes/configurar_agente.php +++ b/pandora_console/godmode/agentes/configurar_agente.php @@ -198,58 +198,97 @@ $img_style = array ("class" => "top", "width" => 16); // TODO: Change to use print_page_header if ($id_agente) { - echo '"; - // Make some space between tabs and title - // IE might not always show an empty div, added space - echo '
 
'; + /* View tab */ + $viewtab['text'] = '' + . print_image ("images/zoom.png", true, array ("title" =>__('View'))) + . ''; + + if($tab == 'view') + $viewtab['active'] = true; + else + $viewtab['active'] = false; + + /* Main tab */ + $maintab['text'] = '' + . print_image ("images/cog.png", true, array ("title" =>__('Setup'))) + . ''; + if($tab == 'main') + + $maintab['active'] = true; + else + $maintab['active'] = false; + + /* Module tab */ + $moduletab['text'] = '' + . print_image ("images/lightbulb.png", true, array ("title" =>__('Modules'))) + . ''; + + if($tab == 'module') + $moduletab['active'] = true; + else + $moduletab['active'] = false; + + /* Alert tab */ + $alerttab['text'] = '' + . print_image ("images/bell.png", true, array ("title" =>__('Alerts'))) + . ''; + + if($tab == 'alert') + $alerttab['active'] = true; + else + $alerttab['active'] = false; + + /* Template tab */ + $templatetab['text'] = '' + . print_image ("images/network.png", true, array ("title" =>__('Module templates'))) + . ''; + + if($tab == 'template') + $templatetab['active'] = true; + else + $templatetab['active'] = false; + + + /* Inventory */ + $inventorytab = enterprise_hook ('inventory_tab'); + + if ($inventorytab == -1) + $inventorytab = ""; + + /* Collection */ + $collectiontab = enterprise_hook('collection_tab'); + + if ($collectiontab == -1) + $collectiontab = ""; + + /* Group tab */ + + $grouptab['text'] = '' + . print_image ("images/agents_group.png", true, array( "title=" => __('Group'))) + . ''; + + $grouptab['active'] = false; + + $gistab = ""; + + /* GIS tab */ + if ($config['activate_gis']) { + + $gistab['text'] = '' + . print_image ("images/world.png", true, array ( "title" => __('GIS data'))) + . ''; + + if ($tab == "gis") + $gistab['active'] = true; + else + $gistab['active'] = false; + } + + $onheader = array('view' => $viewtab, 'main' => $maintab, 'module' => $moduletab, 'alert' => $alerttab, 'template' => $templatetab, 'inventory' => $inventorytab, 'collection'=> $collectiontab, 'group' => $grouptab, 'gis' => $gistab); + + print_page_header (__('Agent configuration').' - '.mb_substr(get_agent_name ($id_agente), 0, 21), "images/setup.png", false, "", true, $onheader); + } // Create agent else { diff --git a/pandora_console/operation/agentes/ver_agente.php b/pandora_console/operation/agentes/ver_agente.php index 0f108faf2b..d786009ca3 100644 --- a/pandora_console/operation/agentes/ver_agente.php +++ b/pandora_console/operation/agentes/ver_agente.php @@ -235,93 +235,110 @@ if (isset($_GET["flag_agent"])){ } } -echo ""; -echo "
"; +$onheader = array('manage' => $managetab, 'main' => $maintab, 'data' => $datatab, 'alert' => $alerttab, 'sla' => $slatab, 'inventory' => $inventorytab, 'collection' => $collectiontab, 'group' => $grouptab, 'gis' => $gistab); + +print_page_header (__('Agent').' - '.mb_substr(get_agent_name($id_agente),0,25), $icon, false, "", false, $onheader); + switch ($tab) { case "gis":