monitoring: Count hosts in downtime once in hosts/show.phtml

This commit is contained in:
Eric Lippmann 2014-12-30 10:33:32 +01:00
parent 3745d3ebef
commit b82f4e5356
1 changed files with 9 additions and 1 deletions

View File

@ -107,10 +107,18 @@
<?php if (! empty($objectsInDowntime)): ?>
<h2>
<?php $inDowntimeCount = count($objectsInDowntime) ?>
<a href="<?= $inDowntimeLink ?>"
title="<?= $this->translate('Hosts in downtime') ?>">
<?= $this->icon('plug') ?>
<?= sprintf($this->translatePlural('%u host is in downtime', '%u hosts are in downtime', count($objectsInDowntime)),count($objectsInDowntime)) ?>
<?= sprintf(
$this->translatePlural(
'%u host is in downtime',
'%u hosts are in downtime',
$inDowntimeCount
),
$inDowntimeCount
) ?>
</a>
</h2>
<?php endif ?>