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 class Hostgroup extends DataView
{ {
/**
* {@inheritdoc}
*/
public function getColumns() public function getColumns()
{ {
return array( return array(
'instance_name',
'hostgroup_alias', 'hostgroup_alias',
'hostgroup_name' 'hostgroup_name'
); );
} }
/** public function getSortRules()
* {@inheritdoc} {
*/ return array(
'hostgroup_alias' => array(
'order' => self::SORT_ASC
)
);
}
public function getStaticFilterColumns() public function getStaticFilterColumns()
{ {
return array( return array(
'host', 'host_alias', 'host_display_name', 'host_name', 'instance_name', 'host_name', 'service_description', 'servicegroup_name'
'hostgroup',
'service', 'service_description', 'service_display_name',
'servicegroup', 'servicegroup_alias', 'servicegroup_name'
); );
} }
} }

View File

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