diff --git a/modules/monitoring/application/views/scripts/show/components/comments.phtml b/modules/monitoring/application/views/scripts/show/components/comments.phtml index adcb9e9d3..fff7bd1f9 100644 --- a/modules/monitoring/application/views/scripts/show/components/comments.phtml +++ b/modules/monitoring/application/views/scripts/show/components/comments.phtml @@ -32,9 +32,21 @@
+ comments)): ?> + + + + comments as $comment): ?>
No comments
+
+
+ +
+
escape($comment->comment_author); ?>, comment_type; ?> (format()->timeSince($comment->comment_timestamp); ?>)
diff --git a/modules/monitoring/application/views/scripts/show/components/customvars.phtml b/modules/monitoring/application/views/scripts/show/components/customvars.phtml index a4419729f..093052245 100644 --- a/modules/monitoring/application/views/scripts/show/components/customvars.phtml +++ b/modules/monitoring/application/views/scripts/show/components/customvars.phtml @@ -1,23 +1,13 @@ - -
+
- Customvariables +
+ Custom Variables +
+
+
- customvars) && count($object->customvars)) { ?> - - - - - - customvars as $name => $value) { ?> - - - - - -
NameValue
escape($name) ?>escape($value) ?>
- + object); ?>
-
+
\ No newline at end of file diff --git a/modules/monitoring/application/views/scripts/show/components/downtime.phtml b/modules/monitoring/application/views/scripts/show/components/downtime.phtml index 0eaa14b3d..9003e0184 100644 --- a/modules/monitoring/application/views/scripts/show/components/downtime.phtml +++ b/modules/monitoring/application/views/scripts/show/components/downtime.phtml @@ -28,20 +28,68 @@ } ?> -
+
- {{IN_DOWNTIME_ICON}}Downtimes +
+ +
+ $this->object->host_name, + 'service' => $this->object->service_description + ); + + $scheduleDowntimeHref = $this->href('monitoring/command/scheduleDowntime', $scheduleDowntimeData); + ?> + + + +
+ Downtimes +
+
- {{SCHEDULE_DOWNTIME_COMMAND_BUTTON}}
- downtimes)): ?> - - - ', $list); ?> - +
+ + object->downtimes)): ?> + + + + + object->downtimes as $downtime): ?> + + + + +
No Downtimes
+
+
+ + + + + +
+
+ downtime_is_in_effect === '1'): ?> + Running since timeSince($downtime->downtime_actual_start_time); ?> + + downtime_is_fixed): ?> + Scheduled for downtime_scheduled_start_time; ?> + + Waiting + + + + Triggered by downtime_author_name; ?> + +
+ downtime_comment_data; ?> +
+
- - Not in downtime -
diff --git a/modules/monitoring/application/views/scripts/show/components/flags.phtml b/modules/monitoring/application/views/scripts/show/components/flags.phtml index 68b50c44a..222e23c4e 100644 --- a/modules/monitoring/application/views/scripts/show/components/flags.phtml +++ b/modules/monitoring/application/views/scripts/show/components/flags.phtml @@ -1,22 +1,50 @@ -
-
Heading
+object; +?> +
+
+
+ Configuration +
+
+ +
+
- - monitoringFlags($object) as $flag => $enabled): ?> - - - - - - +
- - {{ENABLED_ICON}} ENABLED - - {{DISABLED_ICON}} DISABLED - - - {{{ENABLE_OR_DISABLE_COMMAND}}} -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Passive Checks
passive_checks_enabled === '1') ? 'checked="true"' : '' ?> />
Active Checksactive_checks_enabled === '1') ? 'checked="true"' : '' ?> />
Obsessingobsessing === '1') ? 'checked="true"' : '' ?> />
Notificationsnotifications_enabled === '1') ? 'checked="true"' : '' ?> />
Event Handlerevent_handler_enabled === '1') ? 'checked="true"' : '' ?> />
Flap Detectionflap_detection_enabled === '1') ? 'checked="true"' : '' ?> />
diff --git a/modules/monitoring/application/views/scripts/show/components/properties.phtml b/modules/monitoring/application/views/scripts/show/components/properties.phtml index 37fc1ebc1..23e71ac60 100644 --- a/modules/monitoring/application/views/scripts/show/components/properties.phtml +++ b/modules/monitoring/application/views/scripts/show/components/properties.phtml @@ -1,93 +1,26 @@ -
-
Properties
-
- - - - - - - - - - - - - - - - - - - - - - - - - -
Current Attempt - current_check_attempt, - $object->max_check_attempts, - ($object->state_type === '1') ? 'HARD' : 'SOFT' - ); ?> -
Check Type - passive_checks_enabled === '1' && $object->active_checks_enabled === '0'): ?> - PASSIVE - passive_checks_enabled === '0' && $object->active_checks_enabled === '0'): ?> - DISABLED - - ACTIVE - -
Check Latency / Duration - passive_checks_enabled === '0' && $object->active_checks_enabled === '0'): ?> - N/A - - check_latency); ?> / check_execution_time); ?> seconds - -
Last Notification - 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 === '0000-00-00 00:00:00'): ?> - N/A - - last_notification ?> - current_notification_number > 0): ?> -
- current_notification_number ?> notifications sent during current problem state - - -
-
Is This service_description ? 'Service' : 'Host' ?> Flapping? - is_flapping === '1'): ?> - YES - - NO - - percent_state_change); ?>% state change -
In Scheduled Downtime? - in_downtime === '1'): ?> - YES - - NO - -
+
+
+
+ Check Statistics +
-
+ +
+
+
+
Latency
+
object->check_execution_time); ?>s
+
+
+
Duration
+
object->check_latency); ?>s
+
+
+
Attempt
+
+ object->current_check_attempt; ?>/object->max_check_attempts; ?> + (object->host_state_type === '1') ? 'Hard' : 'Soft'; ?>) +
+
+
+
\ No newline at end of file diff --git a/modules/monitoring/application/views/scripts/show/host.phtml b/modules/monitoring/application/views/scripts/show/host.phtml index f54192e77..0b0166efd 100644 --- a/modules/monitoring/application/views/scripts/show/host.phtml +++ b/modules/monitoring/application/views/scripts/show/host.phtml @@ -1,17 +1,10 @@ +tabs->render($this); ?> render('show/components/status.phtml'); ?> - +render('show/components/comments.phtml'); ?> render('show/components/downtime.phtml'); ?> - render('show/components/properties.phtml'); ?> - render('show/components/flags.phtml'); ?> - -render('show/components/hostgroups.phtml'); ?> - -render('show/components/eventHistory.phtml'); ?> - -render('show/components/contacts.phtml'); ?> - render('show/components/customvars.phtml'); ?> - -render('show/components/command.phtml'); ?> +render('show/components/servicegroups.phtml'); ?> +render('show/components/contacts.phtml'); ?> +render('show/components/command.phtml') ?> diff --git a/modules/monitoring/application/views/scripts/show/service.phtml b/modules/monitoring/application/views/scripts/show/service.phtml index e3b322b08..0b0166efd 100644 --- a/modules/monitoring/application/views/scripts/show/service.phtml +++ b/modules/monitoring/application/views/scripts/show/service.phtml @@ -2,6 +2,7 @@ render('show/components/status.phtml'); ?> render('show/components/comments.phtml'); ?> render('show/components/downtime.phtml'); ?> +render('show/components/properties.phtml'); ?> render('show/components/flags.phtml'); ?> render('show/components/customvars.phtml'); ?> render('show/components/servicegroups.phtml'); ?> diff --git a/modules/monitoring/library/Monitoring/Object/AbstractObject.php b/modules/monitoring/library/Monitoring/Object/AbstractObject.php index 799fe171e..40ae632b5 100644 --- a/modules/monitoring/library/Monitoring/Object/AbstractObject.php +++ b/modules/monitoring/library/Monitoring/Object/AbstractObject.php @@ -167,4 +167,33 @@ abstract class AbstractObject ); return $this; } + + public function fetchDowtimes() + { + $this->foreign['downtimes'] = $this->applyObjectFilter( + $this->backend->select()->from('downtime', array( + 'host_name', + 'object_type', + 'service_host_name', + 'service_description', + 'downtime_type', + 'downtime_author_name', + 'downtime_comment_data', + 'downtime_is_fixed', + 'downtime_duration', + 'downtime_entry_time', + 'downtime_scheduled_start_time', + 'downtime_scheduled_end_time', + 'downtime_was_started', + 'downtime_actual_start_time', + 'downtime_actual_start_time_usec', + 'downtime_is_in_effect', + 'downtime_trigger_time', + 'downtime_triggered_by_id', + 'downtime_internal_downtime_id' + ) + ) + )->fetchAll(9); + return $this; + } } diff --git a/modules/monitoring/library/Monitoring/Object/Host.php b/modules/monitoring/library/Monitoring/Object/Host.php index 1a2b69ca5..ad540d49d 100644 --- a/modules/monitoring/library/Monitoring/Object/Host.php +++ b/modules/monitoring/library/Monitoring/Object/Host.php @@ -12,6 +12,7 @@ class Host extends AbstractObject 'contactgroups' => null, 'customvars' => null, 'comments' => null, + 'downtimes' => null ); public function stateName() @@ -30,7 +31,8 @@ class Host extends AbstractObject ->fetchContacts() ->fetchContactgroups() ->fetchCustomvars() - ->fetchComments(); + ->fetchComments() + ->fetchDowtimes(); } protected function fetchObject() @@ -41,6 +43,7 @@ class Host extends AbstractObject 'host_address', 'host_state', 'host_handled', + 'host_in_downtime', 'in_downtime' => 'host_in_downtime', 'host_acknowledged', 'host_last_state_change', diff --git a/modules/monitoring/library/Monitoring/Object/Service.php b/modules/monitoring/library/Monitoring/Object/Service.php index 602380dcb..17e693acd 100644 --- a/modules/monitoring/library/Monitoring/Object/Service.php +++ b/modules/monitoring/library/Monitoring/Object/Service.php @@ -12,6 +12,7 @@ class Service extends AbstractObject 'contactgroups' => null, 'customvars' => null, 'comments' => null, + 'downtimes' => null ); public function stateName() @@ -31,7 +32,8 @@ class Service extends AbstractObject ->fetchContacts() ->fetchContactgroups() ->fetchCustomvars() - ->fetchComments(); + ->fetchComments() + ->fetchDowtimes(); } protected function fetchObject() diff --git a/public/css/main.css b/public/css/main.css index d6422a464..7726c1d6a 100644 --- a/public/css/main.css +++ b/public/css/main.css @@ -149,6 +149,22 @@ th { border-bottom: 2px solid #ddd; } + +.table-detail th { + font-size: 16px; + border-top: 0; +} + +.table-detail thead > tr > th, .table tbody > tr > th, +.table-detail tbody > tr > td, .table tfoot > tr > td { + border-top: 0 !important; +} + +.table-detail > thead { + border-top: 0 !important; +} + + td { padding: 8px 10px 8px 8px !important; border-bottom: 1px dotted #ddd !important; @@ -418,6 +434,16 @@ select.input-sm { display: block; } +.icon-table-hint { + width: 16px; + height: 20px; + display: block; + background-position: 50% 50%; +} +.icon-table-hint:after { + content: "edited"; + padding-left: 22px; +} .icon-flapping { background-image: url('../img/icons/flapping.png'); diff --git a/public/js/icinga/components/ajaxPostSubmitForm.js b/public/js/icinga/components/ajaxPostSubmitForm.js index 1547c816a..f76882752 100644 --- a/public/js/icinga/components/ajaxPostSubmitForm.js +++ b/public/js/icinga/components/ajaxPostSubmitForm.js @@ -54,7 +54,7 @@ define(['components/app/container', 'jquery'], function(Container, $) { var submitHandler = function(e) { var form = $(this); var url = form.attr('action'); - var submit = form.find('input[type="submit"]'); + var submit = form.find('button[type="submit"]', 'input[type="submit"]'); var data = form.serialize(); e.preventDefault();