Skip to content
Extraits de code Groupes Projets
Valider 1d91fd2d rédigé par Timo Besenreuther's avatar Timo Besenreuther
Parcourir les fichiers

refs #1700 time tracking

 * bug fix: min/max generation time didn't work in nested data tables because the column aggregation operations were not passed to sub tables
 * ui improvement: very small values were shown as 0s. use three decimal places if value is smaller than 10ms (e.g. display 2ms as 0.002s instead of 0s)
parent 7ace2928
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -449,7 +449,9 @@ class Piwik_DataTable
// if the row has the subtable already
// then we have to recursively sum the subtables
if (($idSubTable = $row->getIdSubDataTable()) !== null) {
$rowFound->sumSubtable(Piwik_DataTable_Manager::getInstance()->getTable($idSubTable));
$subTable = Piwik_DataTable_Manager::getInstance()->getTable($idSubTable);
$subTable->setColumnAggregationOperations($this->columnAggregationOperations);
$rowFound->sumSubtable($subTable);
}
}
}
......
......@@ -282,6 +282,7 @@ class Piwik_DataTable_Row
$thisSubTable = new Piwik_DataTable();
$this->addSubtable($thisSubTable);
}
$thisSubTable->setColumnAggregationOperations($subTable->getColumnAggregationOperations());
$thisSubTable->addDataTable($subTable);
}
......
......@@ -1437,7 +1437,8 @@ class Piwik
$minutes = floor($minusDaysAndHours / 60);
$seconds = $minusDaysAndHours - $minutes * 60;
$seconds = round($seconds, 2);
$precision = ($seconds > 0 && $seconds < 0.01 ? 3 : 2);
$seconds = round($seconds, $precision);
if ($years > 0) {
$return = sprintf(Piwik_Translate('General_YearsDays'), $years, $days);
......
......@@ -91,6 +91,7 @@ class PiwikTest extends DatabaseTestCase
array(1.342, array('1.34s', '00:00:01.34')),
array(.342, array('0.34s', '00:00:00.34')),
array(.02, array('0.02s', '00:00:00.02')),
array(.002, array('0.002s', '00:00:00')),
array(1.002, array('1s', '00:00:01')),
array(1.02, array('1.02s', '00:00:01.02')),
array(1.2, array('1.2s', '00:00:01.20')),
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter