Don't fetchAll() and loop afterwards in the alert summary report
refs #8340
This commit is contained in:
parent
9917e63e02
commit
f3ca80ffce
|
@ -274,7 +274,6 @@ class Monitoring_AlertsummaryController extends Controller
|
|||
);
|
||||
|
||||
$defects = array();
|
||||
$records = $query->getQuery()->fetchAll();
|
||||
$period = $this->createPeriod($interval);
|
||||
|
||||
foreach ($period as $entry) {
|
||||
|
@ -282,7 +281,7 @@ class Monitoring_AlertsummaryController extends Controller
|
|||
$defects[$id] = array($id, 0);
|
||||
}
|
||||
|
||||
foreach ($records as $item) {
|
||||
foreach ($query as $item) {
|
||||
$id = $this->getPeriodFormat($interval, $item->timestamp);
|
||||
if (empty($defects[$id])) {
|
||||
$defects[$id] = array($id, 0);
|
||||
|
|
Loading…
Reference in New Issue