Merge pull request #3966 from Icinga/fix/invalid-filter-suggestions-in-group-overviews-3940

Fix invalid filter suggestions in group overviews
This commit is contained in:
Johannes Meyer 2019-09-26 14:35:11 +02:00 committed by GitHub
commit f4c43ecafb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 34 additions and 6 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;
}
}

View File

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