From 7614dcbbe850b7777d0eb71d35fdd5ace9f624e1 Mon Sep 17 00:00:00 2001 From: Matthias Jentsch Date: Tue, 22 Oct 2013 10:33:10 +0200 Subject: [PATCH] Improve layout of comment view Change each table row layout to display the data in horizontal rows instead of single columns fixes #4934 --- .../controllers/ListController.php | 3 +- .../views/scripts/list/comments.phtml | 100 ++++++++++-------- 2 files changed, 56 insertions(+), 47 deletions(-) diff --git a/modules/monitoring/application/controllers/ListController.php b/modules/monitoring/application/controllers/ListController.php index e0413a32a..601b8cab4 100644 --- a/modules/monitoring/application/controllers/ListController.php +++ b/modules/monitoring/application/controllers/ListController.php @@ -288,7 +288,8 @@ class Monitoring_ListController extends MonitoringController 'comment_timestamp' => 'Comment Timestamp', 'host_service' => 'Host and Service', 'comment_id' => 'Comment Id', - 'comment_expires' => 'Expiration Timestamp' + 'comment_expires' => 'Expiration Timestamp', + 'comment_type' => 'Comment Type' ) ); $this->handleFormatRequest($query); diff --git a/modules/monitoring/application/views/scripts/list/comments.phtml b/modules/monitoring/application/views/scripts/list/comments.phtml index bbde10f8a..964c4b1a6 100644 --- a/modules/monitoring/application/views/scripts/list/comments.phtml +++ b/modules/monitoring/application/views/scripts/list/comments.phtml @@ -16,7 +16,6 @@ $viewHelper = $this->getHelper('MonitoringState'); sortControl->render($this); ?> - paginationControl($comments, null, null, array('preserve' => $this->preserve)); ?> @@ -46,64 +45,73 @@ $viewHelper = $this->getHelper('MonitoringState'); ); ?> + + + + - - -
-
- - - - -
+ comment_timestamp); ?> + + comment_objecttype_id === '1'): ?> + + comment_objecttype_id === '2'): ?> + + + + comment_type) { + case 'flapping': + $icon = 'icinga-icon-flapping'; + $tooltip = 'Comment was caused by a flapping host or service.'; + break; + case 'comment': + $icon = 'icinga-icon-user'; + $tooltip = 'Comment was created by an user.'; + break; + case 'downtime': + $icon = 'icinga-icon-down'; + $tooltip = 'Comment was caused by a downtime.'; + case 'ack': + $icon = 'icinga-icon-acknowledgement'; + $tooltip = 'Comment was caused by an acknowledgement.'; + } + ?> + + + - comment_objecttype_id === '1'): ?> - - comment_objecttype_id === '2'): ?> - - - - - comment_type) { - case 'flapping': - $icon = 'icinga-icon-flapping'; - $tooltip = 'Comment is caused by a flapping host or service.'; - break; - } - ?> - - - + - comment_timestamp); ?> - - comment_author; ?> - + by + comment_author; ?>
comment_data; ?>
-
- comment_is_persistent === '1') ? 'Yes' : 'No'; ?> - + - expires
comment_expiration_timestamp) ? - 'at ' . date('d.m H:i', $comment->comment_expiration_timestamp) : - 'Never'; - ?>
+ + Persists: comment_is_persistent === '1') ? 'Yes' : 'No'; ?> + + + Expires: comment_expiration_timestamp) ? + 'at ' . date('d.m H:i', $comment->comment_expiration_timestamp) : + 'Never'; + ?> + +