icingaweb2/modules/monitoring/application/views/scripts/config/index.phtml
Jannis Moßhammer d0ac97f335 Configure fixes, regression test for 4606
The configure routine still has to be improved, right now unused
authentication backends are commented out

refs #4491
refs #4606
refs #4640
2013-08-29 11:48:32 +02:00

59 lines
1.8 KiB
PHTML

<?php use Icinga\Web\Url; ?>
<?= $this->tabs->render($this); ?>
<h3>Monitoring Backends</h3>
<?php if ($this->successMessage): ?>
<div class="alert alert-success">
<i>{{OK_ICON}}</i>
<strong><?= $this->escape($this->successMessage); ?></strong>
</div>
<?php endif; ?>
<div>
<a href="<?= Url::fromPath('/monitoring/config/createbackend')->getAbsoluteUrl();?>">
{{CREATE_ICON}} Create New Monitoring Backend
</a>
</div>
<br/>
<?php foreach ($this->backends as $backendName => $config): ?>
<div>
<?php $removeUrl = Url::fromPath('/monitoring/config/removebackend', array('backend' => $backendName)); ?>
<?php $editUrl = Url::fromPath('/monitoring/config/editbackend', array('backend' => $backendName)); ?>
<b><?= $this->escape($backendName); ?></b>
<small>(Type: <?= $this->escape($config['type'] === 'ido' ? 'IDO' : ucfirst($config['type'])); ?>)</small>
<div>
<a href="<?= $removeUrl; ?>">{{REMOVE_ICON}} Remove This Backend</a><br/>
<a href="<?= $editUrl; ?>">{{EDIT_ICON}} Edit This Backend</a>
</div>
</div>
<br/>
<?php endforeach; ?>
<br/>
<h3>Monitoring Instances</h3>
<div>
<a href="<?= Url::fromPath('/monitoring/config/createinstance')->getAbsoluteUrl();?>">
{{CREATE_ICON}} Create New Instance
</a>
</div>
<br/>
<?php foreach ($this->instances as $instanceName => $config): ?>
<?php $removeUrl = Url::fromPath('/monitoring/config/removeinstance', array('instance' => $instanceName)); ?>
<?php $editUrl = Url::fromPath('/monitoring/config/editinstance', array('instance' => $instanceName)); ?>
<div>
<b><?= $this->escape($instanceName); ?></b>
<small>(Type: <?= isset($config['host']) ? 'Remote' : 'Local'; ?>)</small>
<div>
<a href="<?= $removeUrl; ?>">{{REMOVE_ICON}} Remove This Instance</a><br/>
<a href="<?= $editUrl; ?>">{{EDIT_ICON}} Edit This Instance</a>
</div>
</div>
<br/>
<?php endforeach; ?>