This file is indexed.

/usr/share/icingaweb2/modules/monitoring/application/views/scripts/show/components/comments.phtml is in icingaweb2-module-monitoring 2.1.0-1ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<?php
$addLink = false;
if ($this->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(
                'class'             => 'action-link',
                'data-base-target'  => '_self',
                'icon'              => 'comment',
                '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(
                'class'             => 'action-link',
                'data-base-target'  => '_self',
                'icon'              => 'comment',
                'title'             => $this->translate('Add a new comment to this service')
            )
        );
    }
}
if (empty($object->comments) && ! $addLink) {
    return;
}
?>
<tr>
    <th><?php
    echo $this->translate('Comments');
    if (! empty($object->comments) && $addLink) {
        echo '<br>' . $addLink;
    }
    ?></th>
    <td data-base-target="_self">
    <?php if (empty($object->comments)):
        echo $addLink;
    else: ?>
        <dl class="comment-list">
        <?php foreach ($object->comments as $comment): ?>
            <dt class="comment-header">
                <?= $this->escape($comment->author) ?>
                <span class="comment-meta">
                    <?= $this->translate('commented') ?>
                    <?= $this->timeAgo($comment->timestamp) ?>
                <?php if (isset($delCommentForm)): // Form is unset if the current user lacks the respective permission ?>
                    <span class="meta-icons">
                    <?php
                        $deleteButton = clone($delCommentForm);
                        /** @var \Icinga\Module\Monitoring\Forms\Command\Object\DeleteCommentCommandForm $deleteButton */
                        $deleteButton->setAttrib('class', $deleteButton->getAttrib('class') . ' remove-action');
                        $deleteButton->populate(
                            array(
                                'comment_id'            => $comment->id,
                                'comment_is_service'    => isset($comment->service_description)
                            )
                        );
                        echo $deleteButton;
                    ?>
                    </span>
                <?php endif ?>
                </span>
            </dt>
            <dd class="comment-text">
                <p><?= nl2br($this->createTicketLinks($this->escape($comment->comment)), false) ?></p>
            </dd>
        <?php endforeach ?>
        </dl>
    <?php endif ?>
    </td>
</tr>