From e533ff95f5419619f71fbfb246c144d1f700a49f Mon Sep 17 00:00:00 2001 From: Ravi Kumar Kempapura Srinivasa Date: Thu, 27 Feb 2020 11:28:44 +0100 Subject: [PATCH] Introduce NODE_EMPTY state for empty nodes An empty node state called `NODE_EMPTY` has been introduced with a value of 128 in class `Node`, and this state has been mapped to value *0* in structure `$stateToSortStateMap`. --- library/Businessprocess/Node.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/library/Businessprocess/Node.php b/library/Businessprocess/Node.php index a68adc2..21ed313 100644 --- a/library/Businessprocess/Node.php +++ b/library/Businessprocess/Node.php @@ -21,6 +21,7 @@ abstract class Node const ICINGA_DOWN = 1; const ICINGA_UNREACHABLE = 2; const ICINGA_PENDING = 99; + const NODE_EMPTY = 128; /** @var bool Whether to treat acknowledged hosts/services always as UP/OK */ protected static $ackIsOk = false; @@ -42,6 +43,7 @@ abstract class Node self::ICINGA_CRITICAL => 4, self::ICINGA_WARNING => 2, self::ICINGA_OK => 0, + self::NODE_EMPTY => 0 ); /** @var string Alias of the node */ @@ -115,7 +117,8 @@ abstract class Node 'WARNING', 'CRITICAL', 'UNKNOWN', - 99 => 'PENDING' + 99 => 'PENDING', + 128 => 'EMPTY' ); /**