mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-09-22 17:37:45 +02:00
downtimes-header: Be more efficient when listing downtimes
This commit is contained in:
parent
bba57d2bbc
commit
006d2cb537
@ -2,7 +2,7 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<?php $i = 0; foreach ($downtimes as $downtime):
|
<?php $i = 0; foreach ($downtimes as $downtime):
|
||||||
if (++ $i > 5) {
|
if (++ $i > 5) {
|
||||||
continue;
|
break;
|
||||||
} ?>
|
} ?>
|
||||||
<tr class="state <?= $downtime->stateText ?>">
|
<tr class="state <?= $downtime->stateText ?>">
|
||||||
<td class="state">
|
<td class="state">
|
||||||
@ -68,18 +68,18 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<p>
|
<?php if (count($downtimes) > 5): ?>
|
||||||
<?php if ($i > 5): ?>
|
<p>
|
||||||
<?= $this->qlink(
|
<?= $this->qlink(
|
||||||
sprintf($this->translate('show all %d downtimes'), $i),
|
sprintf($this->translate('show all %d downtimes'), $i),
|
||||||
$listAllLink,
|
$listAllLink,
|
||||||
null,
|
null,
|
||||||
array(
|
array(
|
||||||
'icon' => $i > 5 ? 'down-open' : '',
|
'icon' => 'down-open',
|
||||||
'data-base-target' => "_next"
|
'data-base-target' => "_next"
|
||||||
)
|
)
|
||||||
) ?>
|
) ?>
|
||||||
<?php endif ?>
|
</p>
|
||||||
</p>
|
<?php endif ?>
|
Loading…
x
Reference in New Issue
Block a user