monitoring: Fix service status grouping when selecting group alias columns
refs #9956
This commit is contained in:
parent
18f720d31f
commit
6e12dd4d78
|
@ -374,6 +374,7 @@ class ServicestatusQuery extends IdoQuery
|
||||||
$group[] = 'so.object_id';
|
$group[] = 'so.object_id';
|
||||||
$group[] = 's.service_id';
|
$group[] = 's.service_id';
|
||||||
$group[] = 'sgo.object_id';
|
$group[] = 'sgo.object_id';
|
||||||
|
$group[] = 'sg.servicegroup_id';
|
||||||
$groupedTables['services'] = true;
|
$groupedTables['services'] = true;
|
||||||
$groupedTables['servicegroups'] = true;
|
$groupedTables['servicegroups'] = true;
|
||||||
}
|
}
|
||||||
|
@ -388,6 +389,7 @@ class ServicestatusQuery extends IdoQuery
|
||||||
$groupedTables['services'] = true;
|
$groupedTables['services'] = true;
|
||||||
}
|
}
|
||||||
$group[] = 'hgo.object_id';
|
$group[] = 'hgo.object_id';
|
||||||
|
$group[] = 'hg.hostgroup_id';
|
||||||
$groupedTables['hostgroups'] = true;
|
$groupedTables['hostgroups'] = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -404,19 +406,17 @@ class ServicestatusQuery extends IdoQuery
|
||||||
}
|
}
|
||||||
switch ($tableName) {
|
switch ($tableName) {
|
||||||
case 'hosts':
|
case 'hosts':
|
||||||
$groupColumn = 'h.host_id';
|
$group[] = 'h.host_id';
|
||||||
break;
|
break;
|
||||||
case 'hoststatus':
|
case 'hoststatus':
|
||||||
$groupColumn = 'hs.hoststatus_id';
|
$group[] = 'hs.hoststatus_id';
|
||||||
break;
|
break;
|
||||||
case 'servicestatus':
|
case 'servicestatus':
|
||||||
$groupColumn = 'ss.servicestatus_id';
|
$group[] = 'ss.servicestatus_id';
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
continue 2;
|
continue 2;
|
||||||
}
|
}
|
||||||
/** @var string $groupColumn */
|
|
||||||
$group[] = $groupColumn;
|
|
||||||
$groupedTables[$tableName] = true;
|
$groupedTables[$tableName] = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue