mirror of https://github.com/Icinga/icinga2.git
parent
f8d2172c27
commit
6e84800538
|
@ -461,22 +461,21 @@ Dictionary::Ptr CompatUtility::GetCustomVariableConfig(const DynamicObject::Ptr&
|
||||||
if (!custom)
|
if (!custom)
|
||||||
return Dictionary::Ptr();
|
return Dictionary::Ptr();
|
||||||
|
|
||||||
ObjectLock olock(custom);
|
ObjectLock olock(custom);
|
||||||
String key;
|
String key;
|
||||||
Value value;
|
Value value;
|
||||||
BOOST_FOREACH(boost::tie(key, value), custom) {
|
BOOST_FOREACH(boost::tie(key, value), custom) {
|
||||||
|
if (key == "notes" ||
|
||||||
if (key == "notes" ||
|
|
||||||
key == "action_url" ||
|
key == "action_url" ||
|
||||||
key == "notes_url" ||
|
key == "notes_url" ||
|
||||||
key == "icon_image" ||
|
key == "icon_image" ||
|
||||||
key == "icon_image_alt" ||
|
key == "icon_image_alt" ||
|
||||||
key == "statusmap_image" ||
|
key == "statusmap_image" ||
|
||||||
key == "2d_coords")
|
key == "2d_coords")
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
customvars->Set(key, value);
|
customvars->Set(key, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
return customvars;
|
return customvars;
|
||||||
}
|
}
|
||||||
|
@ -497,8 +496,8 @@ std::set<User::Ptr> CompatUtility::GetServiceNotificationUsers(const Service::Pt
|
||||||
BOOST_FOREACH(const UserGroup::Ptr& ug, notification->GetUserGroups()) {
|
BOOST_FOREACH(const UserGroup::Ptr& ug, notification->GetUserGroups()) {
|
||||||
std::set<User::Ptr> members = ug->GetMembers();
|
std::set<User::Ptr> members = ug->GetMembers();
|
||||||
std::copy(members.begin(), members.end(), std::inserter(allUsers, allUsers.begin()));
|
std::copy(members.begin(), members.end(), std::inserter(allUsers, allUsers.begin()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return allUsers;
|
return allUsers;
|
||||||
}
|
}
|
||||||
|
@ -512,8 +511,8 @@ std::set<UserGroup::Ptr> CompatUtility::GetServiceNotificationUserGroups(const S
|
||||||
|
|
||||||
BOOST_FOREACH(const UserGroup::Ptr& ug, notification->GetUserGroups()) {
|
BOOST_FOREACH(const UserGroup::Ptr& ug, notification->GetUserGroups()) {
|
||||||
usergroups.insert(ug);
|
usergroups.insert(ug);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return usergroups;
|
return usergroups;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue