Skip to content

Commit

Permalink
Merge branch 'feature/show-reachability-6875'
Browse files Browse the repository at this point in the history
resolves #6875
  • Loading branch information
lippserd committed Mar 12, 2015
2 parents 020329d + ce3c250 commit f75c27f
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 5 deletions.
@@ -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 ?>
Expand Up @@ -121,6 +121,7 @@ public function setMode($mode)
'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
Expand Down Expand Up @@ -259,6 +260,7 @@ public function setMode($mode)
'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
Expand Down Expand Up @@ -345,6 +347,10 @@ protected function joinBaseTables()
$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'),
Expand Down
1 change: 1 addition & 0 deletions modules/monitoring/library/Monitoring/Object/Host.php
Expand Up @@ -109,6 +109,7 @@ protected function getDataView()
'host_handled',
'host_in_downtime',
'host_is_flapping',
'host_is_reachable',
'host_last_check',
'host_last_notification',
'host_last_state_change',
Expand Down
1 change: 1 addition & 0 deletions modules/monitoring/library/Monitoring/Object/Service.php
Expand Up @@ -137,6 +137,7 @@ protected function getDataView()
'service_handled',
'service_in_downtime',
'service_is_flapping',
'service_is_reachable',
'service_last_check',
'service_last_notification',
'service_last_state_change',
Expand Down

0 comments on commit f75c27f

Please sign in to comment.