monitoring: Remove unnecessary controls in the service grid view
This commit is contained in:
parent
031c5af9fd
commit
cb4b460f3f
|
@ -4,31 +4,21 @@ use Icinga\Web\Url;
|
||||||
|
|
||||||
if (! $this->compact): ?>
|
if (! $this->compact): ?>
|
||||||
<div class="controls separated">
|
<div class="controls separated">
|
||||||
<?= $this->tabs; ?>
|
<?= $this->tabs ?>
|
||||||
<div class="grid dont-print">
|
<div class="grid">
|
||||||
<div class="col-1-3 text-left">
|
<?= $this->sortBox ?>
|
||||||
<?= $this->limiter ?>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-1-3">
|
<?= $this->filterEditor ?>
|
||||||
<?= $this->paginator ?>
|
|
||||||
</div>
|
|
||||||
<div class="col-1-3 text-right">
|
|
||||||
<?= $this->sortBox ?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<?= $this->filterEditor; ?>
|
|
||||||
</div>
|
</div>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
<div class="content" data-base-target="_next">
|
<div class="content" data-base-target="_next">
|
||||||
<?php
|
<?php if (empty($pivotData)): ?>
|
||||||
if (empty($pivotData)) {
|
<p><?= $this->translate('No services found matching the filter.') ?></p>
|
||||||
echo $this->translate('No services found matching the filter') . '</div>';
|
</div>
|
||||||
return;
|
<?php return; endif;
|
||||||
}
|
|
||||||
$hostFilter = '(host_name=' . implode('|host_name=', array_keys($pivotData)) . ')';
|
$hostFilter = '(host_name=' . implode('|host_name=', array_keys($pivotData)) . ')';
|
||||||
?>
|
?>
|
||||||
|
<table class="service-grid-table">
|
||||||
<table class="service-grid-table">
|
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th><?= $this->partial(
|
<th><?= $this->partial(
|
||||||
|
@ -38,7 +28,7 @@ $hostFilter = '(host_name=' . implode('|host_name=', array_keys($pivotData)) . '
|
||||||
'xAxisPaginator' => $horizontalPaginator,
|
'xAxisPaginator' => $horizontalPaginator,
|
||||||
'yAxisPaginator' => $verticalPaginator
|
'yAxisPaginator' => $verticalPaginator
|
||||||
)
|
)
|
||||||
); ?></th>
|
) ?></th>
|
||||||
<?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),
|
||||||
|
@ -55,7 +45,7 @@ $hostFilter = '(host_name=' . implode('|host_name=', array_keys($pivotData)) . '
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|
||||||
<?php $i = 0; ?>
|
<?php $i = 0 ?>
|
||||||
<?php foreach ($pivotHeader['rows'] as $hostName => $hostDisplayName): ?>
|
<?php foreach ($pivotHeader['rows'] as $hostName => $hostDisplayName): ?>
|
||||||
<tr>
|
<tr>
|
||||||
<th><?php
|
<th><?php
|
||||||
|
@ -79,24 +69,24 @@ $hostFilter = '(host_name=' . implode('|host_name=', array_keys($pivotData)) . '
|
||||||
<span class="sr-only" id="<?= $ariaDescribedById ?>">
|
<span class="sr-only" id="<?= $ariaDescribedById ?>">
|
||||||
<?= $this->escape($service->service_output) ?>
|
<?= $this->escape($service->service_output) ?>
|
||||||
</span>
|
</span>
|
||||||
<?= $this->qlink(
|
<?= $this->qlink(
|
||||||
'',
|
'',
|
||||||
'monitoring/service/show',
|
'monitoring/service/show',
|
||||||
array(
|
array(
|
||||||
'host' => $hostName,
|
'host' => $hostName,
|
||||||
'service' => $serviceDescription
|
'service' => $serviceDescription
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'aria-describedby' => $ariaDescribedById,
|
'aria-describedby' => $ariaDescribedById,
|
||||||
'class' => 'bg-color-' . Service::getStateText($service->service_state) . ($service->service_handled ? ' handled' : ''),
|
'aria-label' => sprintf(
|
||||||
'title' => $this->escape($service->service_output),
|
$this->translate('Show detailed information for service %s on host %s'),
|
||||||
'aria-label' => sprintf(
|
$service->service_display_name,
|
||||||
$this->translate('Show detailed information for service %s on host %s'),
|
$service->host_display_name
|
||||||
$service->service_display_name,
|
),
|
||||||
$service->host_display_name
|
'class' => 'bg-color-' . Service::getStateText($service->service_state) . ($service->service_handled ? ' handled' : ''),
|
||||||
|
'title' => $this->escape($service->service_output)
|
||||||
)
|
)
|
||||||
)
|
) ?>
|
||||||
); ?>
|
|
||||||
</td>
|
</td>
|
||||||
<?php endforeach ?>
|
<?php endforeach ?>
|
||||||
<?php if (! $this->compact && $this->horizontalPaginator->getPages()->pageCount > 1): ?>
|
<?php if (! $this->compact && $this->horizontalPaginator->getPages()->pageCount > 1): ?>
|
||||||
|
@ -110,16 +100,16 @@ $hostFilter = '(host_name=' . implode('|host_name=', array_keys($pivotData)) . '
|
||||||
. $this->verticalPaginator->getItemCountPerPage()
|
. $this->verticalPaginator->getItemCountPerPage()
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'data-base-target' => '_self',
|
'class' => 'action-link',
|
||||||
'class' => 'action-link'
|
'data-base-target' => '_self'
|
||||||
)
|
)
|
||||||
) ?>
|
) ?>
|
||||||
<?= ++$i === (int) (count($pivotHeader['rows']) / 2) ? $expandLink : '' ?>
|
<?= ++$i === (int) (count($pivotHeader['rows']) / 2) ? $expandLink : '' ?>
|
||||||
</td>
|
</td>
|
||||||
<?php endif;?>
|
<?php endif ?>
|
||||||
</tr>
|
</tr>
|
||||||
<?php endforeach ?>
|
<?php endforeach ?>
|
||||||
<?php if (! $this->compact && $this->verticalPaginator->getPages()->pageCount > 1): ;?>
|
<?php if (! $this->compact && $this->verticalPaginator->getPages()->pageCount > 1): ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="<?= count($pivotHeader['cols']) + 1?>" class="service-grid-table-more">
|
<td colspan="<?= count($pivotHeader['cols']) + 1?>" class="service-grid-table-more">
|
||||||
<?php echo $this->qlink(
|
<?php echo $this->qlink(
|
||||||
|
@ -130,13 +120,13 @@ $hostFilter = '(host_name=' . implode('|host_name=', array_keys($pivotData)) . '
|
||||||
($this->verticalPaginator->getItemCountPerPage() + 20)
|
($this->verticalPaginator->getItemCountPerPage() + 20)
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'data-base-target' => '_self',
|
'class' => 'action-link',
|
||||||
'class' => 'action-link'
|
'data-base-target' => '_self'
|
||||||
)
|
)
|
||||||
) ?>
|
) ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php endif;?>
|
<?php endif ?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue