mirror of https://github.com/Icinga/icinga2.git
parent
0d2ae5ce92
commit
d0b5898c46
|
@ -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