mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-21 04:44:25 +02:00
Revert "Don't fetchAll() and loop afterwards in the alert summary report"
This reverts commit f3ca80ffced18497322a74b8b49e94e88bb31cdc.
This commit is contained in:
parent
f3ca80ffce
commit
d27b94dcec
@ -274,6 +274,7 @@ class Monitoring_AlertsummaryController extends Controller
|
|||||||
);
|
);
|
||||||
|
|
||||||
$defects = array();
|
$defects = array();
|
||||||
|
$records = $query->getQuery()->fetchAll();
|
||||||
$period = $this->createPeriod($interval);
|
$period = $this->createPeriod($interval);
|
||||||
|
|
||||||
foreach ($period as $entry) {
|
foreach ($period as $entry) {
|
||||||
@ -281,7 +282,7 @@ class Monitoring_AlertsummaryController extends Controller
|
|||||||
$defects[$id] = array($id, 0);
|
$defects[$id] = array($id, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($query as $item) {
|
foreach ($records as $item) {
|
||||||
$id = $this->getPeriodFormat($interval, $item->timestamp);
|
$id = $this->getPeriodFormat($interval, $item->timestamp);
|
||||||
if (empty($defects[$id])) {
|
if (empty($defects[$id])) {
|
||||||
$defects[$id] = array($id, 0);
|
$defects[$id] = array($id, 0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user