Added missin param and Fixed error message and default interval

This commit is contained in:
Calvo 2021-12-10 18:00:33 +01:00
parent f382a5bf15
commit f6c0f50a90
2 changed files with 22 additions and 2 deletions

View File

@ -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');

View File

@ -192,6 +192,7 @@ push_table_simple($data, 'prediction_module');
$data = [];
$data[0] = '';
$data[1] .= '<div id="estimation_interval_row">';
$data[1] .= html_print_label(__('Future estimation'), 'estimation_interval', true).'<br/>';
$data[1] .= html_print_input(
[
@ -203,8 +204,23 @@ $data[1] .= html_print_input(
'div',
false
);
$data[1] .= '</div>';
$data[1] .= '<div id="estimation_days_row">';
$data[1] .= html_print_label(__('Limit value'), 'estimation_days', true).'<br/>';
$data[1] .= html_print_input(
[
'type' => 'number',
'return' => 'true',
'id' => 'estimation_days',
'name' => 'estimation_days',
'value' => $estimation_interval,
]
);
$data[1] .= '</div>';
$data[1] .= '<br />';
$data[1] .= html_print_label(__('Calculation type'), 'estimation_type', true).'<br/>';
$data[1] .= html_print_input(
[