diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php index 9220c68beb..b23bbaaa54 100644 --- a/pandora_console/godmode/agentes/configurar_agente.php +++ b/pandora_console/godmode/agentes/configurar_agente.php @@ -1608,8 +1608,12 @@ if ($update_module || $create_module) { } if ($prediction_module === MODULE_PREDICTION_PLANNING) { - $custom_string_1 = get_parameter('estimation_interval', '300'); $custom_string_2 = get_parameter('estimation_type', 'estimation_calculation'); + if ($custom_string_2 === 'estimation_calculation') { + $custom_string_1 = get_parameter('estimation_days', -1); + } else { + $custom_string_1 = get_parameter('estimation_interval', '300'); + } } $active_snmp_v3 = get_parameter('active_snmp_v3'); diff --git a/pandora_console/godmode/agentes/module_manager_editor_prediction.php b/pandora_console/godmode/agentes/module_manager_editor_prediction.php index 6d81dbb3b5..c033298045 100644 --- a/pandora_console/godmode/agentes/module_manager_editor_prediction.php +++ b/pandora_console/godmode/agentes/module_manager_editor_prediction.php @@ -192,6 +192,7 @@ push_table_simple($data, 'prediction_module'); $data = []; $data[0] = ''; +$data[1] .= '
'; $data[1] .= html_print_label(__('Future estimation'), 'estimation_interval', true).'
'; $data[1] .= html_print_input( [ @@ -203,8 +204,23 @@ $data[1] .= html_print_input( 'div', false ); +$data[1] .= '
'; + + +$data[1] .= '
'; +$data[1] .= html_print_label(__('Limit value'), 'estimation_days', true).'
'; +$data[1] .= html_print_input( + [ + 'type' => 'number', + 'return' => 'true', + 'id' => 'estimation_days', + 'name' => 'estimation_days', + 'value' => $estimation_interval, + ] +); +$data[1] .= '
'; + -$data[1] .= '
'; $data[1] .= html_print_label(__('Calculation type'), 'estimation_type', true).'
'; $data[1] .= html_print_input( [