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

This commit is contained in:
Eric Lippmann 2014-12-30 10:47:10 +01:00
parent 128f6822f1
commit 2e4e04551d

View File

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