Re-design configuration interface

This commit is contained in:
Alexander Klimov 2014-03-11 17:13:42 +01:00
parent f1dcc4c15e
commit 5c0441bc06
2 changed files with 45 additions and 37 deletions

View File

@ -2,7 +2,7 @@
<?= $this->tabs ?> <?= $this->tabs ?>
</div> </div>
<div class="content"> <div class="content" data-base-target="_next">
<?php <?php
if (isset($this->messageBox)) { if (isset($this->messageBox)) {

View File

@ -3,7 +3,7 @@
<?= $this->tabs->render($this); ?> <?= $this->tabs->render($this); ?>
</div> </div>
<div class="content"> <div class="content" data-base-target="_next">
<h1>Monitoring Backends</h1> <h1>Monitoring Backends</h1>
<?php if (isset($this->messageBox)): ?> <?php if (isset($this->messageBox)): ?>
@ -16,23 +16,28 @@
</a> </a>
</p> </p>
<table class="configTable"> <table class="action">
<?php foreach ($this->backends as $backendName => $config): ?> <thead>
<tr> <th>Monitoring Backend</th>
<td class="configTable"> <th style="width: 5em">Remove</th>
<?php </thead>
$removeUrl = Url::fromPath('/monitoring/config/removebackend', array('backend' => $backendName)); <tbody>
$editUrl = Url::fromPath('/monitoring/config/editbackend', array('backend' => $backendName)); <?php foreach ($this->backends as $backendName => $config): ?>
?> <?php
<b><?= $this->escape($backendName); ?></b> $removeUrl = Url::fromPath('/monitoring/config/removebackend', array('backend' => $backendName));
<small>(Type: <?= $this->escape($config['type'] === 'ido' ? 'IDO' : ucfirst($config['type'])); ?>)</small> $editUrl = Url::fromPath('/monitoring/config/editbackend', array('backend' => $backendName));
<div> ?>
<a href="<?= $removeUrl; ?>"><?= $this->icon('remove.png'); ?> Remove</a>&emsp; <tr>
<a href="<?= $editUrl; ?>"><?= $this->icon('edit.png'); ?> Edit</a> <td>
</div> <a href="<?= $editUrl; ?>"><?= $this->icon('edit.png'); ?> <?= $this->escape($backendName); ?></a>
</td> <small>(Type: <?= $this->escape($config['type'] === 'ido' ? 'IDO' : ucfirst($config['type'])); ?>)</small>
</tr> </td>
<?php endforeach; ?> <td>
<a href="<?= $removeUrl; ?>"><?= $this->icon('remove.png'); ?></a>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table> </table>
<h1>Monitoring Instances</h1> <h1>Monitoring Instances</h1>
@ -43,24 +48,27 @@
</a> </a>
</p> </p>
<table class="configTable"> <table class="action">
<?php foreach ($this->instances as $instanceName => $config): ?> <thead>
<tr> <th>Instance</th>
<td class="configTable"> <th style="width: 5em">Remove</th>
<?php </thead>
$removeUrl = Url::fromPath('/monitoring/config/removeinstance', array('instance' => $instanceName)); <tbody>
$editUrl = Url::fromPath('/monitoring/config/editinstance', array('instance' => $instanceName)); <?php foreach ($this->instances as $instanceName => $config): ?>
?> <?php
<div> $removeUrl = Url::fromPath('/monitoring/config/removeinstance', array('instance' => $instanceName));
<b><?= $this->escape($instanceName); ?></b> $editUrl = Url::fromPath('/monitoring/config/editinstance', array('instance' => $instanceName));
?>
<tr>
<td>
<a href="<?= $editUrl; ?>"><?= $this->icon('edit.png'); ?> <?= $this->escape($instanceName); ?></a>
<small>(Type: <?= isset($config['host']) ? 'Remote' : 'Local'; ?>)</small> <small>(Type: <?= isset($config['host']) ? 'Remote' : 'Local'; ?>)</small>
<div> </td>
<a href="<?= $removeUrl; ?>"><?= $this->icon('remove.png'); ?> Remove</a>&emsp; <td>
<a href="<?= $editUrl; ?>"><?= $this->icon('edit.png'); ?> Edit</a> <a href="<?= $removeUrl; ?>"><?= $this->icon('remove.png'); ?></a>
</div> </td>
</div> </tr>
</td> <?php endforeach; ?>
</tr> </tbody>
<?php endforeach; ?>
</table> </table>
</div> </div>