= $this->translate('Comment detail information') ?>
-= $this->translate('Service') ?> |
diff --git a/modules/monitoring/application/views/scripts/comments/show.phtml b/modules/monitoring/application/views/scripts/comments/show.phtml
index d1c8431ee..67e1c6be1 100644
--- a/modules/monitoring/application/views/scripts/comments/show.phtml
+++ b/modules/monitoring/application/views/scripts/comments/show.phtml
@@ -6,7 +6,7 @@
-
= $this->icon('reschedule') ?>= $this->translate('Commands') ?>+= $this->translate('Commands') ?>= $this->qlink( sprintf($this->translate('Remove %d comments'), $comments->count()), $removeAllLink, diff --git a/modules/monitoring/application/views/scripts/hosts/show.phtml b/modules/monitoring/application/views/scripts/hosts/show.phtml index 053c44520..fe336f101 100644 --- a/modules/monitoring/application/views/scripts/hosts/show.phtml +++ b/modules/monitoring/application/views/scripts/hosts/show.phtml @@ -11,10 +11,10 @@
-
+
+
|
---|
+ | = $this->partial('partials/comment/comment-description.phtml', array('comment' => $comment)); ?> |
- objecttype === 'service'): ?>
- = $this->icon('service', $this->translate('Service')); ?> = $this->qlink(
- $this->escape($comment->host_display_name) . ': ' . $this->escape($comment->service_display_name),
- 'monitoring/comment/show',
- array('comment_id' => $comment->id),
- array(
- 'title' => sprintf(
- $this->translate('Show detailed information for this comment about service %s on host %s'),
- $comment->service_display_name,
- $comment->host_display_name
- ),
- 'class' => 'rowaction'
- )
- ); ?>
-
- = $this->icon('host', $this->translate('Host')); ?> = $this->qlink(
- $this->escape($comment->host_display_name),
- 'monitoring/comment/show',
- array('comment_id' => $comment->id),
- array(
- 'title' => sprintf(
- $this->translate('Show detailed information for this comment about host %s'),
- $comment->host_display_name
- ),
- 'class' => 'rowaction'
- )
- ); ?>
-
- - = $this->icon('comment', $this->translate('Comment')); ?> = isset($comment->author) - ? '[' . $this->escape($comment->author) . '] ' - : ''; - ?>= $this->escape($comment->comment); ?> - - = $comment->persistent - ? $this->translate('This comment is persistent.') - : $this->translate('This comment is not persistent.'); - ?> - - = $comment->expiration ? sprintf( - $this->translate('This comment expires %s.'), - $this->timeUntil($comment->expiration) - ) : $this->translate('This comment does not expire.'); ?> - |
-
- - populate( + = $this->partial( + 'partials/comment/comment-detail.phtml', array( - 'comment_id' => $comment->id, - 'comment_is_service' => isset($comment->service_description) - ) - ); - echo $delCommentForm; - ?> + 'comment' => $comment, + 'delCommentForm' => $delCommentForm // Form is unset if the current user lacks the respective permission + )) ?> | -
-= $this->icon($icon, $tooltip) ?> -= $this->timeAgo($comment->timestamp, $this->compact) ?> + + = $this->icon($icon, $tooltip); ?> + diff --git a/modules/monitoring/application/views/scripts/partials/comment/comment-detail.phtml b/modules/monitoring/application/views/scripts/partials/comment/comment-detail.phtml index 9d5da0648..1b78fbcf0 100644 --- a/modules/monitoring/application/views/scripts/partials/comment/comment-detail.phtml +++ b/modules/monitoring/application/views/scripts/partials/comment/comment-detail.phtml @@ -1,17 +1,59 @@ -objecttype === 'service'): ?> - = $this->icon('service', $this->translate('Service')) ?> - = sprintf( - '%s: %s', - $comment->host_display_name, - $comment->service_display_name - ) ?> - - = $this->icon('host', $this->translate('Host')) ?> - = $this->link()->host($comment->host_name, $comment->host_display_name) ?> - + + objecttype === 'service'): ?> + = $this->icon('service', $this->translate('Service')); ?> = $this->qlink( + $this->escape($comment->host_display_name) . ': ' . $this->escape($comment->service_display_name), + 'monitoring/comment/show', + array('comment_id' => $comment->id), + array( + 'title' => sprintf( + $this->translate('Show detailed information for this comment about service %s on host %s'), + $comment->service_display_name, + $comment->host_display_name + ), + 'class' => 'rowaction' + ) + ); ?> + + = $this->icon('host', $this->translate('Host')); ?> = $this->qlink( + $this->escape($comment->host_display_name), + 'monitoring/comment/show', + array('comment_id' => $comment->id), + array( + 'title' => sprintf( + $this->translate('Show detailed information for this comment about host %s'), + $comment->host_display_name + ), + 'class' => 'rowaction' + ) + ); ?> + + = $this->translate('by') ?> + = $this->escape($comment->author) ?> + + = $this->timeAgo($comment->timestamp) ?> + + + = $comment->persistent ? $this->icon('attach', 'This comment is persistent.') : ''; ?> + = $comment->expiration ? $this->icon('clock', sprintf( + $this->translate('This comment expires %s.'), + $this->timeUntil($comment->expiration) + )) : '' ?> + populate( + array( + 'comment_id' => $comment->id, + 'comment_is_service' => isset($comment->service_description) + ) + ); + echo $delCommentForm; + } + ?> + + +
-= $this->icon('comment', $this->translate('Comment')) ?> -author)): ?> - [= $this->escape($comment->author) ?>] - -= $this->escape($comment->comment) ?> + + = $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 c3e0fadda..3dcb479cd 100644 --- a/modules/monitoring/application/views/scripts/partials/comment/comment-header.phtml +++ b/modules/monitoring/application/views/scripts/partials/comment/comment-header.phtml @@ -1,10 +1,10 @@ -
- = $this->render('partials/comment/comment-description.phtml'); ?>
+
= Host::getStateText($host->host_state, true); ?> |
+
+ = Host::getStateText($host->host_state, true); ?>
+ |
+
= $this->iconImage()->host($host) ?>
= implode(' ', $this->hostFlags($host)) ?>
diff --git a/modules/monitoring/application/views/scripts/partials/service/objects-header.phtml b/modules/monitoring/application/views/scripts/partials/service/objects-header.phtml
index 907e7b349..d75de6029 100644
--- a/modules/monitoring/application/views/scripts/partials/service/objects-header.phtml
+++ b/modules/monitoring/application/views/scripts/partials/service/objects-header.phtml
@@ -12,8 +12,10 @@ $i = 0;
continue;
}
?>
- | = Service::getStateText($service->service_state, true); ?> |
+
+ = Service::getStateText($service->service_state, true); ?> |
+
= $this->iconImage()->service($service) ?>
= implode(' ', $this->serviceFlags($service)) ?>
diff --git a/modules/monitoring/public/css/tables.less b/modules/monitoring/public/css/tables.less
index d8ede2163..07413ae02 100644
--- a/modules/monitoring/public/css/tables.less
+++ b/modules/monitoring/public/css/tables.less
@@ -68,3 +68,21 @@
text-align: center;
width: 100px;
}
+
+.comment-col {
+ padding-top: 0.5em;
+ vertical-align: top;
+ width: 3em;
+}
+
+.comment-content {
+ line-height: 1.5em;
+ padding-top: 0.4em;
+ padding-bottom: 0.7em;
+ max-width: 15em;
+ color: @text-color-light;
+}
+
+.comment-header {
+ line-height: 1.8em;
+}
| |