Imported Upstream version 0.6.26

This commit is contained in:
Mario Fetka
2017-10-20 17:10:51 +02:00
parent bebe87317f
commit a6b4158f1f
158 changed files with 13552 additions and 2851 deletions

View File

@@ -1019,13 +1019,23 @@ class Data_Model extends System_Model
foreach($xml->meta->legend->entry as $key=>$value){
$csv .= ";" . $value ;
}
/*
* from rrdtool 1.5 on, timestamp ( value->t ) is not set anymore
* from 1.6 on it can be reactivated by -- showrime option to rrdtool xport
* here we take care of the timestamp ourselves regardless which
* rrdtool version is used
*/
$timestamp2 = $xml->meta->start;
$step = $xml->meta->step;
$csv .= "\n";
foreach($xml->data->row as $key=>$value){
$csv .= (string) $value->t ;
$csv .= $timestamp2;
foreach($value->v as $item){
$csv .= ";".floatval((string) $item);
}
$csv .= "\n";
$timestamp2 = $timestamp2 + $step;
}
return $csv;
}