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

View File

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

View File

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