mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-29 00:34:03 +02:00
parent
80d3abed9d
commit
c810f2bfd1
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
use Icinga\Data\Filter\Filter;
|
||||||
use Icinga\Module\Monitoring\Object\Service;
|
use Icinga\Module\Monitoring\Object\Service;
|
||||||
use Icinga\Web\Url;
|
use Icinga\Web\Url;
|
||||||
|
|
||||||
@ -14,7 +15,10 @@ if (! $this->compact): ?>
|
|||||||
<p><?= $this->translate('No services found matching the filter.') ?></p>
|
<p><?= $this->translate('No services found matching the filter.') ?></p>
|
||||||
</div>
|
</div>
|
||||||
<?php return; endif;
|
<?php return; endif;
|
||||||
$hostFilter = '(host_name=' . implode('|host_name=', array_keys($pivotData)) . ')';
|
$hostFilter = Filter::matchAny();
|
||||||
|
foreach ($pivotData as $hostName => $_) {
|
||||||
|
$hostFilter->orFilter(Filter::where('host_name', $hostName));
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
<table class="service-grid-table">
|
<table class="service-grid-table">
|
||||||
<thead>
|
<thead>
|
||||||
@ -30,8 +34,10 @@ $hostFilter = '(host_name=' . implode('|host_name=', array_keys($pivotData)) . '
|
|||||||
<?php foreach ($pivotHeader['cols'] as $serviceDescription => $serviceDisplayName): ?>
|
<?php foreach ($pivotHeader['cols'] as $serviceDescription => $serviceDisplayName): ?>
|
||||||
<th class="rotate-45"><div><span><?= $this->qlink(
|
<th class="rotate-45"><div><span><?= $this->qlink(
|
||||||
$this->ellipsis($serviceDisplayName, 18),
|
$this->ellipsis($serviceDisplayName, 18),
|
||||||
'monitoring/list/services?' . $hostFilter,
|
Url::fromPath('monitoring/list/services')->addFilter(
|
||||||
array('service_description' => $serviceDescription),
|
Filter::matchAll($hostFilter, Filter::where('service_description', $serviceDescription))
|
||||||
|
),
|
||||||
|
null,
|
||||||
array('title' => sprintf(
|
array('title' => sprintf(
|
||||||
$this->translate('List all services with the name "%s" on all reported hosts'),
|
$this->translate('List all services with the name "%s" on all reported hosts'),
|
||||||
$serviceDisplayName
|
$serviceDisplayName
|
||||||
@ -47,12 +53,16 @@ $hostFilter = '(host_name=' . implode('|host_name=', array_keys($pivotData)) . '
|
|||||||
<?php foreach ($pivotHeader['rows'] as $hostName => $hostDisplayName): ?>
|
<?php foreach ($pivotHeader['rows'] as $hostName => $hostDisplayName): ?>
|
||||||
<tr>
|
<tr>
|
||||||
<th><?php
|
<th><?php
|
||||||
$services = $pivotData[$hostName];
|
$serviceFilter = Filter::matchAny();
|
||||||
$serviceFilter = '(service_description=' . implode('|service_description=', array_keys($services)) . ')';
|
foreach ($pivotData[$hostName] as $serviceName => $_) {
|
||||||
|
$serviceFilter->orFilter(Filter::where('service_description', $serviceName));
|
||||||
|
}
|
||||||
echo $this->qlink(
|
echo $this->qlink(
|
||||||
$hostDisplayName,
|
$hostDisplayName,
|
||||||
'monitoring/list/services?' . $serviceFilter,
|
Url::fromPath('monitoring/list/services')->addFilter(
|
||||||
array('host_name' => $hostName),
|
Filter::matchAll($serviceFilter, Filter::where('host_name', $hostName))
|
||||||
|
),
|
||||||
|
null,
|
||||||
array('title' => sprintf($this->translate('List all reported services on host %s'), $hostDisplayName))
|
array('title' => sprintf($this->translate('List all reported services on host %s'), $hostDisplayName))
|
||||||
);
|
);
|
||||||
?></th>
|
?></th>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user