diff --git a/modules/monitoring/application/views/scripts/list/comments.phtml b/modules/monitoring/application/views/scripts/list/comments.phtml index 4950b6166..ae83dced4 100644 --- a/modules/monitoring/application/views/scripts/list/comments.phtml +++ b/modules/monitoring/application/views/scripts/list/comments.phtml @@ -1,162 +1,137 @@ getHelper('DateFormat'); +$dateHelper = $this->getHelper('DateFormat'); +$commandHelper = $this->getHelper('CommandForm'); +$viewHelper = $this->getHelper('MonitoringState'); - /** @var Zend_View_Helper_CommandForm $commandHelper */ - $commandHelper = $this->getHelper('CommandForm'); - $viewHelper = $this->getHelper('MonitoringState'); ?> - -
-
-

Comments

-
-
- tabs->render($this); ?> -
+
+tabs ?> +sortControl->render($this); ?> +paginationControl($comments, null, null, array('preserve' => $this->preserve)); ?>
-
-
+
+ + + -
- sortControl->render($this); ?> + $objectType = ($comment->comment_objecttype_id === '1') ? 'host' : 'service'; + $objectName = ($objectType === 'host') ? $comment->host_name : $comment->service_name; + $hrefParameters = array( + $objectType => $objectName, + 'comment_id' => $comment->comment_id + ); + if ($objectType === 'service') { + $hrefParameters['host'] = $comment->host_name; + } + + $detailLink = $this->href( + 'monitoring/show/' . $objectType, + $hrefParameters + ); + + $hostLink = $this->href( + 'monitoring/show/host', + array( + 'host' => $comment->host_name + ) + ); + ?> +
+ + + + + - - - - - - - -
+ comment_timestamp); ?> + + comment_objecttype_id === '1'): ?> + img('img/icons/host.png', array('title' => 'Host comment')) ?> + comment_objecttype_id === '2'): ?> + img('img/icons/service.png', array('title' => 'Service comment')) ?> + + + comment_type) { + case 'flapping': + $icon = 'flapping'; + $tooltip = 'Comment was caused by a flapping host or service.'; + break; + case 'comment': + $icon = 'user'; + $tooltip = 'Comment was created by an user.'; + break; + case 'downtime': + $icon = 'down'; + $tooltip = 'Comment was caused by a downtime.'; + case 'ack': + $icon = 'acknowledgement'; + $tooltip = 'Comment was caused by an acknowledgement.'; + } + ?> + img('img/icons/' . $icon . '.png', array('title' => $tooltip)) ?> + + + + +
+ For + service_name): ?> + + service_name ?> + on + host_name; ?> + + + + host_name; ?> + + + by + comment_author; ?> +
+ comment_data; ?>
-
-
- paginationControl($comments, null, null, array('preserve' => $this->preserve)); ?> -
+ + + Persists: comment_is_persistent === '1') ? 'Yes' : 'No'; ?> + + + Expires: comment_expiration_timestamp) ? + 'at ' . date('d.m H:i', $comment->comment_expiration_timestamp) : + 'Never'; + ?> + + -
- selectionToolbar('single'); ?> -
- - - - - + + - + + + + + +
comment_objecttype_id === '1') ? 'host' : 'service'; - $objectName = ($objectType === 'host') ? $comment->host_name : $comment->service_name; - $hrefParameters = array( - $objectType => $objectName, - 'comment_id' => $comment->comment_id + $data = array( + 'commentid' => $comment->comment_id, + 'host' => $comment->host_name ); + if ($objectType === 'service') { - $hrefParameters['host'] = $comment->host_name; + $data['service'] = $comment->service_name; } - $detailLink = $this->href( - 'monitoring/show/' . $objectType, - $hrefParameters - ); - - $hostLink = $this->href( - 'monitoring/show/host', - array( - 'host' => $comment->host_name - ) + echo $commandHelper->iconSubmitForm( + 'img/icons/remove.png', + 'Remove comment', + 'btn-small', + 'removecomment', + $data ); ?> -
- comment_timestamp); ?> -
-
- comment_objecttype_id === '1'): ?> - img('img/icons/host.png', array('title' => 'Host comment')) ?> - comment_objecttype_id === '2'): ?> - img('img/icons/service.png', array('title' => 'Service comment')) ?> - - - comment_type) { - case 'flapping': - $icon = 'flapping'; - $tooltip = 'Comment was caused by a flapping host or service.'; - break; - case 'comment': - $icon = 'user'; - $tooltip = 'Comment was created by an user.'; - break; - case 'downtime': - $icon = 'down'; - $tooltip = 'Comment was caused by a downtime.'; - case 'ack': - $icon = 'acknowledgement'; - $tooltip = 'Comment was caused by an acknowledgement.'; - } - ?> - img('img/icons/' . $icon . '.png', array('title' => $tooltip)) ?> - - - - -
- For - service_name): ?> - - service_name ?> - on - host_name; ?> - - - - host_name; ?> - - - by - comment_author; ?> -
- comment_data; ?> -
- - - - Persists: comment_is_persistent === '1') ? 'Yes' : 'No'; ?> - - - Expires: comment_expiration_timestamp) ? - 'at ' . date('d.m H:i', $comment->comment_expiration_timestamp) : - 'Never'; - ?> - - - -
- $comment->comment_id, - 'host' => $comment->host_name - ); - - if ($objectType === 'service') { - $data['service'] = $comment->service_name; - } - - echo $commandHelper->iconSubmitForm( - 'icinga-icon-remove', - 'Remove comment', - 'btn-small', - 'removecomment', - $data - ); - ?> -
- -
- paginationControl($comments, null, null, array('preserve' => $this->preserve)); ?> -
diff --git a/modules/monitoring/application/views/scripts/list/downtimes.phtml b/modules/monitoring/application/views/scripts/list/downtimes.phtml index 02e381b41..224cc50cc 100644 --- a/modules/monitoring/application/views/scripts/list/downtimes.phtml +++ b/modules/monitoring/application/views/scripts/list/downtimes.phtml @@ -1,87 +1,59 @@ getHelper('CommandForm'); +$helper = $this->getHelper('CommandForm'); ?> -
-
-

Downtimes

-
-
- tabs->render($this); ?> -
-
- -
- -
-
-
- sortControl->render($this); ?> -
-
- -
- paginationControl($downtimes, null, null, array('preserve' => $this->preserve)); ?> -
- -
- selectionToolbar('single'); ?> -
-
- - paginationControl($downtimes, null, null, array('preserve' => $this->preserve)); ?> - - - - - - - - - -
- dateFormat()->formatDateTime((int) $downtime->downtime_start); ?> - - dateFormat()->formatDateTime((int) $downtime->downtime_end); ?> -
- Duration: util()->showHourMin((int) $downtime->downtime_duration); ?> -
- The downtime_is_flexible): ?>flexiblefixed downtime is downtime_is_in_effect): ?>not in effect -
- service)): ?> - service ?> - on host ?> - - host ?> - -
- downtime_author ?>: downtime_comment ?> -
- Entry Time: downtime_entry_time) ? $this->dateFormat()->formatDateTime((int) $downtime->downtime_entry_time) : ''; ?> - -
- $downtime->downtime_internal_downtime_id, - 'host' => $downtime->host - ); - if (isset($downtime->service)) { - $data['service'] = $downtime->service; - } - echo $commandHelper->iconSubmitForm( - 'icinga-icon-remove', - 'Remove Downtime', - 'btn-small', - 'removedowntime', - $data - ); - ?> -
- -
- paginationControl($downtimes, null, null, array('preserve' => $this->preserve)); ?> -
+
+tabs ?> +sortControl->render($this); ?> +paginationControl($downtimes, null, null, array('preserve' => $this->preserve)); ?>
+ + + + + + + + + +
+ dateFormat()->formatDateTime((int) $downtime->downtime_start); ?> - + dateFormat()->formatDateTime((int) $downtime->downtime_end); ?> +
+ Duration: util()->showHourMin((int) $downtime->downtime_duration); ?> +
+ The downtime_is_flexible): ?>flexiblefixed downtime is downtime_is_in_effect): ?>not in effect +
+ service)): ?> + service ?> + on host ?> + + host ?> + +
+ downtime_author ?>: downtime_comment ?> +
+ Entry Time: downtime_entry_time) ? $this->dateFormat()->formatDateTime((int) $downtime->downtime_entry_time) : ''; ?> + +
+ $downtime->downtime_internal_downtime_id, + 'host' => $downtime->host + ); + if (isset($downtime->service)) { + $data['service'] = $downtime->service; + } + echo $helper->iconSubmitForm( + 'img/icons/remove.png', + 'Remove Downtime', + 'btn-small', + 'removedowntime', + $data + ); + ?> +
diff --git a/modules/monitoring/application/views/scripts/list/hostgroups.phtml b/modules/monitoring/application/views/scripts/list/hostgroups.phtml index 3c59b50db..efe2fd40a 100644 --- a/modules/monitoring/application/views/scripts/list/hostgroups.phtml +++ b/modules/monitoring/application/views/scripts/list/hostgroups.phtml @@ -1,29 +1,22 @@
tabs ?> -paginationControl($hostgroups, null, null, array('preserve' => $this->preserve)); ?> - - - - - - - -
HostsServices
- - - +
+
-
- -
- + + - +
+ hostgroup; ?> + ?>">hostgroup; ?> hosts_up): ?> + + + + + Services services_ok): ?> @@ -97,7 +91,8 @@ 'monitoring/list/services', array( 'service_state' => 2, - 'hostgroup' => $h->hostgroup + 'hostgroup' => $h->hostgroup, + 'sort' => 'service_severity' )) ?>" title="Services Critical">services_critical ?> CRITICAL: services_critical_unhandled): ?> @@ -106,7 +101,8 @@ array( 'service_state' => 2, 'service_unhandled' => 1, - 'hostgroup' => $h->hostgroup + 'hostgroup' => $h->hostgroup, + 'sort' => 'service_severity' ) ) ?>" title="Services Critical Unhandled">services_critical_unhandled ?> Unhandled @@ -178,8 +174,8 @@ ) ?>" title="Services Pending">services_pending ?> -
+ -
+
+
diff --git a/modules/monitoring/application/views/scripts/list/hosts.phtml b/modules/monitoring/application/views/scripts/list/hosts.phtml index bb0e4f241..63c7ed254 100644 --- a/modules/monitoring/application/views/scripts/list/hosts.phtml +++ b/modules/monitoring/application/views/scripts/list/hosts.phtml @@ -1,16 +1,22 @@ getHelper('MonitoringState'); +$helper = $this->getHelper('MonitoringState'); ?>
tabs ?> +
filterBox->render($this); ?> -sortControl->render($this); ?>
-paginationControl($hosts, null, null, array('preserve' => $this->preserve)); ?> +
+
+sortControl->render($this); ?> +

+
selectionToolbar('multi', $this->href('monitoring/multi/host',array( 'host' => '*' ))); ?>
+paginationControl($hosts, null, null, array('preserve' => $this->preserve)); ?> +
count() === 0) { echo '

No host found

'; return; @@ -18,107 +24,93 @@ if ($hosts->count() === 0) { ?> - - - util()->getHostStateName($host->host_state)); ?> - href('monitoring/show/host', array('host' => $host->host_name)); ?> - - - - - - - - + if (!$host->host_active_checks_enabled) { + if (!$host->host_passive_checks_enabled) { + $icons[] = $this->img('img/icons/active_passive_checks_disabled.png', array( + 'title' => 'Active And Passive Checks Disabled' + )); + } else { + $icons[] = $this->img('img/icons/active_checks_disabled.png', array( + 'title' => 'Active Checks Disabled' + )); + } + } - - + + - - - -
-
- host_unhandled_service_count) && $host->host_unhandled_service_count > 0): ?> - - - host_unhandled_service_count; ?> - - - + if (!$host->host_in_downtime) { + $icons[] = $this->img('img/icons/in_downtime.png', array( + 'title' => 'In Downtime' + )); + } - monitoringState($host, 'host')); ?>
-
- Since timeSince($host->host_last_state_change); ?> - host_state > 0): ?> -
- host_state_type === '1') ? 'Hard' : 'Soft'; ?> host_current_check_attempt; ?>/host_max_check_attempts; ?> - -
-
-
- host_icon_image) : ?> -
- -
- - - host_name ?> - + // Not available right now: + if (isset($host->host_last_comment) && $host->host_last_comment !== null) { + $icons[] = $this->img('img/icons/comment.png', array( + 'title' => 'Comments' + )); + } +?> +
+
+ host_unhandled_service_count) && $host->host_unhandled_service_count > 0): ?> + + host_unhandled_service_count; ?> + + -
- escape(substr(strip_tags($host->host_output), 0, 10000)); ?> -
-
+ monitoringState($host, 'host')); ?>
+
+ Since timeSince($host->host_last_state_change); ?> + host_state > 0): ?> +
+ host_state_type === '1') ? 'Hard' : 'Soft'; ?> host_current_check_attempt; ?>/host_max_check_attempts; ?> + +
+
+ + + + + host_icon_image) : ?> + img($this->resolveMacros($host->host_icon_image, $host), array('align' => 'right')) ?> + + host_name ?>
+ escape(substr(strip_tags($host->host_output), 0, 10000)); ?> + + + + +
diff --git a/modules/monitoring/application/views/scripts/list/services.phtml b/modules/monitoring/application/views/scripts/list/services.phtml index 7ba68827e..247c45021 100644 --- a/modules/monitoring/application/views/scripts/list/services.phtml +++ b/modules/monitoring/application/views/scripts/list/services.phtml @@ -9,7 +9,8 @@ $helper = $this->getHelper('MonitoringState');
sortControl->render($this); ?>

-selectionToolbar('multi', $this->href('monitoring/multi/service', array( 'service' => '*', 'host' => '*' ))); ?> paginationControl($services, null, null, array('preserve' => $this->preserve)); ?> +
+selectionToolbar('multi', $this->href('monitoring/multi/service', array( 'service' => '*', 'host' => '*' ))); ?>
paginationControl($services, null, null, array('preserve' => $this->preserve)); ?>
@@ -92,7 +93,7 @@ foreach ($services as $service): --> - monitoringState($service, 'service')); ?>
+ monitoringState($service, 'service')); ?>
Since timeSince($service->service_last_state_change); ?> @@ -106,6 +107,7 @@ foreach ($services as $service): + perfdata($service->service_perfdata, true) ?>