diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 537324f502..92ef38d431 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,9 @@ +2013-06-25 Miguel de Dios + + * operation/users/user_edit.php: fixed the "home page" for user, + now it does show ugly 0, show correct the dashboard and + visualmap and can set other. + 2013-06-25 Miguel de Dios * operation/users/user_edit.php: merge the code for made more diff --git a/pandora_console/operation/users/user_edit.php b/pandora_console/operation/users/user_edit.php index 77bca6a470..1aae0b5566 100644 --- a/pandora_console/operation/users/user_edit.php +++ b/pandora_console/operation/users/user_edit.php @@ -102,7 +102,7 @@ if (isset ($_GET["modified"]) && !$view_mode) { $upd_info["id_skin"] = get_parameter ("skin", $user_info["id_skin"]); $upd_info["block_size"] = get_parameter ("block_size", $config["block_size"]); $default_block_size = get_parameter ("default_block_size", 0); - if ($default_block_size) { + if($default_block_size) { $upd_info["block_size"] = 0; } @@ -278,12 +278,55 @@ if (!$meta) { $data = array(); $data[0] = __('Shortcut bar') . ui_print_help_tip(__('This will activate a shortcut bar with alerts, events, messages... information'), true); $data[0] .= '
' . html_print_checkbox('shortcut_bar', 1, $user_info["shortcut"], true); - + $data[1] = __('Home screen'). ui_print_help_tip(__('User can customize the home page. By default, will display \'Agent Detail\'. Example: Select \'Other\' and type sec=estado&sec2=operation/agentes/estado_agente to show agent detail view'), true); - $values = array ('Default' =>__('Default'), 'Dashboard'=>__('Dashboard'), 'Visual console'=>__('Visual console'), 'Event list'=>__('Event list'), - 'Group view'=>__('Group view'), 'Tactical view'=>__('Tactical view'), 'Alert detail' => __('Alert detail'), 'Other'=>__('Other')); + $values = array ( + 'Default' =>__('Default'), + 'Dashboard'=>__('Dashboard'), + 'Visual console'=>__('Visual console'), + 'Event list'=>__('Event list'), + 'Group view'=>__('Group view'), + 'Tactical view'=>__('Tactical view'), + 'Alert detail' => __('Alert detail'), + 'Other'=>__('Other')); + if (enterprise_installed()) { + $values['Dashboard'] = __('Dashboard'); + } + $data[1] .= '
' . html_print_select($values, 'section', io_safe_output($user_info["section"]), 'show_data_section();', '', -1, true, false, false); + echo html_print_select($values, 'section', io_safe_output($user_info["section"]), 'show_data_section();', '', -1, true, false, false); + echo "  "; + + if (enterprise_installed()) { + $dashboards = get_user_dashboards ($config['id_user']); + $dashboards_aux = array(); + if ($dashboards === false) { + $dashboards = array('None'=>'None'); + } + else { + foreach ($dashboards as $key => $dashboard) { + $dashboards_aux[$dashboard['name']] = $dashboard['name']; + } + } + $data[1] .= html_print_select ($dashboards_aux, 'dashboard', $user_info["data_section"], '', '', '', true); + } + + $layouts = visual_map_get_user_layouts ($config['id_user'], true); + $layouts_aux = array(); + if ($layouts === false) { + $layouts_aux = array('None'=>'None'); + } + else { + foreach ($layouts as $layout) { + $layouts_aux[$layout] = $layout; + } + } + $data[1] .= html_print_select ($layouts_aux, 'visual_console', $user_info["data_section"], '', '', '', true); + $data[1] .= html_print_input_text ('data_section', $user_info["data_section"], '', 60, 255, true, false); + + + // User only can change skins if has more than one group $data[2] = ''; if (function_exists('skins_print_select')) {