translate('Comments'); ?> hasPermission('monitoring/command/comment/add')) { /** @var \Icinga\Module\Monitoring\Object\MonitoredObject $object */ if ($object->getType() === $object::TYPE_HOST) { echo $this->qlink( $this->translate('Add comment'), 'monitoring/host/add-comment', array('host' => $object->getName()), array( 'icon' => 'comment', 'data-base-target' => '_self', 'title' => $this->translate('Add a new comment to this host') ) ); } else { echo $this->qlink( $this->translate('Add comment'), 'monitoring/service/add-comment', array('host' => $object->getHost()->getName(), 'service' => $object->getName()), array( 'icon' => 'comment', 'data-base-target' => '_self', 'title' => $this->translate('Add a new comment to this service') ) ); } } else { echo '-'; } ?> 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); ?> escape($comment->author); ?> (timeAgo($comment->timestamp); ?>) populate( array( 'comment_id' => $comment->id, 'comment_is_service' => isset($comment->service_description) ) ); echo $delCommentForm; } ?> (translate('Comment'); ?>): ', $commentText); ?>