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 @@
No comments | +|||||||||||||||||||||||||||||||||||||||
+
+
+
= $this->escape($comment->comment_author); ?>, = $comment->comment_type; ?>
(= $this->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 @@
-
-
+
\ 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 @@
}
?>
-
- Customvariables
+
+
+ Custom Variables
+
+
- customvars) && count($object->customvars)) { ?>
-
-
+
- {{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)): ?> -
- Heading
+object;
+?>
+
+
+
+
+
+ Configuration
+
+ +
-
- Properties
-
-
\ 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 @@
+= $this->tabs->render($this); ?>
= $this->render('show/components/status.phtml'); ?>
-
+= $this->render('show/components/comments.phtml'); ?>
= $this->render('show/components/downtime.phtml'); ?>
-
= $this->render('show/components/properties.phtml'); ?>
-
= $this->render('show/components/flags.phtml'); ?>
-
-= $this->render('show/components/hostgroups.phtml'); ?>
-
-= $this->render('show/components/eventHistory.phtml'); ?>
-
-= $this->render('show/components/contacts.phtml'); ?>
-
= $this->render('show/components/customvars.phtml'); ?>
-
-= $this->render('show/components/command.phtml'); ?>
+= $this->render('show/components/servicegroups.phtml'); ?>
+= $this->render('show/components/contacts.phtml'); ?>
+= $this->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 @@
= $this->render('show/components/status.phtml'); ?>
= $this->render('show/components/comments.phtml'); ?>
= $this->render('show/components/downtime.phtml'); ?>
+= $this->render('show/components/properties.phtml'); ?>
= $this->render('show/components/flags.phtml'); ?>
= $this->render('show/components/customvars.phtml'); ?>
= $this->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();
+
+
+
+
-
+ Check Statistics
+
+
+
+
|