parent
dd0e924e8d
commit
8bfc7b8805
|
@ -57,7 +57,9 @@ class AlertsummaryController extends Controller
|
|||
$this->view->title = $this->translate('Alert Summary');
|
||||
|
||||
$this->view->intervalBox = $this->createIntervalBox();
|
||||
$this->view->recentAlerts = $this->createRecentAlerts();
|
||||
list($recentAlerts, $recentAlertsUrl) = $this->createRecentAlerts();
|
||||
$this->view->recentAlerts = $recentAlerts;
|
||||
$this->view->recentAlertsUrl = $recentAlertsUrl;
|
||||
$this->view->interval = $this->getInterval();
|
||||
$this->view->defectChart = $this->createDefectImage();
|
||||
$this->view->healingChart = $this->createHealingChart();
|
||||
|
@ -80,6 +82,7 @@ class AlertsummaryController extends Controller
|
|||
);
|
||||
$this->applyRestriction('monitoring/filter/objects', $query);
|
||||
$this->view->notifications = $query;
|
||||
$this->view->notificationsUrl = 'monitoring/list/notifications';
|
||||
|
||||
$this->setupLimitControl();
|
||||
$this->setupPaginationControl($this->view->notifications);
|
||||
|
@ -487,7 +490,7 @@ class AlertsummaryController extends Controller
|
|||
/**
|
||||
* Top recent alerts
|
||||
*
|
||||
* @return mixed
|
||||
* @return array
|
||||
*/
|
||||
private function createRecentAlerts()
|
||||
{
|
||||
|
@ -508,7 +511,10 @@ class AlertsummaryController extends Controller
|
|||
|
||||
$query->order('notification_start_time', 'desc');
|
||||
|
||||
return $query->limit(5);
|
||||
return array(
|
||||
$query->limit(5),
|
||||
'monitoring/list/notifications?sort=notification_start_time&dir=desc'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -59,8 +59,9 @@
|
|||
<div class="alertsummary-flex-container">
|
||||
<div class="alertsummary-flex">
|
||||
<?= $this->partial('list/notifications.phtml', array(
|
||||
'notifications' => $this->recentAlerts,
|
||||
'compact' => true
|
||||
'notifications' => $this->recentAlerts,
|
||||
'compact' => true,
|
||||
'notificationsUrl' => $recentAlertsUrl
|
||||
)); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -70,8 +71,9 @@
|
|||
<div class="alertsummary-flex-container">
|
||||
<div class="alertsummary-flex">
|
||||
<?= $this->partial('list/notifications.phtml', array(
|
||||
'notifications' => $this->notifications,
|
||||
'compact' => true
|
||||
'notifications' => $this->notifications,
|
||||
'compact' => true,
|
||||
'notificationsUrl' => $notificationsUrl
|
||||
)); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -72,7 +72,7 @@ if (! $this->compact): ?>
|
|||
<?php elseif ($notifications->hasMore()): ?>
|
||||
<?= $this->qlink(
|
||||
$this->translate('Show More'),
|
||||
$this->url()->without(array('view', 'limit')),
|
||||
$this->url(isset($notificationsUrl) ? $notificationsUrl : null)->without(array('view', 'limit')),
|
||||
null,
|
||||
array(
|
||||
'data-base-target' => '_next',
|
||||
|
|
Loading…
Reference in New Issue