diff --git a/pandora_console/extensions/agents_modules.php b/pandora_console/extensions/agents_modules.php index a81ff78b2a..cd6ceb2518 100644 --- a/pandora_console/extensions/agents_modules.php +++ b/pandora_console/extensions/agents_modules.php @@ -17,6 +17,7 @@ include_once($config['homedir'] . "/include/functions_agents.php"); include_once($config['homedir'] . "/include/functions_modules.php"); include_once($config['homedir'] . '/include/functions_users.php'); +$refr = get_parameter('refresh', 0); // By default 30 seconds function mainAgentsModules() { global $config; @@ -63,7 +64,7 @@ function mainAgentsModules() { $updated_time = $updated_info; $modulegroup = get_parameter('modulegroup', 0); - $refr = get_parameter('refr', 30); // By default 30 seconds + $refr = get_parameter('refresh', 0); // By default 30 seconds $group_id = (int)get_parameter('group_id', 0); $offset = (int)get_parameter('offset', 0); @@ -97,29 +98,13 @@ function mainAgentsModules() { serialize_in_temp($agents_id, $config['id_user']."_agents", 1); } - $comborefr = '
'; - $comborefr .= ''.__('Refresh').''; - $comborefr .= html_print_select ( - array('30' => '30 ' . __('seconds'), - (string)SECONDS_1MINUTE => __('1 minute'), - (string)SECONDS_2MINUTES => __('2 minutes'), - (string)SECONDS_5MINUTES => __('5 minutes'), - (string)SECONDS_10MINUTES => __('10 minutes')), - 'refr', (int)get_parameter('refr', 0), - $script = 'this.form.submit()', '', 0, true, false, false, '', - false, 'width: 100px; margin-right: 10px; margin-top: 5px;'); - $comborefr .= "
"; - if ($config["pure"] == 0) { - $fullscreen['text'] = '' + $fullscreen['text'] = '' . html_print_image ("images/full_screen.png", true, array ("title" => __('Full screen mode'))) . ""; } else { - $fullscreen['text'] = '' - . html_print_image ("images/normal_screen.png", true, array ("title" => __('Back to normal mode'))) - . ""; - $config['refr'] = $refr; + } $groups = users_get_groups (); @@ -168,26 +153,57 @@ function mainAgentsModules() { 'combo_module_groups' => $filter_module_groups, 'combo_groups' => $filter_groups); - if ($config['pure'] == 1) { - $onheader['combo_refr'] = $comborefr; - } - - // Header - ui_print_page_header (__("Agents/Modules"), "images/module_mc.png", false, "", false, $updated_time); - // Old style table, we need a lot of special formatting,don't use table function // Prepare old-style table - echo ''; - echo ""; - if ($config['pure'] == 1){ - echo ""; - echo ""; - } - else{ - echo ""; - } - echo ""; - echo "
" . $comborefr . "" . $fullscreen['text'] . " " . $fullscreen['text'] . "
"; + if ($config['pure'] == 0){ + // Header + ui_print_page_header (__("Agents/Modules"), "images/module_mc.png", false, "", false, $updated_time); + echo ''; + echo ""; + echo ""; + echo ""; + echo "
" . $fullscreen['text'] . "
"; + } else { + $url =" index.php?sec=view&sec2=extensions/agents_modules&pure=0&offset='.$offset.'&group_id='.$group_id.'&modulegroup='.$modulegroup.'&refresh=$refr"; + // Floating menu - Start + echo '
'; + + echo ''; + + echo '
'; + // Floating menu - End + + ui_require_jquery_file('countdown'); + ui_require_css_file('countdown'); + } + if($config['pure'] != 1){ echo '
'; @@ -300,7 +316,7 @@ function mainAgentsModules() { $agents = agents_get_agents ($filter_groups); $nagents = count($agents); - + if ($all_modules == false || $agents == false) { ui_print_info_message ( array('no_close'=>true, 'message'=> __('There are no agents with modules') ) ); return; @@ -481,7 +497,7 @@ function mainAgentsModules() { echo ""; } - + echo ""; echo "
"; @@ -538,9 +554,50 @@ function mainAgentsModules() { extensions_add_operation_menu_option(__("Agents/Modules view"), 'estado', 'agents_modules/icon_menu.png', "v1r1","view"); extensions_add_main_function('mainAgentsModules'); +$ignored_params['refresh']=''; + ?>