Don't display piecharts for empty host and service sets

refs #8565
This commit is contained in:
Matthias Jentsch 2015-04-09 17:16:14 +02:00
parent f4c69395b1
commit 2efea214da
2 changed files with 13 additions and 24 deletions

View File

@ -1,20 +1,14 @@
<?php
use Icinga\Module\Monitoring\Object\Host;
?>
<?php
$i = 0;
$hidden = array();
$hiddenRich = array();
?>
<div class="hbox-item">
<?= $this->translate('States:') ?>
&nbsp;<?= $hostStatesPieChart; ?>
</div>
<?php if (($hostCount = count($objects)) > 0): ?>
<div class="hbox-item">
<?= $this->translate('States:') ?>
&nbsp;<?= $hostStatesPieChart; ?>
</div>
<p>
<table class="state statesummary">

View File

@ -1,22 +1,17 @@
<?php
use Icinga\Module\Monitoring\Object\Service;
?>
<div class="hbox-item">
<?= $this->translate('Service states:') ?>
&nbsp;<?= $serviceStatesPieChart; ?>
</div>
<div class="hbox-item">
<?= $this->translate('Host states:') ?>
&nbsp;<?= $hostStatesPieChart; ?>
</div>
<?php
$i = 0;
$hidden = array();
$hiddenRich = array();
$i = 0;
?>
<?php if (($serviceCount = count($objects)) > 0): ?>
<div class="hbox-item">
<?= $this->translate('Service states:') ?>
&nbsp;<?= $serviceStatesPieChart; ?>
</div>
<div class="hbox-item">
<?= $this->translate('Host states:') ?>
&nbsp;<?= $hostStatesPieChart; ?>
</div>
<p>
<table class="state statesummary">
<tbody>