mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-25 23:04:51 +02:00
Perfdata: Do not show "xx more..." if there is nothing to show
This commit is contained in:
parent
2d7e56c46e
commit
9b25ffa566
@ -89,12 +89,15 @@ class Zend_View_Helper_Perfdata extends Zend_View_Helper_Abstract
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($limit > 0) {
|
if ($limit > 0) {
|
||||||
$count = max(count($table), count($results));
|
$count = $compact ? count($results) : count($table);
|
||||||
$table = array_slice($table, 0, $limit);
|
|
||||||
$results = array_slice($results, 0, $limit);
|
|
||||||
if ($count > $limit) {
|
if ($count > $limit) {
|
||||||
$mess = sprintf($this->view->translate('%d more ...'), $count - $limit);
|
if ($compact) {
|
||||||
$results[] = '<span title="' . $mess . '">...</span>';
|
$results = array_slice($results, 0, $limit);
|
||||||
|
$title = sprintf($this->view->translate('%d more ...'), $count - $limit);
|
||||||
|
$results[] = '<span title="' . $title . '">...</span>';
|
||||||
|
} else {
|
||||||
|
$table = array_slice($table, 0, $limit);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($compact) {
|
if ($compact) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user