mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Enumerate AlertState (#11665)
* Enumerate AlertState * fix typo * add missing use's * . * .
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
*/
|
||||
namespace LibreNMS\Alert\Transport;
|
||||
|
||||
use LibreNMS\Enum\AlertState;
|
||||
use LibreNMS\Alert\Transport;
|
||||
|
||||
/**
|
||||
@@ -46,7 +47,7 @@ class Hue extends Transport
|
||||
public function contactHue($obj, $opts)
|
||||
{
|
||||
// Don't alert on resolve at this time
|
||||
if ($obj['state'] == 0) {
|
||||
if ($obj['state'] == AlertState::RECOVERED) {
|
||||
return true;
|
||||
} else {
|
||||
$device = device_by_id_cache($obj['device_id']); // for event logging
|
||||
|
Reference in New Issue
Block a user