monitoring/viewscripts: avoid errors in comments

PHP code may cause errors even if sitting in HTML comments. Also fixed a
HTML nesting error in list/servicematrix and reduced indentation.
This commit is contained in:
Thomas Gelf 2014-05-20 22:26:21 +00:00
parent 8b28bdc82a
commit 79f3b32474
2 changed files with 45 additions and 47 deletions
modules/monitoring/application/views/scripts/list

View File

@ -1,9 +1,7 @@
<div class="controls">
<?= $this->tabs->render($this); ?>
<div style="margin: 1em" class="dontprint">
<!--<?= $this->filterBox->render($this); ?>-->
Sort by <?= $this->sortControl->render($this); ?>
<!--<?= $this->selectionToolbar('single'); ?>-->
</div>
<?= $this->paginationControl($history, null, null, array('preserve' => $this->preserve)); ?>
</div>

View File

@ -2,7 +2,7 @@
<div class="controls">
<?= $this->tabs; ?>
<div style="margin: 1em;" class="dontprint">
<!--<?= $this->filterBox; ?>-->Sort by <?= $this->sortControl->render($this); ?>
<!--<?= $this->filterBox ?>-->Sort by <?= $this->sortControl ?>
</div>
<?= $this->partial(
'pivottablePagination.phtml',
@ -37,9 +37,11 @@ $hostFilter = implode(',', array_keys($pivotData));
'host_name' => $hostFilter
)
); ?>">
<abbr title="<?= $service_description; ?>">
<?= strlen($service_description) > 18 ? substr($service_description, 0, 18) . '...' : $service_description; ?>
</abbr>
<abbr title="<?= $service_description; ?>"><?=
strlen($service_description) > 18 ?
substr($service_description, 0, 18) . '...' :
$service_description
?></abbr>
</a>
</span>
<?php endforeach ?>
@ -52,25 +54,23 @@ $hostFilter = implode(',', array_keys($pivotData));
<?php endif ?>
<tr>
<th>
<a href="<?= $this->href('monitoring/show/host', array('host' => $host_name)); ?>">
<?= $host_name; ?>
</a>
<a href="<?=
$this->href('monitoring/show/host', array('host' => $host_name))
?>"><?= $host_name ?></a>
</th>
<?php foreach (array_values($serviceStates) as $service): ?>
<?php if ($service !== null): ?>
<td>
<a href="<?= $this->href(
'monitoring/show/service',
array(
<a href="<?= $this->href('monitoring/show/service', array(
'host' => $service->host_name,
'service' => $service->service_description
)
); ?>" title="<?= $this->escape($service->service_output); ?>" class="state_<?= $this->monitoringState($service, 'service'); ?> <?= $service->service_handled ? 'handled' : ''; ?>"></a>
<?php else: ?>
<td>
&middot;
<?php endif ?>
)) ?>" title="<?= $this->escape($service->service_output)
?>" class="state_<?= $this->monitoringState($service, 'service') ?> <?= $service->service_handled ? 'handled' : '' ?>"></a>
</td>
<?php else: ?>
<td>&middot;</td>
<?php endif ?>
<?php endforeach ?>
</tr>
<?php endforeach ?>