13451-Revert - Fix widget Module value color

This commit is contained in:
Pablo Aragon 2024-04-11 19:05:57 +02:00
parent 6589d4a0aa
commit 7dafacf94f
1 changed files with 5 additions and 10 deletions

View File

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