diff --git a/modules/monitoring/application/controllers/AcknowledgementController.php b/modules/monitoring/application/controllers/AcknowledgementController.php deleted file mode 100644 index 684111fde..000000000 --- a/modules/monitoring/application/controllers/AcknowledgementController.php +++ /dev/null @@ -1,77 +0,0 @@ -getTabs()->add( - 'acknowledgement', - array( - 'title' => $this->translate( - 'Show acknowledgements' - ), - 'label' => $this->translate('Acknowledgements'), - 'url' => Url::fromRequest() - ) - )->extend(new DashboardAction())->activate('acknowledgement'); - $this->view->title = $this->translate('Acknowledgement'); - $this->setAutorefreshInterval(15); - $query = $this->backend->select()->from( - 'acknowledgement', - array( - 'acknowledgement_id', - 'instance_id', - 'entry_time', - 'object_id', - 'state', - 'author_name', - 'comment_data', - 'is_sticky', - 'persistent_comment', - 'acknowledgement_id', - 'notify_contacts', - 'end_time', - 'endpoint_object_id', - 'acknowledgement_is_service', - 'service', - 'host' - ) - ); - - $this->applyRestriction('monitoring/filter/objects', $query); - $this->filterQuery($query); - $this->view->acknowledgements = $query; - - $this->setupLimitControl() - ->setupPaginationControl($this->view->acknowledgements) - ->setupSortControl(array( - 'entry_time' => $this->translate('Entry Time'), - 'end_time' => $this->translate('End Time'), - 'state' => $this->translate('Object State'), - 'author_name' => $this->translate('Author Name') - ), $this->view->acknowledgements); - } - - /** - * Apply filters on a DataView - * - * @param DataView $dataView The DataView to apply filters on - * - * @return DataView $dataView - */ - protected function filterQuery(DataView $dataView) - { - $this->setupFilterControl($dataView); - $this->handleFormatRequest($dataView); - return $dataView; - } -} diff --git a/modules/monitoring/application/views/scripts/acknowledgement/index.phtml b/modules/monitoring/application/views/scripts/acknowledgement/index.phtml deleted file mode 100644 index 728b83f5b..000000000 --- a/modules/monitoring/application/views/scripts/acknowledgement/index.phtml +++ /dev/null @@ -1,104 +0,0 @@ - - -compact): ?> -
- tabs; ?> -
- render('list/components/selectioninfo.phtml'); ?> -
-

translate('Acknowledgements') ?>

- sortBox; ?> - limiter; ?> - paginator; ?> - filterEditor; ?> -
- -
- - - - acknowledgement_is_service ? - Service::getStateText($acknowledgement->state) : Host::getStateText($acknowledgement->state); - ?> - - - - - - - -
- icon('ok') ?> - timeAgo($acknowledgement->entry_time, $this->compact); ?> -
- translate( - 'State was %s.', - 'Describes the past host or service state when an acknowledgement was set.' - ), $state) ?> -
- acknowledgement_is_service): ?> - icon('service', $this->translate('Service Acknowledgement')) ?> - qlink( - $this->escape($acknowledgement->host) . ': ' . $this->escape($acknowledgement->service), - 'monitoring/service/show', - array( - 'service' => $acknowledgement->service, - 'host' => $acknowledgement->host - ), - array( - 'title' => sprintf( - $this->translate( - 'Show detailed information for this acknowledgement about service %s on host %s' - ), - $acknowledgement->service, - $acknowledgement->host - ), - 'class' => 'rowaction' - ) - ); ?> - - icon('host', $this->translate('Host Acknowledgement')) ?> - qlink( - $this->escape($acknowledgement->host), - 'monitoring/host/show', - array( - 'host' => $acknowledgement->host - ), - array( - 'title' => sprintf( - $this->translate('Show detailed information for this acknowledgement on host %s'), - $acknowledgement->host - ), - 'class' => 'rowaction' - ) - ); ?> - - -
- icon('comment_data', $this->translate('Comment')); ?> - author_name) ? '[' . $this->escape($acknowledgement->author_name) . '] ' : ''; ?> - escape($acknowledgement->comment_data); ?> - -
- is_sticky ? $this->icon( - 'attach', - $this->translate('Sticky, all notifications are disabled until the host or services recovers' - )) : ''; ?> - notify_contacts ? $this->icon( - 'bell', - $this->translate('Contacts are being notified about this acknowledgement.' - )) : ''; ?> - end_time ? sprintf( - $this->translate('Expires %s.'), - '' . $this->timeUntil($acknowledgement->end_time) . '' - ) : $this->translate('Does not expire.'); ?> -
- - - translate('No comments found matching the filter'); ?> - -
diff --git a/modules/monitoring/configuration.php b/modules/monitoring/configuration.php index 6172fa39f..c68ef6522 100644 --- a/modules/monitoring/configuration.php +++ b/modules/monitoring/configuration.php @@ -180,10 +180,6 @@ $section->add($this->translate('Downtimes'), array( 'url' => 'monitoring/list/downtimes', 'priority' => 80 )); -$section->add($this->translate('Acknowledgements'), array( - 'url' => 'monitoring/acknowledgement', - 'priority' => 90 -)); /* * History Section diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/AcknowledgementQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/AcknowledgementQuery.php deleted file mode 100644 index ac46fd36a..000000000 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/AcknowledgementQuery.php +++ /dev/null @@ -1,80 +0,0 @@ - array( - 'acknowledgement_id' => 'a.acknowledgement_id', - 'instance_id' => 'a.instance_id', - 'entry_time' => 'UNIX_TIMESTAMP(a.entry_time)', - 'object_id' => 'a.object_id', - 'state' => 'a.state', - 'author_name' => 'a.author_name', - 'comment_data' => 'a.comment_data', - 'is_sticky' => 'a.is_sticky', - 'persistent_comment' => 'a.persistent_comment', - 'acknowledgement_id' => 'a.acknowledgement_id', - 'notify_contacts' => 'a.notify_contacts', - 'end_time' => 'UNIX_TIMESTAMP(a.end_time)', - 'endpoint_object_id' => 'a.endpoint_object_id' - ), - 'objects' => array( - 'acknowledgement_is_service' => '(CASE WHEN o.objecttype_id = 2 THEN 1 ELSE 0 END)', - 'host' => 'o.name1', - 'service' => 'o.name2' - ) - ); - - /** - * @var Zend_Db_Select - */ - protected $acknowledgementQuery; - - /** - * {@inheritdoc} - */ - protected function joinBaseTables() - { - $this->acknowledgementQuery = $this->db->select(); - $this->select->from( - array('o' => $this->prefix . 'objects'), - array() - ); - $this->select->joinLeft( - array('hs' => $this->prefix . 'hoststatus'), - 'hs.host_object_id = o.object_id AND o.is_active = 1', - array() - ); - $this->select->joinLeft( - array('ss' => $this->prefix . 'servicestatus'), - 'ss.service_object_id = o.object_id AND o.is_active = 1', - array() - ); - $ackTable = $this->prefix . 'acknowledgements'; - $subQuery = '(SELECT MAX(acknowledgement_id) FROM ' . $ackTable . ' WHERE object_id = a.object_id)'; - $this->select->join( - array('a' => $ackTable), - 'o.object_id = a.object_id ' . - 'AND ((o.objecttype_id = 2 AND ss.problem_has_been_acknowledged = 1 AND ss.acknowledgement_type = 2) ' . - ' OR (o.objecttype_id = 1 AND hs.problem_has_been_acknowledged = 1 AND hs.acknowledgement_type = 2)) ' . - 'AND o.is_active = 1 AND a.acknowledgement_id = ' . $subQuery, - array() - ); - - $this->joinedVirtualTables['objects'] = true; - $this->joinedVirtualTables['acknowledgements'] = true; - $this->joinedVirtualTables['hoststatus'] = true; - $this->joinedVirtualTables['servicestatus'] = true; - } -} diff --git a/modules/monitoring/library/Monitoring/DataView/Acknowledgement.php b/modules/monitoring/library/Monitoring/DataView/Acknowledgement.php deleted file mode 100644 index fb3bb85df..000000000 --- a/modules/monitoring/library/Monitoring/DataView/Acknowledgement.php +++ /dev/null @@ -1,52 +0,0 @@ -