diff --git a/pandora_console/godmode/agentes/agent_manager.php b/pandora_console/godmode/agentes/agent_manager.php index 1a7ce20d5d..b9e3db84a4 100644 --- a/pandora_console/godmode/agentes/agent_manager.php +++ b/pandora_console/godmode/agentes/agent_manager.php @@ -171,7 +171,7 @@ if (!$new_agent && $alias != '') { $table_agent_name = '
'.__('Agent name').': '.ui_print_help_tip(__("The agent's name must be the same as the one defined at the console"), true).'
'; $table_agent_name .= ''.__('QR Code Agent view').':
'; @@ -188,8 +188,8 @@ if (!$new_agent && $alias != '') { ); $table_agent_name .= ''; } -} else { - $agent_info_new = 'agent_info_new'; + + $agent_options_update = 'agent_options_update'; } // Delete link from here. @@ -365,9 +365,9 @@ $table_description .= html_print_input_text( echo ''.__('Secondary groups').ui_print_help_icon('secondary_groups', true).'
'.__('Safe operation mode').ui_print_help_tip( __( 'This mode allow %s to disable all modules of this agent while the selected module is on CRITICAL status', get_product_name() ), true - ); - $table->data[2][1] = html_print_checkbox('safe_mode', 1, $safe_mode, true); - $table->data[2][1] .= ' '.__('Module').' '.html_print_select($safe_mode_modules, 'safe_mode_module', $safe_mode_module, '', '', 0, true); + ).'
'; + $table_adv_safe .= html_print_checkbox_switch('safe_mode', 1, $safe_mode, true); + $table_adv_safe .= __('Module').' '.html_print_select($safe_mode_modules, 'safe_mode_module', $safe_mode_module, '', '', 0, true).''.__('Remote configuration').'
'; if (!$new_agent) { - $table->data[5][1] = ''.__('Not available').''; + $table_adv_remote .= ''.__('Not available').''; if (isset($filename)) { if (file_exists($filename['md5'])) { - $table->data[5][1] = date('F d Y H:i:s', fileatime($filename['md5'])); + $table_adv_remote .= date('F d Y H:i:s', fileatime($filename['md5'])); // Delete remote configuration - $table->data[5][1] .= ''; - $table->data[5][1] .= html_print_image( + $table_adv_remote .= ''; + $table_adv_remote .= html_print_image( 'images/cross.png', true, [ @@ -512,17 +512,17 @@ if (enterprise_installed()) { 'style' => 'vertical-align: middle;', ] ).''; - $table->data[5][1] .= ''.ui_print_help_tip( + $table_adv_remote .= ''.ui_print_help_tip( __('Delete this conf file implies that for restore you must reactive remote config in the local agent.'), true ); } } } else { - $table->data[5][1] = ''.__('Not available').''; + $table_adv_remote .= ''.__('Not available').''; } - + $table_adv_remote .= ''.__('Cascade protection services'); + $table_adv_cascade .= ui_print_help_tip(__('Disable the alerts and events of the elements that belong to this service'), true).'
'; + $table_adv_cascade .= html_print_select($cps_array, 'cps', $cps, '', '', 0, true).''.__('Custom ID').'
'; +$table_adv_custom_id .= html_print_input_text('custom_id', $custom_id, '', 16, 255, true).''.__('Parent').'
'; $params = []; $params['return'] = true; $params['show_helptip'] = true; @@ -557,75 +557,79 @@ $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_adv_parent .= ''.__('Module definition').ui_print_help_icon('module_definition', true).'
'; +$table_adv_module_mode .= ''.__('Disabled').ui_print_help_tip(__('If the remote configuration is enabled, it will also go into standby mode when disabling it.'), true).'
'; +$table_adv_status .= html_print_checkbox_switch('disabled', 1, $disabled, true).''.__('Url address').ui_print_help_tip(__('URL address must be complete, for example: https://pandorafms.com/'), true).'
'; + $table_adv_url .= html_print_input_text( 'url_description', $url_description, '', 45, 255, true - ); + ).''.__('Url address').'
'.__('Quiet'); +$table_adv_quiet .= ui_print_help_tip(__('The agent still runs but the alerts and events will be stop'), true).'
'; +$table_adv_quiet .= html_print_checkbox_switch('quiet', 1, $quiet, true).''.__('Agent icon').ui_print_help_tip(__('Agent icon for GIS Maps.'), true).'
'; if ($icon_path == '') { $display_icons = 'none'; // Hack to show no icon. Use any given image to fix not found image errors @@ -654,7 +658,7 @@ if ($icon_path == '') { $path_warning = $path.$icon_path.'.warning.png'; } -$table->data[0][3] = html_print_select( +$table_adv_agent_icon .= html_print_select( $arraySelectIcon, 'icon_path', $icon_path, @@ -662,57 +666,60 @@ $table->data[0][3] = html_print_select( __('None'), '', true -).' '.html_print_image( +).html_print_image( $path_ok, true, [ 'id' => 'icon_ok', 'style' => 'display:'.$display_icons.';', ] -).' '.html_print_image( +).html_print_image( $path_bad, true, [ 'id' => 'icon_bad', 'style' => 'display:'.$display_icons.';', ] -).' '.html_print_image( +).html_print_image( $path_warning, true, [ 'id' => 'icon_warning', 'style' => 'display:'.$display_icons.';', ] -); +).''.__('Ignore new GIS data:').'
'; + if ($new_agent) { + $update_gis_data = true; + } + + $table_adv_gis .= html_print_checkbox_switch('update_gis_data', 1, $update_gis_data, true).'No / Yes