monitoring: Remove ServicedowntimeQuery::getGroup()

refs #9956
This commit is contained in:
Eric Lippmann 2015-09-30 09:29:34 +02:00
parent 690fc89d62
commit f4e4dbe069
1 changed files with 10 additions and 33 deletions

View File

@ -13,6 +13,16 @@ class ServicedowntimeQuery extends IdoQuery
*/
protected $allowCustomVars = true;
/**
* {@inheritdoc}
*/
protected $groupBase = array('downtimes', array('sd.scheduleddowntime_id', 'so.object_id'));
/**
* {@inheritdoc}
*/
protected $groupOrigin = array('hostgroups', 'servicegroups');
/**
* {@inheritdoc}
*/
@ -185,37 +195,4 @@ class ServicedowntimeQuery extends IdoQuery
array()
);
}
/**
* {@inheritdoc}
*/
public function getGroup()
{
$group = array();
if ($this->hasJoinedVirtualTable('hostgroups') || $this->hasJoinedVirtualTable('servicegroups')) {
$group = array('sd.scheduleddowntime_id', 'so.object_id');
if ($this->hasJoinedVirtualTable('hosts')) {
$group[] = 'h.host_id';
}
if ($this->hasJoinedVirtualTable('hoststatus')) {
$group[] = 'hs.hoststatus_id';
}
if ($this->hasJoinedVirtualTable('services')) {
$group[] = 's.service_id';
}
if ($this->hasJoinedVirtualTable('servicestatus')) {
$group[] = 'ss.servicestatus_id';
}
if ($this->hasJoinedVirtualTable('instances')) {
$group[] = 'i.instance_id';
}
}
return $group;
}
}