Hostgroupsummary: Only provide valid filter columns

refs #3940
This commit is contained in:
Johannes Meyer 2019-09-26 13:47:56 +02:00
parent ae013723ee
commit 2b77baa19f
1 changed files with 17 additions and 3 deletions

View File

@ -58,10 +58,24 @@ class Hostgroupsummary extends DataView
{
return array(
'instance_name',
'host', 'host_alias', 'host_contact', 'host_contactgroup', 'host_display_name', 'host_name',
'host_contact', 'host_contactgroup', 'host_name',
'hostgroup',
'service', 'service_description', 'service_display_name',
'servicegroup', 'servicegroup_alias', 'servicegroup_name'
'service_description',
'servicegroup_name'
);
}
public function getFilterColumns()
{
if ($this->filterColumns === null) {
$filterColumns = parent::getFilterColumns();
$diff = array_diff($filterColumns, $this->getColumns());
$this->filterColumns = array_merge($diff, [
'Hostgroup Name' => 'hostgroup_name',
'Hostgroup Alias' => 'hostgroup_alias'
]);
}
return $this->filterColumns;
}
}