mirror of https://github.com/Icinga/icinga2.git
parent
df1d47a996
commit
2cc8ef17e1
|
@ -127,8 +127,16 @@ Value HostGroupsTable::MembersAccessor(const Value& row)
|
||||||
|
|
||||||
Value HostGroupsTable::MembersWithStateAccessor(const Value& row)
|
Value HostGroupsTable::MembersWithStateAccessor(const Value& row)
|
||||||
{
|
{
|
||||||
/* TODO */
|
Array::Ptr members = boost::make_shared<Array>();
|
||||||
return Empty;
|
|
||||||
|
BOOST_FOREACH(const Host::Ptr& host, static_cast<HostGroup::Ptr>(row)->GetMembers()) {
|
||||||
|
Array::Ptr member_state = boost::make_shared<Array>();
|
||||||
|
member_state->Add(host->GetName());
|
||||||
|
member_state->Add(host->GetState());
|
||||||
|
members->Add(member_state);
|
||||||
|
}
|
||||||
|
|
||||||
|
return members;
|
||||||
}
|
}
|
||||||
|
|
||||||
Value HostGroupsTable::WorstHostStateAccessor(const Value& row)
|
Value HostGroupsTable::WorstHostStateAccessor(const Value& row)
|
||||||
|
|
|
@ -121,8 +121,18 @@ Value ServiceGroupsTable::MembersAccessor(const Value& row)
|
||||||
|
|
||||||
Value ServiceGroupsTable::MembersWithStateAccessor(const Value& row)
|
Value ServiceGroupsTable::MembersWithStateAccessor(const Value& row)
|
||||||
{
|
{
|
||||||
/* TODO */
|
Array::Ptr members = boost::make_shared<Array>();
|
||||||
return Empty;
|
|
||||||
|
BOOST_FOREACH(const Service::Ptr& service, static_cast<ServiceGroup::Ptr>(row)->GetMembers()) {
|
||||||
|
Array::Ptr host_svc = boost::make_shared<Array>();
|
||||||
|
host_svc->Add(service->GetHost()->GetName());
|
||||||
|
host_svc->Add(service->GetShortName());
|
||||||
|
host_svc->Add(service->GetHost()->GetState());
|
||||||
|
host_svc->Add(service->GetState());
|
||||||
|
members->Add(host_svc);
|
||||||
|
}
|
||||||
|
|
||||||
|
return members;
|
||||||
}
|
}
|
||||||
|
|
||||||
Value ServiceGroupsTable::WorstServiceStateAccessor(const Value& row)
|
Value ServiceGroupsTable::WorstServiceStateAccessor(const Value& row)
|
||||||
|
|
Loading…
Reference in New Issue