parent
b25d8e2f34
commit
5c19c05a8a
|
@ -114,7 +114,6 @@ class HoststatehistoryQuery extends IdoQuery
|
|||
'hgo.object_id = hg.hostgroup_object_id AND hgo.is_active = 1 AND hgo.objecttype_id = 3',
|
||||
array()
|
||||
);
|
||||
$this->select->group(array('hh.statehistory_id', 'ho.name1'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -164,6 +163,21 @@ class HoststatehistoryQuery extends IdoQuery
|
|||
'so.object_id = s.service_object_id AND so.is_active = 1 AND so.objecttype_id = 2',
|
||||
array()
|
||||
);
|
||||
$this->select->group(array('hh.statehistory_id', 'ho.name1'));
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getGroup()
|
||||
{
|
||||
$group = array();
|
||||
if ($this->hasJoinedVirtualTable('hostgroups') || $this->hasJoinedVirtualTable('services')) {
|
||||
$group = array('hh.statehistory_id', 'ho.object_id');
|
||||
if ($this->hasJoinedVirtualTable('hosts')) {
|
||||
$group[] = 'h.host_id';
|
||||
}
|
||||
}
|
||||
|
||||
return $group;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue