parent
89ed498069
commit
9793bd52c7
|
@ -1,27 +1,34 @@
|
||||||
<tr>
|
<tr>
|
||||||
<th><?= $this->translate('Comments') ?></th>
|
<th><?= $this->translate('Comments'); ?></th>
|
||||||
<td>
|
<td>
|
||||||
<?php if ($this->hasPermission('monitoring/command/comment/add')) {
|
<?php if ($this->hasPermission('monitoring/command/comment/add')) {
|
||||||
/** @type \Icinga\Module\Monitoring\Object\MonitoredObject $object */
|
/** @type \Icinga\Module\Monitoring\Object\MonitoredObject $object */
|
||||||
if ($object->getType() === $object::TYPE_HOST) {
|
if ($object->getType() === $object::TYPE_HOST) {
|
||||||
$addCommentLink = $this->href(
|
echo $this->qlink(
|
||||||
|
$this->icon('comment') . ' ' . $this->translate('Add comment'),
|
||||||
'monitoring/host/add-comment',
|
'monitoring/host/add-comment',
|
||||||
array('host' => $object->getName())
|
array('host' => $object->getName()),
|
||||||
|
array(
|
||||||
|
'data-base-target' => '_self',
|
||||||
|
'title' => $this->translate('Add a new comment to this host')
|
||||||
|
),
|
||||||
|
false
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
$addCommentLink = $this->href(
|
echo $this->qlink(
|
||||||
|
$this->icon('comment') . ' ' . $this->translate('Add comment'),
|
||||||
'monitoring/service/add-comment',
|
'monitoring/service/add-comment',
|
||||||
array('host' => $object->getHost()->getName(), 'service' => $object->getName())
|
array('host' => $object->getHost()->getName(), 'service' => $object->getName()),
|
||||||
|
array(
|
||||||
|
'data-base-target' => '_self',
|
||||||
|
'title' => $this->translate('Add a new comment to this service')
|
||||||
|
),
|
||||||
|
false
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
?>
|
} else {
|
||||||
<a href="<?= $addCommentLink ?>" data-base-target="_self">
|
|
||||||
<?= $this->icon('comment') ?>
|
|
||||||
<?= $this->translate('Add comment') ?>
|
|
||||||
</a>
|
|
||||||
<?php } else {
|
|
||||||
echo '-';
|
echo '-';
|
||||||
} // endif ?>
|
} ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue