diff --git a/modules/monitoring/application/controllers/CommentController.php b/modules/monitoring/application/controllers/CommentController.php
new file mode 100644
index 000000000..8d700770b
--- /dev/null
+++ b/modules/monitoring/application/controllers/CommentController.php
@@ -0,0 +1,88 @@
+params->get('comment_id');
+
+ $this->comment = $this->backend->select()->from('comment', array(
+ 'id' => 'comment_internal_id',
+ 'objecttype' => 'comment_objecttype',
+ 'comment' => 'comment_data',
+ 'author' => 'comment_author_name',
+ 'timestamp' => 'comment_timestamp',
+ 'type' => 'comment_type',
+ 'persistent' => 'comment_is_persistent',
+ 'expiration' => 'comment_expiration',
+ 'host_name',
+ 'service_description',
+ 'host_display_name',
+ 'service_display_name'
+ ))->where('comment_internal_id', $commentId)->getQuery()->fetchRow();
+
+ if (false === $this->comment) {
+ throw new Zend_Controller_Action_Exception($this->translate('Comment not found'));
+ }
+
+ $this->getTabs()
+ ->add(
+ 'comment',
+ array(
+ 'title' => $this->translate(
+ 'Display detailed information about a comment.'
+ ),
+ 'icon' => 'comment',
+ 'label' => $this->translate('Comment'),
+ 'url' =>'monitoring/comments/show'
+ )
+ )->activate('comment')->extend(new DashboardAction());
+ }
+
+ public function showAction()
+ {
+ $this->view->comment = $this->comment;
+ if ($this->hasPermission('monitoring/command/comment/delete')) {
+ $this->view->delCommentForm = $this->createDelCommentForm();
+ }
+ }
+
+ private function createDelCommentForm()
+ {
+ $this->assertPermission('monitoring/command/comment/delete');
+
+ $delCommentForm = new DeleteCommentCommandForm();
+ $delCommentForm->setAction(
+ Url::fromPath('monitoring/comment/show')
+ ->setParam('comment_id', $this->comment->id)
+ );
+ $delCommentForm->populate(
+ array(
+ 'redirect' => Url::fromPath('monitoring/list/comments'),
+ 'comment_id' => $this->comment->id
+ )
+ );
+ $delCommentForm->handleRequest();
+ return $delCommentForm;
+ }
+}
diff --git a/modules/monitoring/application/views/scripts/comment/show.phtml b/modules/monitoring/application/views/scripts/comment/show.phtml
new file mode 100644
index 000000000..c5492a1cf
--- /dev/null
+++ b/modules/monitoring/application/views/scripts/comment/show.phtml
@@ -0,0 +1,76 @@
+
+ compact): ?>
+ = $this->tabs; ?>
+
+
+ = $this->render('partials/comment/comment-header.phtml'); ?>
+
+
+
+
= $this->translate('Comment detail information') ?>
+
+
+
+ comment->objecttype === 'service'): ?>
+ = $this->translate('Service') ?> |
+
+ = $this->icon('service', $this->translate('Service')); ?>
+ = $this->link()->service(
+ $this->comment->service_description,
+ $this->comment->service_display_name,
+ $this->comment->host_name,
+ $this->comment->host_display_name
+ ); ?>
+ |
+
+ = $this->translate('Host') ?> |
+
+ = $this->icon('host', $this->translate('Host')); ?>
+ = $this->link()->host(
+ $this->comment->host_name,
+ $this->comment->host_display_name
+ ); ?>
+ |
+
+
+
+
+ = $this->translate('Author') ?> |
+ = $this->icon('user', $this->translate('User')) ?> = $this->escape($this->comment->author) ?> |
+
+
+
+ = $this->translate('Persistent') ?> |
+ = $this->escape($this->comment->persistent) ? $this->translate('Yes') : $this->translate('No') ?> |
+
+
+
+ = $this->translate('Created') ?> |
+ = date('d.m.y H:i' ,$this->escape($this->comment->timestamp)) ?> |
+
+
+
+ = $this->translate('Expires') ?> |
+
+ = $this->comment->expiration ? sprintf(
+ $this->translate('This comment expires on %s at %s.'),
+ date('d.m.y', $this->comment->expiration),
+ date('H:i', $this->comment->expiration)
+ ) : $this->translate('This comment does not expire.'); ?>
+ |
+
+
+
+
+ = $this->translate('Commands') ?> |
+
+ = $delCommentForm ?>
+ |
+
+
+
+
+
+
+
+
diff --git a/modules/monitoring/application/views/scripts/list/comments.phtml b/modules/monitoring/application/views/scripts/list/comments.phtml
index 9f383345c..8810c6e67 100644
--- a/modules/monitoring/application/views/scripts/list/comments.phtml
+++ b/modules/monitoring/application/views/scripts/list/comments.phtml
@@ -15,7 +15,10 @@ if (count($comments) === 0) {
return;
}
?>
-