mirror of
https://github.com/Icinga/icingaweb2-module-businessprocess.git
synced 2026-01-04 12:49:34 -05:00
process/show: add simulation mode
This commit is contained in:
parent
0e710f9d4d
commit
1dfd67a15e
3 changed files with 12 additions and 0 deletions
|
|
@ -27,6 +27,11 @@ class Bpapp_ProcessController extends Controller
|
|||
}
|
||||
}
|
||||
$this->setAutorefreshInterval(10);
|
||||
|
||||
if ($this->params->get('simulation')) {
|
||||
$bp->setSimulationMode();
|
||||
$this->addSimulation($bp);
|
||||
}
|
||||
}
|
||||
|
||||
public function sourceAction()
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
<?= $this->tabs ?>
|
||||
<h1><?= $this->escape($this->title) ?>
|
||||
<a href="<?= $this->url()->with('mode', 'toplevel') ?>" title="<?= $this->escape('Switch to toplevel view') ?>"><?= $this->icon('dashboard') ?></a>
|
||||
<?= $this->render('simulationlink.phtml') ?>
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
6
application/views/scripts/simulationlink.phtml
Normal file
6
application/views/scripts/simulationlink.phtml
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<?php if ($this->bp->isSimulationMode()): ?>
|
||||
<a href="<?= $this->url()->without('simulation') ?>" title="<?= $this->escape('Switch to live mode') ?>"><?= $this->icon('globe') ?></a>
|
||||
<?php else: ?>
|
||||
<a href="<?= $this->url()->with('simulation', true) ?>" title="<?= $this->escape('Switch to simulation mode') ?>"><?= $this->icon('magic') ?></a>
|
||||
<?php endif ?>
|
||||
|
||||
Loading…
Reference in a new issue