Fixed thresholds SLA
fixed dynamic calculation while the thresholds are disabled.
This commit is contained in:
parent
9fef698df4
commit
27744031ce
|
@ -3956,8 +3956,8 @@ function sla_check_value($value, $min, $max, $inverse_interval = 0) {
|
||||||
if (!isset($inverse_interval)) {
|
if (!isset($inverse_interval)) {
|
||||||
$inverse_interval = 0;
|
$inverse_interval = 0;
|
||||||
}
|
}
|
||||||
if ( (!isset($max)) && (!isset($min)) ) {
|
if ( (!isset($max)) && (!isset($min)) ) { // disabled thresholds
|
||||||
return ($inverse_interval==0)?true:false;
|
return true;
|
||||||
}
|
}
|
||||||
if ($max == $min) { // equal
|
if ($max == $min) { // equal
|
||||||
if ($value == $max) {
|
if ($value == $max) {
|
||||||
|
@ -4290,8 +4290,8 @@ function reporting_advanced_sla ($id_agent_module, $time_from = null, $time_to =
|
||||||
$max_value = null;
|
$max_value = null;
|
||||||
}
|
}
|
||||||
if ( (!(isset($max_value))) && (!(isset($min_value))) ) {
|
if ( (!(isset($max_value))) && (!(isset($min_value))) ) {
|
||||||
$max_value = 0;
|
$max_value = null;
|
||||||
$min_value = 0;
|
$min_value = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue