Merge branch 'feature/display-host-service-timeperiods-9888'
resolves #9888
This commit is contained in:
commit
7bccc656c9
|
@ -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') ?>
|
||||
</tbody>
|
||||
|
|
|
@ -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') ?>
|
||||
</tbody>
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
<?php if (isset($object->service_check_timeperiod)): ?>
|
||||
|
||||
<tr>
|
||||
<th><?= $this->translate('Check Timeperiod') ?></th>
|
||||
<td>
|
||||
<?= $object->service_check_timeperiod ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php endif ?>
|
||||
|
||||
<?php if (isset($object->host_check_timeperiod)): ?>
|
||||
|
||||
<tr>
|
||||
<th><?= $this->translate('Check Timeperiod') ?></th>
|
||||
<td>
|
||||
<?= $object->host_check_timeperiod ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php endif ?>
|
|
@ -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}
|
||||
*/
|
||||
|
|
|
@ -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}
|
||||
*/
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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',
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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',
|
||||
|
|
Loading…
Reference in New Issue