mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-25 14:54:24 +02:00
Always show downtime schedule times
This commit is contained in:
parent
1351be7da8
commit
ba6b8c04ec
@ -1,10 +1,10 @@
|
|||||||
<td class="state-col state-<?= $stateName; ?><?= $downtime->is_in_effect ? ' handled' : ''; ?>">
|
<td class="state-col state-<?= $stateName; ?><?= $downtime->is_in_effect ? ' handled' : ''; ?>">
|
||||||
<?php if ($downtime->start <= time() && ! $downtime->is_in_effect): ?>
|
<?php if ($downtime->start <= time() && ! $downtime->is_in_effect): ?>
|
||||||
<div class="state-label"><?= $this->translate('ENDS', 'Downtime status'); ?></div>
|
<div class="state-label"><?= $this->translate('ENDS', 'Downtime status'); ?></div>
|
||||||
<div class="state-meta"><?= $this->timeUntil($downtime->is_flexible ? $downtime->scheduled_end : $downtime->end, $this->compact) ?></div>
|
<div class="state-meta"><?= $this->timeUntil($downtime->is_flexible ? $downtime->scheduled_end : $downtime->end, $this->compact, true) ?></div>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<div class="state-label"><?= $downtime->is_in_effect ? $this->translate('EXPIRES', 'Downtime status') : $this->translate('STARTS', 'Downtime status'); ?></div>
|
<div class="state-label"><?= $downtime->is_in_effect ? $this->translate('EXPIRES', 'Downtime status') : $this->translate('STARTS', 'Downtime status'); ?></div>
|
||||||
<div class="state-meta"><?= $this->timeUntil($downtime->is_in_effect ? $downtime->end : $downtime->start, $this->compact) ?></div>
|
<div class="state-meta"><?= $this->timeUntil($downtime->is_in_effect ? $downtime->end : $downtime->start, $this->compact, true) ?></div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@ -47,7 +47,7 @@
|
|||||||
)) ?>
|
)) ?>
|
||||||
</span>
|
</span>
|
||||||
<?php if (! $downtime->is_in_effect && $downtime->start >= time()): ?>
|
<?php if (! $downtime->is_in_effect && $downtime->start >= time()): ?>
|
||||||
<span><?= sprintf($this->translate('expires %s'), $this->timeUntil($downtime->end)) ?></span>
|
<span><?= sprintf($this->translate('expires %s'), $this->timeUntil($downtime->end, false, true)) ?></span>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
<span class="comment-icons">
|
<span class="comment-icons">
|
||||||
<?php if ($downtime->is_flexible): ?>
|
<?php if ($downtime->is_flexible): ?>
|
||||||
|
@ -64,17 +64,17 @@ if (empty($object->comments) && ! $addLink) {
|
|||||||
if ((bool) $downtime->is_fixed) {
|
if ((bool) $downtime->is_fixed) {
|
||||||
$state = sprintf(
|
$state = sprintf(
|
||||||
$this->translate('scheduled %s', 'Last format parameter represents the time scheduled'),
|
$this->translate('scheduled %s', 'Last format parameter represents the time scheduled'),
|
||||||
$this->timeUntil($downtime->start)
|
$this->timeUntil($downtime->start, false, true)
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
$state = sprintf(
|
$state = sprintf(
|
||||||
$this->translate('scheduled flexible %s', 'Last format parameter represents the time scheduled'),
|
$this->translate('scheduled flexible %s', 'Last format parameter represents the time scheduled'),
|
||||||
$this->timeUntil($downtime->start)
|
$this->timeUntil($downtime->start, false, true)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
$state .= ' ' . sprintf(
|
$state .= ' ' . sprintf(
|
||||||
$this->translate('expires %s', 'Last format parameter represents the downtime expire time'),
|
$this->translate('expires %s', 'Last format parameter represents the downtime expire time'),
|
||||||
$this->timeUntil($downtime->end)
|
$this->timeUntil($downtime->end, false, true)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user