From f6c0f50a90ad36bb8883be72d1acb10aca26802e Mon Sep 17 00:00:00 2001 From: Calvo Date: Fri, 10 Dec 2021 18:00:33 +0100 Subject: [PATCH] Added missin param and Fixed error message and default interval --- .../godmode/agentes/configurar_agente.php | 6 +++++- .../module_manager_editor_prediction.php | 18 +++++++++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php index 1d7bec840c..5845cffc32 100644 --- a/pandora_console/godmode/agentes/configurar_agente.php +++ b/pandora_console/godmode/agentes/configurar_agente.php @@ -1606,8 +1606,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( [