Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormattpiwik <matthieu.aubry@gmail.com>2008-12-22 11:17:30 +0300
committermattpiwik <matthieu.aubry@gmail.com>2008-12-22 11:17:30 +0300
commitf257895928bb781ffd179ff4d4370eb331d90c83 (patch)
treef13f2968ded90a1a8bf0e34235910c0ed2545235 /plugins
parent812e3fd2c17e556c69842175e6c2df7817b4ebc6 (diff)
- fix actions table column names
- display total size used by piwik in dbUsage plugin - adding tests in pre-release check git-svn-id: http://dev.piwik.org/svn/trunk@841 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Actions/Actions.php4
-rw-r--r--plugins/Actions/Controller.php14
-rw-r--r--plugins/CoreAdminHome/templates/header.tpl1
-rw-r--r--plugins/CoreHome/templates/datatable.js10
-rw-r--r--plugins/DBStats/API.php13
-rw-r--r--plugins/DBStats/templates/DBStats.tpl6
-rw-r--r--plugins/Goals/templates/title_and_evolution_graph.tpl4
-rw-r--r--plugins/Provider/Controller.php2
-rw-r--r--plugins/Referers/Controller.php12
9 files changed, 30 insertions, 36 deletions
diff --git a/plugins/Actions/Actions.php b/plugins/Actions/Actions.php
index 4545762f64..50e1d04345 100644
--- a/plugins/Actions/Actions.php
+++ b/plugins/Actions/Actions.php
@@ -189,8 +189,8 @@ class Piwik_Actions extends Piwik_Plugin
protected function archiveDayRecordInDatabase()
{
- $maximumRowsInDataTableLevelZero = 200;
- $maximumRowsInSubDataTable = 50;
+ $maximumRowsInDataTableLevelZero = 1000;
+ $maximumRowsInSubDataTable = 200;
$dataTable = Piwik_ArchiveProcessing_Day::generateDataTable($this->actionsTablesByType[Piwik_Tracker_Action::TYPE_ACTION]);
$s = $dataTable->getSerialized( $maximumRowsInDataTableLevelZero, $maximumRowsInSubDataTable );
diff --git a/plugins/Actions/Controller.php b/plugins/Actions/Controller.php
index 85d3cf9466..20e160f927 100644
--- a/plugins/Actions/Controller.php
+++ b/plugins/Actions/Controller.php
@@ -45,7 +45,6 @@ class Piwik_Actions_Controller extends Piwik_Controller
__FUNCTION__,
'Actions.getActions',
'getActionsSubDataTable' );
-
return $this->renderView($view, $fetch);
}
@@ -117,8 +116,6 @@ class Piwik_Actions_Controller extends Piwik_Controller
$currentMethod,
$methodToCall,
$subMethod );
- $view->setColumnTranslation('nb_hits', Piwik_Translate('General_ColumnPageviews'));
- $view->setColumnTranslation('nb_uniq_visitors', Piwik_Translate('General_ColumnUniquePageviews'));
$view->setTemplate('CoreHome/templates/datatable_actions.tpl');
if(Piwik_Common::getRequestVar('idSubtable', -1) != -1)
@@ -132,25 +129,24 @@ class Piwik_Actions_Controller extends Piwik_Controller
$view->setTemplate('CoreHome/templates/datatable_actions_recursive.tpl');
}
$view->disableSort();
-
- $view->setSortedColumn( 'nb_hits', 'desc' );
-
$view->disableOffsetInformation();
+ $view->setLimit( 100 );
$view->setColumnsToDisplay( array('label','nb_uniq_visitors','nb_hits') );
- $view->setLimit( 100 );
+ $view->setSortedColumn( 'nb_uniq_visitors', 'desc' );
+ $view->setColumnTranslation('nb_hits', Piwik_Translate('General_ColumnPageviews'));
+ $view->setColumnTranslation('nb_uniq_visitors', Piwik_Translate('General_ColumnUniquePageviews'));
+
// computing minimum value to exclude
require_once "VisitsSummary/Controller.php";
$visitsInfo = Piwik_VisitsSummary_Controller::getVisitsSummary();
$nbActions = $visitsInfo->getColumn('nb_actions');
$nbActionsLowPopulationThreshold = floor(0.02 * $nbActions); // 2 percent of the total number of actions
-
// we remove 1 to make sure some actions/downloads are displayed in the case we have a very few of them
// and each of them has 1 or 2 hits...
$nbActionsLowPopulationThreshold = min($visitsInfo->getColumn('max_actions')-1, $nbActionsLowPopulationThreshold-1);
$view->setExcludeLowPopulation( 'nb_hits', $nbActionsLowPopulationThreshold );
-
$view->main();
// we need to rewrite the phpArray so it contains all the recursive arrays
diff --git a/plugins/CoreAdminHome/templates/header.tpl b/plugins/CoreAdminHome/templates/header.tpl
index 8ed9472766..55762dccb3 100644
--- a/plugins/CoreAdminHome/templates/header.tpl
+++ b/plugins/CoreAdminHome/templates/header.tpl
@@ -18,6 +18,7 @@
<link rel="stylesheet" type="text/css" href="themes/default/common.css" />
<link rel="stylesheet" type="text/css" href="plugins/CoreAdminHome/templates/styles.css" />
+<link rel="stylesheet" type="text/css" href="libs/jquery/jquery-calendar.css" />
<link rel="shortcut icon" href="plugins/CoreHome/templates/images/favicon.ico">
diff --git a/plugins/CoreHome/templates/datatable.js b/plugins/CoreHome/templates/datatable.js
index 092d203570..b24a8f1254 100644
--- a/plugins/CoreHome/templates/datatable.js
+++ b/plugins/CoreHome/templates/datatable.js
@@ -1,5 +1,5 @@
//-----------------------------------------------------------------------------
-// Data Table
+// DataTable
//-----------------------------------------------------------------------------
//A list of all our DataTables
//Test if the object have already been initialized (multiple includes)
@@ -215,7 +215,6 @@ dataTable.prototype =
handleSort: function(domElem)
{
var self = this;
-
if( self.param.enable_sort )
{
$('.sortable', domElem).click(
@@ -504,6 +503,11 @@ dataTable.prototype =
// this value is stored in config file General->dataTable_default_limit but this is more an edge case so ok to set it to 10
delete self.param.filter_limit;
self.param.viewDataTable = self.param.viewDataTable == 'table' ? 'tableAllColumns' : 'table';
+ // when switching to display simple table, do not exclude low pop by default
+ if(self.param.viewDataTable == 'table')
+ {
+ self.param.enable_filter_excludelowpop = 0;
+ }
self.reloadAjaxDataTable();
}
);
@@ -597,7 +601,7 @@ dataTable.prototype =
var urlToLink = $(urlLinkDom).html();
$(urlLinkDom).remove();
- var truncationOffsetBecauseImageIsPrepend = -2;
+ var truncationOffsetBecauseImageIsPrepend = -2; //website subtable needs -9.
self.truncate( $(this), truncationOffsetBecauseImageIsPrepend );
if( urlToLink.match("javascript:") )
diff --git a/plugins/DBStats/API.php b/plugins/DBStats/API.php
index 9fa169157f..5c26a6700e 100644
--- a/plugins/DBStats/API.php
+++ b/plugins/DBStats/API.php
@@ -63,14 +63,15 @@ class Piwik_DBStats_API
static public function getAllTablesStatus()
{
- Piwik::isUserIsSuperUser();
+ Piwik::checkUserIsSuperUser();
$db = Zend_Registry::get('db');
// http://dev.mysql.com/doc/refman/5.1/en/show-table-status.html
$tablesPiwik = Piwik::getTablesInstalled();
$total = array('Name' => 'Total', 'Data_length' => 0, 'Index_length' => 0, 'Rows' => 0);
- foreach($tablesPiwik as $table)
+ $table = array();
+ foreach($tablesPiwik as $tableName)
{
- $t = self::getTableStatus($table);
+ $t = self::getTableStatus($tableName);
$total['Data_length'] += $t['Data_length'];
$total['Index_length'] += $t['Index_length'];
$total['Rows'] += $t['Rows'];
@@ -79,14 +80,14 @@ class Piwik_DBStats_API
$t['Data_length'] = Piwik::getPrettySizeFromBytes($t['Data_length']);
$t['Index_length'] = Piwik::getPrettySizeFromBytes($t['Index_length']);
$t['Rows'] = Piwik::getPrettySizeFromBytes($t['Rows']);
- $tables[] = $t;
+ $table[] = $t;
}
$total['Total_length'] = Piwik::getPrettySizeFromBytes($total['Data_length']+$total['Index_length']);
$total['Data_length'] = Piwik::getPrettySizeFromBytes($total['Data_length']);
$total['Index_length'] = Piwik::getPrettySizeFromBytes($total['Index_length']);
$total['TotalRows'] = Piwik::getPrettySizeFromBytes($total['Rows']);
- $tables['Total'] = $total;
+ $table['Total'] = $total;
- return $tables;
+ return $table;
}
}
diff --git a/plugins/DBStats/templates/DBStats.tpl b/plugins/DBStats/templates/DBStats.tpl
index 27f0769dcd..e82e095683 100644
--- a/plugins/DBStats/templates/DBStats.tpl
+++ b/plugins/DBStats/templates/DBStats.tpl
@@ -13,10 +13,11 @@
<th>{'DBStats_RowNumber'|translate}</th>
<th>{'DBStats_DataSize'|translate}</th>
<th>{'DBStats_IndexSize'|translate}</th>
+ <th>{'DBStats_TotalSize'|translate}</th>
</thead>
<tbody id="tables">
{foreach from=$tablesStatus key=index item=table}
- <tr {if $table.Name == 'Total'}class="active"{/if}>
+ <tr {if $table.Name == 'Total'}class="active" style="font-weight:bold;"{/if}>
<td>
{$table.Name}
</td>
@@ -29,6 +30,9 @@
<td>
{$table.Index_length}b
</td>
+ <td>
+ {$table.Total_length}b
+ </td>
</tr>
{/foreach}
</tbody>
diff --git a/plugins/Goals/templates/title_and_evolution_graph.tpl b/plugins/Goals/templates/title_and_evolution_graph.tpl
index e9dfea5156..64f616abea 100644
--- a/plugins/Goals/templates/title_and_evolution_graph.tpl
+++ b/plugins/Goals/templates/title_and_evolution_graph.tpl
@@ -1,14 +1,11 @@
<script type="text/javascript" src="plugins/CoreHome/templates/sparkline.js"></script>
-<div id="leftcolumn">
<a name="evolutionGraph" graphId="{$nameGraphEvolution}"></a>
<h2>{$title}</h2>
{$graphEvolution}
-</div>
-<div id="rightcolumn">
<table>
<tr><td>
<p>{sparkline src=$urlSparklineConversions}<span>
@@ -22,6 +19,5 @@
{'%s overall conversion rate (visits with a completed goal)'|translate:"<strong>$conversion_rate%</strong>"}</span></p>
</td></tr>
</table>
-</div>
<div style="clear:both"> \ No newline at end of file
diff --git a/plugins/Provider/Controller.php b/plugins/Provider/Controller.php
index c585fd6e88..90d9674cc3 100644
--- a/plugins/Provider/Controller.php
+++ b/plugins/Provider/Controller.php
@@ -8,11 +8,9 @@ class Piwik_Provider_Controller extends Piwik_Controller
{
$view = Piwik_ViewDataTable::factory();
$view->init( $this->pluginName, __FUNCTION__, "Provider.getProvider" );
-
$view->setColumnsToDisplay( array('label','nb_uniq_visitors') );
$view->setSortedColumn( 1 );
$view->setLimit( 5 );
-
return $this->renderView($view, $fetch);
}
diff --git a/plugins/Referers/Controller.php b/plugins/Referers/Controller.php
index 14bb8e7185..c064e8b83e 100644
--- a/plugins/Referers/Controller.php
+++ b/plugins/Referers/Controller.php
@@ -56,6 +56,7 @@ class Piwik_Referers_Controller extends Piwik_Controller
$view->disableOffsetInformation();
$view->disableExcludeLowPopulation();
$view->doNotShowFooter();
+ $view->enableShowGoals();
$view->setColumnsToDisplay( array('label','nb_uniq_visitors', 'nb_visits') );
@@ -190,7 +191,7 @@ class Piwik_Referers_Controller extends Piwik_Controller
return $this->renderView($view, $fetch);
}
- function getReferersType()
+ protected function getReferersVisitorsByType()
{
// we disable the queued filters because here we want to get the visits coming from search engines
// if the filters were applied we would have to look up for a label looking like "Search Engines"
@@ -199,14 +200,7 @@ class Piwik_Referers_Controller extends Piwik_Controller
&format=original
&disable_queued_filters=1";
$request = new Piwik_API_Request($requestString);
- $view->enableShowGoals();
- return $request->process();
- }
-
- protected function getReferersVisitorsByType()
- {
- // this is raw data (no filters applied, on purpose) so we select the data using the magic integers ID
- $dataTableReferersType = $this->getReferersType(true);
+ $dataTableReferersType = $request->process();
$nameToColumnId = array(
'visitorsFromSearchEngines' => Piwik_Common::REFERER_TYPE_SEARCH_ENGINE,