mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-31 01:34:09 +02:00
monitoring: Fix the notifications view script
This commit is contained in:
parent
a5122f540d
commit
ac56cc02ac
@ -16,27 +16,14 @@ use Icinga\Module\Monitoring\Object\Service;
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if (! $this->inline): ?>
|
||||
<div class="content">
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
|
||||
if (empty($this->notifications)) {
|
||||
echo 'No notifications yet</div>';
|
||||
return;
|
||||
}
|
||||
?>
|
||||
<?php if (count($notifications) === 0): ?>
|
||||
<?= $this->translate('No notifications matching the filter') ?>
|
||||
<?php return; endif ?>
|
||||
|
||||
<table data-base-target="_next" class="action">
|
||||
<tbody>
|
||||
<?php
|
||||
|
||||
if (count($notifications) === 0) {
|
||||
echo mt('monitoring', 'No notifications matching the filter');
|
||||
}
|
||||
foreach ($notifications as $notification):
|
||||
|
||||
<?php foreach ($notifications as $notification):
|
||||
if (isset($notification->service)) {
|
||||
$isService = true;
|
||||
$href = $this->href('monitoring/show/service', array(
|
||||
@ -58,24 +45,30 @@ foreach ($notifications as $notification):
|
||||
$this->translate('on %s', 'datetime'),
|
||||
$this->translate('at %s', 'time'),
|
||||
$this->translate('%s ago', 'timespan')
|
||||
);
|
||||
?>
|
||||
) ?>
|
||||
</td>
|
||||
<td style="font-size: 0.8em">
|
||||
<?php if ($isService): ?>
|
||||
<?= sprintf($this->translate('%s on %s'), "<a href=\"$href\">$notification->service</a>", $notification->host); ?>
|
||||
<?= sprintf(
|
||||
$this->translate('%s on %s'),
|
||||
$this->qlink($notification->service, $href), $notification->host
|
||||
) ?>
|
||||
<?php else: ?>
|
||||
<a href="<?= $href ?>"><?= $notification->host ?></a>
|
||||
<?php endif; ?>
|
||||
<br />
|
||||
<?= $this->qlink($notification->host, $href) ?>
|
||||
<?php endif ?>
|
||||
<br>
|
||||
<?= $this->escape(substr(strip_tags($notification->notification_output), 0, 10000)); ?>
|
||||
<br />
|
||||
<br>
|
||||
<?php if (! $this->contact): ?>
|
||||
<small>
|
||||
<?= sprintf($this->translate('Sent to %s'), "<a href=\"$this->href(
|
||||
<?= sprintf(
|
||||
$this->translate('Sent to %s'),
|
||||
$this->qlink(
|
||||
$notification->notification_contact,
|
||||
'monitoring/show/contact',
|
||||
array('contact' => $notification->notification_contact)
|
||||
)\">$this->escape($notification->notification_contact)</a>"); ?>
|
||||
)
|
||||
) ?>
|
||||
</small>
|
||||
<?php endif ?>
|
||||
</td>
|
||||
@ -83,7 +76,4 @@ foreach ($notifications as $notification):
|
||||
<?php endforeach ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<?php if (!$this->inline): ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user