Skip to content

Commit

Permalink
monitoring: Display host and service count as badge in the hostgroups…
Browse files Browse the repository at this point in the history
… overview

refs #5543
  • Loading branch information
lippserd committed Sep 28, 2015
1 parent 7a17a53 commit 344dafe
Showing 1 changed file with 9 additions and 17 deletions.
26 changes: 9 additions & 17 deletions modules/monitoring/application/views/scripts/list/hostgroups.phtml
Expand Up @@ -19,17 +19,20 @@ if (! $this->compact): ?>
<table class="action-table listing-table" data-base-target="_next">
<thead>
<tr>
<th></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></th>
<th><?= $this->translate('Service States') ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($hostgroups as $hostgroup): ?>
<tr href="<?= $this->href('monitoring/list/hosts', array('hostgroup_name' => $hostgroup->hostgroup_name)) ?>">
<td class="groupname">
<td class="count-col">
<span class="badge"><?= $hostgroup->hosts_total ?></span>
</td>
<th>
<?= $this->qlink(
$hostgroup->hostgroup_alias,
'monitoring/list/hosts',
Expand All @@ -39,18 +42,7 @@ if (! $this->compact): ?>
$hostgroup->hostgroup_alias
))
) ?>
</td>
<td class="total">
<?= $this->qlink(
$hostgroup->hosts_total,
'monitoring/list/hosts',
array('hostgroup_name' => $hostgroup->hostgroup_name),
array('title' => sprintf(
$this->translate('List all hosts in host group "%s"'),
$hostgroup->hostgroup_alias
))
) ?>
</td>
</th>
<td>
<?php
$stateBadges = new StateBadges();
Expand Down Expand Up @@ -137,15 +129,15 @@ if (! $this->compact): ?>
echo $stateBadges->render();
?>
</td>
<td class="total">
<td class="count-col">
<?= $this->qlink(
$hostgroup->services_total,
'monitoring/list/services',
array('hostgroup_name' => $hostgroup->hostgroup_name),
array('title' => sprintf(
$this->translate('List all services of all hosts in host group "%s"'),
$hostgroup->hostgroup_alias
))
), 'class' => 'badge')
) ?>
</td>
<td>
Expand Down

0 comments on commit 344dafe

Please sign in to comment.