Enumerate AlertState (#11665)

* Enumerate AlertState

* fix typo

* add missing use's

* .

* .
This commit is contained in:
SourceDoctor
2020-05-24 04:14:36 +02:00
committed by GitHub
parent b8c6769049
commit b89eb22cd5
46 changed files with 163 additions and 90 deletions

View File

@@ -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