monitoring: Display host and service count as badge in the hostgroups overview
refs #5543
This commit is contained in:
parent
7a17a53b0c
commit
344dafe253
|
@ -19,17 +19,20 @@ if (! $this->compact): ?>
|
||||||
<table class="action-table listing-table" data-base-target="_next">
|
<table class="action-table listing-table" data-base-target="_next">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
<th></th>
|
||||||
<th><?= $this->translate('Host Group') ?></th>
|
<th><?= $this->translate('Host Group') ?></th>
|
||||||
<th><?= $this->translate('Total Hosts') ?></th>
|
|
||||||
<th><?= $this->translate('Host States') ?></th>
|
<th><?= $this->translate('Host States') ?></th>
|
||||||
<th><?= $this->translate('Total Services') ?></th>
|
<th></th>
|
||||||
<th><?= $this->translate('Service States') ?></th>
|
<th><?= $this->translate('Service States') ?></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php foreach ($hostgroups as $hostgroup): ?>
|
<?php foreach ($hostgroups as $hostgroup): ?>
|
||||||
<tr href="<?= $this->href('monitoring/list/hosts', array('hostgroup_name' => $hostgroup->hostgroup_name)) ?>">
|
<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(
|
<?= $this->qlink(
|
||||||
$hostgroup->hostgroup_alias,
|
$hostgroup->hostgroup_alias,
|
||||||
'monitoring/list/hosts',
|
'monitoring/list/hosts',
|
||||||
|
@ -39,18 +42,7 @@ if (! $this->compact): ?>
|
||||||
$hostgroup->hostgroup_alias
|
$hostgroup->hostgroup_alias
|
||||||
))
|
))
|
||||||
) ?>
|
) ?>
|
||||||
</td>
|
</th>
|
||||||
<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>
|
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
$stateBadges = new StateBadges();
|
$stateBadges = new StateBadges();
|
||||||
|
@ -137,7 +129,7 @@ if (! $this->compact): ?>
|
||||||
echo $stateBadges->render();
|
echo $stateBadges->render();
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
<td class="total">
|
<td class="count-col">
|
||||||
<?= $this->qlink(
|
<?= $this->qlink(
|
||||||
$hostgroup->services_total,
|
$hostgroup->services_total,
|
||||||
'monitoring/list/services',
|
'monitoring/list/services',
|
||||||
|
@ -145,7 +137,7 @@ if (! $this->compact): ?>
|
||||||
array('title' => sprintf(
|
array('title' => sprintf(
|
||||||
$this->translate('List all services of all hosts in host group "%s"'),
|
$this->translate('List all services of all hosts in host group "%s"'),
|
||||||
$hostgroup->hostgroup_alias
|
$hostgroup->hostgroup_alias
|
||||||
))
|
), 'class' => 'badge')
|
||||||
) ?>
|
) ?>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
|
Loading…
Reference in New Issue