Commit
… for each page and page title CORE * formatting sub-second times * getColumn() method on data table array (in order to behave the same as the regular data table class) * data tables can store in their meta data, which columns are empty (this is used in order to dynamically hide the new "generation time" column) * ViewDataTable and Api.getProcessedReport act according to the empty column meta data SCHEMA * new column custom_float_1 in log_link_visit_action * new version to apply the change TRACKER * Piwik_Tracker::setGenerationTime * tracking parameter "generation_time_me" * value is stored in new custom_float_1 column * the log importer can handle a group "generation_time_micro" which can be used in a custom log format. _micro is used because apache can log the time in microseconds but piwik processes milliseconds. * note: extension of JS tracker still missing ACTIONS PLUGIN * for pages and page titles, add new columns sum_time_generation and nb_hits_with_time_generation to the blob archives * if they are set, compute avg_time_generation on the API level. if not, remove the columns and mark them as empty in the data table meta data. * show new column "avg. generation time" in the pages and page titles reports plus TESTS for everything
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -330,6 +330,7 @@ class_name VARCHAR(255) NULL, | |
custom_var_v4 VARCHAR(200) DEFAULT NULL, | ||
custom_var_k5 VARCHAR(200) DEFAULT NULL, | ||
custom_var_v5 VARCHAR(200) DEFAULT NULL, | ||
custom_float_1 FLOAT NULL DEFAULT NULL, | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
timo-bes
Author
Member
|
||
PRIMARY KEY(idlink_va), | ||
INDEX index_idvisit(idvisit), | ||
INDEX index_idsite_servertime ( idsite, server_time ) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
/** | ||
* Piwik - Open source web analytics | ||
* | ||
* @link http://piwik.org | ||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later | ||
* | ||
* @category Piwik | ||
* @package Updates | ||
*/ | ||
|
||
/** | ||
* @package Updates | ||
*/ | ||
class Piwik_Updates_1_12_b1 extends Piwik_Updates | ||
{ | ||
static function isMajorUpdate() | ||
{ | ||
return true; | ||
} | ||
|
||
static function getSql($schema = 'Myisam') | ||
{ | ||
return array( | ||
'ALTER TABLE `'. Piwik_Common::prefixTable('log_link_visit_action') .'` | ||
ADD `custom_float_1` FLOAT NULL DEFAULT NULL' => false | ||
); | ||
} | ||
|
||
static function update() | ||
{ | ||
Piwik_Updater::updateDatabase(__FILE__, self::getSql()); | ||
} | ||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1262,6 +1262,7 @@ public function setColumnsToDisplay( $columnsNames ) | |
/** | ||
* Returns columns names to display, in order. | ||
* If no columns were specified to be displayed, return all columns found in the first row. | ||
* If the data table has empty_columns meta data set, those columns will be removed. | ||
* @param array PHP array conversion of the data table | ||
* @return array | ||
*/ | ||
|
@@ -1279,6 +1280,21 @@ public function getColumnsToDisplay() | |
} | ||
|
||
$this->columnsToDisplay = array_filter($this->columnsToDisplay); | ||
|
||
$emptyColumns = $this->dataTable->getMetadata(Piwik_DataTable::EMPTY_COLUMNS_METADATA_NAME); | ||
This comment has been minimized.
Sorry, something went wrong.
peterbo
Contributor
|
||
if (is_array($emptyColumns)) | ||
{ | ||
foreach ($emptyColumns as $emptyColumn) | ||
{ | ||
$key = array_search($emptyColumn, $this->columnsToDisplay); | ||
if ($key !== false) | ||
{ | ||
unset($this->columnsToDisplay[$key]); | ||
} | ||
} | ||
$this->columnsToDisplay = array_values($this->columnsToDisplay); | ||
} | ||
|
||
return $this->columnsToDisplay; | ||
} | ||
|
||
|
That feels so dirty :(