41 lines
1.0 KiB
PHTML
41 lines
1.0 KiB
PHTML
<?php
|
|
|
|
use Icinga\Module\Monitoring\Object\Host;
|
|
use Icinga\Module\Monitoring\Object\Service;
|
|
|
|
if (in_array((int) $object->state, array(0, 99))) {
|
|
return;
|
|
}
|
|
|
|
$cf = $this->getHelper('CommandForm');
|
|
|
|
$data = array('host' => $object->host_name);
|
|
if ($object->service_description) {
|
|
$data['service'] = $object->service_description;
|
|
}
|
|
|
|
?>
|
|
<tr>
|
|
<?php
|
|
|
|
if ($object instanceof Host && $object->host_acknowledged
|
|
|| $object instanceof Service && $object->service_acknowledged): ?>
|
|
<th>Issue acknowledged</th>
|
|
<td data-base-target="_self"><?= $cf->labelSubmitForm(
|
|
$this->translate('Remove Acknowledgement'),
|
|
$this->translate('Remove problem acknowledgement'),
|
|
'link-like',
|
|
'removeacknowledgement',
|
|
$data
|
|
) ?>
|
|
<?php else: ?>
|
|
<th><?= $this->translate('Not acknowledged') ?></th>
|
|
<td>
|
|
<a href="<?= $this->href(
|
|
'monitoring/command/acknowledgeproblem',
|
|
$data
|
|
) ?>"><?= $this->icon('acknowledgement_petrol.png') ?> <?= $this->translate('Acknowledge') ?></a>
|
|
</td>
|
|
<?php endif ?>
|
|
</tr>
|