Display icon_images in all host and service detail views

refs #8665
This commit is contained in:
Matthias Jentsch 2015-05-19 18:08:26 +02:00
parent 54207d3427
commit c0cf6e4918
8 changed files with 26 additions and 4 deletions

View File

@ -53,6 +53,7 @@ class Monitoring_HostsController extends Controller
protected function handleCommandForm(ObjectsCommandForm $form)
{
$this->hostList->setColumns(array(
'host_icon_image',
'host_name',
'host_state',
'host_problem',
@ -94,6 +95,7 @@ class Monitoring_HostsController extends Controller
->handleRequest();
$this->view->checkNowForm = $checkNowForm;
$this->hostList->setColumns(array(
'host_icon_image',
'host_name',
'host_state',
'host_problem',

View File

@ -55,6 +55,7 @@ class Monitoring_ServicesController extends Controller
'host_state',
'host_problem',
'host_handled',
'service_icon_image',
'service_description',
'service_state',
'service_problem',
@ -98,6 +99,7 @@ class Monitoring_ServicesController extends Controller
'host_state',
'host_problem',
'host_handled',
'service_icon_image',
'service_output',
'service_description',
'service_state',

View File

@ -9,6 +9,9 @@ use Icinga\Module\Monitoring\Object\Host;
<?= $this->prefixedTimeSince($object->host_last_state_change, true); ?>
</td>
<td>
<?php if ($object->host_icon_image && ! preg_match('/[\'"]/', $object->host_icon_image)): ?>
<?= $this->icon($this->resolveMacros($object->host_icon_image, $object)) ?>
<?php endif ?>
<strong><?= $this->escape($object->host_display_name); ?></strong>
<?php if ($object->host_display_name !== $object->host_name): ?>
<small>(<?= $this->escape($object->host_name); ?>)</small>

View File

@ -18,6 +18,9 @@ $i = 0;
<td class="state"><?= Host::getStateText($host->host_state, true); ?><br /></td>
<td>
<?= implode(' ', $this->hostFlags($host)) ?>
<?php if ($host->host_icon_image && ! preg_match('/[\'"]/', $host->host_icon_image)): ?>
<?= $this->icon($this->resolveMacros($host->host_icon_image, $host)) ?>
<?php endif ?>
<b><?= $this->escape($host->getName()); ?></b><br>
<?= $this->escape($host->host_output) ?>
</td>

View File

@ -10,7 +10,10 @@ use Icinga\Module\Monitoring\Object\Service;
<?= $this->prefixedTimeSince($object->host_last_state_change, true); ?>
</td>
<td>
<strong><?= $this->escape($object->host_display_name); ?></strong>
<?php if ($object->host_icon_image && ! preg_match('/[\'"]/', $object->host_icon_image)): ?>
<?= $this->icon($this->resolveMacros($object->host_icon_image, $object)) ?>
<?php endif ?>
<strong><?= $this->escape($object->host_display_name); ?></strong>
<?php if ($object->host_display_name !== $object->host_name): ?>
<small>(<?= $this->escape($object->host_name); ?>)</small>
<?php endif ?>
@ -27,10 +30,13 @@ use Icinga\Module\Monitoring\Object\Service;
<?= $this->prefixedTimeSince($object->service_last_state_change, true); ?>
</td>
<td>
<?php if ($object->service_icon_image && ! preg_match('/[\'"]/', $object->service_icon_image)): ?>
<?= $this->icon($this->resolveMacros($object->service_icon_image, $object)) ?>
<?php endif ?>
<strong><?= $this->translate('Service'); ?>: <?= $this->escape($object->service_display_name); ?></strong>
<?php if ($object->service_display_name !== $object->service_description): ?>
<small>(<?= $this->escape($object->service_description); ?>)</small>
<?php endif ?>
<?php if ($object->service_display_name !== $object->service_description): ?>
<small>(<?= $this->escape($object->service_description); ?>)</small>
<?php endif ?>
<?= $this->render('partials/service/statusicons.phtml'); ?>
</td>
</tr>

View File

@ -16,6 +16,9 @@ $i = 0;
<td class="state"><?= Service::getStateText($service->service_state, true); ?><br /></td>
<td>
<?= implode(' ', $this->serviceFlags($service)) ?>
<?php if ($service->service_icon_image && ! preg_match('/[\'"]/', $service->service_icon_image)): ?>
<?= $this->icon($this->resolveMacros($service->service_icon_image, $service)) ?>
<?php endif ?>
<b>
<?= $this->escape($service->getName()); ?>
<?= $this->translate('on') ?>

View File

@ -89,6 +89,7 @@ class Host extends MonitoredObject
protected function getDataView()
{
$columns = array(
'host_icon_image',
'host_acknowledged',
'host_action_url',
'host_active_checks_enabled',

View File

@ -106,6 +106,7 @@ class Service extends MonitoredObject
protected function getDataView()
{
return $this->backend->select()->from('serviceStatus', array(
'host_icon_image',
'host_acknowledged',
'host_active_checks_enabled',
'host_address',
@ -118,6 +119,7 @@ class Service extends MonitoredObject
'host_notifications_enabled',
'host_passive_checks_enabled',
'host_state',
'service_icon_image',
'service_acknowledged',
'service_action_url',
'service_active_checks_enabled',