fixed visual error selects home view

This commit is contained in:
marcos 2021-04-13 15:37:44 +02:00
parent 4f803c8abb
commit 87362d07f4
2 changed files with 27 additions and 4 deletions

View File

@ -1111,7 +1111,9 @@ if ($dashboards === false) {
}
}
$home_screen .= '<div id="show_db" style="display: none; width: 100%;">';
$home_screen .= html_print_select($dashboards_aux, 'dashboard', $user_info['data_section'], '', '', '', true);
$home_screen .= '</div>';
$layouts = visual_map_get_user_layouts($config['id_user'], true);
@ -1124,6 +1126,7 @@ if ($layouts === false) {
}
}
$home_screen .= '<div id="show_vc" style="display: none; width: 100%;">';
$home_screen .= html_print_select(
$layouts_aux,
'visual_console',
@ -1133,6 +1136,8 @@ $home_screen .= html_print_select(
'',
true
);
$home_screen .= '</div>';
$home_screen .= html_print_input_text(
'data_section',
$user_info['data_section'],
@ -1664,46 +1669,64 @@ function show_data_section () {
$("#text-data_section").css("display", "none");
$("#dashboard").css("display", "");
$("#visual_console").css("display", "none");
$("#show_vc").css("display", "none");
$("#show_db").css("display", "inline-grid");
break;
case <?php echo "'".'Visual console'."'"; ?>:
$("#text-data_section").css("display", "none");
$("#dashboard").css("display", "none");
$("#visual_console").css("display", "");
$("#show_vc").css("display", "inline-grid");
$("#show_db").css("display", "none");
break;
case <?php echo "'".'Event list'."'"; ?>:
$("#text-data_section").css("display", "none");
$("#dashboard").css("display", "none");
$("#visual_console").css("display", "none");
$("#show_vc").css("display", "none");
$("#show_db").css("display", "none");
break;
case <?php echo "'".'Group view'."'"; ?>:
$("#text-data_section").css("display", "none");
$("#dashboard").css("display", "none");
$("#visual_console").css("display", "none");
$("#show_vc").css("display", "none");
$("#show_db").css("display", "none");
break;
case <?php echo "'".'Tactical view'."'"; ?>:
$("#text-data_section").css("display", "none");
$("#dashboard").css("display", "none");
$("#visual_console").css("display", "none");
$("#show_vc").css("display", "none");
$("#show_db").css("display", "none");
break;
case <?php echo "'".'Alert detail'."'"; ?>:
$("#text-data_section").css("display", "none");
$("#dashboard").css("display", "none");
$("#visual_console").css("display", "none");
$("#show_vc").css("display", "none");
$("#show_db").css("display", "none");
break;
case <?php echo "'".'External link'."'"; ?>:
$("#text-data_section").css("display", "");
$("#dashboard").css("display", "none");
$("#visual_console").css("display", "none");
$("#show_vc").css("display", "none");
$("#show_db").css("display", "none");
break;
case <?php echo "'".'Other'."'"; ?>:
$("#text-data_section").css("display", "");
$("#dashboard").css("display", "none");
$("#visual_console").css("display", "none");
$("#show_vc").css("display", "none");
$("#show_db").css("display", "none");
break;
case <?php echo "'".'Default'."'"; ?>:
$("#text-data_section").css("display", "none");
$("#dashboard").css("display", "none");
$("#visual_console").css("display", "none");
$("#show_vc").css("display", "none");
$("#show_db").css("display", "none");
break;
}
}

View File

@ -376,7 +376,7 @@ if (!$meta) {
}
}
$home_screen .= '<div id="show_db" style="display: none; width: 605px;">';
$home_screen .= '<div id="show_db" style="display: none; width: 100%;">';
$home_screen .= html_print_select($dashboards_aux, 'dashboard', $user_info['data_section'], '', '', '', true, false, false, '');
$home_screen .= '</div>';
@ -683,7 +683,7 @@ if (!is_metaconsole()) {
</div>';
if ($config['ehorus_enabled'] && $config['ehorus_user_level_conf']) {
// eHorus user remote login
// EHorus user remote login.
$table_remote = new StdClass();
$table_remote->data = [];
$table_remote->width = '100%';
@ -693,12 +693,12 @@ if ($config['ehorus_enabled'] && $config['ehorus_user_level_conf']) {
$table_remote->style['name'] = 'font-weight: bold';
// Title
// Title.
$row = [];
$row['control'] = '<p class="edit_user_labels">'.__('eHorus user configuration').': </p>';
$table_remote->data['ehorus_user_level_conf'] = $row;
// Enable/disable eHorus for this user
// Enable/disable eHorus for this user.
$row = [];
$row['name'] = __('eHorus user acces enabled');
$row['control'] = html_print_checkbox_switch('ehorus_user_level_enabled', 1, $user_info['ehorus_user_level_enabled'], true);