monitoring: Support filtering the host group overview by service custom variables

refs #9009
This commit is contained in:
Eric Lippmann 2015-06-05 09:14:26 +02:00
parent 28b1cf5762
commit c299fb3ce9
1 changed files with 18 additions and 2 deletions

View File

@ -48,8 +48,10 @@ class Hostgroupsummary extends DataView
{
return array(
'hosts_severity',
'host', 'hostgroup', 'hostgroup_alias', 'hostgroup_name',
'service', 'servicegroup', 'servicegroup_alias', 'servicegroup_name'
'host', 'host_alias', 'host_display_name', 'host_name',
'hostgroup',
'service', 'service_description',
'servicegroup', 'servicegroup_alias', 'servicegroup_name'
);
}
@ -93,4 +95,18 @@ class Hostgroupsummary extends DataView
)
);
}
/**
* {@inheritdoc}
*/
public function isValidFilterTarget($column)
{
if ($column[0] === '_'
&& preg_match('/^_(?:host|service)_/', $column)
) {
return true;
} else {
return parent::isValidFilterTarget($column);
}
}
}