mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-27 15:54:03 +02:00
JobDetails: fix null issue
This commit is contained in:
parent
37db546a0d
commit
e27cda645d
@ -44,12 +44,12 @@ class JobDetails extends HtmlDocument
|
|||||||
}
|
}
|
||||||
|
|
||||||
$tsLastAttempt = $job->get('ts_last_attempt');
|
$tsLastAttempt = $job->get('ts_last_attempt');
|
||||||
|
if ($tsLastAttempt) {
|
||||||
$ts = \strtotime($tsLastAttempt);
|
$ts = \strtotime($tsLastAttempt);
|
||||||
$timeAgo = Html::tag('span', [
|
$timeAgo = Html::tag('span', [
|
||||||
'class' => 'time-ago',
|
'class' => 'time-ago',
|
||||||
'title' => DateFormatter::formatDateTime($ts)
|
'title' => DateFormatter::formatDateTime($ts)
|
||||||
], DateFormatter::timeAgo($ts));
|
], DateFormatter::timeAgo($ts));
|
||||||
if ($tsLastAttempt) {
|
|
||||||
if ($job->get('last_attempt_succeeded') === 'y') {
|
if ($job->get('last_attempt_succeeded') === 'y') {
|
||||||
$this->add(Hint::ok(Html::sprintf(
|
$this->add(Hint::ok(Html::sprintf(
|
||||||
$this->translate('The last attempt succeeded %s'),
|
$this->translate('The last attempt succeeded %s'),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user