mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-27 15:54:03 +02:00
monitoring/list/services: Make overdue/unreachable services better visible
refs #3212
This commit is contained in:
parent
18b933679c
commit
5ead593fa7
@ -103,7 +103,8 @@ class HostController extends MonitoredObjectController
|
|||||||
'service_passive_checks_enabled',
|
'service_passive_checks_enabled',
|
||||||
'current_check_attempt' => 'service_current_check_attempt',
|
'current_check_attempt' => 'service_current_check_attempt',
|
||||||
'max_check_attempts' => 'service_max_check_attempts',
|
'max_check_attempts' => 'service_max_check_attempts',
|
||||||
'service_check_command'
|
'service_check_command',
|
||||||
|
'service_next_update'
|
||||||
));
|
));
|
||||||
$this->applyRestriction('monitoring/filter/objects', $query);
|
$this->applyRestriction('monitoring/filter/objects', $query);
|
||||||
$this->view->services = $query->where('host_name', $this->object->getName());
|
$this->view->services = $query->where('host_name', $this->object->getName());
|
||||||
|
@ -159,7 +159,8 @@ class ListController extends Controller
|
|||||||
'service_notifications_enabled',
|
'service_notifications_enabled',
|
||||||
'service_active_checks_enabled',
|
'service_active_checks_enabled',
|
||||||
'service_passive_checks_enabled',
|
'service_passive_checks_enabled',
|
||||||
'service_check_command'
|
'service_check_command',
|
||||||
|
'service_next_update'
|
||||||
), $this->addColumns()));
|
), $this->addColumns()));
|
||||||
$this->applyRestriction('monitoring/filter/objects', $services);
|
$this->applyRestriction('monitoring/filter/objects', $services);
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
use Icinga\Date\DateFormatter;
|
||||||
use Icinga\Module\Monitoring\Object\Host;
|
use Icinga\Module\Monitoring\Object\Host;
|
||||||
use Icinga\Module\Monitoring\Object\Service;
|
use Icinga\Module\Monitoring\Object\Service;
|
||||||
|
|
||||||
@ -38,10 +39,16 @@ if (! $this->compact): ?>
|
|||||||
'host' => $service->host_name,
|
'host' => $service->host_name,
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
$serviceStateName = Service::getStateText($service->service_state); ?>
|
$serviceStateName = Service::getStateText($service->service_state);
|
||||||
<tr>
|
$serviceCheckOverdue = $service->service_next_update < time(); ?>
|
||||||
|
<tr<?= $serviceCheckOverdue ? ' class="state-outdated"' : '' ?>>
|
||||||
<td class="state-col state-<?= $serviceStateName ?><?= $service->service_handled ? ' handled' : '' ?>">
|
<td class="state-col state-<?= $serviceStateName ?><?= $service->service_handled ? ' handled' : '' ?>">
|
||||||
<div class="state-label"><?= Service::getStateText($service->service_state, true) ?></div>
|
<div class="state-label">
|
||||||
|
<?php if ($serviceCheckOverdue): ?>
|
||||||
|
<?= $this->icon('clock', sprintf($this->translate('Overdue %s'), DateFormatter::timeSince($service->service_next_update))) ?>
|
||||||
|
<?php endif ?>
|
||||||
|
<?= Service::getStateText($service->service_state, true) ?>
|
||||||
|
</div>
|
||||||
<?php if ((int) $service->service_state !== 99): ?>
|
<?php if ((int) $service->service_state !== 99): ?>
|
||||||
<div class="state-meta">
|
<div class="state-meta">
|
||||||
<?= $this->timeSince($service->service_last_state_change, $this->compact) ?>
|
<?= $this->timeSince($service->service_last_state_change, $this->compact) ?>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user