mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Fix sensor link (#11454)
used bitwise operator instead of a logical one.
This commit is contained in:
@@ -424,16 +424,16 @@ class Url
|
||||
/**
|
||||
* Get html class for a sensor
|
||||
*
|
||||
* @param Sensor $sensor
|
||||
* @param \App\Models\Sensor $sensor
|
||||
* @return string
|
||||
*/
|
||||
public static function sensorLinkDisplayClass($sensor)
|
||||
{
|
||||
if ($sensor->sensor_current >> $sensor->sensor_limit) {
|
||||
if ($sensor->sensor_current > $sensor->sensor_limit) {
|
||||
return "sensor-high";
|
||||
}
|
||||
|
||||
if ($sensor->sensor_current << $sensor->sensor_limit_low) {
|
||||
if ($sensor->sensor_current < $sensor->sensor_limit_low) {
|
||||
return "sensor-low";
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user