diff --git a/modules/monitoring/application/views/scripts/list/comments.phtml b/modules/monitoring/application/views/scripts/list/comments.phtml index 8810c6e67..248c40490 100644 --- a/modules/monitoring/application/views/scripts/list/comments.phtml +++ b/modules/monitoring/application/views/scripts/list/comments.phtml @@ -18,40 +18,14 @@ if (count($comments) === 0) {
- = $this->icon($icon, $tooltip) ?>
- - = $this->escape($title); ?> - - = $this->prefixedTimeSince($comment->timestamp); ?> + = $this->render('partials/comment/comment-description.phtml'); ?> |
objecttype === 'service'): ?>
diff --git a/modules/monitoring/application/views/scripts/partials/comment/comment-description.phtml b/modules/monitoring/application/views/scripts/partials/comment/comment-description.phtml
new file mode 100644
index 000000000..2c5f07133
--- /dev/null
+++ b/modules/monitoring/application/views/scripts/partials/comment/comment-description.phtml
@@ -0,0 +1,27 @@
+type) {
+ case 'flapping':
+ $icon = 'flapping';
+ $title = $this->translate('Flapping');
+ $tooltip = $this->translate('Comment was caused by a flapping host or service.');
+ break;
+ case 'comment':
+ $icon = 'user';
+ $title = $this->translate('User Comment');
+ $tooltip = $this->translate('Comment was created by an user.');
+ break;
+ case 'downtime':
+ $icon = 'plug';
+ $title = $this->translate('Downtime');
+ $tooltip = $this->translate('Comment was caused by a downtime.');
+ break;
+ case 'ack':
+ $icon = 'ok';
+ $title = $this->translate('Acknowledgement');
+ $tooltip = $this->translate('Comment was caused by an acknowledgement.');
+ break;
+}
+?>
+= $this->escape($title); ?> += $this->icon($icon, $tooltip) ?> += $this->prefixedTimeSince($comment->timestamp); ?> diff --git a/modules/monitoring/application/views/scripts/partials/comment/comment-detail.phtml b/modules/monitoring/application/views/scripts/partials/comment/comment-detail.phtml new file mode 100644 index 000000000..e31f1fdce --- /dev/null +++ b/modules/monitoring/application/views/scripts/partials/comment/comment-detail.phtml @@ -0,0 +1,18 @@ +objecttype === 'service'): ?> + = $this->icon('service', $this->translate('Service')); ?> + = $this->link()->service( + $comment->service_description, + $comment->service_display_name, + $comment->host_name, + $comment->host_display_name + ); ?> + + = $this->icon('host', $this->translate('Host')); ?> + = $this->link()->host($comment->host_name, $comment->host_display_name); ?> + + + += $this->icon('comment', $this->translate('Comment')); ?> = isset($comment->author) + ? '[' . $comment->author . '] ' + : ''; +?>= $this->escape($comment->comment); ?> diff --git a/modules/monitoring/application/views/scripts/partials/comment/comment-header.phtml b/modules/monitoring/application/views/scripts/partials/comment/comment-header.phtml index 6b9a5c53e..ce0eabe03 100644 --- a/modules/monitoring/application/views/scripts/partials/comment/comment-header.phtml +++ b/modules/monitoring/application/views/scripts/partials/comment/comment-header.phtml @@ -1,57 +1,10 @@
|