monitoring: Fix order of information and actions in the check execution part in the detail area
fixes #10310
This commit is contained in:
parent
ff3aa43070
commit
18e3884b8b
|
@ -4,16 +4,14 @@
|
||||||
<?= $this->translate('Check Source') ?>
|
<?= $this->translate('Check Source') ?>
|
||||||
</th>
|
</th>
|
||||||
<td>
|
<td>
|
||||||
<?php if ($object->is_reachable !== null) {
|
|
||||||
if ((bool) $object->is_reachable) {
|
|
||||||
echo $this->icon('circle', $this->translate('Is reachable'), array('class' => 'fg-color-ok'));
|
|
||||||
} else {
|
|
||||||
echo $this->icon('circle', $this->translate('Not reachable'), array('class' => 'fg-color-critical'));
|
|
||||||
}
|
|
||||||
} ?>
|
|
||||||
<?= $this->escape($object->check_source) ?>
|
<?= $this->escape($object->check_source) ?>
|
||||||
<?php if ($object->is_reachable !== null): ?>
|
<?php if ($object->is_reachable !== null): ?>
|
||||||
<span class="check-source-meta"><?= (bool) $object->is_reachable ? $this->translate('is reachable') : $this->translate('is not reachable') ?></span>
|
<span class="check-source-meta"><?= (bool) $object->is_reachable ? $this->translate('is reachable') : $this->translate('is not reachable') ?></span>
|
||||||
|
<?php if ((bool) $object->is_reachable) {
|
||||||
|
echo $this->icon('circle', $this->translate('Is reachable'), array('class' => 'check-source-reachable'));
|
||||||
|
} else {
|
||||||
|
echo $this->icon('circle', $this->translate('Not reachable'), array('class' => 'check-source-not-reachable'));
|
||||||
|
} ?>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -6,18 +6,28 @@ $activeChecksEnabled = (bool) $object->active_checks_enabled;
|
||||||
<tr>
|
<tr>
|
||||||
<th><?= $activeChecksEnabled ? $this->translate('Last check') : $this->translate('Last update') ?></th>
|
<th><?= $activeChecksEnabled ? $this->translate('Last check') : $this->translate('Last update') ?></th>
|
||||||
<td data-base-target="_self">
|
<td data-base-target="_self">
|
||||||
|
<?php if ((int) $object->state !== 99): ?>
|
||||||
|
<?= $this->timeAgo($object->last_check) ?>
|
||||||
|
<?php if ($object->next_update < time()): ?>
|
||||||
|
<?= $this->icon('circle', $this->translate('Check result is late'), array('class' => 'check-result-late')) ?>
|
||||||
|
<?php endif ?>
|
||||||
|
<?php endif ?>
|
||||||
<?php if (isset($checkNowForm)) { // Form is unset if the current user lacks the respective permission
|
<?php if (isset($checkNowForm)) { // Form is unset if the current user lacks the respective permission
|
||||||
echo $checkNowForm;
|
echo $checkNowForm;
|
||||||
} ?>
|
} ?>
|
||||||
<?php if ((int) $object->state !== 99) {
|
|
||||||
echo $this->timeAgo($object->last_check);
|
|
||||||
} ?>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<th><?= $activeChecksEnabled ? $this->translate('Next check') : $this->translate('Next update') ?></th>
|
<th><?= $activeChecksEnabled ? $this->translate('Next check') : $this->translate('Next update') ?></th>
|
||||||
<td>
|
<td>
|
||||||
|
<?php if ((int) $object->state !== 99) {
|
||||||
|
if ($activeChecksEnabled) {
|
||||||
|
echo $this->timeUntil($object->next_check);
|
||||||
|
} else {
|
||||||
|
echo sprintf($this->translate('expected %s'), $this->timeUntil($object->next_update));
|
||||||
|
}
|
||||||
|
} ?>
|
||||||
<?php if ($activeChecksEnabled && $this->hasPermission('monitoring/command/schedule-check')) {
|
<?php if ($activeChecksEnabled && $this->hasPermission('monitoring/command/schedule-check')) {
|
||||||
if ($object->getType() === $object::TYPE_SERVICE) {
|
if ($object->getType() === $object::TYPE_SERVICE) {
|
||||||
echo $this->qlink(
|
echo $this->qlink(
|
||||||
|
@ -49,16 +59,6 @@ $activeChecksEnabled = (bool) $object->active_checks_enabled;
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} ?>
|
} ?>
|
||||||
<?php if ((int) $object->state !== 99) {
|
|
||||||
if ($activeChecksEnabled) {
|
|
||||||
echo $this->timeUntil($object->next_check);
|
|
||||||
} else {
|
|
||||||
echo sprintf($this->translate('expected %s'), $this->timeUntil($object->next_update));
|
|
||||||
}
|
|
||||||
} ?>
|
|
||||||
<?php if ($object->next_update < time()) {
|
|
||||||
echo $this->icon('circle', $this->translate('Check result is late'), array('class' => 'fg-color-critical'));
|
|
||||||
} ?>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,26 @@
|
||||||
/*! Icinga Web 2 | (c) 2014 Icinga Development Team | GPLv2+ */
|
/*! Icinga Web 2 | (c) 2014 Icinga Development Team | GPLv2+ */
|
||||||
|
|
||||||
|
// Styles for the icon displayed if a check source is reachable
|
||||||
|
.check-source-reachable {
|
||||||
|
color: @color-ok;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Styles for the icon displayed if a check source is not reachable
|
||||||
|
.check-source-not-reachable {
|
||||||
|
color: @color-critical;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Styles for the icon displayed if a check result is late
|
||||||
|
.check-result-late {
|
||||||
|
color: @color-critical;
|
||||||
|
|
||||||
|
&:before {
|
||||||
|
// Remove right margin because the check now form may be displayed right next to the icon and we already have a gap
|
||||||
|
// because of inline-blocks
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Show more and load more links in overviews
|
// Show more and load more links in overviews
|
||||||
.action-links {
|
.action-links {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
|
|
Loading…
Reference in New Issue