Fix state summary in multi views

refs #8565
This commit is contained in:
Matthias Jentsch 2015-05-18 14:58:51 +02:00
parent e84491d438
commit 342a8a39d1
3 changed files with 4 additions and 4 deletions

View File

@ -14,7 +14,7 @@ function urlAddFilterOptional($url, $filter, $optional) {
$this->baseFilter = isset($this->baseFilter) ? $this->baseFilter : null;
$selfUrl = 'monitoring/list/hosts';
$currentUrl = Url::fromRequest()->getRelativeUrl();
?><div class="tinystatesummary" <?= $this->compact ? ' data-base-target="col1"' : ''; ?>>
?><div data-base-target='_next' class="tinystatesummary" <?= $this->compact ? ' data-base-target="col1"' : ''; ?>>
<?= sprintf($this->translate('%s hosts:'), $this->stats->hosts_total); ?>
<span class="badges">
<?php if ($this->stats->hosts_up): ?>
@ -67,7 +67,7 @@ $currentUrl = Url::fromRequest()->getRelativeUrl();
$this->stats->hosts_down_handled,
urlAddFilterOptional(
$selfUrl,
Filter::matchAll(Filter::where('host_state', 1), Filter::where('host_unhandled', 1)),
Filter::matchAll(Filter::where('host_state', 1), Filter::where('host_unhandled', 0)),
$this->baseFilter
),
null,

View File

@ -16,7 +16,7 @@ $this->baseFilter = isset($this->baseFilter) ? $this->baseFilter : null;
$selfUrl = 'monitoring/list/services';
$currentUrl = Url::fromRequest()->getRelativeUrl();
?><div class="tinystatesummary" <?= $this->compact ? ' data-base-target="col1"' : ''; ?>>
?><div data-base-target='_next' class="tinystatesummary" <?= $this->compact ? ' data-base-target="col1"' : ''; ?>>
<?= sprintf($this->translate('%s services:'), $this->stats->services_total); ?>
<span class="badges">
<?php if ($this->stats->services_ok): ?>

View File

@ -4,7 +4,7 @@ use Icinga\Module\Monitoring\Object\Service;
$i = 0;
?>
<?php if (($serviceCount = count($objects)) > 0): ?>
<table class="action state statesummary">
<table class='action state statesummary'>
<tbody>
<?php foreach ($objects as $service): /** @var Service $service */ ?>
<?php