parent
d01a98b7e6
commit
7b0a48bef5
|
@ -21,16 +21,16 @@ $this->addHelperFunction('timeSincePrefix', function ($timestamp) {
|
|||
. ' </span>';
|
||||
});
|
||||
|
||||
$this->addHelperFunction('timeUnless', function ($timestamp) {
|
||||
$this->addHelperFunction('timeUntil', function ($timestamp) {
|
||||
if (! $timestamp) return '';
|
||||
return '<span class="timeunless">'
|
||||
return '<span class="timeuntil">'
|
||||
. Format::timeUntil($timestamp)
|
||||
. '</span>';
|
||||
});
|
||||
|
||||
$this->addHelperFunction('timeUnlessPrefix', function ($timestamp) {
|
||||
$this->addHelperFunction('timeUntilPrefix', function ($timestamp) {
|
||||
if (! $timestamp) return '';
|
||||
return '<span class="timeunless">'
|
||||
return '<span class="timeuntil">'
|
||||
. $this->translate(Format::timeUntilPrefix($timestamp))
|
||||
. '</span>';
|
||||
});
|
||||
|
|
|
@ -58,7 +58,7 @@ foreach ($comments as $comment):
|
|||
<?php if ($comment->persistent): ?>Comment is persistent<br /><?php endif ?>
|
||||
<b>Expires: </b> <?=
|
||||
($comment->expiration) ?
|
||||
$this->timeUnless($comment->expiration) :
|
||||
$this->timeUntil($comment->expiration) :
|
||||
'Never'
|
||||
?>
|
||||
</td>
|
||||
|
|
|
@ -43,7 +43,7 @@ $cf = $this->getHelper('CommandForm');
|
|||
<?php if ($ps->notifications_enabled === '1'): ?>
|
||||
<a rel="tooltip" title="Disable notifications for a specific time on a program-wide basis" href="<?= $this->href('monitoring/command/disablenotificationswithexpire') ?>" data-base-target="_next">Temporarily disable</a>
|
||||
<?php elseif ($ps->disable_notif_expire_time): ?>
|
||||
Will be re-enabled in <strong><?= $this->timeUnless($ps->disable_notif_expire_time) ?></strong>
|
||||
Will be re-enabled in <strong><?= $this->timeUntil($ps->disable_notif_expire_time) ?></strong>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
|
|
|
@ -25,7 +25,7 @@ $cf = $this->getHelper('CommandForm');
|
|||
'host' => $object->host_name,
|
||||
'service' => $object->service_description
|
||||
)
|
||||
) ?>"><?= $this->img('img/icons/reschedule_petrol.png') ?> <?= $this->translate('Reschedule') ?></a> <?= $this->timeUnless($object->next_check) ?></td>
|
||||
) ?>"><?= $this->img('img/icons/reschedule_petrol.png') ?> <?= $this->translate('Reschedule') ?></a> <?= $this->timeUntil($object->next_check) ?></td>
|
||||
</tr>
|
||||
<?php if ($object->check_execution_time): ?>
|
||||
<tr>
|
||||
|
|
|
@ -18,9 +18,9 @@ foreach ($object->downtimes as $downtime) {
|
|||
$state = 'in downtime since ' . $this->timeSince($downtime->start);
|
||||
} else {
|
||||
if ($downtime->is_fixed) {
|
||||
$state = 'scheduled ' . $this->timeUnless($downtime->start);
|
||||
$state = 'scheduled ' . $this->timeUntil($downtime->start);
|
||||
} else {
|
||||
$state = 'scheduled flexible ' . $this->timeUnless($downtime->start);
|
||||
$state = 'scheduled flexible ' . $this->timeUntil($downtime->start);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue