monitoring: Support filtering the service group overview by custom variables

refs #9009
This commit is contained in:
Eric Lippmann 2015-06-05 09:16:28 +02:00
parent 1ea7335b96
commit 82b0354704
1 changed files with 15 additions and 1 deletions

View File

@ -44,7 +44,7 @@ class Servicegroupsummary extends DataView
return array( return array(
'services_severity', 'services_severity',
'host', 'hostgroup', 'hostgroup_alias', 'hostgroup_name', 'host', 'hostgroup', 'hostgroup_alias', 'hostgroup_name',
'service', 'servicegroup', 'servicegroup_alias', 'servicegroup_name' 'service', 'servicegroup'
); );
} }
@ -89,4 +89,18 @@ class Servicegroupsummary extends DataView
) )
); );
} }
/**
* {@inheritdoc}
*/
public function isValidFilterTarget($column)
{
if ($column[0] === '_'
&& preg_match('/^_(?:host|service)_/', $column)
) {
return true;
} else {
return parent::isValidFilterTarget($column);
}
}
} }