/usr/share/icingaweb2/modules/monitoring/application/views/scripts/list/notifications.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 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 | <?php
use Icinga\Module\Monitoring\Object\Host;
use Icinga\Module\Monitoring\Object\Service;
if (! $this->compact): ?>
<div class="controls">
<?= $tabs ?>
<div class="grid">
<?= $this->sortBox ?>
<?= $this->limiter ?>
<?= $this->paginator ?>
</div>
<?= $this->filterEditor ?>
</div>
<?php endif ?>
<div class="content">
<?php if (! $notifications->hasResult()): ?>
<p><?= $this->translate('No notifications found matching the filter.') ?></p>
</div>
<?php return; endif ?>
<table data-base-target="_next" class="table-row-selectable state-table">
<tbody>
<?php foreach ($notifications->peekAhead($this->compact) as $notification):
if (isset($notification->service_description)) {
$isService = true;
$stateLabel = Service::getStateText($notification->notification_state, true);
$stateName = Service::getStateText($notification->notification_state);
} else {
$isService = false;
$stateLabel = Host::getStateText($notification->notification_state, true);
$stateName = Host::getStateText($notification->notification_state);
}
?>
<tr>
<td class="state-col state-<?= $stateName ?>">
<div class="state-label"><?= $stateLabel ?></div>
<div class="state-meta">
<?= $this->timeAgo($notification->notification_start_time, $this->compact) ?>
</div>
</td>
<td>
<div class="state-header">
<?php if ($isService): ?>
<?= $this->icon('service', $this->translate('Service')); ?>
<?= $this->link()->service(
$notification->service_description,
$notification->service_display_name,
$notification->host_name,
$notification->host_display_name,
'rowaction'
) ?>
<?php else: ?>
<?= $this->icon('host', $this->translate('Host')); ?>
<?= $this->link()->host($notification->host_name, $notification->host_display_name) ?>
<?php endif ?>
<?php if (! $this->contact): ?>
<div class="notification-recipient">
<?php if ($notification->notification_contact_name): ?>
<?= sprintf(
$this->translate('Sent to %s'),
$this->qlink(
$notification->notification_contact_name,
'monitoring/show/contact',
array('contact_name' => $notification->notification_contact_name)
)
) ?>
<?php else: ?>
<?= $this->translate('Sent out to any contact') ?>
<?php endif ?>
</div>
<?php endif ?>
</div>
<p class="overview-plugin-output">
<?= $this->pluginOutput($this->ellipsis($notification->notification_output, 10000), true) ?>
</p>
</td>
</tr>
<?php endforeach ?>
</tbody>
</table>
<?php if ($notifications->hasMore()): ?>
<div class="text-right">
<?= $this->qlink(
$this->translate('Show More'),
$this->url(isset($notificationsUrl) ? $notificationsUrl : null)->without(array('view', 'limit')),
null,
array(
'class' => 'action-link',
'data-base-target' => '_next'
)
); ?>
</div>
<?php endif ?>
</div>
|