diff --git a/modules/monitoring/application/views/scripts/show/components/comments.phtml b/modules/monitoring/application/views/scripts/show/components/comments.phtml index cf7c2ede9..adcb9e9d3 100644 --- a/modules/monitoring/application/views/scripts/show/components/comments.phtml +++ b/modules/monitoring/application/views/scripts/show/components/comments.phtml @@ -1,19 +1,49 @@
- Comments - comments)): ?> -
- comments as $comment): ?> -

- escape($comment->comment_author), - $this->format()->timeSince($comment->comment_timestamp), - $comment->comment_type, - $comment->comment_data - ); ?> - {{REMOVE_ICON}} -

- -
- +
+
+ Comments + $object->host_name + ); + if ($object->service_description) { + $data['service'] = $object->service_description; + } + $addCommentHref = $this->href( + 'monitoring/command/addComment', + $data + ); + $sendNotificationHref = $this->href( + 'monitoring/command/sendCustomNotification', + $data + ); + ?> + +
+
+
+
+ + + comments as $comment): ?> + + + + + +
+ escape($comment->comment_author); ?>, comment_type; ?> + (format()->timeSince($comment->comment_timestamp); ?>) +
+ escape($comment->comment_data); ?> +
+
+
diff --git a/modules/monitoring/application/views/scripts/show/components/status.phtml b/modules/monitoring/application/views/scripts/show/components/status.phtml index e26f0bc0c..bf282d762 100644 --- a/modules/monitoring/application/views/scripts/show/components/status.phtml +++ b/modules/monitoring/application/views/scripts/show/components/status.phtml @@ -4,8 +4,10 @@ if ($type === 'host') { $objectStateName = strtolower($this->util()->getHostStateName($this->object->host_state)); + $objectState = (int) $object->host_state; } else { $objectStateName = strtolower($this->util()->getServiceStateName($this->object->service_state)); + $objectState = (int) $object->service_state; } ?>
@@ -71,7 +73,12 @@

pluginOutput($object->output); ?>

- + + 0): ?> + + + +
@@ -88,6 +95,17 @@ + is_flapping): ?> +
+
+ Flapping +
+
+ percent_state_change) ?>% state change +
+
+ +
Last Check @@ -112,5 +130,44 @@
+ + 0): ?> + service_description) { + $notificationsHref = $this->href( + 'monitoring/list/notifications', + array( + 'host' => $object->host_name, + 'service' => $object->service_description + ) + ); + } else { + $notificationsHref = $this->href( + 'monitoring/list/notifications', + array( + 'host' => $object->host_name + ) + ); + } + ?> +
+
+ Last Notification +
+
+ + last_notification === '0000-00-00 00:00:00'): ?> + N/A + + last_notification ?> + current_notification_number > 0): ?> +
+ current_notification_number ?> notifications sent during current problem state + + +
+
+
+ \ No newline at end of file diff --git a/modules/monitoring/application/views/scripts/show/service.phtml b/modules/monitoring/application/views/scripts/show/service.phtml index 4fab84322..e3b322b08 100644 --- a/modules/monitoring/application/views/scripts/show/service.phtml +++ b/modules/monitoring/application/views/scripts/show/service.phtml @@ -1,11 +1,9 @@ tabs->render($this); ?> render('show/components/status.phtml'); ?> -render('show/components/command.phtml') ?> -render('show/components/downtime.phtml'); ?> render('show/components/comments.phtml'); ?> -render('show/components/properties.phtml'); ?> +render('show/components/downtime.phtml'); ?> render('show/components/flags.phtml'); ?> render('show/components/customvars.phtml'); ?> render('show/components/servicegroups.phtml'); ?> render('show/components/contacts.phtml'); ?> -render('show/components/eventHistory.phtml'); ?> +render('show/components/command.phtml') ?> diff --git a/modules/monitoring/library/Monitoring/Object/Host.php b/modules/monitoring/library/Monitoring/Object/Host.php index 33b1df745..1a2b69ca5 100644 --- a/modules/monitoring/library/Monitoring/Object/Host.php +++ b/modules/monitoring/library/Monitoring/Object/Host.php @@ -44,14 +44,16 @@ class Host extends AbstractObject 'in_downtime' => 'host_in_downtime', 'host_acknowledged', 'host_last_state_change', - 'last_check' => 'host_last_check', - 'next_check' => 'host_next_check', - 'check_execution_time' => 'host_check_execution_time', - 'check_latency' => 'host_check_latency', - 'output' => 'host_output', - 'long_output' => 'host_long_output', - 'check_command' => 'host_check_command', - 'perfdata' => 'host_perfdata', + 'last_state_change' => 'host_last_state_change', + 'last_notification' => 'host_last_notification', + 'last_check' => 'host_last_check', + 'next_check' => 'host_next_check', + 'check_execution_time' => 'host_check_execution_time', + 'check_latency' => 'host_check_latency', + 'output' => 'host_output', + 'long_output' => 'host_long_output', + 'check_command' => 'host_check_command', + 'perfdata' => 'host_perfdata', 'host_icon_image', 'passive_checks_enabled' => 'host_passive_checks_enabled', 'obsessing' => 'host_obsessing', @@ -67,7 +69,8 @@ class Host extends AbstractObject 'is_flapping' => 'host_is_flapping', 'last_comment' => 'host_last_comment', 'action_url' => 'host_action_url', - 'notes_url' => 'host_notes_url' + 'notes_url' => 'host_notes_url', + 'percent_state_change' => 'host_percent_state_change' ))->where('host_name', $this->name1)->fetchRow(); } }