diff --git a/pandora_console/godmode/users/configure_user.php b/pandora_console/godmode/users/configure_user.php index 5fcf6a616c..dff6666611 100644 --- a/pandora_console/godmode/users/configure_user.php +++ b/pandora_console/godmode/users/configure_user.php @@ -392,6 +392,7 @@ if ($create_user === true) { $values['timezone'] = (string) get_parameter('timezone'); $values['default_event_filter'] = (int) get_parameter('default_event_filter'); $values['default_custom_view'] = (int) get_parameter('default_custom_view'); + $values['time_autorefresh'] = (int) get_parameter('time_autorefresh', 0); $dashboard = get_parameter('dashboard', ''); $visual_console = get_parameter('visual_console', ''); @@ -653,6 +654,7 @@ if ($update_user) { $values['default_event_filter'] = (int) get_parameter('default_event_filter'); $values['default_custom_view'] = (int) get_parameter('default_custom_view'); $values['show_tips_startup'] = (int) get_parameter_switch('show_tips_startup'); + $values['time_autorefresh'] = (int) get_parameter('time_autorefresh'); // API Token information. $apiTokenRenewed = (bool) get_parameter('renewAPIToken'); $values['api_token'] = ($apiTokenRenewed === true) ? api_token_generate() : users_get_API_token($values['id_user']); @@ -1562,8 +1564,8 @@ $autorefresh_list_out['operation/visual_console/render_view'] = 'Visual console' $autorefresh_list_out['operation/events/events'] = 'Events'; -if (isset($autorefresh_list) === false) { - $select = db_process_sql("SELECT autorefresh_white_list FROM tusuario WHERE id_user = '".$config['id_user']."'"); +if (isset($autorefresh_list) === false || empty($autorefresh_list) === true || empty($autorefresh_list[0]) === true) { + $select = db_process_sql("SELECT autorefresh_white_list FROM tusuario WHERE id_user = '".$id."'"); $autorefresh_list = json_decode($select[0]['autorefresh_white_list']); if ($autorefresh_list === null) { $autorefresh_list[0] = __('None'); @@ -1773,6 +1775,13 @@ if (is_metaconsole() === false) { }); }); + $("#button-uptbutton").click (function () { + console.log('aaaaaaaaaaaaa'); + if($("#autorefresh_list option").length > 0) { + $('#autorefresh_list option').prop('selected', true); + } + }); + $("input#checkbox-double_auth").change(function(e) { e.preventDefault(); if (this.checked) { diff --git a/pandora_console/operation/users/user_edit.php b/pandora_console/operation/users/user_edit.php index da3ed994c9..a6144d9de0 100644 --- a/pandora_console/operation/users/user_edit.php +++ b/pandora_console/operation/users/user_edit.php @@ -1107,12 +1107,6 @@ $(document).ready (function () { }); }); - $("#submit-uptbutton").click (function () { - if($("#autorefresh_list option").length > 0) { - $('#autorefresh_list option').prop('selected', true); - } - }); - check_default_block_size() $("#checkbox-default_block_size").change(function() { check_default_block_size();