Create checkable group memberships like the members' children

refs #8116
This commit is contained in:
Alexander A. Klimov 2020-07-17 14:45:34 +02:00
parent 0bb5af811d
commit 3d25a7f4ac
2 changed files with 6 additions and 4 deletions

View File

@ -29,8 +29,6 @@ void Host::OnAllConfigLoaded()
BOOST_THROW_EXCEPTION(std::invalid_argument("Host '" + GetName() + "' cannot be put into global zone '" + zone->GetName() + "'."));
}
HostGroup::EvaluateObjectRules(this);
Array::Ptr groups = GetGroups();
if (groups) {
@ -49,6 +47,9 @@ void Host::OnAllConfigLoaded()
void Host::CreateChildObjects(const Type::Ptr& childType)
{
if (childType == HostGroup::TypeInstance)
HostGroup::EvaluateObjectRules(this);
if (childType == ScheduledDowntime::TypeInstance)
ScheduledDowntime::EvaluateApplyRules(this);

View File

@ -56,8 +56,6 @@ void Service::OnAllConfigLoaded()
if (m_Host)
m_Host->AddService(this);
ServiceGroup::EvaluateObjectRules(this);
Array::Ptr groups = GetGroups();
if (groups) {
@ -76,6 +74,9 @@ void Service::OnAllConfigLoaded()
void Service::CreateChildObjects(const Type::Ptr& childType)
{
if (childType == ServiceGroup::TypeInstance)
ServiceGroup::EvaluateObjectRules(this);
if (childType == ScheduledDowntime::TypeInstance)
ScheduledDowntime::EvaluateApplyRules(this);