monitoring: Remove ServicecommentQuery::getGroup()

refs #9956
This commit is contained in:
Eric Lippmann 2015-09-29 22:42:00 +02:00
parent 92778ec0eb
commit d2d960d072
1 changed files with 10 additions and 32 deletions

View File

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