116 lines
3.4 KiB
PHTML
116 lines
3.4 KiB
PHTML
<?php
|
|
|
|
/** @var boolean $showService */
|
|
$showService = false;
|
|
|
|
if (isset($this->service) && $this->tabs->getActiveName() !== 'host') {
|
|
$showService = true;
|
|
}
|
|
|
|
/** @var boolean $inlineCommands */
|
|
$inlineCommands = true;
|
|
if ($this->tabs->getActiveName() === 'history') {
|
|
$inlineCommands = false;
|
|
}
|
|
|
|
if (!$this->compact) {
|
|
echo $this->tabs->render($this);
|
|
|
|
}
|
|
?>
|
|
<div>
|
|
<?php if ($inlineCommands === true): ?>
|
|
<div class="pull-right">
|
|
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<table>
|
|
<tr>
|
|
<td>
|
|
{{HOST_ICON}}
|
|
<?php if ($this->object->host_icon_image): ?>
|
|
<div>
|
|
<img src="<?= $this->object->host_icon_image; ?>" alt="Host image"/>
|
|
</div>
|
|
<?php endif; ?>
|
|
<strong>
|
|
<?= $this->escape($this->object->host_name); ?>
|
|
<?php if ($this->object->host_address && $this->object->host_address !== $this->object->host_name): ?>
|
|
(<?= $this->escape($this->object->host_address); ?>)
|
|
<?php endif; ?>
|
|
</strong>
|
|
|
|
<?php if (isset($this->object->host_alias) && $this->object->host_alias !== $this->object->host_name): ?>
|
|
<br/>
|
|
<sup>(<?= $this->object->host_alias; ?>)</sup>
|
|
<?php endif; ?>
|
|
</td>
|
|
<td
|
|
<?= $showService ? '' : ' rowspan="2"'; ?>
|
|
<?= $this->util()->getHostStateName($this->object->host_state); ?>
|
|
since <?= $this->timeSince($this->object->host_last_state_change); ?>
|
|
<?php if ($this->object->host_acknowledged === '1'): ?>
|
|
(Has been acknowledged)
|
|
<?php endif; ?>
|
|
</td>
|
|
</tr>
|
|
|
|
<?php if ($this->object->host_action_url || $this->object->host_notes_url): ?>
|
|
<tr>
|
|
<td rowspan="2">
|
|
<?php if ($this->object->host_action_url): ?>
|
|
{{EXTERNAL_LINK_ICON}}
|
|
<a target="_new" href='<?= $this->object->host_notes_url ?>'>Host actions </a>
|
|
<?php endif; ?>
|
|
<?php if ($this->object->host_notes_url): ?>
|
|
{{EXTERNAL_LINK_ICON}}
|
|
<a target="_new" href='<?= $this->object->host_notes_url ?>'>Host notes </a>
|
|
<?php endif; ?>
|
|
</td>
|
|
</tr>
|
|
<?php endif; ?>
|
|
|
|
<?php if ($showService === true): ?>
|
|
<tr>
|
|
<td>
|
|
{{SERVICE_ICON}}
|
|
<?php if ($this->service->service_icon_image): ?>
|
|
<div>
|
|
<img src="<?= $this->service->service_icon_image; ?>" alt="Host image"/>
|
|
</div>
|
|
<?php endif; ?>
|
|
<strong>
|
|
Service: <?= $this->escape($this->service->service_description); ?>
|
|
</strong>
|
|
</td>
|
|
<td>
|
|
<?= $this->util()->getServiceStateName($this->service->service_state); ?>
|
|
since <?= $this->timeSince($this->service->service_last_state_change); ?>
|
|
<?php if ($this->service->service_acknowledged === '1'): ?>
|
|
(Has been acknowledged)
|
|
<?php endif; ?>
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<?php if ($this->service->service_action_url || $this->service->service_notes_url): ?>
|
|
<tr>
|
|
<td rowspan="2">
|
|
<?php if ($this->service->service_action_url): ?>
|
|
{{EXTERNAL_LINK_ICON}}
|
|
<a target="_new" href='<?= $this->service->service_notes_url ?>'>Service actions </a>
|
|
<?php endif; ?>
|
|
|
|
<?php if ($this->service->service_notes_url): ?>
|
|
{{EXTERNAL_LINK_ICON}}
|
|
<a target="_new" href='<?= $this->service->service_notes_url ?>'>Service notes </a>
|
|
<?php endif; ?>
|
|
</td>
|
|
</tr>
|
|
<?php endif; ?>
|
|
<?php endif; ?>
|
|
</table>
|
|
<div class="clearfix"></div>
|
|
</div>
|