monitoring: Clear order of the HoststatusQuery used in the HostserviceproblemsummaryQuery

This commit is contained in:
Eric Lippmann 2015-09-17 17:30:38 +02:00
parent 78989c0aad
commit faa9b41fb8
1 changed files with 6 additions and 6 deletions

View File

@ -55,8 +55,10 @@ class HostserviceproblemsummaryQuery extends IdoQuery
public function setHoststatusQuery(HoststatusQuery $query)
{
$this->hostStatusQuery = clone $query;
$this->hostStatusQuery->setIsSubQuery();
$this->hostStatusQuery->columns(array('object_id'));
$this->hostStatusQuery
->clearOrder()
->setIsSubQuery()
->columns(array('object_id'));
return $this;
}
@ -70,12 +72,10 @@ class HostserviceproblemsummaryQuery extends IdoQuery
array()
)->join(
array('s' => $this->prefix . 'services'),
's.service_object_id = so.object_id',
's.service_object_id = so.object_id AND so.is_active = 1',
array()
);
$this->select->group(array('so.name1'));
$this->select->where('so.is_active = 1');
$this->select->group(array('so.object_id'));
$this->joinedVirtualTables['services'] = true;
}