diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index f7734d09bc..2d639990e4 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,9 @@ +2010-08-23 Sergio Martin + + * operation/agentes/networkmap.php: Add the feature of + hide and shot (toggle) the menu of options in the + network maps + 2010-08-23 Sergio Martin * godmode/alerts/alert_list.list.php: Changed the diff --git a/pandora_console/operation/agentes/networkmap.php b/pandora_console/operation/agentes/networkmap.php index 654b819328..42e48efe64 100644 --- a/pandora_console/operation/agentes/networkmap.php +++ b/pandora_console/operation/agentes/networkmap.php @@ -36,6 +36,7 @@ $delete_networkmap = get_parameter ('delete_networkmap', 0); $add_networkmap = get_parameter ('add_networkmap', 0); $update_networkmap = get_parameter ('update_networkmap', 0); $recenter_networkmap = get_parameter ('recenter_networkmap', 0); +$hidden_options = get_parameter ('hidden_options', 1); if($delete_networkmap) { $result = delete_networkmap($id_networkmap); @@ -171,6 +172,8 @@ $combolist = '
' . + &module_group='.$module_group.'&pure='.$pure.'&hidden_options='.(int)$hidden_options.'">' . print_image("images/file.png", true, array ("title" => __('Save map'))) .''); } @@ -206,10 +209,11 @@ switch($activeTab){ break; } -print_page_header (__('Network map')." - ".$title, "images/bricks.png", false, "network_map", false, $buttons); +if(!empty($name)) { + $title .= " » ".$name; +} -//echo $layout." ".$depth." ".$nooverlap." ".$modwithalerts." ".$hidepolicymodules." ".$zoom." ". -// $ranksep." ".$simple." ".$regen." ".$font_size." ".$group." ".$module_group." ".$center." ".$name; +print_page_header (__('Network map')." - ".$title, "images/bricks.png", false, "network_map", false, $buttons); if($delete_networkmap || $add_networkmap || $save_networkmap) { echo $message; @@ -220,10 +224,6 @@ if($id_networkmap == 0) { return; } -if(!empty($name)) { - echo "

".__('Name').": ".$name."

"; -} - // CONFIGURATION FORM // Layout selection @@ -234,69 +234,69 @@ $layout_array = array ( 'spring2' => 'spring 2', 'flat' => 'flat'); -echo ''; -echo ''; -echo ''; +$options_form .= '
'; -echo ''; -echo ''; -echo ''; -echo ''; +$options_form = ''; +$options_form .= '
'; -echo __('Name') . '
'; -print_input_text ('name', $name, '', 10, 25, 0); -echo '
' . __('Group') . '
'; -print_select_groups(false, false, false, 'group', $group, '', 'All', 0, false); -echo '
'; +$options_form .= '
'; +$options_form .= ''; +$options_form .= ''; +$options_form .= ''; +$options_form .= ''; if($activeTab == 'groups' || $activeTab == 'policies'){ - echo ''; + $options_form .= ''; } -echo ''; +$options_form .= ''; if($activeTab == 'groups'){ - echo ''; + $options_form .= print_select ($depth_levels, 'depth', $depth, '', '', '', true, false, false); + $options_form .= ''; } if($activeTab == 'policies'){ - echo ''; + $options_form .= print_select ($depth_levels, 'depth', $depth, '', '', '', true, false, false); + $options_form .= ''; } -echo '
'; +$options_form .= __('Name') . '
'; +$options_form .= print_input_text ('name', $name, '', 10, 25, true); +$options_form .= '
' . __('Group') . '
'; +$options_form .= print_select_groups(false, false, false, 'group', $group, '', 'All', 0, true); +$options_form .= '
' . __('Module group') . '
'; - print_select_from_sql ('SELECT id_mg, name FROM tmodule_group', 'module_group', $module_group, '', 'All', 0, false); - echo '
' . __('Module group') . '
'; + $options_form .= print_select_from_sql ('SELECT id_mg, name FROM tmodule_group', 'module_group', $module_group, '', 'All', 0, true); + $options_form .= '
' . __('Layout') . '
'; -print_select ($layout_array, 'layout', $layout, '', '', ''); -echo '
' . __('Layout') . '
'; +$options_form .= print_select ($layout_array, 'layout', $layout, '', '', '', true); +$options_form .= '
' . __('Depth') . '
'; + $options_form .= '
' . __('Depth') . '
'; $depth_levels = array('all' => __('All'), 'agent' => __('Agents'), 'group' => __('Groups')); - print_select ($depth_levels, 'depth', $depth, '', '', '', 0, false, false); - echo '
' . __('Depth') . '
'; + $options_form .= '
' . __('Depth') . '
'; $depth_levels = array('all' => __('All'), 'agent' => __('Agents'), 'policy' => __('Policies')); - print_select ($depth_levels, 'depth', $depth, '', '', '', 0, false, false); - echo '
'; -echo '
'; -echo ''; -echo ''; +$options_form .= '
' . __('No Overlap') . '
'; -print_checkbox ('nooverlap', '1', $nooverlap); -echo '
'; +$options_form .= '
'; +$options_form .= ''; +$options_form .= ''; if(($activeTab == 'groups' || $activeTab == 'policies') && $depth == 'all') { - echo ''; + $options_form .= ''; if($activeTab == 'groups') { if($config['enterprise_installed']) { - echo ''; + $options_form .= ''; } } } -echo ''; +$options_form .= ''; -echo ''; +$options_form .= ''; if ($pure == "1") { // Zoom @@ -309,29 +309,32 @@ if ($pure == "1") { '5' => 'x10', ); - echo ''; + $options_form .= ''; } if ($nooverlap == 1){ - echo ""; + $options_form .= ""; } -echo ""; +$options_form .= ""; -echo ''; -echo '
' . __('No Overlap') . '
'; +$options_form .= print_checkbox ('nooverlap', '1', $nooverlap, true); +$options_form .= '
' . __('Only modules with alerts') . '
'; - print_checkbox ('modwithalerts', '1', $modwithalerts); - echo '
' . __('Only modules with alerts') . '
'; + $options_form .= print_checkbox ('modwithalerts', '1', $modwithalerts, true); + $options_form .= '
' . __('Hide policy modules') . '
'; - print_checkbox ('hidepolicymodules', '1', $hidepolicymodules); - echo '
' . __('Hide policy modules') . '
'; + $options_form .= print_checkbox ('hidepolicymodules', '1', $hidepolicymodules, true); + $options_form .= '
' . __('Simple') . '
'; -print_checkbox ('simple', '1', $simple); -echo '
' . __('Simple') . '
'; +$options_form .= print_checkbox ('simple', '1', $simple, true); +$options_form .= '
' . __('Regenerate') . '
'; -print_checkbox ('regen', '1', $regen); -echo '
' . __('Regenerate') . '
'; +$options_form .= print_checkbox ('regen', '1', $regen, true); +$options_form .= '
' . __('Zoom') . '
'; - print_select ($zoom_array, 'zoom', $zoom, '', '', '', 0, false, false, false); - echo '
' . __('Zoom') . '
'; + $options_form .= print_select ($zoom_array, 'zoom', $zoom, '', '', '', true, false, false, false); + $options_form .= '
"; - echo __('Distance between nodes') . '
'; - print_input_text ('ranksep', $ranksep, $alt = 'Separation between elements in the map (in Non-overlap mode)', 3, 4, 0); - echo "
"; + $options_form .= __('Distance between nodes') . '
'; + $options_form .= print_input_text ('ranksep', $ranksep, __('Separation between elements in the map (in Non-overlap mode)'), 3, 4, true); + $options_form .= "
"; -echo __('Font') . '
'; -print_input_text ('font_size', $font_size, $alt = 'Font size (in pt)', 2, 4, 0); -echo "
"; +$options_form .= __('Font') . '
'; +$options_form .= print_input_text ('font_size', $font_size, $alt = 'Font size (in pt)', 2, 4, true); +$options_form .= "
'; -print_input_hidden('update_networkmap',1); -print_submit_button (__('Update'), "updbutton", false, 'class="sub upd"'); -echo '
'; +$options_form .= '
'; +$options_form .= print_input_hidden('update_networkmap',1, true); +$options_form .= print_input_hidden('hidden_options',0, true); +$options_form .= print_submit_button (__('Update'), "updbutton", false, 'class="sub upd"', true); +$options_form .= '
'; + +toggle($options_form, __('Map options'), '', $hidden_options); if($id_networkmap != 0) { switch ($activeTab) {