parent
d01a98b7e6
commit
7b0a48bef5
|
@ -21,16 +21,16 @@ $this->addHelperFunction('timeSincePrefix', function ($timestamp) {
|
||||||
. ' </span>';
|
. ' </span>';
|
||||||
});
|
});
|
||||||
|
|
||||||
$this->addHelperFunction('timeUnless', function ($timestamp) {
|
$this->addHelperFunction('timeUntil', function ($timestamp) {
|
||||||
if (! $timestamp) return '';
|
if (! $timestamp) return '';
|
||||||
return '<span class="timeunless">'
|
return '<span class="timeuntil">'
|
||||||
. Format::timeUntil($timestamp)
|
. Format::timeUntil($timestamp)
|
||||||
. '</span>';
|
. '</span>';
|
||||||
});
|
});
|
||||||
|
|
||||||
$this->addHelperFunction('timeUnlessPrefix', function ($timestamp) {
|
$this->addHelperFunction('timeUntilPrefix', function ($timestamp) {
|
||||||
if (! $timestamp) return '';
|
if (! $timestamp) return '';
|
||||||
return '<span class="timeunless">'
|
return '<span class="timeuntil">'
|
||||||
. $this->translate(Format::timeUntilPrefix($timestamp))
|
. $this->translate(Format::timeUntilPrefix($timestamp))
|
||||||
. '</span>';
|
. '</span>';
|
||||||
});
|
});
|
||||||
|
|
|
@ -58,7 +58,7 @@ foreach ($comments as $comment):
|
||||||
<?php if ($comment->persistent): ?>Comment is persistent<br /><?php endif ?>
|
<?php if ($comment->persistent): ?>Comment is persistent<br /><?php endif ?>
|
||||||
<b>Expires: </b> <?=
|
<b>Expires: </b> <?=
|
||||||
($comment->expiration) ?
|
($comment->expiration) ?
|
||||||
$this->timeUnless($comment->expiration) :
|
$this->timeUntil($comment->expiration) :
|
||||||
'Never'
|
'Never'
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -43,7 +43,7 @@ $cf = $this->getHelper('CommandForm');
|
||||||
<?php if ($ps->notifications_enabled === '1'): ?>
|
<?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>
|
<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): ?>
|
<?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>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -25,7 +25,7 @@ $cf = $this->getHelper('CommandForm');
|
||||||
'host' => $object->host_name,
|
'host' => $object->host_name,
|
||||||
'service' => $object->service_description
|
'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>
|
</tr>
|
||||||
<?php if ($object->check_execution_time): ?>
|
<?php if ($object->check_execution_time): ?>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
|
@ -18,9 +18,9 @@ foreach ($object->downtimes as $downtime) {
|
||||||
$state = 'in downtime since ' . $this->timeSince($downtime->start);
|
$state = 'in downtime since ' . $this->timeSince($downtime->start);
|
||||||
} else {
|
} else {
|
||||||
if ($downtime->is_fixed) {
|
if ($downtime->is_fixed) {
|
||||||
$state = 'scheduled ' . $this->timeUnless($downtime->start);
|
$state = 'scheduled ' . $this->timeUntil($downtime->start);
|
||||||
} else {
|
} else {
|
||||||
$state = 'scheduled flexible ' . $this->timeUnless($downtime->start);
|
$state = 'scheduled flexible ' . $this->timeUntil($downtime->start);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue