servicegrid: Ensure dashboard compliance

refs #7876
This commit is contained in:
Johannes Meyer 2015-04-17 16:20:29 +02:00
parent c099b7ddd7
commit 14a555629d

View File

@ -1,28 +1,28 @@
<?php <?php
use Icinga\Module\Monitoring\Object\Service; use Icinga\Module\Monitoring\Object\Service;
?> if (! $this->compact): ?>
<?php if (!$this->compact): ?>
<div class="controls"> <div class="controls">
<?= $this->tabs; ?> <?= $this->tabs; ?>
<div style="margin: 1em;" class="dontprint"> <?= $this->sortBox; ?>
<?= $this->translate('Sort by'); ?> <?= $this->sortControl; ?> <?= $this->limiter; ?>
</div> <?= $this->paginator; ?>
<?= $this->filterEditor; ?>
</div> </div>
<?php endif ?> <?php endif ?>
<div class="content" data-base-target="_next"> <div class="content" data-base-target="_next">
<table class="pivot servicestates">
<?php <?php
$hasHeader = false; $hasHeader = false;
$pivotData = $this->pivot->toArray(); $pivotData = $this->pivot->toArray();
if (count($pivotData) === 0) {
echo $this->translate('No services found matching the filter') . '</div>';
return;
}
$hostFilter = '(host_name=' . implode('|host_name=', array_keys($pivotData)) . ')'; $hostFilter = '(host_name=' . implode('|host_name=', array_keys($pivotData)) . ')';
?> ?>
<table class="pivot servicestates">
<?php if (count($pivotData) === 0): ?>
<?= $this->translate('No Services matching the filter'); ?>
<?php endif ?>
<?php foreach ($pivotData as $host_name => $serviceStates): ?> <?php foreach ($pivotData as $host_name => $serviceStates): ?>
<?php if (!$hasHeader): ?> <?php if (!$hasHeader): ?>
<thead> <thead>