monitoring: Don't render an empty table if there are no services to list
refs #5543
This commit is contained in:
parent
a053c3a6e3
commit
64b7315379
|
@ -20,6 +20,10 @@ if (! $this->compact): ?>
|
||||||
</div>
|
</div>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
<?php if (! $services->hasResult()): ?>
|
||||||
|
<p><?= $this->translate('No services found matching the filter.') ?></p>
|
||||||
|
</div>
|
||||||
|
<?php return; endif ?>
|
||||||
<table data-base-target="_next"
|
<table data-base-target="_next"
|
||||||
class="action-table multiselect<?php if ($this->compact): ?> compact<?php endif ?>"
|
class="action-table multiselect<?php if ($this->compact): ?> compact<?php endif ?>"
|
||||||
data-icinga-multiselect-url="<?= $this->href('monitoring/services/show') ?>"
|
data-icinga-multiselect-url="<?= $this->href('monitoring/services/show') ?>"
|
||||||
|
@ -96,19 +100,17 @@ if (! $this->compact): ?>
|
||||||
<?php endforeach ?>
|
<?php endforeach ?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<?php if (! $services->hasResult()): ?>
|
<?php if ($services->hasMore()): ?>
|
||||||
<?= $this->translate('No services found matching the filter'); ?>
|
<div class="text-right">
|
||||||
<?php elseif ($services->hasMore()): ?>
|
<?= $this->qlink(
|
||||||
<div class="text-right">
|
$this->translate('Show More'),
|
||||||
<?= $this->qlink(
|
$this->url()->without(array('view', 'limit')),
|
||||||
$this->translate('Show More'),
|
null,
|
||||||
$this->url()->without(array('view', 'limit')),
|
array(
|
||||||
null,
|
'data-base-target' => '_next',
|
||||||
array(
|
'class' => 'action-link'
|
||||||
'data-base-target' => '_next',
|
)
|
||||||
'class' => 'action-link'
|
) ?>
|
||||||
)
|
</div>
|
||||||
) ?>
|
<?php endif ?>
|
||||||
</div>
|
|
||||||
<?php endif ?>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue