Skip to content

Commit

Permalink
Capitalization, smaleler codestyle fixes
Browse files Browse the repository at this point in the history
refs #3776
  • Loading branch information
Jannis Moßhammer authored and lippserd committed Aug 21, 2013
1 parent 83d0539 commit cd1fb2e
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 21 deletions.
10 changes: 5 additions & 5 deletions modules/monitoring/application/controllers/ConfigController.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ static public function createProvidedTabs()
'backends' => new Tab(array(
'name' => 'backends',
'title' => 'Monitoring Backends',
'url' => Url::fromPath('/monitoring/config/backend')
'url' => Url::fromPath('/monitoring/config')
))
);
}
Expand All @@ -81,7 +81,7 @@ public function editbackendAction()
{
$backend = $this->getParam('backend');
if (!$this->isExistingBackend($backend)) {
$this->view->error = "Unknown backend " . htmlentities($backend);
$this->view->error = 'Unknown backend ' . $backend;
return;
}
$backendForm = new EditBackendForm();
Expand Down Expand Up @@ -135,7 +135,7 @@ public function removebackendAction()
{
$backend = $this->getParam('backend');
if (!$this->isExistingBackend($backend)) {
$this->view->error = "Unknown backend " . $backend;
$this->view->error = 'Unknown backend ' . $backend;
return;
}
$form = new ConfirmRemovalForm();
Expand Down Expand Up @@ -166,7 +166,7 @@ public function removeinstanceAction()
{
$instance = $this->getParam('instance');
if (!$this->isExistingInstance($instance)) {
$this->view->error = "Unknown instance " . $instance;
$this->view->error = 'Unknown instance ' . $instance;
return;
}

Expand Down Expand Up @@ -197,7 +197,7 @@ public function editinstanceAction()
{
$instance = $this->getParam('instance');
if (!$this->isExistingInstance($instance)) {
$this->view->error = "Unknown instance " . htmlentities($instance);
$this->view->error = 'Unknown instance ' . htmlentities($instance);
return;
}
$form = new EditInstanceForm();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,6 @@ public function create()
'required' => true
)
);
$this->setSubmitLabel('Confirm removal');
$this->setSubmitLabel('Confirm Removal');
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?= $this->tabs->render($this); ?>
<?php if ($this->name): ?>
<h4>Edit backend <?= $this->escape($this->name) ?></h4>
<h4>Edit Backend "<?= $this->escape($this->name) ?>"</h4>
<?php else: ?>
<h4>Create new backend</h4>
<h4>Create New Backend</h4>
<?php endif; ?>

<?php if ($this->error): ?>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?= $this->tabs->render($this); ?>

<?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: ?>
<h4>Configure new icinga instance</h4>
<h4>Configure New Icinga Instance</h4>
<?php endif; ?>

<?php if ($this->error): ?>
Expand Down
22 changes: 13 additions & 9 deletions modules/monitoring/application/views/scripts/config/index.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
<h3>Backends</h3>

<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>
<br/>

Expand All @@ -13,24 +15,26 @@
<?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"]); ?>)</small>
<small>(Type: <?= $this->escape($config['type']); ?>)</small>
<?php if ($config['disabled']): ?>
- <b>Disabled</b>
<?php endif; ?>
<div>
<a href="<?= $removeUrl; ?>">Remove this backend</a><br/>
<a href="<?= $editUrl; ?>">Edit this backend</a>
<a href="<?= $removeUrl; ?>">Remove This Backend</a><br/>
<a href="<?= $editUrl; ?>">Edit This Backend</a>
</div>
</div>
<br/>
<?php endforeach; ?>

<br/>

<h3>Montoring instances</h3>
<h3>Monitoring Instances</h3>

<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>

<br/>
Expand All @@ -39,11 +43,11 @@
<?php $editUrl = Url::fromPath('/monitoring/config/editinstance', array('instance' => $instanceName)); ?>
<div>
<b><?= $this->escape($instanceName); ?></b>
<small>(Type: <?= isset($config["host"]) ? 'Remote' : 'Local'; ?>)</small>
<small>(Type: <?= isset($config['host']) ? 'Remote' : 'Local'; ?>)</small>

<div>
<a href="<?= $removeUrl; ?>">Remove this instance</a><br/>
<a href="<?= $editUrl; ?>">Edit this instance</a>
<a href="<?= $removeUrl; ?>">Remove This Instance</a><br/>
<a href="<?= $editUrl; ?>">Edit This Instance</a>
</div>
</div>
<br/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?= $this->tabs->render($this); ?>
<h4>Remove backend <?= $this->escape($this->name) ?></h4>
<h4>Remove Backend "<?= $this->escape($this->name) ?>"</h4>

<p>
Are you sure you want to remove the backend <?= $this->escape($this->name) ?>?
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?= $this->tabs->render($this); ?>
<h4>Remove instance <?= $this->escape($this->name) ?></h4>
<h4>Remove Instance "<?= $this->escape($this->name) ?>"</h4>

<p>
Are you sure you want to remove the instance <?= $this->escape($this->name) ?>?
Expand Down

0 comments on commit cd1fb2e

Please sign in to comment.