Skip to content

Commit

Permalink
monitoring: Remove HostcommentQuery::getGroup()
Browse files Browse the repository at this point in the history
refs #9956
  • Loading branch information
lippserd committed Sep 29, 2015
1 parent c597a67 commit 2ce63ad
Showing 1 changed file with 10 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@ class HostcommentQuery extends IdoQuery
*/
protected $allowCustomVars = true;

/**
* {@inheritdoc}
*/
protected $groupBase = array('comments' => array('c.comment_id', 'ho.object_id'));

/**
* {@inheritdoc}
*/
protected $groupOrigin = array('hostgroups', 'services');

/**
* {@inheritdoc}
*/
Expand Down Expand Up @@ -165,28 +175,4 @@ protected function joinInstances()
array()
);
}

/**
* {@inheritdoc}
*/
public function getGroup()
{
$group = array();
if ($this->hasJoinedVirtualTable('hostgroups') || $this->hasJoinedVirtualTable('services')) {
$group = array('c.comment_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;
}
}

0 comments on commit 2ce63ad

Please sign in to comment.