perfdata.phtml: Collapse perfdata values if they exceed 5 lines

refs #3566
This commit is contained in:
Johannes Meyer 2019-07-18 10:45:29 +02:00
parent b61a952cfd
commit f42a49d4a9
2 changed files with 2 additions and 2 deletions

View File

@ -108,7 +108,7 @@ class Zend_View_Helper_Perfdata extends Zend_View_Helper_Abstract
return ''; return '';
} }
return sprintf( return sprintf(
'<table class="performance-data-table">%s</table>', '<table class="performance-data-table collapsible" data-visible-rows="6">%s</table>',
implode("\n", $table) implode("\n", $table)
); );
} }

View File

@ -1,4 +1,4 @@
<?php if ($object->perfdata): ?> <?php if ($object->perfdata): ?>
<h2><?= $this->translate('Performance data') ?></h2> <h2><?= $this->translate('Performance data') ?></h2>
<?= $this->perfdata($object->perfdata) ?> <div id="check-perfdata-<?= $this->escape(str_replace(' ', '-', $object->check_command)) ?>"><?= $this->perfdata($object->perfdata) ?></div>
<?php endif ?> <?php endif ?>