From b6ed832a03e6977bae6a0c512c52dfaf3dfb6eb9 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Fri, 30 Sep 2022 11:44:18 +0200 Subject: [PATCH] AppliedServiceSetServiceInfo: provide the UUID fixes #2619 --- .../DirectorObject/Lookup/AppliedServiceSetServiceInfo.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/library/Director/DirectorObject/Lookup/AppliedServiceSetServiceInfo.php b/library/Director/DirectorObject/Lookup/AppliedServiceSetServiceInfo.php index 9aba8503..b5785d52 100644 --- a/library/Director/DirectorObject/Lookup/AppliedServiceSetServiceInfo.php +++ b/library/Director/DirectorObject/Lookup/AppliedServiceSetServiceInfo.php @@ -7,6 +7,7 @@ use Icinga\Data\Filter\Filter; use Icinga\Module\Director\Db; use Icinga\Module\Director\Objects\HostApplyMatches; use Icinga\Module\Director\Objects\IcingaHost; +use Ramsey\Uuid\Uuid; use Ramsey\Uuid\UuidInterface; /** @@ -96,6 +97,7 @@ class AppliedServiceSetServiceInfo implements ServiceInfo $query = $db->select() ->from(['s' => 'icinga_service'], [ 'id' => 's.id', + 'uuid' => 'ss.uuid', 'name' => 's.object_name', 'assign_filter' => 'ss.assign_filter', 'service_set_name' => 'ss.object_name', @@ -116,6 +118,7 @@ class AppliedServiceSetServiceInfo implements ServiceInfo $allRules = $db->fetchAll($query); foreach ($allRules as $rule) { + $rule->uuid = Uuid::fromBytes(Db\DbUtil::binaryResult($rule->uuid)); $rule->filter = Filter::fromQueryString($rule->assign_filter); }