diff --git a/config/modules/monitoring/menu.ini b/config/modules/monitoring/menu.ini index 6c69af7ea..5031870b9 100755 --- a/config/modules/monitoring/menu.ini +++ b/config/modules/monitoring/menu.ini @@ -67,7 +67,7 @@ icon = "img/icons/notification.png" [History.Events] title = "All Events" -url = "monitoring/list/eventhistory" +url = "monitoring/list/eventhistory?raw_timestamp>=-2+days" icon = "img/icons/history.png" [System.Performance] diff --git a/modules/monitoring/application/controllers/ListController.php b/modules/monitoring/application/controllers/ListController.php index 4c595de5e..2e0a7c6fc 100644 --- a/modules/monitoring/application/controllers/ListController.php +++ b/modules/monitoring/application/controllers/ListController.php @@ -362,7 +362,7 @@ class Monitoring_ListController extends MonitoringController public function eventhistoryAction() { - $query = EventHistoryView::fromRequest( + $dataview = EventHistoryView::fromRequest( $this->getRequest(), array( 'host_name', @@ -378,12 +378,18 @@ class Monitoring_ListController extends MonitoringController 'host', 'service' ) - )->getQuery(); + ); + + $this->setupFilterControl($dataview, 'eventhistory'); + $this->setupSortControl( + array( + 'raw_timestamp' => 'Occurence' + ) + ); + + $query = $dataview->getQuery(); $this->handleFormatRequest($query); $this->view->history = $query->paginate(); - $this->setupSortControl( - array() - ); } /** diff --git a/modules/monitoring/application/views/scripts/list/eventhistory.phtml b/modules/monitoring/application/views/scripts/list/eventhistory.phtml index 8e5c96d32..4f91e129d 100644 --- a/modules/monitoring/application/views/scripts/list/eventhistory.phtml +++ b/modules/monitoring/application/views/scripts/list/eventhistory.phtml @@ -10,6 +10,15 @@