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/DBStats
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/DBStats')
-rw-r--r--plugins/DBStats/API.php13
-rw-r--r--plugins/DBStats/templates/DBStats.tpl6
2 files changed, 12 insertions, 7 deletions
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>