Capitalization, smaleler codestyle fixes

refs #3776
This commit is contained in:
Jannis Moßhammer 2013-08-20 18:08:56 +02:00 committed by Eric Lippmann
parent 83d053965f
commit cd1fb2e4b5
7 changed files with 25 additions and 21 deletions

View File

@ -59,7 +59,7 @@ class Monitoring_ConfigController extends BaseConfigController {
'backends' => new Tab(array( 'backends' => new Tab(array(
'name' => 'backends', 'name' => 'backends',
'title' => 'Monitoring Backends', 'title' => 'Monitoring Backends',
'url' => Url::fromPath('/monitoring/config/backend') 'url' => Url::fromPath('/monitoring/config')
)) ))
); );
} }
@ -81,7 +81,7 @@ class Monitoring_ConfigController extends BaseConfigController {
{ {
$backend = $this->getParam('backend'); $backend = $this->getParam('backend');
if (!$this->isExistingBackend($backend)) { if (!$this->isExistingBackend($backend)) {
$this->view->error = "Unknown backend " . htmlentities($backend); $this->view->error = 'Unknown backend ' . $backend;
return; return;
} }
$backendForm = new EditBackendForm(); $backendForm = new EditBackendForm();
@ -135,7 +135,7 @@ class Monitoring_ConfigController extends BaseConfigController {
{ {
$backend = $this->getParam('backend'); $backend = $this->getParam('backend');
if (!$this->isExistingBackend($backend)) { if (!$this->isExistingBackend($backend)) {
$this->view->error = "Unknown backend " . $backend; $this->view->error = 'Unknown backend ' . $backend;
return; return;
} }
$form = new ConfirmRemovalForm(); $form = new ConfirmRemovalForm();
@ -166,7 +166,7 @@ class Monitoring_ConfigController extends BaseConfigController {
{ {
$instance = $this->getParam('instance'); $instance = $this->getParam('instance');
if (!$this->isExistingInstance($instance)) { if (!$this->isExistingInstance($instance)) {
$this->view->error = "Unknown instance " . $instance; $this->view->error = 'Unknown instance ' . $instance;
return; return;
} }
@ -197,7 +197,7 @@ class Monitoring_ConfigController extends BaseConfigController {
{ {
$instance = $this->getParam('instance'); $instance = $this->getParam('instance');
if (!$this->isExistingInstance($instance)) { if (!$this->isExistingInstance($instance)) {
$this->view->error = "Unknown instance " . htmlentities($instance); $this->view->error = 'Unknown instance ' . htmlentities($instance);
return; return;
} }
$form = new EditInstanceForm(); $form = new EditInstanceForm();

View File

@ -78,6 +78,6 @@ class ConfirmRemovalForm extends Form
'required' => true 'required' => true
) )
); );
$this->setSubmitLabel('Confirm removal'); $this->setSubmitLabel('Confirm Removal');
} }
} }

View File

@ -1,8 +1,8 @@
<?= $this->tabs->render($this); ?> <?= $this->tabs->render($this); ?>
<?php if ($this->name): ?> <?php if ($this->name): ?>
<h4>Edit backend <?= $this->escape($this->name) ?></h4> <h4>Edit Backend "<?= $this->escape($this->name) ?>"</h4>
<?php else: ?> <?php else: ?>
<h4>Create new backend</h4> <h4>Create New Backend</h4>
<?php endif; ?> <?php endif; ?>
<?php if ($this->error): ?> <?php if ($this->error): ?>

View File

@ -1,9 +1,9 @@
<?= $this->tabs->render($this); ?> <?= $this->tabs->render($this); ?>
<?php if (isset($this->name)): ?> <?php if (isset($this->name)): ?>
<h4>Edit instance configuration for <?= $this->escape($this->name) ?></h4> <h4>Edit Instance Configuration for "<?= $this->escape($this->name) ?>"</h4>
<?php else: ?> <?php else: ?>
<h4>Configure new icinga instance</h4> <h4>Configure New Icinga Instance</h4>
<?php endif; ?> <?php endif; ?>
<?php if ($this->error): ?> <?php if ($this->error): ?>

View File

@ -4,7 +4,9 @@
<h3>Backends</h3> <h3>Backends</h3>
<div> <div>
<a href="<?= Url::fromPath('/monitoring/config/createbackend')->getAbsoluteUrl();?>">Create new backend</a> <a href="<?= Url::fromPath('/monitoring/config/createbackend')->getAbsoluteUrl();?>">
Create New Backend
</a>
</div> </div>
<br/> <br/>
@ -13,13 +15,13 @@
<?php $removeUrl = Url::fromPath('/monitoring/config/removebackend', array('backend' => $backendName)); ?> <?php $removeUrl = Url::fromPath('/monitoring/config/removebackend', array('backend' => $backendName)); ?>
<?php $editUrl = Url::fromPath('/monitoring/config/editbackend', array('backend' => $backendName)); ?> <?php $editUrl = Url::fromPath('/monitoring/config/editbackend', array('backend' => $backendName)); ?>
<b><?= $this->escape($backendName); ?></b> <b><?= $this->escape($backendName); ?></b>
<small>(Type: <?= $this->escape($config["type"]); ?>)</small> <small>(Type: <?= $this->escape($config['type']); ?>)</small>
<?php if ($config['disabled']): ?> <?php if ($config['disabled']): ?>
- <b>Disabled</b> - <b>Disabled</b>
<?php endif; ?> <?php endif; ?>
<div> <div>
<a href="<?= $removeUrl; ?>">Remove this backend</a><br/> <a href="<?= $removeUrl; ?>">Remove This Backend</a><br/>
<a href="<?= $editUrl; ?>">Edit this backend</a> <a href="<?= $editUrl; ?>">Edit This Backend</a>
</div> </div>
</div> </div>
<br/> <br/>
@ -27,10 +29,12 @@
<br/> <br/>
<h3>Montoring instances</h3> <h3>Monitoring Instances</h3>
<div> <div>
<a href="<?= Url::fromPath('/monitoring/config/createinstance')->getAbsoluteUrl();?>">Create new instance </a> <a href="<?= Url::fromPath('/monitoring/config/createinstance')->getAbsoluteUrl();?>">
Create New Instance
</a>
</div> </div>
<br/> <br/>
@ -39,11 +43,11 @@
<?php $editUrl = Url::fromPath('/monitoring/config/editinstance', array('instance' => $instanceName)); ?> <?php $editUrl = Url::fromPath('/monitoring/config/editinstance', array('instance' => $instanceName)); ?>
<div> <div>
<b><?= $this->escape($instanceName); ?></b> <b><?= $this->escape($instanceName); ?></b>
<small>(Type: <?= isset($config["host"]) ? 'Remote' : 'Local'; ?>)</small> <small>(Type: <?= isset($config['host']) ? 'Remote' : 'Local'; ?>)</small>
<div> <div>
<a href="<?= $removeUrl; ?>">Remove this instance</a><br/> <a href="<?= $removeUrl; ?>">Remove This Instance</a><br/>
<a href="<?= $editUrl; ?>">Edit this instance</a> <a href="<?= $editUrl; ?>">Edit This Instance</a>
</div> </div>
</div> </div>
<br/> <br/>

View File

@ -1,5 +1,5 @@
<?= $this->tabs->render($this); ?> <?= $this->tabs->render($this); ?>
<h4>Remove backend <?= $this->escape($this->name) ?></h4> <h4>Remove Backend "<?= $this->escape($this->name) ?>"</h4>
<p> <p>
Are you sure you want to remove the backend <?= $this->escape($this->name) ?>? Are you sure you want to remove the backend <?= $this->escape($this->name) ?>?

View File

@ -1,5 +1,5 @@
<?= $this->tabs->render($this); ?> <?= $this->tabs->render($this); ?>
<h4>Remove instance <?= $this->escape($this->name) ?></h4> <h4>Remove Instance "<?= $this->escape($this->name) ?>"</h4>
<p> <p>
Are you sure you want to remove the instance <?= $this->escape($this->name) ?>? Are you sure you want to remove the instance <?= $this->escape($this->name) ?>?