mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-23 13:54:26 +02:00
monitoring: Count services once in services/show.phtml
This commit is contained in:
parent
c28f4284e4
commit
3d95e37b7f
@ -2,13 +2,14 @@
|
|||||||
<?= $this->tabs ?>
|
<?= $this->tabs ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<?php if (count($objects) === 0): ?>
|
<?php $serviceCount = count($objects) ?>
|
||||||
|
<?php if ($serviceCount === 0): ?>
|
||||||
<?= $this->translate('No services matching the filter') ?>
|
<?= $this->translate('No services matching the filter') ?>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
|
|
||||||
<div class="hbox">
|
<div class="hbox">
|
||||||
<div class="hbox-item" style="width: 6em;">
|
<div class="hbox-item" style="width: 6em;">
|
||||||
<b><?= sprintf($this->translatePlural('Service (%u)', 'Services (%u)', array_sum(array_values($serviceStates))), array_sum(array_values($serviceStates))) ?></b>
|
<b><?= sprintf($this->translatePlural('Service (%u)', 'Services (%u)', $serviceCount), $serviceCount) ?></b>
|
||||||
</div>
|
</div>
|
||||||
<div class="hbox-item">
|
<div class="hbox-item">
|
||||||
<?= $this->serviceStatesPieChart ?>
|
<?= $this->serviceStatesPieChart ?>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user