monitoring: Fix duration, date and time formatting for downtimes
refs #6778
This commit is contained in:
parent
de9be044b3
commit
da97523fa0
modules/monitoring/application/views/scripts
|
@ -44,7 +44,7 @@
|
|||
</tr>
|
||||
<tr title="<?= $this->translate('Date and time this downtime was entered'); ?>">
|
||||
<th><?= $this->translate('Entry Time') ?></th>
|
||||
<td> <?= date('d.m.y H:i' ,$this->escape($this->downtime->entry_time)) ?></td>
|
||||
<td><?= $this->formatDateTime($this->downtime->entry_time) ?></td>
|
||||
</tr>
|
||||
<tr class="newsection">
|
||||
<th><?= $this->escape(
|
||||
|
@ -66,14 +66,14 @@
|
|||
. 'this refers to the earliest possible time that the downtime'
|
||||
. ' can start'); ?>">
|
||||
<th><?= $this->translate('Scheduled start') ?></th>
|
||||
<td><?= date('d.m.y H:i', $this->downtime->scheduled_start) ?></td>
|
||||
<td><?= $this->formatDateTime($this->downtime->scheduled_start) ?></td>
|
||||
</tr>
|
||||
<tr title="<?= $this->translate('The date/time the scheduled downtime is '
|
||||
. 'supposed to end. If this is a flexible (non-fixed) downtime, '
|
||||
. 'this refers to the last possible time that the downtime can '
|
||||
. 'start'); ?>">
|
||||
<th><?= $this->translate('Scheduled end') ?></th>
|
||||
<td><?= date('d.m.y H:i', $this->downtime->scheduled_end) ?></td>
|
||||
<td><?= $this->formatDateTime($this->downtime->scheduled_end) ?></td>
|
||||
</tr>
|
||||
<?php if ($this->downtime->is_flexible): ?>
|
||||
<tr title="<?= $this->translate('Indicates the number of seconds that the '
|
||||
|
@ -81,17 +81,17 @@
|
|||
. ' this is a flexible downtime, which can start at a variable '
|
||||
. 'time, but lasts for the specified duration'); ?>">
|
||||
<th tit><?= $this->translate('Duration') ?></th>
|
||||
<td><?= $this->format()->duration($this->escape($this->downtime->duration)); ?></td>
|
||||
<td><?= $this->formatDuration($this->downtime->duration) ?></td>
|
||||
</tr>
|
||||
<tr title="<?= $this->translate('he date/time the scheduled downtime was'
|
||||
. ' actually started'); ?>">
|
||||
<th><?= $this->translate('Actual start time') ?></th>
|
||||
<td><?= date('d.m.y H:i', $downtime->start); ?></td>
|
||||
<td><?= $this->formatDateTime($downtime->start) ?></td>
|
||||
</tr>
|
||||
<tr title="<?= $this->translate('The date/time the scheduled downtime '
|
||||
. 'actually ended'); ?>">
|
||||
<th><?= $this->translate('Actual end time') ?></th>
|
||||
<td><?= date('d.m.y H:i', $downtime->end); ?></td>
|
||||
<td><?= $this->formatDateTime($downtime->end) ?></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
|
||||
|
|
|
@ -74,20 +74,20 @@ if (count($downtimes) === 0) {
|
|||
$isService
|
||||
? $this->translate('This flexible service downtime was started on %s at %s and lasts for %s until %s at %s.')
|
||||
: $this->translate('This flexible host downtime was started on %s at %s and lasts for %s until %s at %s.'),
|
||||
date('d.m.y', $downtime->start),
|
||||
date('H:i', $downtime->start),
|
||||
$this->format()->duration($downtime->duration),
|
||||
date('d.m.y', $downtime->end),
|
||||
date('H:i', $downtime->end)
|
||||
$this->formatDate($downtime->start),
|
||||
$this->formatTime($downtime->start),
|
||||
$this->formatDuration($downtime->duration),
|
||||
$this->formatDate($downtime->end),
|
||||
$this->formatTime($downtime->end)
|
||||
); ?>
|
||||
<?php else: ?>
|
||||
<?= sprintf(
|
||||
$isService
|
||||
? $this->translate('This flexible service downtime has been scheduled to start between %s - %s and to last for %s.')
|
||||
: $this->translate('This flexible host downtime has been scheduled to start between %s - %s and to last for %s.'),
|
||||
date('d.m.y H:i', $downtime->scheduled_start),
|
||||
date('d.m.y H:i', $downtime->scheduled_end),
|
||||
$this->format()->duration($downtime->duration)
|
||||
$this->formatDateTime($downtime->scheduled_start),
|
||||
$this->formatDateTime($downtime->scheduled_end),
|
||||
$this->formatDuration($downtime->duration)
|
||||
); ?>
|
||||
<?php endif ?>
|
||||
<?php else: ?>
|
||||
|
@ -96,20 +96,20 @@ if (count($downtimes) === 0) {
|
|||
$isService
|
||||
? $this->translate('This fixed service downtime was started on %s at %s and expires on %s at %s.')
|
||||
: $this->translate('This fixed host downtime was started on %s at %s and expires on %s at %s.'),
|
||||
date('d.m.y', $downtime->start),
|
||||
date('H:i', $downtime->start),
|
||||
date('d.m.y', $downtime->end),
|
||||
date('H:i', $downtime->end)
|
||||
$this->formatDate($downtime->start),
|
||||
$this->formatTime($downtime->start),
|
||||
$this->formatDate($downtime->end),
|
||||
$this->formatTime($downtime->end)
|
||||
); ?>
|
||||
<?php else: ?>
|
||||
<?= sprintf(
|
||||
$isService
|
||||
? $this->translate('This fixed service downtime has been scheduled to start on %s at %s and to end on %s at %s.')
|
||||
: $this->translate('This fixed host downtime has been scheduled to start on %s at %s and to end on %s at %s.'),
|
||||
date('d.m.y', $downtime->scheduled_start),
|
||||
date('H:i', $downtime->scheduled_start),
|
||||
date('d.m.y', $downtime->scheduled_end),
|
||||
date('H:i', $downtime->scheduled_end)
|
||||
$this->formatDate($downtime->start),
|
||||
$this->formatTime($downtime->start),
|
||||
$this->formatDate($downtime->end),
|
||||
$this->formatTime($downtime->end)
|
||||
); ?>
|
||||
<?php endif ?>
|
||||
<?php endif ?>
|
||||
|
|
|
@ -13,20 +13,20 @@
|
|||
$this->isService
|
||||
? $this->translate('This flexible service downtime was started on %s at %s and lasts for %s until %s at %s.')
|
||||
: $this->translate('This flexible host downtime was started on %s at %s and lasts for %s until %s at %s.'),
|
||||
date('d.m.y', $downtime->start),
|
||||
date('H:i', $downtime->start),
|
||||
$this->format()->duration($downtime->duration),
|
||||
date('d.m.y', $downtime->end),
|
||||
date('H:i', $downtime->end)
|
||||
$this->formatDate($downtime->start),
|
||||
$this->formatTime($downtime->start),
|
||||
$this->formatDuration($downtime->duration),
|
||||
$this->formatDate($downtime->end),
|
||||
$this->formatTime($downtime->end)
|
||||
); ?>
|
||||
<?php else: ?>
|
||||
<?= sprintf(
|
||||
$this->isService
|
||||
? $this->translate('This flexible service downtime has been scheduled to start between %s - %s and to last for %s.')
|
||||
: $this->translate('This flexible host downtime has been scheduled to start between %s - %s and to last for %s.'),
|
||||
date('d.m.y H:i', $downtime->scheduled_start),
|
||||
date('d.m.y H:i', $downtime->scheduled_end),
|
||||
$this->format()->duration($downtime->duration)
|
||||
$this->formatDateTime($downtime->scheduled_start),
|
||||
$this->formatDateTime($downtime->scheduled_end),
|
||||
$this->formatDuration($downtime->duration)
|
||||
); ?>
|
||||
<?php endif ?>
|
||||
<?php else: ?>
|
||||
|
@ -35,20 +35,20 @@
|
|||
$this->isService
|
||||
? $this->translate('This fixed service downtime was started on %s at %s and expires on %s at %s.')
|
||||
: $this->translate('This fixed host downtime was started on %s at %s and expires on %s at %s.'),
|
||||
date('d.m.y', $downtime->start),
|
||||
date('H:i', $downtime->start),
|
||||
date('d.m.y', $downtime->end),
|
||||
date('H:i', $downtime->end)
|
||||
$this->formatDate($downtime->start),
|
||||
$this->formatTime($downtime->start),
|
||||
$this->formatDate($downtime->end),
|
||||
$this->formatTime($downtime->end)
|
||||
); ?>
|
||||
<?php else: ?>
|
||||
<?= sprintf(
|
||||
$this->isService
|
||||
? $this->translate('This fixed service downtime has been scheduled to start on %s at %s and to end on %s at %s.')
|
||||
: $this->translate('This fixed host downtime has been scheduled to start on %s at %s and to end on %s at %s.'),
|
||||
date('d.m.y', $downtime->scheduled_start),
|
||||
date('H:i', $downtime->scheduled_start),
|
||||
date('d.m.y', $downtime->scheduled_end),
|
||||
date('H:i', $downtime->scheduled_end)
|
||||
$this->formatDate($downtime->start),
|
||||
$this->formatTime($downtime->start),
|
||||
$this->formatDate($downtime->end),
|
||||
$this->formatTime($downtime->end)
|
||||
); ?>
|
||||
<?php endif ?>
|
||||
<?php endif ?>
|
||||
|
|
|
@ -25,20 +25,20 @@
|
|||
$this->isService
|
||||
? $this->translate('This flexible service downtime was started on %s at %s and lasts for %s until %s at %s.')
|
||||
: $this->translate('This flexible host downtime was started on %s at %s and lasts for %s until %s at %s.'),
|
||||
date('d.m.y', $downtime->start),
|
||||
date('H:i', $downtime->start),
|
||||
$this->format()->duration($downtime->duration),
|
||||
date('d.m.y', $downtime->end),
|
||||
date('H:i', $downtime->end)
|
||||
$this->formatDate($downtime->start),
|
||||
$this->formatTime($downtime->start),
|
||||
$this->formatDuration($downtime->duration),
|
||||
$this->formatDate($downtime->end),
|
||||
$this->formatTime($downtime->end)
|
||||
); ?>
|
||||
<?php else: ?>
|
||||
<?= sprintf(
|
||||
$this->isService
|
||||
? $this->translate('This flexible service downtime has been scheduled to start between %s - %s and to last for %s.')
|
||||
: $this->translate('This flexible host downtime has been scheduled to start between %s - %s and to last for %s.'),
|
||||
date('d.m.y H:i', $downtime->scheduled_start),
|
||||
date('d.m.y H:i', $downtime->scheduled_end),
|
||||
$this->format()->duration($downtime->duration)
|
||||
$this->formatDateTime($downtime->scheduled_start),
|
||||
$this->formatDateTime($downtime->scheduled_end),
|
||||
$this->formatDuration($downtime->duration)
|
||||
); ?>
|
||||
<?php endif ?>
|
||||
<?php else: ?>
|
||||
|
@ -47,20 +47,20 @@
|
|||
$this->isService
|
||||
? $this->translate('This fixed service downtime was started on %s at %s and expires on %s at %s.')
|
||||
: $this->translate('This fixed host downtime was started on %s at %s and expires on %s at %s.'),
|
||||
date('d.m.y', $downtime->start),
|
||||
date('H:i', $downtime->start),
|
||||
date('d.m.y', $downtime->end),
|
||||
date('H:i', $downtime->end)
|
||||
$this->formatDate($downtime->start),
|
||||
$this->formatTime($downtime->start),
|
||||
$this->formatDate($downtime->end),
|
||||
$this->formatTime($downtime->end)
|
||||
); ?>
|
||||
<?php else: ?>
|
||||
<?= sprintf(
|
||||
$this->isService
|
||||
? $this->translate('This fixed service downtime has been scheduled to start on %s at %s and to end on %s at %s.')
|
||||
: $this->translate('This fixed host downtime has been scheduled to start on %s at %s and to end on %s at %s.'),
|
||||
date('d.m.y', $downtime->scheduled_start),
|
||||
date('H:i', $downtime->scheduled_start),
|
||||
date('d.m.y', $downtime->scheduled_end),
|
||||
date('H:i', $downtime->scheduled_end)
|
||||
$this->formatDate($downtime->start),
|
||||
$this->formatTime($downtime->start),
|
||||
$this->formatDate($downtime->end),
|
||||
$this->formatTime($downtime->end)
|
||||
); ?>
|
||||
<?php endif ?>
|
||||
<?php endif ?>
|
||||
|
|
Loading…
Reference in New Issue