monitoring: Count hosts once in services/show.phtml

This commit is contained in:
Eric Lippmann 2014-12-30 10:44:22 +01:00
parent 3d95e37b7f
commit a7a99b5856
1 changed files with 2 additions and 1 deletions

View File

@ -23,7 +23,8 @@
<div class="hbox">
<div class="hbox-item" style="width: 6em;">
<b><?= sprintf($this->translatePlural('Host (%u)', 'Hosts (%u)', array_sum(array_values($hostStates))), array_sum(array_values($hostStates))) ?></b>
<?php $hostCount = array_sum(array_values($hostStates)) ?>
<b><?= sprintf($this->translatePlural('Host (%u)', 'Hosts (%u)', $hostCount), $hostCount) ?></b>
</div>
<div class="hbox-item">
<?= $this->hostStatesPieChart ?>