diff --git a/modules/monitoring/application/controllers/AlertsummaryController.php b/modules/monitoring/application/controllers/AlertsummaryController.php index 88100d01b..dc28d9035 100644 --- a/modules/monitoring/application/controllers/AlertsummaryController.php +++ b/modules/monitoring/application/controllers/AlertsummaryController.php @@ -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' + ); } /** diff --git a/modules/monitoring/application/views/scripts/alertsummary/index.phtml b/modules/monitoring/application/views/scripts/alertsummary/index.phtml index d96ca5bdc..f84395000 100644 --- a/modules/monitoring/application/views/scripts/alertsummary/index.phtml +++ b/modules/monitoring/application/views/scripts/alertsummary/index.phtml @@ -59,8 +59,9 @@
partial('list/notifications.phtml', array( - 'notifications' => $this->recentAlerts, - 'compact' => true + 'notifications' => $this->recentAlerts, + 'compact' => true, + 'notificationsUrl' => $recentAlertsUrl )); ?>
@@ -70,8 +71,9 @@
partial('list/notifications.phtml', array( - 'notifications' => $this->notifications, - 'compact' => true + 'notifications' => $this->notifications, + 'compact' => true, + 'notificationsUrl' => $notificationsUrl )); ?>
diff --git a/modules/monitoring/application/views/scripts/list/notifications.phtml b/modules/monitoring/application/views/scripts/list/notifications.phtml index 06028c993..6e08abaa7 100644 --- a/modules/monitoring/application/views/scripts/list/notifications.phtml +++ b/modules/monitoring/application/views/scripts/list/notifications.phtml @@ -72,7 +72,7 @@ if (! $this->compact): ?> hasMore()): ?> 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',