From c547f4c17f20bae02a12848c12b59804e6c73f7a Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 15 Sep 2016 14:07:19 +0200 Subject: [PATCH] Fix error in the contact detail view introduced by changes to the notification queries --- .../monitoring/application/controllers/ListController.php | 2 +- .../monitoring/application/controllers/ShowController.php | 5 ++--- .../Monitoring/Backend/Ido/Query/NotificationQuery.php | 1 - 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/modules/monitoring/application/controllers/ListController.php b/modules/monitoring/application/controllers/ListController.php index 787a184f5..cfbff2169 100644 --- a/modules/monitoring/application/controllers/ListController.php +++ b/modules/monitoring/application/controllers/ListController.php @@ -292,7 +292,7 @@ class ListController extends Controller $this->setupPaginationControl($notifications); $this->setupLimitControl(); $this->setupSortControl(array( - 'notification_start_time' => $this->translate('Notification Start') + 'notification_timestamp' => $this->translate('Notification Start') ), $notifications); $this->view->notifications = $notifications; diff --git a/modules/monitoring/application/controllers/ShowController.php b/modules/monitoring/application/controllers/ShowController.php index bfd5167ff..2c7bc6039 100644 --- a/modules/monitoring/application/controllers/ShowController.php +++ b/modules/monitoring/application/controllers/ShowController.php @@ -29,7 +29,6 @@ class ShowController extends Controller 'contact_alias', 'contact_email', 'contact_pager', - 'contact_object_id', 'contact_notify_service_timeperiod', 'contact_notify_service_recovery', 'contact_notify_service_warning', @@ -61,13 +60,13 @@ class ShowController extends Controller 'service_description', 'notification_output', 'notification_contact_name', - 'notification_start_time', + 'notification_timestamp', 'notification_state', 'host_display_name', 'service_display_name' )); - $notifications->where('contact_object_id', $contact->contact_object_id); + $notifications->where('notification_contact_name', $contactName); $this->applyRestriction('monitoring/filter/objects', $notifications); $this->view->notifications = $notifications; $this->setupLimitControl(); diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/NotificationQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/NotificationQuery.php index c9515140b..8729cf25c 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/NotificationQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/NotificationQuery.php @@ -24,7 +24,6 @@ class NotificationQuery extends IdoQuery 'notifications' => array( 'instance_name' => 'n.instance_name', 'notification_contact_name' => 'n.notification_contact_name', - 'notification_object_id' => 'n.notification_object_id', 'notification_output' => 'n.notification_output', 'notification_state' => 'n.notification_state', 'notification_timestamp' => 'n.notification_timestamp'