mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
13451-Fix widget Module value color
This commit is contained in:
parent
398b791199
commit
fdc5df1ba4
@ -459,12 +459,17 @@ class ModuleValueWidget extends Widget
|
|||||||
|
|
||||||
$last = modules_get_last_value($this->values['moduleId']);
|
$last = modules_get_last_value($this->values['moduleId']);
|
||||||
|
|
||||||
if (($last >= $sql_data['min_warning']) && ($last < $sql_data['max_warning'])) {
|
if (empty($sql_data['min_warning']) === false || empty($sql_data['max_warning']) === false
|
||||||
$color = COL_WARNING;
|
|| 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['max_warning']) {
|
if ($last >= $sql_data['max_warning']) {
|
||||||
$color = COL_CRITICAL;
|
$color = COL_CRITICAL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$uuid = uniqid();
|
$uuid = uniqid();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user