monitoring/list/downtimes: Enhance PDF layout

This commit is contained in:
Johannes Meyer 2022-02-28 17:32:13 +01:00
parent 122d52c953
commit d5fbae7b28
2 changed files with 8 additions and 2 deletions

View File

@ -24,6 +24,12 @@ if (! $this->compact): ?>
data-icinga-multiselect-url="<?= $this->href('monitoring/downtimes/show') ?>" data-icinga-multiselect-url="<?= $this->href('monitoring/downtimes/show') ?>"
data-icinga-multiselect-controllers="<?= $this->href("monitoring/downtimes") ?>" data-icinga-multiselect-controllers="<?= $this->href("monitoring/downtimes") ?>"
data-icinga-multiselect-data="downtime_id"> data-icinga-multiselect-data="downtime_id">
<thead class="print-only">
<tr>
<th><?= $this->translate('State') ?></th>
<th><?= $this->translate('Downtime') ?></th>
</tr>
</thead>
<tbody> <tbody>
<?php foreach ($downtimes->peekAhead($this->compact) as $downtime): <?php foreach ($downtimes->peekAhead($this->compact) as $downtime):
if (isset($downtime->service_description)) { if (isset($downtime->service_description)) {
@ -43,7 +49,7 @@ if (! $this->compact): ?>
</tbody> </tbody>
</table> </table>
<?php if ($downtimes->hasMore()): ?> <?php if ($downtimes->hasMore()): ?>
<div class="action-links"> <div class="dont-print action-links">
<?= $this->qlink( <?= $this->qlink(
$this->translate('Show More'), $this->translate('Show More'),
$this->url()->without(array('showCompact', 'limit')), $this->url()->without(array('showCompact', 'limit')),

View File

@ -81,7 +81,7 @@
$textId = 'downtime-' . $uniqId; $textId = 'downtime-' . $uniqId;
$deleteButton = clone $delDowntimeForm; $deleteButton = clone $delDowntimeForm;
/** @var \Icinga\Module\Monitoring\Forms\Command\Object\DeleteDowntimeCommandForm $deleteButton */ /** @var \Icinga\Module\Monitoring\Forms\Command\Object\DeleteDowntimeCommandForm $deleteButton */
$deleteButton->setAttrib('class', $deleteButton->getAttrib('class') . ' remove-action'); $deleteButton->setAttrib('class', $deleteButton->getAttrib('class') . ' remove-action dont-print');
$deleteButton->populate( $deleteButton->populate(
array( array(
'downtime_id' => $downtime->id, 'downtime_id' => $downtime->id,