Skip to content

Commit

Permalink
monitoring: Don't render an empty table if there are no hosts to list
Browse files Browse the repository at this point in the history
refs #5543
  • Loading branch information
lippserd committed Sep 24, 2015
1 parent 55cc3ea commit d107d18
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions modules/monitoring/application/views/scripts/list/hosts.phtml
Expand Up @@ -19,6 +19,10 @@ if (! $this->compact): ?>
</div>
<?php endif ?>
<div class="content">
<?php if (! $hosts->hasResult()): ?>
<p><?= $this->translate('No hosts found matching the filter'.) ?></p>
</div>
<?php return; endif ?>
<table data-base-target="_next"
class="action-table multiselect"
data-icinga-multiselect-url="<?= $this->href('monitoring/hosts/show') ?>"
Expand Down Expand Up @@ -94,9 +98,7 @@ if (! $this->compact): ?>
<?php endforeach ?>
</tbody>
</table>
<?php if (! $hosts->hasResult()): ?>
<?= $this->translate('No hosts found matching the filter') ?>
<?php elseif ($hosts->hasMore()): ?>
<?php if ($hosts->hasMore()): ?>
<div class="text-right">
<?= $this->qlink(
$this->translate('Show More'),
Expand Down

0 comments on commit d107d18

Please sign in to comment.