commit
84521a1a24
|
@ -193,11 +193,11 @@ class Monitoring_AlertsummaryController extends Controller
|
|||
|
||||
$out = new stdClass();
|
||||
if ($yesterday === $today) {
|
||||
$out->trend = 'unchanged';
|
||||
$out->trend = $this->translate('unchanged');
|
||||
} elseif ($yesterday > $today) {
|
||||
$out->trend = 'down';
|
||||
$out->trend = $this->translate('down');
|
||||
} else {
|
||||
$out->trend = 'up';
|
||||
$out->trend = $this->translate('up');
|
||||
}
|
||||
|
||||
if ($yesterday <= 0) {
|
||||
|
|
|
@ -605,7 +605,7 @@ class Monitoring_ListController extends Controller
|
|||
$this->filterQuery($query);
|
||||
|
||||
$this->setupSortControl(array(
|
||||
'timestamp' => 'Occurence'
|
||||
'timestamp' => $this->translate('Occurence')
|
||||
));
|
||||
$this->view->history = $query->paginate();
|
||||
}
|
||||
|
|
|
@ -5,85 +5,75 @@ use Icinga\Module\Monitoring\Object\Service;
|
|||
|
||||
?>
|
||||
|
||||
<?php if (!$this->compact): ?>
|
||||
<?php if (! $this->compact): ?>
|
||||
<div class="controls">
|
||||
<?= $this->tabs ?>
|
||||
<div class="dontprint" style="margin: 1em;">
|
||||
<?= $this->translate('Sort by') ?> <?= $this->sortControl->render($this) ?>
|
||||
</div>
|
||||
<?= $this->widget('limiter') ?>
|
||||
<?= $this->paginationControl($notifications, null, null, array('preserve' => $this->preserve)) ?>
|
||||
</div>
|
||||
<?= $this->tabs ?>
|
||||
<div class="dontprint" style="margin: 1em;">
|
||||
<?= $this->translate('Sort by') ?> <?= $this->sortControl->render($this) ?>
|
||||
</div>
|
||||
<?= $this->widget('limiter') ?>
|
||||
<?= $this->paginationControl($notifications, null, null, array('preserve' => $this->preserve)) ?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if (! $this->inline): ?>
|
||||
<div class="content">
|
||||
<?php endif; ?>
|
||||
<?php if (count($notifications) === 0): ?>
|
||||
<?= $this->translate('No notifications matching the filter') ?>
|
||||
<?php return; endif ?>
|
||||
|
||||
<?php
|
||||
|
||||
if (empty($this->notifications)) {
|
||||
echo 'No notifications yet</div>';
|
||||
return;
|
||||
}
|
||||
?>
|
||||
|
||||
<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):
|
||||
|
||||
if (isset($notification->service)) {
|
||||
$isService = true;
|
||||
$href = $this->href('monitoring/show/service', array(
|
||||
'host' => $notification->host,
|
||||
'service' => $notification->service
|
||||
));
|
||||
$stateName = Service::getStateText($notification->notification_state);
|
||||
} else {
|
||||
$isService = false;
|
||||
$href = $this->href('monitoring/show/host', array(
|
||||
'host' => $notification->host
|
||||
));
|
||||
$stateName = Host::getStateText($notification->notification_state);
|
||||
}
|
||||
?>
|
||||
<tr class="state <?= $stateName ?>">
|
||||
<td class="state">
|
||||
<?= $this->dateTimeRenderer($notification->notification_start_time)->render(
|
||||
$this->translate('on %s', 'datetime'),
|
||||
$this->translate('at %s', 'time'),
|
||||
$this->translate('%s ago', 'timespan')
|
||||
);
|
||||
<table data-base-target="_next" class="action">
|
||||
<tbody>
|
||||
<?php foreach ($notifications as $notification):
|
||||
if (isset($notification->service)) {
|
||||
$isService = true;
|
||||
$href = $this->href('monitoring/show/service', array(
|
||||
'host' => $notification->host,
|
||||
'service' => $notification->service
|
||||
));
|
||||
$stateName = Service::getStateText($notification->notification_state);
|
||||
} else {
|
||||
$isService = false;
|
||||
$href = $this->href('monitoring/show/host', array(
|
||||
'host' => $notification->host
|
||||
));
|
||||
$stateName = Host::getStateText($notification->notification_state);
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td style="font-size: 0.8em">
|
||||
<?php if ($isService): ?>
|
||||
<a href="<?= $href ?>"><?= $notification->service ?></a> on <?= $notification->host ?>
|
||||
<?php else: ?>
|
||||
<a href="<?= $href ?>"><?= $notification->host ?></a>
|
||||
<?php endif; ?>
|
||||
<br />
|
||||
<?= $this->escape(substr(strip_tags($notification->notification_output), 0, 10000)); ?>
|
||||
<br />
|
||||
<?php if (!$this->contact): ?>
|
||||
<small>
|
||||
Sent to <a href="<?= $this->href(
|
||||
'monitoring/show/contact',
|
||||
array('contact' => $notification->notification_contact)
|
||||
) ?>"><?= $this->escape($notification->notification_contact) ?></a>
|
||||
</small>
|
||||
<?php endif ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<?php if (!$this->inline): ?>
|
||||
<tr class="state <?= $stateName ?>">
|
||||
<td class="state">
|
||||
<?= $this->dateTimeRenderer($notification->notification_start_time)->render(
|
||||
$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'),
|
||||
$this->qlink($notification->service, $href), $notification->host
|
||||
) ?>
|
||||
<?php else: ?>
|
||||
<?= $this->qlink($notification->host, $href) ?>
|
||||
<?php endif ?>
|
||||
<br>
|
||||
<?= $this->escape(substr(strip_tags($notification->notification_output), 0, 10000)); ?>
|
||||
<br>
|
||||
<?php if (! $this->contact): ?>
|
||||
<small>
|
||||
<?= sprintf(
|
||||
$this->translate('Sent to %s'),
|
||||
$this->qlink(
|
||||
$notification->notification_contact,
|
||||
'monitoring/show/contact',
|
||||
array('contact' => $notification->notification_contact)
|
||||
)
|
||||
) ?>
|
||||
</small>
|
||||
<?php endif ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
|
|
@ -26,11 +26,11 @@ $cp = $this->checkPerformance()->create($this->checkperformance);
|
|||
</tr>
|
||||
<tr>
|
||||
<th><?= $this->translate('Last Status Update'); ?></th>
|
||||
<td><?= $this->timeSince($this->programStatus->status_update_time) ?> ago</td>
|
||||
<td><?= sprintf($this->translate('%s ago'), $this->timeSince($this->programStatus->status_update_time)); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?= $this->translate('Last External Command Check'); ?></th>
|
||||
<td><?= $this->timeSince($this->programStatus->last_command_check) ?> ago</td>
|
||||
<td><?= sprintf($this->translate('%s ago'), $this->timeSince($this->programStatus->last_command_check)); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?= $this->translate('Last Log File Rotation'); ?></th>
|
||||
|
|
|
@ -127,22 +127,27 @@ $section->add($this->translate('Hostgroups'), array(
|
|||
'url' => 'monitoring/list/hostgroups',
|
||||
'priority' => 60
|
||||
));
|
||||
$section->add($this->translate('Contactgroups'), array(
|
||||
'url' => 'monitoring/list/contactgroups',
|
||||
'priority' => 61
|
||||
));
|
||||
$section->add($this->translate('Downtimes'), array(
|
||||
'url' => 'monitoring/list/downtimes',
|
||||
'priority' => 71
|
||||
));
|
||||
$section->add($this->translate('Comments'), array(
|
||||
'url' => 'monitoring/list/comments?comment_type=(comment|ack)',
|
||||
'priority' => 70
|
||||
));
|
||||
$section->add($this->translate('Contacts'), array(
|
||||
'url' => 'monitoring/list/contacts',
|
||||
'priority' => 70
|
||||
));
|
||||
$section->add($this->translate('Contactgroups'), array(
|
||||
'url' => 'monitoring/list/contactgroups',
|
||||
'priority' => 70
|
||||
));
|
||||
$section->add($this->translate('Comments'), array(
|
||||
'url' => 'monitoring/list/comments?comment_type=(comment|ack)',
|
||||
'priority' => 80
|
||||
));
|
||||
$section->add($this->translate('Downtimes'), array(
|
||||
'url' => 'monitoring/list/downtimes',
|
||||
'priority' => 80
|
||||
));
|
||||
$section->add($this->translate('Notifications'), array(
|
||||
'url' => 'monitoring/list/notifications',
|
||||
'priority' => 80
|
||||
));
|
||||
|
||||
|
||||
/*
|
||||
* History Section
|
||||
|
|
Loading…
Reference in New Issue