2012-03-12 Vanessa Gil <vanessa.gil@artica.es>
* index.php operation/users/user_edit.php: Customize home screen. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5734 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
c7b0698aa2
commit
cc0192417e
|
@ -1,3 +1,7 @@
|
|||
2012-03-12 Vanessa Gil <vanessa.gil@artica.es>
|
||||
* index.php
|
||||
operation/users/user_edit.php: Customize home screen.
|
||||
|
||||
2012-03-09 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* include/javascript/pandora.js, extensions/snmp_explorer.php,
|
||||
|
|
|
@ -276,28 +276,55 @@ else {
|
|||
|
||||
if ($home_page != '') {
|
||||
switch($home_page) {
|
||||
case __('Event list'):
|
||||
header ('location:' . $config['homeurl'] . '/index.php?sec=eventos&sec2=operation/events/events');
|
||||
case __('Event list'):
|
||||
require ('operation/events/events.php');
|
||||
break;
|
||||
case __('Group view'):
|
||||
header ('location:' . $config['homeurl'] . '/index.php?sec=estado&sec2=operation/agentes/group_view');
|
||||
require ('operation/agentes/group_view.php');
|
||||
break;
|
||||
case __('Alert detail'):
|
||||
header ('location:' . $config['homeurl'] . '/index.php?sec=estado&sec2=operation/agentes/alerts_status');
|
||||
require ('operation/agentes/alerts_status.php');
|
||||
break;
|
||||
case __('Tactical view'):
|
||||
require ("general/logon_ok.php");
|
||||
require ('operation/agentes/tactical.php');
|
||||
break;
|
||||
case __('Default'):
|
||||
require ('general/logon_ok.php');
|
||||
break;
|
||||
case __('Dashboard'):
|
||||
$id_dashboard = db_get_value('id', 'tdashboard', 'name', $home_url);
|
||||
header ('location:' . $config['homeurl'] . '/index.php?sec=dashboard&sec2='.ENTERPRISE_DIR.'/dashboard/main_dashboard&id='.$id_dashboard);
|
||||
$str = 'sec=visualc&sec2='.ENTERPRISE_DIR.'/dashboard/main_dashboard&id='.$id_dashboard;
|
||||
parse_str($str, $res);
|
||||
foreach ($res as $key => $param) {
|
||||
$_GET[$key] = $param;
|
||||
}
|
||||
require(ENTERPRISE_DIR.'/dashboard/main_dashboard.php');
|
||||
break;
|
||||
case __('Visual console'):
|
||||
$id_visualc = db_get_value('id', 'tlayout', 'name', $home_url);
|
||||
header ('location:' . $config['homeurl'] . '/index.php?sec=visualc&sec2=operation/visual_console/render_view&id='. $id_visualc .'&refr=60');
|
||||
$str = 'sec=visualc&sec2=operation/visual_console/render_view&id='.$id_visualc .'&refr=60';
|
||||
parse_str($str, $res);
|
||||
foreach ($res as $key => $param) {
|
||||
$_GET[$key] = $param;
|
||||
}
|
||||
require('operation/visual_console/render_view.php');
|
||||
break;
|
||||
case __('Other'):
|
||||
header ('location:' . $config['homeurl'] . '/index.php?'. io_safe_output($home_url));
|
||||
$home_url = io_safe_output($home_url);
|
||||
parse_str ($home_url, $res);
|
||||
foreach ($res as $key => $param) {
|
||||
$_GET[$key] = $param;
|
||||
}
|
||||
if (isset($_GET['sec2'])) {
|
||||
$file = $_GET['sec2'].'.php';
|
||||
|
||||
if (!file_exists ($file)) {
|
||||
unset($_GET['sec2']);
|
||||
require('general/logon_ok.php');
|
||||
} else {
|
||||
require($file);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -331,7 +358,3 @@ echo '</html>';
|
|||
$run_time = format_numeric (microtime (true) - $config['start_time'], 3);
|
||||
echo "\n<!-- Page generated in $run_time seconds -->\n";
|
||||
?>
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
|
||||
</script>
|
||||
|
|
|
@ -97,7 +97,7 @@ if (isset ($_GET["modified"]) && !$view_mode) {
|
|||
$visual_console = get_parameter('visual_console', '');
|
||||
|
||||
$section = io_safe_output($upd_info["section"]);
|
||||
if (($section == 'Event list') || ($section == 'Group view') || ($section == 'Alert detail') || ($section == 'Tactical view')) {
|
||||
if (($section == 'Event list') || ($section == 'Group view') || ($section == 'Alert detail') || ($section == 'Tactical view') || ($section == 'Default')) {
|
||||
$upd_info["data_section"] = '';
|
||||
} else if ($section == 'Dashboard') {
|
||||
$upd_info["data_section"] = $dashboard;
|
||||
|
@ -242,7 +242,7 @@ echo html_print_checkbox('shortcut_bar', 1, $user_info["shortcut"], true);
|
|||
|
||||
echo '</td></tr><tr><td class="datos">'.__('Home screen'). ui_print_help_tip(__('
|
||||
User can customize the home page. By default, will display \'Tactical view\'. Example: Select \'Other\' and type sec=estado&sec2=operation/agentes/estado_agente to show agent detail view'), true) .'</td><td class="datos2">';
|
||||
$values = array ('Dashboard'=>__('Dashboard'), 'Visual console'=>__('Visual console'), 'Event list'=>__('Event list'),
|
||||
$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'));
|
||||
echo html_print_select($values, 'section', io_safe_output($user_info["section"]), 'show_data_section();', '', -1, true, false, false);
|
||||
echo " ";
|
||||
|
@ -369,6 +369,11 @@ function show_data_section () {
|
|||
$("#dashboard").css("display", "none");
|
||||
$("#visual_console").css("display", "none");
|
||||
break;
|
||||
case <?php echo "'".__('Default')."'"; ?>:
|
||||
$("#text-data_section").css("display", "none");
|
||||
$("#dashboard").css("display", "none");
|
||||
$("#visual_console").css("display", "none");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue