mirror of https://github.com/Icinga/icinga2.git
parent
016f47d6e6
commit
12dadfdfb3
|
@ -175,6 +175,11 @@ String Comment::AddComment(const Checkable::Ptr& checkable, CommentType entryTyp
|
|||
if (service)
|
||||
attrs->Set("service_name", service->GetShortName());
|
||||
|
||||
String zone = checkable->GetZoneName();
|
||||
|
||||
if (!zone.IsEmpty())
|
||||
attrs->Set("zone", zone);
|
||||
|
||||
String config = ConfigObjectUtility::CreateObjectConfig(Comment::TypeInstance, fullName, true, Array::Ptr(), attrs);
|
||||
|
||||
Array::Ptr errors = new Array();
|
||||
|
|
|
@ -223,6 +223,11 @@ String Downtime::AddDowntime(const Checkable::Ptr& checkable, const String& auth
|
|||
if (service)
|
||||
attrs->Set("service_name", service->GetShortName());
|
||||
|
||||
String zone = checkable->GetZoneName();
|
||||
|
||||
if (!zone.IsEmpty())
|
||||
attrs->Set("zone", zone);
|
||||
|
||||
String config = ConfigObjectUtility::CreateObjectConfig(Downtime::TypeInstance, fullName, true, Array::Ptr(), attrs);
|
||||
|
||||
Array::Ptr errors = new Array();
|
||||
|
|
Loading…
Reference in New Issue