monitoring: Count hosts in downtime once in hosts/show.phtml
This commit is contained in:
parent
3745d3ebef
commit
b82f4e5356
|
@ -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 ?>
|
||||
|
|
Loading…
Reference in New Issue