From 7dafacf94f654568a1f7e8aed3786fd5c565bc68 Mon Sep 17 00:00:00 2001 From: Pablo Aragon Date: Thu, 11 Apr 2024 19:05:57 +0200 Subject: [PATCH] 13451-Revert - Fix widget Module value color --- .../lib/Dashboard/Widgets/module_value.php | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/pandora_console/include/lib/Dashboard/Widgets/module_value.php b/pandora_console/include/lib/Dashboard/Widgets/module_value.php index a315e8d469..87992ab3ba 100644 --- a/pandora_console/include/lib/Dashboard/Widgets/module_value.php +++ b/pandora_console/include/lib/Dashboard/Widgets/module_value.php @@ -459,17 +459,12 @@ class ModuleValueWidget extends Widget $last = modules_get_last_value($this->values['moduleId']); - if (empty($sql_data['min_warning']) === false || empty($sql_data['max_warning']) === false - || empty($sql_data['min_critical']) === false || empty($sql_data['max_critical']) === false - || empty($sql_data['str_warning']) === false - ) { - if (($last >= $sql_data['min_warning']) && ($last < $sql_data['max_warning'])) { - $color = COL_WARNING; - } + if (($last >= $sql_data['min_warning']) && ($last < $sql_data['max_warning'])) { + $color = COL_WARNING; + } - if ($last >= $sql_data['max_warning']) { - $color = COL_CRITICAL; - } + if ($last >= $sql_data['max_warning']) { + $color = COL_CRITICAL; } $uuid = uniqid();