Servicegroup Overview: Use $query->hasResult() instead of $query->count()
refs #9632
This commit is contained in:
parent
39d29c79d2
commit
c0b82eff94
|
@ -10,11 +10,10 @@
|
|||
<div class="content">
|
||||
<?php
|
||||
|
||||
if (count($servicegroups) === 0) {
|
||||
echo $this->translate('No servicegroups found matching the filter') . '</div>';
|
||||
return;
|
||||
}
|
||||
?>
|
||||
$firstRow = true;
|
||||
foreach ($servicegroups as $s): ?>
|
||||
<?php if ($firstRow): ?>
|
||||
<?php $firstRow = false; ?>
|
||||
<table class="groupview action" data-base-target="_next">
|
||||
<thead>
|
||||
<th><?= $this->translate('Last Problem'); ?></th>
|
||||
|
@ -23,7 +22,7 @@ if (count($servicegroups) === 0) {
|
|||
<th><?= $this->translate('Service States'); ?></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($servicegroups as $s): ?>
|
||||
<?php endif ?>
|
||||
<tr href="<?= $this->href('monitoring/list/services', array('servicegroup_name' => $s->servicegroup_name)); ?>">
|
||||
<?php if ($s->services_critical_last_state_change_unhandled): ?>
|
||||
<td class="state change critical unhandled">
|
||||
|
@ -298,7 +297,11 @@ if (count($servicegroups) === 0) {
|
|||
<?php endif ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
<?php endforeach ?>
|
||||
<?php if ($servicegroups->hasResult()): ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php else: ?>
|
||||
<?= $this->translate('No servicegroups found matching the filter'); ?>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue