diff --git a/modules/monitoring/application/views/scripts/host/show.phtml b/modules/monitoring/application/views/scripts/host/show.phtml
index 12de39a78..23e2bf4e2 100644
--- a/modules/monitoring/application/views/scripts/host/show.phtml
+++ b/modules/monitoring/application/views/scripts/host/show.phtml
@@ -35,6 +35,7 @@
= $this->render('show/components/command.phtml') ?>
= $this->render('show/components/checksource.phtml') ?>
= $this->render('show/components/checkstatistics.phtml') ?>
+ = $this->render('show/components/checktimeperiod.phtml') ?>
= $this->render('show/components/customvars.phtml') ?>
= $this->render('show/components/flags.phtml') ?>
diff --git a/modules/monitoring/application/views/scripts/service/show.phtml b/modules/monitoring/application/views/scripts/service/show.phtml
index 1fac5752f..ad7fb4177 100644
--- a/modules/monitoring/application/views/scripts/service/show.phtml
+++ b/modules/monitoring/application/views/scripts/service/show.phtml
@@ -27,6 +27,7 @@
= $this->render('show/components/command.phtml') ?>
= $this->render('show/components/checksource.phtml') ?>
= $this->render('show/components/checkstatistics.phtml') ?>
+ = $this->render('show/components/checktimeperiod.phtml') ?>
= $this->render('show/components/customvars.phtml') ?>
= $this->render('show/components/flags.phtml') ?>
diff --git a/modules/monitoring/application/views/scripts/show/components/checktimeperiod.phtml b/modules/monitoring/application/views/scripts/show/components/checktimeperiod.phtml
new file mode 100644
index 000000000..34c4eb9ef
--- /dev/null
+++ b/modules/monitoring/application/views/scripts/show/components/checktimeperiod.phtml
@@ -0,0 +1,21 @@
+service_check_timeperiod)): ?>
+
+
+ = $this->translate('Check Timeperiod') ?> |
+
+ = $object->service_check_timeperiod ?>
+ |
+
+
+
+
+host_check_timeperiod)): ?>
+
+
+ = $this->translate('Check Timeperiod') ?> |
+
+ = $object->host_check_timeperiod ?>
+ |
+
+
+
diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/HoststatusQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/HoststatusQuery.php
index 307140b7a..9898ccac9 100644
--- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/HoststatusQuery.php
+++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/HoststatusQuery.php
@@ -157,6 +157,9 @@ class HoststatusQuery extends IdoQuery
'service' => 'so.name2 COLLATE latin1_general_ci',
'service_description' => 'so.name2',
'service_display_name' => 's.display_name COLLATE latin1_general_ci',
+ ),
+ 'checktimeperiods' => array(
+ 'host_check_timeperiod' => 'ctp.alias COLLATE latin1_general_ci'
)
);
@@ -266,6 +269,15 @@ class HoststatusQuery extends IdoQuery
);
}
+ protected function joinChecktimeperiods()
+ {
+ $this->select->joinLeft(
+ array('ctp' => $this->prefix . 'timeperiods'),
+ 'ctp.timeperiod_object_id = h.check_timeperiod_object_id',
+ array()
+ );
+ }
+
/**
* {@inheritdoc}
*/
diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicestatusQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicestatusQuery.php
index 7e573fde0..734e138d4 100644
--- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicestatusQuery.php
+++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicestatusQuery.php
@@ -269,6 +269,9 @@ class ServicestatusQuery extends IdoQuery
'service_state_type' => 'ss.state_type',
'service_status_update_time' => 'ss.status_update_time',
'service_unhandled' => 'CASE WHEN (ss.problem_has_been_acknowledged + ss.scheduled_downtime_depth + COALESCE(hs.current_state, 0)) = 0 THEN 1 ELSE 0 END'
+ ),
+ 'checktimeperiods' => array(
+ 'service_check_timeperiod' => 'ctp.alias COLLATE latin1_general_ci'
)
);
@@ -386,6 +389,15 @@ class ServicestatusQuery extends IdoQuery
);
}
+ protected function joinChecktimeperiods()
+ {
+ $this->select->joinLeft(
+ array('ctp' => $this->prefix . 'timeperiods'),
+ 'ctp.timeperiod_object_id = s.check_timeperiod_object_id',
+ array()
+ );
+ }
+
/**
* {@inheritdoc}
*/
diff --git a/modules/monitoring/library/Monitoring/DataView/Hoststatus.php b/modules/monitoring/library/Monitoring/DataView/Hoststatus.php
index 413f175f1..f30e00193 100644
--- a/modules/monitoring/library/Monitoring/DataView/Hoststatus.php
+++ b/modules/monitoring/library/Monitoring/DataView/Hoststatus.php
@@ -32,6 +32,7 @@ class HostStatus extends DataView
'host_output',
'host_long_output',
'host_check_command',
+ 'host_check_timeperiod',
'host_perfdata',
'host_check_source',
'host_passive_checks_enabled',
diff --git a/modules/monitoring/library/Monitoring/DataView/Servicestatus.php b/modules/monitoring/library/Monitoring/DataView/Servicestatus.php
index f12c66535..8c19cb1ab 100644
--- a/modules/monitoring/library/Monitoring/DataView/Servicestatus.php
+++ b/modules/monitoring/library/Monitoring/DataView/Servicestatus.php
@@ -73,6 +73,7 @@ class ServiceStatus extends DataView
'service_problem',
'service_perfdata',
'service_check_source',
+ 'service_check_timeperiod',
'service_active_checks_enabled',
'service_active_checks_enabled_changed',
'service_passive_checks_enabled',
@@ -93,7 +94,7 @@ class ServiceStatus extends DataView
'service_flap_detection_enabled_changed',
'service_modified_service_attributes',
'service_host_name',
- 'service_acknowledgement_type'
+ 'service_acknowledgement_type',
);
}
diff --git a/modules/monitoring/library/Monitoring/Object/Host.php b/modules/monitoring/library/Monitoring/Object/Host.php
index 145f7c7c2..75c31c3ea 100644
--- a/modules/monitoring/library/Monitoring/Object/Host.php
+++ b/modules/monitoring/library/Monitoring/Object/Host.php
@@ -101,6 +101,7 @@ class Host extends MonitoredObject
'host_check_execution_time',
'host_check_latency',
'host_check_source',
+ 'host_check_timeperiod',
'host_current_check_attempt',
'host_current_notification_number',
'host_display_name',
@@ -136,7 +137,7 @@ class Host extends MonitoredObject
'host_process_perfdata' => 'host_process_performance_data',
'host_state',
'host_state_type',
- 'instance_name',
+ 'instance_name'
);
if ($this->backend->getType() === 'livestatus') {
$columns[] = 'host_contacts';
diff --git a/modules/monitoring/library/Monitoring/Object/Service.php b/modules/monitoring/library/Monitoring/Object/Service.php
index 0294bb852..f4f3ce748 100644
--- a/modules/monitoring/library/Monitoring/Object/Service.php
+++ b/modules/monitoring/library/Monitoring/Object/Service.php
@@ -133,6 +133,7 @@ class Service extends MonitoredObject
'service_check_execution_time',
'service_check_latency',
'service_check_source',
+ 'service_check_timeperiod',
'service_current_notification_number',
'service_description',
'service_display_name',