mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-28 16:24:04 +02:00
servicesummary: show ok count only when available
This commit is contained in:
parent
e345c88487
commit
84458eff26
@ -6,12 +6,15 @@ $currentUrl = Url::fromRequest()->getRelativeUrl();
|
||||
|
||||
?><h3 class="tinystatesummary" <?= $this->compact ? ' data-base-target="col1"' : '' ?>>
|
||||
<?= $this->qlink(sprintf($this->translate('%s services:'), $this->stats->services_total), $selfUrl) ?>
|
||||
<?php if ($this->stats->services_ok): ?>
|
||||
<span class="state ok<?= $currentUrl === Url::fromPath($selfUrl, array('service_state' => 0))->getRelativeUrl() ? ' active' : '' ?>"><?= $this->qlink(
|
||||
$this->stats->services_ok,
|
||||
$selfUrl,
|
||||
array('service_state' => 0),
|
||||
array('title' => sprintf($this->translate('Services with state %s'), strtoupper($this->translate('ok'))))
|
||||
) ?></span>
|
||||
<?php endif ?>
|
||||
|
||||
<?php
|
||||
|
||||
foreach (array(2 => 'critical', 3 => 'unknown', 1 => 'warning') as $stateId => $state) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user