From aca6d812f1047e9ef16c87d43fe3ff1776c085f9 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Thu, 13 Jul 2017 11:49:55 +0200 Subject: [PATCH] Notifications: make tabs fit dashlets, no objects --- application/controllers/NotificationsController.php | 13 +++++++++++++ .../Director/Dashboard/NotificationsDashboard.php | 6 +++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/application/controllers/NotificationsController.php b/application/controllers/NotificationsController.php index 6762af15..5ed02a04 100644 --- a/application/controllers/NotificationsController.php +++ b/application/controllers/NotificationsController.php @@ -2,10 +2,23 @@ namespace Icinga\Module\Director\Controllers; +use Icinga\Exception\NotFoundError; use Icinga\Module\Director\Web\Controller\ObjectsController; class NotificationsController extends ObjectsController { + protected function addObjectsTabs() + { + $res = parent::addObjectsTabs(); + $this->tabs()->remove('index'); + return $res; + } + + public function indexAction() + { + throw new NotFoundError('Not found'); + } + protected function checkDirectorPermissions() { $this->assertPermission('director/notifications'); diff --git a/library/Director/Dashboard/NotificationsDashboard.php b/library/Director/Dashboard/NotificationsDashboard.php index 71c313dd..2b657075 100644 --- a/library/Director/Dashboard/NotificationsDashboard.php +++ b/library/Director/Dashboard/NotificationsDashboard.php @@ -4,12 +4,12 @@ namespace Icinga\Module\Director\Dashboard; class NotificationsDashboard extends Dashboard { - protected $dashletNames = array( - 'NotificationApply', + protected $dashletNames = [ 'NotificationTemplate', + 'NotificationApply', 'UserObject', 'TimeperiodObject' - ); + ]; public function getTitle() {