]> granicus.if.org Git - icinga2/commitdiff
Fix service and notification templates.
authorGunnar Beutner <gunnar.beutner@netways.de>
Mon, 11 Nov 2013 15:42:35 +0000 (16:42 +0100)
committerGunnar Beutner <gunnar.beutner@netways.de>
Mon, 11 Nov 2013 15:42:58 +0000 (16:42 +0100)
Fixes #5058

lib/icinga/host.cpp
lib/icinga/icinga-type.conf
lib/icinga/service-notification.cpp

index 8bc79665fc39d98f920e930219e5b8c224f07706..6291eba6d342314f785c57a3544b892fbc41539d 100644 (file)
@@ -197,10 +197,6 @@ void Host::UpdateSlaveServices(void)
                ExpressionList::Ptr svc_exprl = make_shared<ExpressionList>();
                item->GetLinkedExpressionList()->ExtractPath(path, svc_exprl);
 
-               std::vector<String> dpath;
-               dpath.push_back("templates");
-               svc_exprl->ErasePath(dpath);
-
                builder->AddExpressionList(svc_exprl);
 
                ConfigItem::Ptr serviceItem = builder->Compile();
index fe684a63d080c69cd595216f1cc9eb65c37c3d1d..d59cd95d915eb125da1f3b81227a0bb2a9a40c28 100644 (file)
@@ -113,7 +113,9 @@ type Service {
 
                        %attribute any "*"
                }
-       }
+       },
+
+       %attribute any "templates"
 }
 
 type ServiceGroup {
@@ -147,7 +149,9 @@ type Notification {
        %attribute name(TimePeriod) "notification_period",
 
        %attribute number "notification_type_filter",
-       %attribute number "notification_state_filter"
+       %attribute number "notification_state_filter",
+
+       %attribute any "templates"
 }
 
 type User {
index 77158fad1f05445a493f4b0b2081f3b300875974..cb15c06b3ade56273cf8e11679f08255431890e6 100644 (file)
@@ -149,10 +149,6 @@ void Service::UpdateSlaveNotifications(void)
                ExpressionList::Ptr nfc_exprl = make_shared<ExpressionList>();
                item->GetLinkedExpressionList()->ExtractPath(path, nfc_exprl);
 
-               std::vector<String> dpath;
-               dpath.push_back("templates");
-               nfc_exprl->ErasePath(dpath);
-
                builder->AddExpressionList(nfc_exprl);
 
                ConfigItem::Ptr notificationItem = builder->Compile();