2014-03-08 21:28:32 +01:00
|
|
|
<?php
|
|
|
|
|
2014-09-12 16:52:45 +02:00
|
|
|
/** @var \Icinga\Module\Monitoring\Object\MonitoredObject $object */
|
2014-03-08 21:28:32 +01:00
|
|
|
|
|
|
|
if (in_array((int) $object->state, array(0, 99))) {
|
2014-09-12 16:52:45 +02:00
|
|
|
// Ignore this markup if the object is in a non-problem state or pending
|
2014-03-08 21:28:32 +01:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2014-09-12 16:52:45 +02:00
|
|
|
if ($object->acknowledged): ?>
|
|
|
|
<tr>
|
|
|
|
<th><?= $this->translate('Acknowledged') ?></th>
|
2015-01-22 17:25:30 +01:00
|
|
|
<td>
|
|
|
|
<?php if (isset($removeAckForm)) { // Form is unset if the current user lacks the respective permission
|
|
|
|
echo $removeAckForm;
|
|
|
|
} else {
|
|
|
|
echo '-';
|
|
|
|
} ?>
|
|
|
|
</td>
|
2014-09-12 16:52:45 +02:00
|
|
|
</tr>
|
2014-03-08 21:28:32 +01:00
|
|
|
<?php else: ?>
|
2014-09-12 16:52:45 +02:00
|
|
|
<tr>
|
|
|
|
<th><?= $this->translate('Not acknowledged') ?></th>
|
|
|
|
<td>
|
2015-01-23 11:01:47 +01:00
|
|
|
<?php if ($this->hasPermission('monitoring/command/acknowledge-problem')) {
|
|
|
|
if ($object->getType() === $object::TYPE_HOST) {
|
|
|
|
$ackLink = $this->href(
|
|
|
|
'monitoring/host/acknowledge-problem',
|
|
|
|
array('host' => $object->getName())
|
|
|
|
);
|
|
|
|
} else {
|
|
|
|
$ackLink = $this->href(
|
|
|
|
'monitoring/service/acknowledge-problem',
|
|
|
|
array('host' => $object->getHost()->getName(), 'service' => $object->getName())
|
|
|
|
);
|
|
|
|
}
|
2014-09-12 16:52:45 +02:00
|
|
|
?>
|
2015-02-23 17:26:21 +01:00
|
|
|
<?= $this->qlink(
|
|
|
|
$this->icon('ok') . ' ' . $this->translate('Acknowledge'),
|
|
|
|
$ackLink,
|
|
|
|
null,
|
|
|
|
array('title' => $this->translate(
|
|
|
|
'Acknowledge this problem, suppress all future notifications for it and tag it as being handled'
|
|
|
|
)),
|
|
|
|
false
|
|
|
|
); ?>
|
2015-01-23 11:01:47 +01:00
|
|
|
<?php } else {
|
|
|
|
echo '-';
|
|
|
|
} // endif ?>
|
2014-09-12 16:52:45 +02:00
|
|
|
</td>
|
|
|
|
</tr>
|
2014-03-08 21:28:32 +01:00
|
|
|
<?php endif ?>
|