mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-27 07:44:04 +02:00
Notification view cleanup, first steps
This commit is contained in:
parent
04d968b4bf
commit
6be6cabb9f
@ -1,81 +1,65 @@
|
|||||||
<div class="row">
|
<div class="controls">
|
||||||
<div class="pull-left">
|
<?= $this->tabs ?>
|
||||||
<h1>Notifications</h1>
|
<?= $this->sortControl->render($this) ?>
|
||||||
</div>
|
<?= $this->selectionToolbar('single') ?>
|
||||||
<div class="pull-right">
|
<?= $this->paginationControl($notifications, null, null, array('preserve' => $this->preserve)) ?>
|
||||||
<?= $this->tabs->render($this); ?>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php if (!empty($notifications)): ?>
|
<div class="content">
|
||||||
<div data-icinga-component="app/mainDetailGrid" data-icinga-grid-selection-type="single">
|
<?php
|
||||||
|
|
||||||
<div class="container pull-left">
|
if (empty($this->notifications)) {
|
||||||
<div class="row">
|
echo 'No notifications yet</div>';
|
||||||
<div class="col-md-12">
|
return;
|
||||||
<?= $this->sortControl->render($this); ?>
|
}
|
||||||
</div>
|
?>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
<table class="action">
|
||||||
<?= $this->paginationControl($notifications, null, null, array('preserve' => $this->preserve)); ?>
|
<tbody>
|
||||||
</div>
|
<?php
|
||||||
|
|
||||||
<div class="row">
|
foreach ($notifications as $notification):
|
||||||
<?= $this->selectionToolbar('single'); ?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<table class="table table-condensed pull-left">
|
if (isset($notification->service)) {
|
||||||
<tbody>
|
$isService = true;
|
||||||
<?php foreach ($notifications as $notification): ?>
|
$href = $this->href('monitoring/show/service', array(
|
||||||
<?php
|
'host' => $notification->host,
|
||||||
if (isset($notification->service)) {
|
'service' => $notification->service
|
||||||
$isService = true;
|
));
|
||||||
$href = $this->href('monitoring/show/service', array(
|
$stateName = strtolower($this->util()->getServiceStateName($notification->notification_state));
|
||||||
'host' => $notification->host,
|
} else {
|
||||||
'service' => $notification->service
|
$isService = false;
|
||||||
));
|
$href = $this->href('monitoring/show/host', array(
|
||||||
$stateName = strtolower($this->util()->getServiceStateName($notification->notification_state));
|
'host' => $notification->host
|
||||||
} else {
|
));
|
||||||
$isService = false;
|
$stateName = strtolower($this->util()->getHostStateName($notification->notification_state));
|
||||||
$href = $this->href('monitoring/show/host', array(
|
}
|
||||||
'host' => $notification->host
|
?>
|
||||||
));
|
<tr class="state <?= $stateName ?>">
|
||||||
$stateName = strtolower($this->util()->getHostStateName($notification->notification_state));
|
<td class="state"><?= $this->timeSince($notification->notification_start_time) ?></td>
|
||||||
}
|
<td>
|
||||||
?>
|
<?php if ($isService): ?>
|
||||||
<tr>
|
<a href="<?= $href ?>"><?= $notification->service ?></a>
|
||||||
<td class="border-status-<?= $stateName ?>"><?= date('d.m. H:i', $notification->notification_start_time); ?></td>
|
<small>
|
||||||
<td>
|
on <?= $notification->host ?>
|
||||||
<?php if ($isService): ?>
|
</small>
|
||||||
<a href="<?= $href ?>"><?= $notification->service ?></a>
|
<?php $isService = true; ?>
|
||||||
<small>
|
<?php else: ?>
|
||||||
on <?= $notification->host ?>
|
<a href="<?= $href ?>"><?= $notification->host ?></a>
|
||||||
</small>
|
<?php endif; ?>
|
||||||
<?php $isService = true; ?>
|
<br />
|
||||||
<?php else: ?>
|
<?= $this->escape(substr(strip_tags($notification->notification_output), 0, 10000)); ?>
|
||||||
<a href="<?= $href ?>"><?= $notification->host ?></a>
|
<br />
|
||||||
<?php endif; ?>
|
<small>
|
||||||
<br />
|
Sent to
|
||||||
<?= $this->escape(substr(strip_tags($notification->notification_output), 0, 10000)); ?>
|
<a href="<?= $this->href('monitoring/show/contact', array('contact' => $notification->notification_contact)); ?>">
|
||||||
<br />
|
<?= $notification->notification_contact ?>
|
||||||
<small>
|
</a>
|
||||||
Sent to
|
</small>
|
||||||
<a href="<?= $this->href('monitoring/show/contact', array('contact' => $notification->notification_contact)); ?>">
|
</td>
|
||||||
<?= $notification->notification_contact ?>
|
</tr>
|
||||||
</a>
|
<?php endforeach ?>
|
||||||
</small>
|
</tbody>
|
||||||
</td>
|
</table>
|
||||||
</tr>
|
|
||||||
<?php endforeach; ?>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<div class="container pull-left">
|
|
||||||
<?= $this->paginationControl($notifications, null, null, array('preserve' => $this->preserve)); ?>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<?php else: ?>
|
|
||||||
No notifications yet
|
|
||||||
<?php endif; ?>
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user