From a09e41e3b8fbe2249e739d01cc3961aa5a531d47 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Fri, 17 Apr 2015 16:13:36 +0200 Subject: [PATCH] list/notifications: Ensure dashboard compliance refs #7876 --- .../controllers/ListController.php | 5 ++++ .../views/scripts/list/notifications.phtml | 26 +++++++++---------- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/modules/monitoring/application/controllers/ListController.php b/modules/monitoring/application/controllers/ListController.php index f1f758e9c..b040da72d 100644 --- a/modules/monitoring/application/controllers/ListController.php +++ b/modules/monitoring/application/controllers/ListController.php @@ -306,12 +306,14 @@ class Monitoring_ListController extends Controller if ($url = $this->hasBetterUrl()) { return $this->redirectNow($url); } + $this->addTitleTab( 'notifications', $this->translate('Notifications'), $this->translate('List notifications') ); $this->setAutorefreshInterval(15); + $query = $this->backend->select()->from('notification', array( 'host_name', 'service_description', @@ -324,6 +326,9 @@ class Monitoring_ListController extends Controller )); $this->filterQuery($query); $this->view->notifications = $query->paginate(); + + $this->setupLimitControl(); + $this->setupPaginationControl($this->view->notifications); $this->setupSortControl(array( 'notification_start_time' => $this->translate('Notification Start') )); diff --git a/modules/monitoring/application/views/scripts/list/notifications.phtml b/modules/monitoring/application/views/scripts/list/notifications.phtml index 9a3b424b4..c49f5fc3f 100644 --- a/modules/monitoring/application/views/scripts/list/notifications.phtml +++ b/modules/monitoring/application/views/scripts/list/notifications.phtml @@ -1,26 +1,24 @@ - -compact): ?> +if (! $this->compact): ?>
- tabs ?> -
- translate('Sort by') ?> sortControl->render($this) ?> -
- widget('limiter') ?> - paginationControl($notifications, null, null, array('preserve' => $this->preserve)) ?> + tabs; ?> + sortBox; ?> + limiter; ?> + paginator; ?> + filterEditor; ?>
-
- - translate('No notifications matching the filter') ?> - +translate('No notifications found matching the filter') . '
'; + return; +} +?>