Fix pieChart layout and add indicator for truncated piecharts
This commit is contained in:
parent
38ad802bd5
commit
2f254851e3
|
@ -57,8 +57,13 @@ class Zend_View_Helper_Perfdata extends Zend_View_Helper_Abstract
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($limit > 0) {
|
if ($limit > 0) {
|
||||||
|
$count = max (count($table), count ($results));
|
||||||
$table = array_slice ($table, 0, $limit);
|
$table = array_slice ($table, 0, $limit);
|
||||||
$results = array_slice ($results, 0, $limit);
|
$results = array_slice ($results, 0, $limit);
|
||||||
|
if ($count > $limit) {
|
||||||
|
$mess = sprintf(t('%d more ...'), $count - $limit);
|
||||||
|
$results[] = '<span title="' . $mess . '">...</span>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($compact) {
|
if ($compact) {
|
||||||
|
|
|
@ -65,7 +65,7 @@ foreach ($services as $service):
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
<div class="sparkline-box"><?= $this->perfdata($service->service_perfdata, true, 8) ?></div>
|
<div class="sparkline-box"><?= $this->perfdata($service->service_perfdata, true, 8) ?> </div>
|
||||||
|
|
||||||
<?php if (!$service->service_handled && $service->service_state > 0): ?>
|
<?php if (!$service->service_handled && $service->service_state > 0): ?>
|
||||||
<?= $this->icon('attention-alt', $this->translate('Unhandled')) ?>
|
<?= $this->icon('attention-alt', $this->translate('Unhandled')) ?>
|
||||||
|
|
|
@ -64,15 +64,6 @@ table.action td a:hover {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
table.action span.sparkline, table.action img.inlinepie {
|
|
||||||
margin: 0.5em 0.25em 0.5em 0.25em;
|
|
||||||
float:right;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dashboard table.action span.sparkline, .dashboard table.action img.inlinepie {
|
|
||||||
margin: 0em 0.25em 0em 0.25em;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* END of Action table */
|
/* END of Action table */
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -287,7 +287,8 @@ li li .badge {
|
||||||
|
|
||||||
.sparkline-box {
|
.sparkline-box {
|
||||||
position: relative;
|
position: relative;
|
||||||
top: -9px;
|
top: -3px;
|
||||||
|
float: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dashboard .sparkline-box {
|
.dashboard .sparkline-box {
|
||||||
|
@ -299,4 +300,6 @@ li li .badge {
|
||||||
height: 12px;
|
height: 12px;
|
||||||
position: relative;
|
position: relative;
|
||||||
top: 4px;
|
top: 4px;
|
||||||
|
|
||||||
|
margin: 0em 0em 0em 0.1em;
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
Sparkline.prototype.onRendered = function(evt) {
|
Sparkline.prototype.onRendered = function(evt) {
|
||||||
var el = evt.target;
|
var el = evt.target;
|
||||||
|
|
||||||
$('span.sparkline', el).each(function(i, element) {
|
$('.sparkline', el).each(function(i, element) {
|
||||||
// read custom options
|
// read custom options
|
||||||
var $spark = $(element);
|
var $spark = $(element);
|
||||||
var title = $spark.attr('title');
|
var title = $spark.attr('title');
|
||||||
|
|
Loading…
Reference in New Issue