mirror of
https://github.com/Icinga/icingaweb2-module-businessprocess.git
synced 2025-12-24 16:49:34 -05:00
78 lines
2.4 KiB
PHTML
78 lines
2.4 KiB
PHTML
<?php
|
|
|
|
use Icinga\Module\Businessprocess\BusinessProcess;
|
|
|
|
?>
|
|
<?php if (! $this->compact): ?>
|
|
<div class="controls">
|
|
<?= $this->tabs ?>
|
|
<h1><?= $this->escape($this->title) ?></h1>
|
|
<!--
|
|
<form method="post" action="<?= $this->url()->without('node')->without('unlocked') ?>">
|
|
<input type="hidden" name="action" value="switchConfig" />
|
|
<?= $this->formSelect('config', $this->configName, array('class' => 'autosubmit'), $this->processList) ?>
|
|
</form>-->
|
|
<?= $this->breadcrumb->render() ?>
|
|
<?= $this->actions ?>
|
|
</div>
|
|
<?php endif ?>
|
|
|
|
<div class="content<?= $this->compact ? ' compact' : '' ?>" data-base-target="_next">
|
|
<div data-base-target="_self"><?= $this->form ?></div>
|
|
<?php if (! $this->bpconfig->isLocked()): ?>
|
|
<?= $this->qlink('Add new node', 'businessprocess/node/add', array('config' => $this->configName)) ?>
|
|
<?php endif ?>
|
|
<?php if ($this->bpconfig->hasErrors() || $this->bpconfig->hasChanges() || $this->bpconfig->hasSimulations()): ?>
|
|
<ul class="error">
|
|
<?php foreach ($this->bpconfig->getErrors() as $error): ?>
|
|
<li><?= $this->escape($error) ?></li>
|
|
<?php endforeach ?>
|
|
<?php if ($this->bpconfig->hasChanges()): ?>
|
|
<li><?= sprintf(
|
|
$this->translate('This process has %d pending change(s).'),
|
|
$this->bpconfig->countChanges()
|
|
) ?> <?= $this->qlink(
|
|
$this->translate('Store'),
|
|
'businessprocess/process/config',
|
|
array('config' => $this->configName)
|
|
) ?> <?= $this->qlink(
|
|
$this->translate('Dismiss'),
|
|
$this->url()->with('dismissChanges', true),
|
|
null
|
|
) ?></li>
|
|
<?php endif ?>
|
|
<?php if ($this->bpconfig->hasSimulations()): ?>
|
|
<li><?= sprintf(
|
|
$this->translate('This process shows %d simulated state(s).'),
|
|
$this->bpconfig->countSimulations()
|
|
) ?> <?= $this->qlink(
|
|
$this->translate('Dismiss'),
|
|
$this->url()->with('dismissSimulations', true),
|
|
null
|
|
) ?></li>
|
|
<?php endif ?>
|
|
</ul>
|
|
<?php endif ?>
|
|
<div id="<?= $this->bp->getHtmlId() ?>" class="bp">
|
|
<?php
|
|
|
|
try {
|
|
echo $this->bp->renderHtml($this);
|
|
} catch (Exception $e) {
|
|
printf(
|
|
'<ul class="error"><li>%s: %s</li></ul>',
|
|
$this->translate('Error'),
|
|
$this->escape($e->getMessage())
|
|
);
|
|
}
|
|
|
|
|
|
?>
|
|
<?php if (! $this->bpconfig->isLocked()): ?>
|
|
<?php if ($this->bp instanceof BusinessProcess): /* do not render when showing subtree */ ?>
|
|
<?= $this->bp->renderUnbound($this) ?>
|
|
<?php endif ?>
|
|
<?php endif ?>
|
|
</div>
|
|
<?= $this->render('warnings.phtml') ?>
|
|
</div>
|