From 20e32eefe9a007715c39b88f0c56bf012516141e Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Tue, 31 May 2022 10:32:57 +0200 Subject: [PATCH 1/2] #9078 Fixed max critical --- pandora_console/include/functions_reporting.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 6bf29c1235..f8f1c0dc92 100755 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -6954,7 +6954,7 @@ function sla_truncate($num, $accurancy=2) * * @param integer $value Value. * @param integer $min Treshold min SLA. - * @param boolean $max Treshold max SLA. + * @param integer $max Treshold max SLA. * @param boolean $inverse_interval Treshold inverse SLA. * * @return boolean Returns the interval in downtime (false if no matches). @@ -7001,6 +7001,10 @@ function sla_check_value($value, $min, $max, $inverse_interval=0) return ($inverse_interval == 0) ? true : false; } + if ($max == 0 && $min != 0 && $value >= $min) { + return ($inverse_interval == 0) ? true : false; + } + return ($inverse_interval == 0) ? false : true; } @@ -14739,8 +14743,10 @@ function reporting_module_histogram_graph($report, $content, $pdf=0) if ($modules_is_string === false) { if ($agentmodule_info['max_critical'] == 0) { $max_value_critical = null; - if ((bool) $content['dinamic_proc'] === true) { - $max_value_critical = 0.01; + if ($agentmodule_info['min_critical'] == 0) { + if ((bool) $content['dinamic_proc'] === true) { + $max_value_critical = 0.01; + } } } else { $max_value_critical = $agentmodule_info['max_critical']; From b756106f25f700f5f2fcf961a8382278ba87e4d0 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Tue, 31 May 2022 10:34:13 +0200 Subject: [PATCH 2/2] #9078 Fixed max critical 2 --- pandora_console/include/functions_reporting.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index f8f1c0dc92..35b3b310b5 100755 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -7001,10 +7001,6 @@ function sla_check_value($value, $min, $max, $inverse_interval=0) return ($inverse_interval == 0) ? true : false; } - if ($max == 0 && $min != 0 && $value >= $min) { - return ($inverse_interval == 0) ? true : false; - } - return ($inverse_interval == 0) ? false : true; }