Reduce filter columns of the Hostgroup and Servicegroup data views

Its not necessary to expose those columns because these data views do not directly accept user input.
This commit is contained in:
Eric Lippmann 2017-07-27 15:03:12 +02:00
parent 44da318109
commit 0a3da99e7f
2 changed files with 20 additions and 22 deletions

View File

@ -8,28 +8,27 @@ namespace Icinga\Module\Monitoring\DataView;
*/
class Hostgroup extends DataView
{
/**
* {@inheritdoc}
*/
public function getColumns()
{
return array(
'instance_name',
'hostgroup_alias',
'hostgroup_name'
);
}
/**
* {@inheritdoc}
*/
public function getSortRules()
{
return array(
'hostgroup_alias' => array(
'order' => self::SORT_ASC
)
);
}
public function getStaticFilterColumns()
{
return array(
'host', 'host_alias', 'host_display_name', 'host_name',
'hostgroup',
'service', 'service_description', 'service_display_name',
'servicegroup', 'servicegroup_alias', 'servicegroup_name'
'instance_name', 'host_name', 'service_description', 'servicegroup_name'
);
}
}

View File

@ -5,28 +5,27 @@ namespace Icinga\Module\Monitoring\DataView;
class Servicegroup extends DataView
{
/**
* {@inheritdoc}
*/
public function getColumns()
{
return array(
'instance_name',
'servicegroup_alias',
'servicegroup_name'
);
}
/**
* {@inheritdoc}
*/
public function getSortRules()
{
return array(
'servicegroup_alias' => array(
'order' => self::SORT_ASC
)
);
}
public function getStaticFilterColumns()
{
return array(
'host', 'host_alias', 'host_display_name', 'host_name',
'hostgroup', 'hostgroup_alias', 'hostgroup_name',
'service', 'service_description', 'service_display_name',
'servicegroup'
'instance_name', 'host_name', 'hostgroup_name', 'service_description'
);
}
}