parent
08965898e9
commit
92778ec0eb
|
@ -13,6 +13,16 @@ class HostdowntimeQuery extends IdoQuery
|
|||
*/
|
||||
protected $allowCustomVars = true;
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected $groupBase = array('downtimes' => array('sd.scheduleddowntime_id', 'ho.object_id'));
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected $groupOrigin = array('hostgroups', 'servicegroups', 'services');
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
|
@ -171,28 +181,4 @@ class HostdowntimeQuery extends IdoQuery
|
|||
array()
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@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';
|
||||
}
|
||||
|
||||
if ($this->hasJoinedVirtualTable('instances')) {
|
||||
$group[] = 'i.instance_id';
|
||||
}
|
||||
}
|
||||
|
||||
return $group;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue