diff --git a/pandora_console/godmode/agentes/agent_manager.php b/pandora_console/godmode/agentes/agent_manager.php index ad27ff87f0..8224d4f7a1 100644 --- a/pandora_console/godmode/agentes/agent_manager.php +++ b/pandora_console/godmode/agentes/agent_manager.php @@ -375,28 +375,6 @@ if (enterprise_installed()) { true, // Return HTML (not echo) true // Multiple selection ); -} - -// Custom ID -$table->data[0][0] = __('Custom ID'); -$table->data[0][1] = html_print_input_text ('custom_id', $custom_id, '', 16, 255, true); - -$table->data[1][0] = __('Parent'); -$params = array(); -$params['return'] = true; -$params['show_helptip'] = true; -$params['input_name'] = 'id_parent'; -$params['print_hidden_input_idagent'] = true; -$params['hidden_input_idagent_name'] = 'id_agent_parent'; -$params['hidden_input_idagent_value'] = $id_parent; -$params['value'] = db_get_value ("alias","tagente","id_agente",$id_parent); -$params['selectbox_id'] = 'cascade_protection_module'; -$params['javascript_is_function_select'] = true; -$params['cascade_protection'] = true; - -$table->data[1][1] = ui_print_agent_autocomplete_input($params); -$table->data[1][1] .= html_print_checkbox ("cascade_protection", 1, $cascade_protection, true).__('Cascade protection'). " " . ui_print_help_icon("cascade_protection", true); -$table->data[1][1] .= " " . __('Module') . " " . html_print_select ($modules_values, "cascade_protection_module", $cascade_protection_module, "", "", 0, true); //safe operation mode if($id_agente){ @@ -415,27 +393,6 @@ if($id_agente){ $table->data[2][1] .= " " . __('Module') . " " . html_print_select ($safe_mode_modules, "safe_mode_module", $safe_mode_module, "", "", 0, true); } - -// Learn mode / Normal mode -$table->data[3][0] = __('Module definition') . - ui_print_help_icon("module_definition", true); -$table->data[3][1] = __('Learning mode') . ' ' . - html_print_radio_button_extended ("modo", 1, '', $modo, false, 'show_modules_not_learning_mode_context_help();', - 'style="margin-right: 40px;"', true); -$table->data[3][1] .= __('Normal mode') . ' ' . - html_print_radio_button_extended ("modo", 0, '', $modo, false, 'show_modules_not_learning_mode_context_help();', - 'style="margin-right: 40px;"', true); -$table->data[3][1] .= __('Autodisable mode') . ' ' . - html_print_radio_button_extended ("modo", 2, '', $modo, false, 'show_modules_not_learning_mode_context_help();', - 'style="margin-right: 40px;"', true); - -// Status (Disabled / Enabled) -$table->data[4][0] = __('Status'); -$table->data[4][1] = __('Disabled') . ' ' . - html_print_radio_button_extended ("disabled", 1, '', $disabled, false, '', 'style="margin-right: 40px;"', true); -$table->data[4][1] .= __('Active') . ' ' . - html_print_radio_button_extended ("disabled", 0, '', $disabled, false, '', 'style="margin-right: 40px;"', true); - // Remote configuration $table->data[5][0] = __('Remote configuration'); @@ -464,6 +421,80 @@ if (!$new_agent) { else $table->data[5][1] = '' . __('Not available') . ''; + + +$cps_array[-1] = __('Disabled'); +if($cps > 0){ + $cps_array[$cps] = __('Enabled'); +} +else{ + $cps_inc = 0; + if($id_agente){ + $cps_inc = service_agents_cps($id_agente); + } + $cps_array[$cps_inc] = __('Enabled'); +} + +$table->data[6][0] = __('Cascade protection services'); +$table->data[6][0] .= ui_print_help_tip(__('Disable the alerts and events of the elements that belong to this service'), true); +$table->data[6][1] = html_print_select($cps_array, 'cps', $cps, '', '', 0, true); + + +} +// Custom ID +$table->data[0][0] = __('Custom ID'); +$table->data[0][1] = html_print_input_text ('custom_id', $custom_id, '', 16, 255, true); + +$table->data[1][0] = __('Parent'); +$params = array(); +$params['return'] = true; +$params['show_helptip'] = true; +$params['input_name'] = 'id_parent'; +$params['print_hidden_input_idagent'] = true; +$params['hidden_input_idagent_name'] = 'id_agent_parent'; +$params['hidden_input_idagent_value'] = $id_parent; +$params['value'] = db_get_value ("alias","tagente","id_agente",$id_parent); +$params['selectbox_id'] = 'cascade_protection_module'; +$params['javascript_is_function_select'] = true; +$params['cascade_protection'] = true; + +$table->data[1][1] = ui_print_agent_autocomplete_input($params); +if (enterprise_installed()) { +$table->data[1][1] .= html_print_checkbox ("cascade_protection", 1, $cascade_protection, true).__('Cascade protection'). " " . ui_print_help_icon("cascade_protection", true); +} +$table->data[1][1] .= " " . __('Module') . " " . html_print_select ($modules_values, "cascade_protection_module", $cascade_protection_module, "", "", 0, true); +// Learn mode / Normal mode +$table->data[3][0] = __('Module definition') . + ui_print_help_icon("module_definition", true); +$table->data[3][1] = __('Learning mode') . ' ' . + html_print_radio_button_extended ("modo", 1, '', $modo, false, 'show_modules_not_learning_mode_context_help();', + 'style="margin-right: 40px;"', true); +$table->data[3][1] .= __('Normal mode') . ' ' . + html_print_radio_button_extended ("modo", 0, '', $modo, false, 'show_modules_not_learning_mode_context_help();', + 'style="margin-right: 40px;"', true); +$table->data[3][1] .= __('Autodisable mode') . ' ' . + html_print_radio_button_extended ("modo", 2, '', $modo, false, 'show_modules_not_learning_mode_context_help();', + 'style="margin-right: 40px;"', true); + +// Status (Disabled / Enabled) +$table->data[4][0] = __('Status'); +$table->data[4][1] = __('Disabled') . ' ' . + html_print_radio_button_extended ("disabled", 1, '', $disabled, false, '', 'style="margin-right: 40px;"', true); +$table->data[4][1] .= __('Enabled') . ' ' . + html_print_radio_button_extended ("disabled", 0, '', $disabled, false, '', 'style="margin-right: 40px;"', true); + if (enterprise_installed()) { + $table->data[4][2] = __('Url address'); + $table->data[4][3] = html_print_input_text ('url_description', + $url_description, '', 45, 255, true); + }else{ + $table->data[5][0] = __('Url address'); + $table->data[5][1] = html_print_input_text ('url_description', + $url_description, '', 45, 255, true); + } +$table->data[5][2] = __('Quiet'); +$table->data[5][3] .= ui_print_help_tip(__('The agent still runs but the alerts and events will be stop'), true); +$table->data[5][3] = html_print_checkbox('quiet', 1, $quiet, true); + $listIcons = gis_get_array_list_icons(); $arraySelectIcon = array(); @@ -509,30 +540,6 @@ if ($config['activate_gis']) { $update_gis_data, false, '', 'style="margin-right: 40px;"', true); } -$table->data[4][2] = __('Url address'); -$table->data[4][3] = html_print_input_text ('url_description', - $url_description, '', 45, 255, true); - -$table->data[5][2] = __('Quiet'); -$table->data[5][3] .= ui_print_help_tip(__('The agent still runs but the alerts and events will be stop'), true); -$table->data[5][3] = html_print_checkbox('quiet', 1, $quiet, true); - -$cps_array[-1] = __('Disabled'); -if($cps > 0){ - $cps_array[$cps] = __('Enabled'); -} -else{ - $cps_inc = 0; - if($id_agente){ - $cps_inc = service_agents_cps($id_agente); - } - $cps_array[$cps_inc] = __('Enabled'); -} - -$table->data[6][0] = __('Cascade protection services'); -$table->data[6][0] .= ui_print_help_tip(__('Disable the alerts and events of the elements that belong to this service'), true); -$table->data[6][1] = html_print_select($cps_array, 'cps', $cps, '', '', 0, true); - ui_toggle(html_print_table ($table, true), __('Advanced options')); unset($table); @@ -596,10 +603,10 @@ else { } echo clippy_context_help("modules_not_learning_mode"); echo ""; - - +echo ''; if ($id_agente) { + echo '