From 15399d77ceea9feab481289930f3afe95fa43b8c Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Mon, 13 Apr 2015 15:25:10 +0200 Subject: [PATCH] NotificationQuery: Use query column `service_description' instead of `service' refs #8613 --- .../application/controllers/AlertsummaryController.php | 4 ++-- modules/monitoring/application/controllers/ListController.php | 2 +- modules/monitoring/application/controllers/ShowController.php | 2 +- .../application/views/scripts/list/notifications.phtml | 4 ++-- .../Monitoring/Backend/Ido/Query/NotificationQuery.php | 2 +- .../monitoring/library/Monitoring/DataView/Notification.php | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/monitoring/application/controllers/AlertsummaryController.php b/modules/monitoring/application/controllers/AlertsummaryController.php index d6e95b601..22329cd7a 100644 --- a/modules/monitoring/application/controllers/AlertsummaryController.php +++ b/modules/monitoring/application/controllers/AlertsummaryController.php @@ -61,7 +61,7 @@ class Monitoring_AlertsummaryController extends Controller array( 'host_name', 'host_display_name', - 'service', + 'service_description', 'service_display_name', 'notification_output', 'notification_contact', @@ -479,7 +479,7 @@ class Monitoring_AlertsummaryController extends Controller array( 'host_name', 'host_display_name', - 'service', + 'service_description', 'service_display_name', 'notification_output', 'notification_contact', diff --git a/modules/monitoring/application/controllers/ListController.php b/modules/monitoring/application/controllers/ListController.php index 64cec8a2c..ef0ee4db2 100644 --- a/modules/monitoring/application/controllers/ListController.php +++ b/modules/monitoring/application/controllers/ListController.php @@ -326,7 +326,7 @@ class Monitoring_ListController extends Controller $this->setAutorefreshInterval(15); $query = $this->backend->select()->from('notification', array( 'host_name', - 'service', + 'service_description', 'notification_output', 'notification_contact', 'notification_start_time', diff --git a/modules/monitoring/application/controllers/ShowController.php b/modules/monitoring/application/controllers/ShowController.php index 680ed719d..f89b70d07 100644 --- a/modules/monitoring/application/controllers/ShowController.php +++ b/modules/monitoring/application/controllers/ShowController.php @@ -157,7 +157,7 @@ class Monitoring_ShowController extends Controller $notifications = $this->backend->select()->from('notification', array( 'host_name', - 'service', + 'service_description', 'notification_output', 'notification_contact', 'notification_start_time', diff --git a/modules/monitoring/application/views/scripts/list/notifications.phtml b/modules/monitoring/application/views/scripts/list/notifications.phtml index b5d5adde1..b9fd7e309 100644 --- a/modules/monitoring/application/views/scripts/list/notifications.phtml +++ b/modules/monitoring/application/views/scripts/list/notifications.phtml @@ -24,7 +24,7 @@ use Icinga\Module\Monitoring\Object\Service; service)) { + if (isset($notification->service_description)) { $isService = true; $stateName = Service::getStateText($notification->notification_state); } else { @@ -44,7 +44,7 @@ use Icinga\Module\Monitoring\Object\Service; icon('service', $this->translate('Service')); ?> link()->service( - $notification->service, + $notification->service_description, $notification->service_display_name, $notification->host_name, $notification->host_display_name diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/NotificationQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/NotificationQuery.php index d974cd1eb..41526f612 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/NotificationQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/NotificationQuery.php @@ -14,7 +14,7 @@ class NotificationQuery extends IdoQuery ), 'objects' => array( 'host_name' => 'o.name1', - 'service' => 'o.name2' + 'service_description' => 'o.name2' ), 'contact' => array( 'notification_contact' => 'c_o.name1', diff --git a/modules/monitoring/library/Monitoring/DataView/Notification.php b/modules/monitoring/library/Monitoring/DataView/Notification.php index f716d0066..0eb761ae3 100644 --- a/modules/monitoring/library/Monitoring/DataView/Notification.php +++ b/modules/monitoring/library/Monitoring/DataView/Notification.php @@ -14,7 +14,7 @@ class Notification extends DataView { return array( 'host_name', - 'service', + 'service_description', 'notification_state', 'notification_start_time', 'notification_contact',