diff --git a/modules/monitoring/application/controllers/ListController.php b/modules/monitoring/application/controllers/ListController.php
index 81b446adf..f17a9465c 100644
--- a/modules/monitoring/application/controllers/ListController.php
+++ b/modules/monitoring/application/controllers/ListController.php
@@ -218,20 +218,7 @@ class Monitoring_ListController extends MonitoringController
*/
public function notificationsAction()
{
- $query = NotificationView::fromRequest(
- $this->_request,
- array(
- 'host_name',
- 'service_description',
- 'notification_type',
- 'notification_reason',
- 'notification_start_time',
- 'notification_contact',
- 'notification_information',
- 'notification_command',
- 'notification_internal_id'
- )
- )->getQuery();
+ $query = NotificationView::fromRequest($this->_request)->getQuery();
$this->view->notifications = $query->paginate();
$this->setupSortControl(array(
'notification_start_time' => 'Notification Start'
diff --git a/modules/monitoring/application/views/scripts/list/notifications.phtml b/modules/monitoring/application/views/scripts/list/notifications.phtml
index 4395e813b..077ba44aa 100644
--- a/modules/monitoring/application/views/scripts/list/notifications.phtml
+++ b/modules/monitoring/application/views/scripts/list/notifications.phtml
@@ -1,71 +1,56 @@
-= $this->tabs->render($this); ?>
+
Notifications
-getHelper('MonitoringProperties');
-?>
-
- = $this->sortControl->render($this); ?>
-
- = $this->paginationControl($notifications, null, null, array('preserve' => $this->preserve)); ?>
-
-
-
- | Host |
- Service |
- Type |
- Time |
- Contact |
- Notification Command |
- Information |
-
-
-
-
- service_description)) {
- $detailLink = $this->href('monitoring/show/host', array('host' => $notification->host_name));
- } else {
- $detailLink = $this->href('monitoring/show/host', array(
- 'host' => $notification->host_name,
- 'service' => $notification->service_description,
- 'notification_id' => $notification->notification_internal_id
- )
- );
- }
- ?>
- activeRowHref === $detailLink) ? 'class="active"' : ''; ?>>
- |
-
-
- = $notification->host_name ?>
-
- |
-
-
- = empty($notification->service_description) ? '' : $notification->service_description; ?>
-
- |
- = $formatter->getNotificationType($notification); ?>
- |
-
- = $notification->notification_start_time ?>
- |
-
- = $notification->notification_contact ?>
- |
-
- = $notification->notification_command ?>
- |
-
- = $this->escape(substr(strip_tags($notification->notification_information), 0, 10000)); ?>
- |
-
-
-
-
-
-
\ No newline at end of file
+
+
+ = $this->sortControl->render($this); ?>
+ = $this->paginationControl($notifications, null, null, array('preserve' => $this->preserve)); ?>
+
+
+
+ service)) {
+ $isService = true;
+ $href = $this->href('monitoring/show/service', array(
+ 'host' => $notification->host,
+ 'service' => $notification->service
+ ));
+ $stateName = strtolower($this->util()->getServiceStateName($notification->notification_state));
+ } else {
+ $isService = false;
+ $href = $this->href('monitoring/show/host', array(
+ 'host' => $notification->host
+ ));
+ $stateName = strtolower($this->util()->getHostStateName($notification->notification_state));
+ }
+ ?>
+
+ | = date('d.m. H:i', $notification->notification_start_time); ?> |
+
+
+ = $notification->service ?>
+
+ on = $notification->host ?>
+
+
+
+ = $notification->host ?>
+
+
+ = $this->escape(substr(strip_tags($notification->notification_output), 0, 10000)); ?>
+
+
+ Sent to
+
+ = $notification->notification_contact ?>
+
+
+ |
+
+
+
+
+ = $this->paginationControl($notifications, null, null, array('preserve' => $this->preserve)); ?>
+
+
+No notifications yet
+
diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/NotificationQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/NotificationQuery.php
index a0d803e10..dcc1fc3f3 100644
--- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/NotificationQuery.php
+++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/NotificationQuery.php
@@ -37,23 +37,19 @@ class NotificationQuery extends IdoQuery
*/
protected $columnMap = array(
'notification' => array(
- 'notification_type' => 'n.notification_type',
- 'notification_reason' => 'n.notification_reason',
- 'notification_start_time' => 'n.start_time',
- 'notification_information' => 'n.output',
- 'notification_internal_id' => 'n.notification_id'
+ 'notification_output' => 'n.output',
+ 'notification_start_time' => 'UNIX_TIMESTAMP(n.start_time)',
+ 'notification_state' => 'n.state'
),
'objects' => array(
- 'host_name' => 'o.name1',
- 'service_description' => 'o.name2',
- 'service' => 'o.name2',
- 'host_name' => 'o.name1'
+ 'host' => 'o.name1',
+ 'service' => 'o.name2'
),
'contact' => array(
- 'notification_contact' => 'c_o.name1'
+ 'notification_contact' => 'c_o.name1'
),
'command' => array(
- 'notification_command' => 'cmd_o.name1'
+ 'notification_command' => 'cmd_o.name1'
)
);
diff --git a/modules/monitoring/library/Monitoring/DataView/Notification.php b/modules/monitoring/library/Monitoring/DataView/Notification.php
index 817a93609..9efefdac2 100644
--- a/modules/monitoring/library/Monitoring/DataView/Notification.php
+++ b/modules/monitoring/library/Monitoring/DataView/Notification.php
@@ -14,17 +14,13 @@ class Notification extends DataView
public function getColumns()
{
return array(
- 'host_name',
- 'service_description',
- 'notification_type',
- 'notification_reason',
+ 'host',
+ 'service',
+ 'notification_state',
'notification_start_time',
'notification_contact',
- 'notification_information',
- 'notification_command',
- 'host',
- 'service'
- 'notification_internal_id'
+ 'notification_output',
+ 'notification_command'
);
}