= $this->translate('Comments') ?> |
hasPermission('monitoring/command/comment/add')) {
/** @type \Icinga\Module\Monitoring\Object\MonitoredObject $object */
if ($object->getType() === $object::TYPE_HOST) {
$addCommentLink = $this->href(
'monitoring/host/add-comment',
array('host' => $object->getName())
);
} else {
$addCommentLink = $this->href(
'monitoring/service/add-comment',
array('host' => $object->getHost()->getName(), 'service' => $object->getName())
);
}
?>
= $this->icon('comment') ?>
= $this->translate('Add comment') ?>
|
comments as $comment) {
// Ticket hook sample
$commentText = $this->tickets ? preg_replace_callback(
$this->tickets->getPattern(),
array($this->tickets, 'createLink'),
$this->escape($comment->comment)
) : $this->escape($comment->comment);
?>
= $this->escape($comment->author) ?> (= $this->timeSince($comment->timestamp) ?>) |
populate(array('comment_id' => $comment->id));
echo $delCommentForm;
} ?>
(= ucfirst($comment->type) ?>):
|
= nl2br($commentText) ?>
|
|