parent
6e40b79b0d
commit
72de85ab7b
|
@ -94,7 +94,6 @@ class HostdowntimeQuery extends IdoQuery
|
|||
'hgo.object_id = hg.hostgroup_object_id AND hgo.is_active = 1 AND hgo.objecttype_id = 3',
|
||||
array()
|
||||
);
|
||||
$this->group(array('sd.scheduleddowntime_id', 'ho.name1'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -156,6 +155,25 @@ class HostdowntimeQuery extends IdoQuery
|
|||
'so.object_id = s.service_object_id AND so.is_active = 1 AND so.objecttype_id = 2',
|
||||
array()
|
||||
);
|
||||
$this->group(array('sd.scheduleddowntime_id', 'ho.name1'));
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getGroup()
|
||||
{
|
||||
$group = array();
|
||||
if ($this->hasJoinedVirtualTable('hostgroups') || $this->hasJoinedVirtualTable('servicegroups') || $this->hasJoinedVirtualTable('services')) {
|
||||
$group = array('sd.scheduleddowntime_id', 'ho.object_id');
|
||||
if ($this->hasJoinedVirtualTable('hosts')) {
|
||||
$group[] = 'h.host_id';
|
||||
}
|
||||
|
||||
if ($this->hasJoinedVirtualTable('hoststatus')) {
|
||||
$group[] = 'hs.hoststatus_id';
|
||||
}
|
||||
}
|
||||
|
||||
return $group;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue