mirror of
https://github.com/Icinga/icingaweb2-module-businessprocess.git
synced 2025-12-25 17:19:33 -05:00
47 lines
1.6 KiB
PHTML
47 lines
1.6 KiB
PHTML
<?php
|
|
|
|
use Icinga\Module\Businessprocess\ImportedNode;
|
|
use Icinga\Module\Businessprocess\BpNode;
|
|
|
|
$count = $this->bp->countChildren();
|
|
$howMany = 'normal';
|
|
|
|
if ($count < 20) {
|
|
$howMany = 'few';
|
|
} elseif ($count > 50) {
|
|
$howMany = 'many';
|
|
}
|
|
|
|
?>
|
|
<?php if (! $this->compact): ?>
|
|
<div class="controls">
|
|
<?= $this->tabs ?>
|
|
<h1><form method="post" action="<?= $this->url()->without('node')->without('unlocked') ?>">
|
|
<?= $this->formSelect('config', $this->configName, array('class' => 'autosubmit'), $this->processList) ?>
|
|
</form>
|
|
<a href="<?= $this->url()->without('mode') ?>" title="<?= $this->escape('Switch to tree view') ?>" style="float: right"><?= $this->icon('sitemap') ?></a>
|
|
</h1>
|
|
</div>
|
|
<?php endif ?>
|
|
|
|
<div class="content<?= $this->compact ? ' compact' : '' ?>" data-base-target="_next">
|
|
<div class="toplevel <?= $howMany ?>" data-base-target="_next">
|
|
<?php foreach ($this->bp->getChildren() as $name => $node): ?>
|
|
<div class="<?= strtolower($node->getStateName()) ?><?= $node->isHandled() ? ' handled' : '' ?>">
|
|
<?php if ($node instanceof ImportedNode): ?>
|
|
<a href="<?= $this->url('businessprocess/process/show', array('config' => $node->getConfigName(), 'node' => $name)) ?>">
|
|
<?php else: ?>
|
|
<a href="<?= $this->url('businessprocess/process/show', array('config' => $this->configName, 'node' => $name)) ?>">
|
|
<?php endif ?>
|
|
<?= $this->escape($node->getAlias()) ?><?php
|
|
|
|
if ($node instanceof BpNode) {
|
|
echo $this->renderStateBadges($node->getStateSummary());
|
|
}
|
|
|
|
?></a>
|
|
</div>
|
|
<?php endforeach ?>
|
|
</div>
|
|
<?= $this->render('warnings.phtml') ?>
|
|
</div>
|