monitoring: Clear order of the HoststatusQuery used in the HostserviceproblemsummaryQuery
This commit is contained in:
parent
78989c0aad
commit
faa9b41fb8
|
@ -55,8 +55,10 @@ class HostserviceproblemsummaryQuery extends IdoQuery
|
||||||
public function setHoststatusQuery(HoststatusQuery $query)
|
public function setHoststatusQuery(HoststatusQuery $query)
|
||||||
{
|
{
|
||||||
$this->hostStatusQuery = clone $query;
|
$this->hostStatusQuery = clone $query;
|
||||||
$this->hostStatusQuery->setIsSubQuery();
|
$this->hostStatusQuery
|
||||||
$this->hostStatusQuery->columns(array('object_id'));
|
->clearOrder()
|
||||||
|
->setIsSubQuery()
|
||||||
|
->columns(array('object_id'));
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -70,12 +72,10 @@ class HostserviceproblemsummaryQuery extends IdoQuery
|
||||||
array()
|
array()
|
||||||
)->join(
|
)->join(
|
||||||
array('s' => $this->prefix . 'services'),
|
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()
|
array()
|
||||||
);
|
);
|
||||||
|
$this->select->group(array('so.object_id'));
|
||||||
$this->select->group(array('so.name1'));
|
|
||||||
$this->select->where('so.is_active = 1');
|
|
||||||
$this->joinedVirtualTables['services'] = true;
|
$this->joinedVirtualTables['services'] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue