hasPermission('monitoring/command/comment/add')) { /** @var \Icinga\Module\Monitoring\Object\MonitoredObject $object */ if ($object->getType() === $object::TYPE_HOST) { $addLink = $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 { $addLink = $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') ) ); } } if (empty($object->comments) && ! $addLink) { return; } ?>
(= $this->translate('Comment'); ?>): = str_replace(array('\r\n', '\n'), '
', $commentText) ?>