mirror of
https://github.com/librenms/librenms.git
synced 2024-09-21 02:18:39 +00:00
Fix bad health sensor labels in the ui (#16350)
This commit is contained in:
parent
4fd528c95d
commit
c6cac9d90b
@ -1084,16 +1084,16 @@ function get_sensor_label_color($sensor, $type = 'sensors')
|
||||
if (is_null($sensor)) {
|
||||
return 'label-unknown';
|
||||
}
|
||||
if (! is_null($sensor['sensor_limit_warn']) && $sensor['sensor_current'] > $sensor['sensor_limit_warn']) {
|
||||
if (! is_null($sensor['sensor_limit_warn']) && $sensor['sensor_current'] >= $sensor['sensor_limit_warn']) {
|
||||
$label_style = 'label-warning';
|
||||
}
|
||||
if (! is_null($sensor['sensor_limit_low_warn']) && $sensor['sensor_current'] < $sensor['sensor_limit_low_warn']) {
|
||||
if (! is_null($sensor['sensor_limit_low_warn']) && $sensor['sensor_current'] <= $sensor['sensor_limit_low_warn']) {
|
||||
$label_style = 'label-warning';
|
||||
}
|
||||
if (! is_null($sensor['sensor_limit']) && $sensor['sensor_current'] > $sensor['sensor_limit']) {
|
||||
if (! is_null($sensor['sensor_limit']) && $sensor['sensor_current'] >= $sensor['sensor_limit']) {
|
||||
$label_style = 'label-danger';
|
||||
}
|
||||
if (! is_null($sensor['sensor_limit_low']) && $sensor['sensor_current'] < $sensor['sensor_limit_low']) {
|
||||
if (! is_null($sensor['sensor_limit_low']) && $sensor['sensor_current'] <= $sensor['sensor_limit_low']) {
|
||||
$label_style = 'label-danger';
|
||||
}
|
||||
$unit = __("$type.{$sensor['sensor_class']}.unit");
|
||||
|
Loading…
Reference in New Issue
Block a user