Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/site/app/controllers/statistics_controller.php
diff options
context:
space:
mode:
authorlorchard@mozilla.com <lorchard@mozilla.com@4eb1ac78-321c-0410-a911-ec516a8615a5>2009-02-10 20:19:37 (GMT)
committer lorchard@mozilla.com <lorchard@mozilla.com@4eb1ac78-321c-0410-a911-ec516a8615a5>2009-02-10 20:19:37 (GMT)
commitccf48cbff5427242e2f0a9ccb3b895c10801901c (patch)
tree71ec7cbb2314fb9023197fda9da4d26fef6f495e /site/app/controllers/statistics_controller.php
parent32f02a8edf9bde3059f2e6a6e0a8cb17d4f17bea (diff)
Bug 473244: Add new aggregations and export to developer stats
git-svn-id: http://svn.mozilla.org/addons/trunk@22131 4eb1ac78-321c-0410-a911-ec516a8615a5
Diffstat (limited to 'site/app/controllers/statistics_controller.php')
-rw-r--r--site/app/controllers/statistics_controller.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/site/app/controllers/statistics_controller.php b/site/app/controllers/statistics_controller.php
index 3d0c28e..6f1b595 100644
--- a/site/app/controllers/statistics_controller.php
+++ b/site/app/controllers/statistics_controller.php
@@ -145,11 +145,13 @@ class StatisticsController extends AppController
//'simile/timeplot/timeplot-api.js?local',
'jquery-compressed.js',
//'simile/amo-bundle.compressed.js',
+ 'strftime-min-1.3.js',
'simile/amo-bundle.js',
'stats/stats.js',
'stats/dropdowns.js',
'stats/colors.js',
'stats/plot-selection.js',
+ 'stats/plot-tables.js',
'stats/plots.js'
);
$this->publish('jsAdd', $this->jsAdd);
@@ -180,7 +182,8 @@ class StatisticsController extends AppController
$session = $this->Session->read('User');
$this->publish('email', $session['email']);
- $this->set('all_addons', $this->Addon->getAddonsByUser($session['id']));
+ $this->set('all_addons', empty($session['id']) ?
+ array() : $this->Addon->getAddonsByUser($session['id']));
// Add-on icon
$addonIcon = $this->Image->getAddonIconURL($addon_id);
@@ -214,8 +217,13 @@ class StatisticsController extends AppController
if (!$rss) {
$this->publish('jsLocalization', array(
+ 'date' => _('date'),
'statistics_js_dropdowns_removeplot' => _('statistics_js_dropdowns_removeplot'),
'statistics_js_dropdowns_none' => _('statistics_js_dropdowns_none'),
+ 'statistics_js_download_csv' => ___('statistics_js_download_csv', 'View this table in CSV format'),
+ 'statistics_js_groupby_selector_date' => ___('statistics_js_groupby_selector_date', 'Group by: Day'),
+ 'statistics_js_groupby_selector_week' => ___('statistics_js_groupby_selector_week', 'Group by: Week'),
+ 'statistics_js_groupby_selector_month' => ___('statistics_js_groupby_selector_month', 'Group by: Month'),
'statistics_js_plotselection_selector_summary' => _('statistics_js_plotselection_selector_summary'),
'statistics_js_plotselection_selector_downloads' => _('statistics_js_plotselection_selector_downloads'),
'statistics_js_plotselection_selector_adu' => _('statistics_js_plotselection_selector_adu'),
@@ -267,7 +275,7 @@ class StatisticsController extends AppController
return;
}
- $csv = $this->Stats->historicalPlot($addon_id, $plot);
+ $csv = $this->Stats->historicalPlot($addon_id, $plot, @$_GET['group_by']);
$this->set('csv', $csv);
$this->render('csv', 'ajax');