From 96954ea9a170db6b8a92f7113b8975a14c8e2524 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Mon, 13 Apr 2015 15:24:15 +0200 Subject: [PATCH] NotificationQuery: Use query column `host_name' instead of `host' 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 0f6b6cdb8..d6e95b601 100644 --- a/modules/monitoring/application/controllers/AlertsummaryController.php +++ b/modules/monitoring/application/controllers/AlertsummaryController.php @@ -59,7 +59,7 @@ class Monitoring_AlertsummaryController extends Controller $query = $this->backend->select()->from( 'notification', array( - 'host', + 'host_name', 'host_display_name', 'service', 'service_display_name', @@ -477,7 +477,7 @@ class Monitoring_AlertsummaryController extends Controller $query = $this->backend->select()->from( 'notification', array( - 'host', + 'host_name', 'host_display_name', 'service', 'service_display_name', diff --git a/modules/monitoring/application/controllers/ListController.php b/modules/monitoring/application/controllers/ListController.php index 2802714aa..64cec8a2c 100644 --- a/modules/monitoring/application/controllers/ListController.php +++ b/modules/monitoring/application/controllers/ListController.php @@ -325,7 +325,7 @@ class Monitoring_ListController extends Controller ); $this->setAutorefreshInterval(15); $query = $this->backend->select()->from('notification', array( - 'host', + 'host_name', 'service', 'notification_output', 'notification_contact', diff --git a/modules/monitoring/application/controllers/ShowController.php b/modules/monitoring/application/controllers/ShowController.php index f41811297..680ed719d 100644 --- a/modules/monitoring/application/controllers/ShowController.php +++ b/modules/monitoring/application/controllers/ShowController.php @@ -156,7 +156,7 @@ class Monitoring_ShowController extends Controller $this->view->commands = $commands->paginate(); $notifications = $this->backend->select()->from('notification', array( - 'host', + 'host_name', 'service', 'notification_output', 'notification_contact', diff --git a/modules/monitoring/application/views/scripts/list/notifications.phtml b/modules/monitoring/application/views/scripts/list/notifications.phtml index cd2c46538..b5d5adde1 100644 --- a/modules/monitoring/application/views/scripts/list/notifications.phtml +++ b/modules/monitoring/application/views/scripts/list/notifications.phtml @@ -46,12 +46,12 @@ use Icinga\Module\Monitoring\Object\Service; link()->service( $notification->service, $notification->service_display_name, - $notification->host, + $notification->host_name, $notification->host_display_name ) ?> icon('host', $this->translate('Host')); ?> - link()->host($notification->host, $notification->host_display_name) ?> + link()->host($notification->host_name, $notification->host_display_name) ?>
escape($this->ellipsis($notification->notification_output, 10000)) ?> diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/NotificationQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/NotificationQuery.php index 4eebc640f..d974cd1eb 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/NotificationQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/NotificationQuery.php @@ -13,7 +13,7 @@ class NotificationQuery extends IdoQuery 'notification_object_id' => 'n.object_id' ), 'objects' => array( - 'host' => 'o.name1', + 'host_name' => 'o.name1', 'service' => 'o.name2' ), 'contact' => array( diff --git a/modules/monitoring/library/Monitoring/DataView/Notification.php b/modules/monitoring/library/Monitoring/DataView/Notification.php index b4632b57c..f716d0066 100644 --- a/modules/monitoring/library/Monitoring/DataView/Notification.php +++ b/modules/monitoring/library/Monitoring/DataView/Notification.php @@ -13,7 +13,7 @@ class Notification extends DataView public function getColumns() { return array( - 'host', + 'host_name', 'service', 'notification_state', 'notification_start_time',