livestatus: add childs attribute to hosts table

refs #4372
This commit is contained in:
Michael Friedrich 2013-07-19 16:11:35 +02:00
parent f0f3412f2c
commit 4bc4defc97
1 changed files with 7 additions and 2 deletions

View File

@ -1396,8 +1396,13 @@ Value HostsTable::ParentsAccessor(const Value& row)
Value HostsTable::ChildsAccessor(const Value& row)
{
/* TODO */
return Empty;
Array::Ptr childs = boost::make_shared<Array>();
BOOST_FOREACH(const Host::Ptr& child, static_cast<Host::Ptr>(row)->GetChildHosts()) {
childs->Add(child->GetName());
}
return childs;
}
Value HostsTable::NumServicesAccessor(const Value& row)