Make servicematrix x-axis header titles linking to filtered servicelist

This commit is contained in:
Johannes Meyer 2014-03-20 09:41:41 +01:00
parent 44950ea570
commit aa6d6b1d41
2 changed files with 26 additions and 11 deletions

View File

@ -16,8 +16,12 @@
<?php endif ?>
<div class="content" data-base-target="_next">
<table class="pivot servicestates">
<?php $hasHeader = false; ?>
<?php foreach ($this->pivot->toArray() as $host_name => $serviceStates): ?>
<?php
$hasHeader = false;
$pivotData = $this->pivot->toArray();
$hostFilter = implode(',', array_keys($pivotData));
?>
<?php foreach ($pivotData as $host_name => $serviceStates): ?>
<?php if (!$hasHeader): ?>
<thead>
<tr>
@ -26,9 +30,17 @@
<div>
<?php foreach (array_keys($serviceStates) as $service_description): ?>
<span>
<abbr title="<?= $service_description; ?>">
<?= strlen($service_description) > 18 ? substr($service_description, 0, 18) . '...' : $service_description; ?>
</abbr>
<a href="<?= $this->href(
'monitoring/list/services',
array(
'service_description' => $service_description,
'host_name' => $hostFilter
)
); ?>">
<abbr title="<?= $service_description; ?>">
<?= strlen($service_description) > 18 ? substr($service_description, 0, 18) . '...' : $service_description; ?>
</abbr>
</a>
</span>
<?php endforeach ?>
</div>

View File

@ -531,6 +531,15 @@ div.pivot-pagination {
}
table.pivot {
a {
text-decoration: none;
color: black;
&:hover {
color: #666;
}
}
thead {
th {
height: 6em;
@ -578,12 +587,6 @@ table.pivot {
a {
font-size: 0.8em;
text-decoration: none;
color: black;
&:hover {
color: #666;
}
}
}