mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-28 16:24:04 +02:00
Use timeSince and timeUntil when displaying object downtimes
refs #6778
This commit is contained in:
parent
bd51bed9d7
commit
e49f938f56
@ -47,12 +47,21 @@ foreach ($object->downtimes as $downtime) {
|
||||
) : $this->escape($downtime->comment);
|
||||
|
||||
if ((bool) $downtime->is_in_effect) {
|
||||
$state = 'in downtime since ' . $this->timeSince($downtime->start);
|
||||
$state = sprintf(
|
||||
$this->translate('in downtime %s', 'Last format parameter represents the time in downtime'),
|
||||
$this->timeSince($downtime->start)
|
||||
);
|
||||
} else {
|
||||
if ((bool) $downtime->is_fixed) {
|
||||
$state = 'scheduled ' . $this->timeUntil($downtime->start);
|
||||
$state = sprintf(
|
||||
$this->translate('scheduled %s', 'Last format parameter represents the time scheduled'),
|
||||
$this->timeUntil($downtime->start)
|
||||
);
|
||||
} else {
|
||||
$state = 'scheduled flexible ' . $this->timeUntil($downtime->start);
|
||||
$state = sprintf(
|
||||
$this->translate('scheduled flexible %s', 'Last format parameter represents the time scheduled'),
|
||||
$this->timeUntil($downtime->start)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user