mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-28 16:24:04 +02:00
parent
d7e850da0e
commit
36622101ae
@ -19,19 +19,12 @@ class Zend_View_Helper_Perfdata extends Zend_View_Helper_Abstract
|
|||||||
public function perfdata($perfdataStr, $compact = false, $limit = 0, $color = Perfdata::PERFDATA_OK)
|
public function perfdata($perfdataStr, $compact = false, $limit = 0, $color = Perfdata::PERFDATA_OK)
|
||||||
{
|
{
|
||||||
$pieChartData = PerfdataSet::fromString($perfdataStr)->asArray();
|
$pieChartData = PerfdataSet::fromString($perfdataStr)->asArray();
|
||||||
|
uasort(
|
||||||
if (1 < ($i = count($pieChartData))) {
|
$pieChartData,
|
||||||
while (--$i) {
|
function($a, $b) {
|
||||||
for ($j = 0, $k = 1; $j < $i; ++$j, ++$k) {
|
return $a->worseThan($b) ? -1 : ($b->worseThan($a) ? 1 : 0);
|
||||||
if ($pieChartData[$k]->worseThan($pieChartData[$j])) {
|
|
||||||
$perfdata = $pieChartData[$k];
|
|
||||||
$pieChartData[$k] = $pieChartData[$j];
|
|
||||||
$pieChartData[$j] = $perfdata;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
);
|
||||||
|
|
||||||
$results = array();
|
$results = array();
|
||||||
$table = array(
|
$table = array(
|
||||||
'<td><b>' . implode(
|
'<td><b>' . implode(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user