Skip to content

Commit

Permalink
monitoring: Fix stupid thead creation in the lit/hostgroups view script
Browse files Browse the repository at this point in the history
Drunk?

refs #5543
  • Loading branch information
lippserd committed Sep 24, 2015
1 parent da50ade commit e197907
Showing 1 changed file with 12 additions and 20 deletions.
32 changes: 12 additions & 20 deletions modules/monitoring/application/views/scripts/list/hostgroups.phtml
Expand Up @@ -11,25 +11,21 @@ if (! $this->compact): ?>
</div>
<?php endif ?>
<div class="content">
<?php

$firstRow = true;
foreach ($hostgroups as $hostgroup): ?>
<?php if ($firstRow): ?>
<?php $firstRow = false ?>
<table class="groupview action" data-base-target="_next">
<?php if (! $hostgroups->hasResult()): ?>
<p><?= $this->translate('No host groups found matching the filter.') ?></p>
</div>
<?php return; endif ?>
<table class="groupview action" data-base-target="_next">
<thead>
<th><?= $this->translate('Last Problem') ?></th>
<th><?= $this->translate('Host Group') ?></th>
<th><?= $this->translate('Total Hosts') ?></th>
<th><?= $this->translate('Host States') ?></th>
<th><?= $this->translate('Total Services') ?></th>
<th><?= $this->translate('Service States') ?></th>
<th><?= $this->translate('Last Problem') ?></th>
<th><?= $this->translate('Host Group') ?></th>
<th><?= $this->translate('Total Hosts') ?></th>
<th><?= $this->translate('Host States') ?></th>
<th><?= $this->translate('Total Services') ?></th>
<th><?= $this->translate('Service States') ?></th>
</thead>
<tbody>
<?php endif ?>
<?php

<?php foreach ($hostgroups as $hostgroup):
if ($hostgroup->hosts_down_unhandled) {
$handled = false;
$state = Host::STATE_DOWN;
Expand Down Expand Up @@ -464,7 +460,6 @@ if ($hostgroup->hosts_down_unhandled) {
</td>
</tr>
<?php endforeach ?>
<?php if ($hostgroups->hasResult()): ?>
</tbody>
</table>
<?php if ($hostgroups->hasMore()): ?>
Expand All @@ -478,7 +473,4 @@ if ($hostgroup->hosts_down_unhandled) {
)
) ?>
<?php endif ?>
<?php else: ?>
<?= $this->translate('No hostgroups found matching the filter') ?>
<?php endif ?>
</div>

0 comments on commit e197907

Please sign in to comment.