mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-24 14:24:41 +02:00
monitoring: Add missing restrictable filter columns to the host status data view
refs #9009
This commit is contained in:
parent
8f111406f3
commit
f2f3fe2c07
@ -5,19 +5,6 @@ namespace Icinga\Module\Monitoring\DataView;
|
||||
|
||||
class HostStatus extends DataView
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function isValidFilterTarget($column)
|
||||
{
|
||||
if ($column[0] === '_'
|
||||
&& preg_match('/^_host_/', $column)
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
return parent::isValidFilterTarget($column);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
@ -84,7 +71,12 @@ class HostStatus extends DataView
|
||||
*/
|
||||
public function getFilterColumns()
|
||||
{
|
||||
return array('host', 'hostgroup', 'hostgroup_name');
|
||||
return array(
|
||||
'host',
|
||||
'hostgroup', 'hostgroup_alias', 'hostgroup_name',
|
||||
'service', 'service_description', 'service_display_name',
|
||||
'servicegroup', 'servicegroup_alias', 'servicegroup_name'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -125,4 +117,17 @@ class HostStatus extends DataView
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function isValidFilterTarget($column)
|
||||
{
|
||||
if ($column[0] === '_'
|
||||
&& preg_match('/^_(?:host|service)_/', $column)
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
return parent::isValidFilterTarget($column);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user