Services Overview: Use $query->hasResult() instead of $query->count()

refs #9632
This commit is contained in:
Johannes Meyer 2015-08-03 15:24:10 +02:00
parent e1b3c42818
commit 028342adfe
1 changed files with 3 additions and 7 deletions

View File

@ -18,13 +18,6 @@ if (! $this->compact): ?>
</div>
<?php endif ?>
<div class="content">
<?php
if (count($services) === 0) {
echo $this->translate('No services found matching the filter') . '</div>';
return;
}
?>
<table data-base-target="<?= isset($baseTarget) ? $baseTarget : '_next'; ?>"
class="action multiselect <?php if ($this->compact): ?> compact<?php endif ?>" style="table-layout: auto;"
data-icinga-multiselect-url="<?= $this->href("monitoring/services/show") ?>"
@ -91,4 +84,7 @@ if (count($services) === 0) {
<?php endforeach ?>
</tbody>
</table>
<?php if (! $services->hasResult()): ?>
<?= $this->translate('No services found matching the filter'); ?>
<?php endif ?>
</div>