40 lines
1.0 KiB
PHTML
40 lines
1.0 KiB
PHTML
<?php
|
|
|
|
/** @var \Icinga\Module\Monitoring\Object\MonitoredObject $object */
|
|
|
|
if (in_array((int) $object->state, array(0, 99))) {
|
|
// Ignore this markup if the object is in a non-problem state or pending
|
|
return;
|
|
}
|
|
|
|
if ($object->getType() === $object::TYPE_HOST) {
|
|
$ackLink = $this->href(
|
|
'monitoring/host/acknowledge-problem',
|
|
array('host' => $object->getHost())
|
|
);
|
|
} else {
|
|
$ackLink = $this->href(
|
|
'monitoring/service/acknowledge-problem',
|
|
array('host' => $object->getHost(), 'service' => $object->getService())
|
|
);
|
|
}
|
|
|
|
if ($object->acknowledged): ?>
|
|
<tr>
|
|
<th><?= $this->translate('Acknowledged') ?></th>
|
|
<td><?= $removeAckForm ?></td>
|
|
</tr>
|
|
<?php else: ?>
|
|
<tr>
|
|
<th><?= $this->translate('Not acknowledged') ?></th>
|
|
<td>
|
|
<?php
|
|
|
|
?>
|
|
<a href="<?= $ackLink ?>">
|
|
<?= $this->icon('acknowledgement_petrol.png') ?> <?= $this->translate('Acknowledge') ?>
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
<?php endif ?>
|