icingaweb2-module-director/application/views/scripts/job/index.phtml

45 lines
1.2 KiB
PHTML

<div class="controls">
<?= $this->tabs ?>
<h1><?= $this->escape($this->title) ?></h1>
<span class="action-links">
<?= $this->actionLinks ?>
</span>
</div>
<div class="content">
<?php if ($job->disabled === 'y'): ?>
<p class="error"><?= sprintf(
$this->translate(
'This job would run every %ds. It has been disabled and will therefore not be executed as scheduled'
),
$job->run_interval
) ?>
</p>
<?php else: ?>
<p>
<?php //$class = $job->job(); echo $class::getDescription() ?>
<?php if ($job->isPending()): ?>
<?= sprintf($this->translate('This job runs every %ds and is currently pending'), $job->run_interval) ?>
<?php else: ?>
<?= sprintf($this->translate('This job runs every %ds.'), $job->run_interval) ?>
<?php endif ?>
</p>
<?php endif ?>
<?php if ($job->ts_last_attempt): ?>
<?php if ($job->last_attempt_succeeded): ?>
<p><?= sprintf(
$this->translate('The last attempt succeeded at %s'),
$job->ts_last_attempt
) ?></p>
<?php else: ?>
<p class="error"><?= sprintf(
$this->translate('The last attempt failed at %s: %s'),
$job->ts_last_attempt,
$this->escape($job->ts_last_error)
) ?></p>
<?php endif ?>
<?php else: ?>
<?= $this->translate('This job has not been executed yet') ?>
<?php endif ?>
</div>