Merge branch 'feature/show-reachability-6875'

resolves #6875
This commit is contained in:
Eric Lippmann 2015-03-13 00:27:12 +01:00
commit f75c27fc99
4 changed files with 26 additions and 5 deletions

View File

@ -1,7 +1,20 @@
<?php if (! $object->check_source) return ?>
<?php if ($object->check_source !== null): ?>
<tr>
<th><?= $this->translate('Check Source') ?></th>
<td>
<?= $this->escape($object->check_source) ?>
</td>
<th>
<?= $this->translate('Check Source') ?>
</th>
<td>
<?= $this->escape($object->check_source) ?>
</td>
</tr>
<?php endif ?>
<?php if ($object->is_reachable !== null): ?>
<tr>
<th>
<?= $this->translate('Reachable') ?>
</th>
<td>
<?= $object->is_reachable ? $this->translate('Yes') : $this->translate('No') ?>
</td>
</tr>
<?php endif ?>

View File

@ -121,6 +121,7 @@ class StatusQuery extends IdoQuery
'host_retry_check_interval' => 'hs.retry_check_interval',
'host_check_timeperiod_object_id' => 'hs.check_timeperiod_object_id',
'host_status_update_time' => 'hs.status_update_time',
'host_is_reachable' => 'hs.is_reachable',
'host_severity' => 'CASE WHEN hs.current_state = 0
THEN
CASE WHEN hs.has_been_checked = 0 OR hs.has_been_checked IS NULL
@ -259,6 +260,7 @@ class StatusQuery extends IdoQuery
'service_check_timeperiod_object_id' => 'ss.check_timeperiod_object_id',
'service_status_update_time' => 'ss.status_update_time',
'service_problem' => 'CASE WHEN ss.current_state = 0 THEN 0 ELSE 1 END',
'service_is_reachable' => 'ss.is_reachable',
'service_severity' => 'CASE WHEN ss.current_state = 0
THEN
CASE WHEN ss.has_been_checked = 0 OR ss.has_been_checked IS NULL
@ -345,6 +347,10 @@ class StatusQuery extends IdoQuery
$this->columnMap['hoststatus']['host_check_source'] = '(NULL)';
$this->columnMap['servicestatus']['service_check_source'] = '(NULL)';
}
if (version_compare($this->getIdoVersion(), '1.13.0', '<')) {
$this->columnMap['hoststatus']['host_is_reachable'] = '(NULL)';
$this->columnMap['servicestatus']['service_is_reachable'] = '(NULL)';
}
$this->select->from(array('ho' => $this->prefix . 'objects'), array())
->join(
array('hs' => $this->prefix . 'hoststatus'),

View File

@ -109,6 +109,7 @@ class Host extends MonitoredObject
'host_handled',
'host_in_downtime',
'host_is_flapping',
'host_is_reachable',
'host_last_check',
'host_last_notification',
'host_last_state_change',

View File

@ -137,6 +137,7 @@ class Service extends MonitoredObject
'service_handled',
'service_in_downtime',
'service_is_flapping',
'service_is_reachable',
'service_last_check',
'service_last_notification',
'service_last_state_change',