Fix service and notification templates.

Fixes #5058
This commit is contained in:
Gunnar Beutner 2013-11-11 16:42:35 +01:00
parent f3f113efd6
commit 0dba71ecaf
3 changed files with 6 additions and 10 deletions

View File

@ -197,10 +197,6 @@ void Host::UpdateSlaveServices(void)
ExpressionList::Ptr svc_exprl = make_shared<ExpressionList>(); ExpressionList::Ptr svc_exprl = make_shared<ExpressionList>();
item->GetLinkedExpressionList()->ExtractPath(path, svc_exprl); item->GetLinkedExpressionList()->ExtractPath(path, svc_exprl);
std::vector<String> dpath;
dpath.push_back("templates");
svc_exprl->ErasePath(dpath);
builder->AddExpressionList(svc_exprl); builder->AddExpressionList(svc_exprl);
ConfigItem::Ptr serviceItem = builder->Compile(); ConfigItem::Ptr serviceItem = builder->Compile();

View File

@ -113,7 +113,9 @@ type Service {
%attribute any "*" %attribute any "*"
} }
} },
%attribute any "templates"
} }
type ServiceGroup { type ServiceGroup {
@ -147,7 +149,9 @@ type Notification {
%attribute name(TimePeriod) "notification_period", %attribute name(TimePeriod) "notification_period",
%attribute number "notification_type_filter", %attribute number "notification_type_filter",
%attribute number "notification_state_filter" %attribute number "notification_state_filter",
%attribute any "templates"
} }
type User { type User {

View File

@ -149,10 +149,6 @@ void Service::UpdateSlaveNotifications(void)
ExpressionList::Ptr nfc_exprl = make_shared<ExpressionList>(); ExpressionList::Ptr nfc_exprl = make_shared<ExpressionList>();
item->GetLinkedExpressionList()->ExtractPath(path, nfc_exprl); item->GetLinkedExpressionList()->ExtractPath(path, nfc_exprl);
std::vector<String> dpath;
dpath.push_back("templates");
nfc_exprl->ErasePath(dpath);
builder->AddExpressionList(nfc_exprl); builder->AddExpressionList(nfc_exprl);
ConfigItem::Ptr notificationItem = builder->Compile(); ConfigItem::Ptr notificationItem = builder->Compile();