GroupsummaryQuery: Provide case insensitive filter columns for group names
I've renamed those and made them case sensitive as part of #8613 but missed that they are required by the global search. fixes #9056
This commit is contained in:
parent
2618d4a468
commit
923bc11b39
modules/monitoring/library/Monitoring
|
@ -20,7 +20,8 @@ class GroupSummaryQuery extends IdoQuery
|
|||
'hosts_down_unhandled' => 'SUM(CASE WHEN object_type = \'host\' AND state = 1 AND acknowledged + in_downtime = 0 THEN 1 ELSE 0 END)',
|
||||
'hosts_pending' => 'SUM(CASE WHEN object_type = \'host\' AND state = 99 THEN 1 ELSE 0 END)',
|
||||
'hostgroup_name' => 'hostgroup_name',
|
||||
'hostgroup_alias' => 'hostgroup_alias'
|
||||
'hostgroup_alias' => 'hostgroup_alias',
|
||||
'hostgroup' => 'hostgroup'
|
||||
),
|
||||
'servicestatussummary' => array(
|
||||
'services_total' => 'SUM(CASE WHEN object_type = \'service\' THEN 1 ELSE 0 END)',
|
||||
|
@ -45,7 +46,8 @@ class GroupSummaryQuery extends IdoQuery
|
|||
'services_critical_last_state_change_unhandled' => 'MAX(CASE WHEN object_type = \'service\' AND state = 2 AND acknowledged + in_downtime + host_state = 0 THEN state_change ELSE 0 END)',
|
||||
'services_unknown_last_state_change_unhandled' => 'MAX(CASE WHEN object_type = \'service\' AND state = 3 AND acknowledged + in_downtime + host_state = 0 THEN state_change ELSE 0 END)',
|
||||
'servicegroup_name' => 'servicegroup_name',
|
||||
'servicegroup_alias' => 'servicegroup_alias'
|
||||
'servicegroup_alias' => 'servicegroup_alias',
|
||||
'servicegroup' => 'servicegroup'
|
||||
)
|
||||
);
|
||||
|
||||
|
@ -56,11 +58,13 @@ class GroupSummaryQuery extends IdoQuery
|
|||
'host_state'
|
||||
);
|
||||
|
||||
if (in_array('servicegroup_name', $this->desiredColumns)) {
|
||||
if (in_array('servicegroup', $this->desiredColumns) || in_array('servicegroup_name', $this->desiredColumns)) {
|
||||
$columns[] = 'servicegroup';
|
||||
$columns[] = 'servicegroup_name';
|
||||
$columns[] = 'servicegroup_alias';
|
||||
$groupColumns = array('servicegroup_name', 'servicegroup_alias');
|
||||
} else {
|
||||
$columns[] = 'hostgroup';
|
||||
$columns[] = 'hostgroup_name';
|
||||
$columns[] = 'hostgroup_alias';
|
||||
$groupColumns = array('hostgroup_name', 'hostgroup_alias');
|
||||
|
|
|
@ -83,10 +83,12 @@ class HoststatusQuery extends IdoQuery
|
|||
END'
|
||||
),
|
||||
'hostgroups' => array(
|
||||
'hostgroup' => 'hgo.name1 COLLATE latin1_general_ci',
|
||||
'hostgroup_name' => 'hgo.name1',
|
||||
'hostgroup_alias' => 'hg.alias'
|
||||
),
|
||||
'servicegroups' => array(
|
||||
'servicegroup' => 'sgo.name1 COLLATE latin1_general_ci',
|
||||
'servicegroup_name' => 'sgo.name1',
|
||||
'servicegroup_alias' => 'sg.alias'
|
||||
),
|
||||
|
|
|
@ -58,4 +58,9 @@ class Groupsummary extends DataView
|
|||
)
|
||||
);
|
||||
}
|
||||
|
||||
public function getFilterColumns()
|
||||
{
|
||||
return array('hostgroup', 'servicegroup');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue