mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-30 17:24:18 +02:00
scripts/job: show single job details
This commit is contained in:
parent
17345a3df8
commit
95afce9d5a
50
application/views/scripts/job/index.phtml
Normal file
50
application/views/scripts/job/index.phtml
Normal file
@ -0,0 +1,50 @@
|
||||
<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 ?>
|
||||
|
||||
<pre>
|
||||
<?= $this->escape(
|
||||
print_r($this->job->getProperties(), 1)
|
||||
) ?>
|
||||
</pre>
|
||||
</div>
|
Loading…
x
Reference in New Issue
Block a user