mirror of
https://github.com/Icinga/icinga2.git
synced 2025-09-24 10:17:59 +02:00
Create checkable group memberships like the members' children
refs #8116
This commit is contained in:
parent
0bb5af811d
commit
3d25a7f4ac
@ -29,8 +29,6 @@ void Host::OnAllConfigLoaded()
|
|||||||
BOOST_THROW_EXCEPTION(std::invalid_argument("Host '" + GetName() + "' cannot be put into global zone '" + zone->GetName() + "'."));
|
BOOST_THROW_EXCEPTION(std::invalid_argument("Host '" + GetName() + "' cannot be put into global zone '" + zone->GetName() + "'."));
|
||||||
}
|
}
|
||||||
|
|
||||||
HostGroup::EvaluateObjectRules(this);
|
|
||||||
|
|
||||||
Array::Ptr groups = GetGroups();
|
Array::Ptr groups = GetGroups();
|
||||||
|
|
||||||
if (groups) {
|
if (groups) {
|
||||||
@ -49,6 +47,9 @@ void Host::OnAllConfigLoaded()
|
|||||||
|
|
||||||
void Host::CreateChildObjects(const Type::Ptr& childType)
|
void Host::CreateChildObjects(const Type::Ptr& childType)
|
||||||
{
|
{
|
||||||
|
if (childType == HostGroup::TypeInstance)
|
||||||
|
HostGroup::EvaluateObjectRules(this);
|
||||||
|
|
||||||
if (childType == ScheduledDowntime::TypeInstance)
|
if (childType == ScheduledDowntime::TypeInstance)
|
||||||
ScheduledDowntime::EvaluateApplyRules(this);
|
ScheduledDowntime::EvaluateApplyRules(this);
|
||||||
|
|
||||||
|
@ -56,8 +56,6 @@ void Service::OnAllConfigLoaded()
|
|||||||
if (m_Host)
|
if (m_Host)
|
||||||
m_Host->AddService(this);
|
m_Host->AddService(this);
|
||||||
|
|
||||||
ServiceGroup::EvaluateObjectRules(this);
|
|
||||||
|
|
||||||
Array::Ptr groups = GetGroups();
|
Array::Ptr groups = GetGroups();
|
||||||
|
|
||||||
if (groups) {
|
if (groups) {
|
||||||
@ -76,6 +74,9 @@ void Service::OnAllConfigLoaded()
|
|||||||
|
|
||||||
void Service::CreateChildObjects(const Type::Ptr& childType)
|
void Service::CreateChildObjects(const Type::Ptr& childType)
|
||||||
{
|
{
|
||||||
|
if (childType == ServiceGroup::TypeInstance)
|
||||||
|
ServiceGroup::EvaluateObjectRules(this);
|
||||||
|
|
||||||
if (childType == ScheduledDowntime::TypeInstance)
|
if (childType == ScheduledDowntime::TypeInstance)
|
||||||
ScheduledDowntime::EvaluateApplyRules(this);
|
ScheduledDowntime::EvaluateApplyRules(this);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user