From b0da63dc62785c4e11c415dbbab683f477236b4a Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Mon, 13 May 2024 14:03:32 +0200 Subject: [PATCH] #13007 hidden module filters --- pandora_console/operation/tree.php | 75 +++++++++++++++--------------- 1 file changed, 38 insertions(+), 37 deletions(-) diff --git a/pandora_console/operation/tree.php b/pandora_console/operation/tree.php index 2f690dc0b5..41784398fe 100755 --- a/pandora_console/operation/tree.php +++ b/pandora_console/operation/tree.php @@ -291,46 +291,47 @@ if (is_metaconsole() === true) { ); } -// if (is_metaconsole() === false) { -// Module filter. -$module_status_arr = []; -$module_status_arr[-1] = __('All'); -// Default. -$module_status_arr[AGENT_MODULE_STATUS_NORMAL] = __('Normal'); -$module_status_arr[AGENT_MODULE_STATUS_WARNING] = __('Warning'); -$module_status_arr[AGENT_MODULE_STATUS_CRITICAL_BAD] = __('Critical'); -$module_status_arr[AGENT_MODULE_STATUS_UNKNOWN] = __('Unknown'); -$module_status_arr[AGENT_MODULE_STATUS_NOT_INIT] = __('Not init'); -$module_status_arr['fired'] = __('Fired alerts'); +if (is_metaconsole() === false) { + // Module filter. + $module_status_arr = []; + $module_status_arr[-1] = __('All'); + // Default. + $module_status_arr[AGENT_MODULE_STATUS_NORMAL] = __('Normal'); + $module_status_arr[AGENT_MODULE_STATUS_WARNING] = __('Warning'); + $module_status_arr[AGENT_MODULE_STATUS_CRITICAL_BAD] = __('Critical'); + $module_status_arr[AGENT_MODULE_STATUS_UNKNOWN] = __('Unknown'); + $module_status_arr[AGENT_MODULE_STATUS_NOT_INIT] = __('Not init'); + $module_status_arr['fired'] = __('Fired alerts'); -$table->data['last_row'][] = html_print_label_input_block( - __('Search module'), - html_print_input_text('search_module', $search_module, '', 25, 30, true) -); + $table->data['last_row'][] = html_print_label_input_block( + __('Search module'), + html_print_input_text('search_module', $search_module, '', 25, 30, true) + ); -$table->data['last_row'][] = html_print_label_input_block( - __('Show not init modules'), - html_print_checkbox_switch('show_not_init_modules', $show_not_init_modules, true, true) -); + $table->data['last_row'][] = html_print_label_input_block( + __('Show not init modules'), + html_print_checkbox_switch('show_not_init_modules', $show_not_init_modules, true, true) + ); + + $table->data['last_row'][] = html_print_label_input_block( + __('Module status'), + html_print_select( + $module_status_arr, + 'status_module', + $status_module, + '', + '', + 0, + true, + false, + false, + '', + false, + 'width:100%' + ) + ); +} -$table->data['last_row'][] = html_print_label_input_block( - __('Module status'), - html_print_select( - $module_status_arr, - 'status_module', - $status_module, - '', - '', - 0, - true, - false, - false, - '', - false, - 'width:100%' - ) -); -// } $form_html = '