FEATURE: track user visits on mobile and display on admin dashboard in a new Mobile section

This commit is contained in:
Neil Lalonde
2015-07-07 12:31:07 -04:00
parent 0330e17ffa
commit 782dd13e78
14 changed files with 86 additions and 31 deletions

View File

@@ -13,7 +13,7 @@ export default Discourse.Route.extend({
c.set('versionCheck', Discourse.VersionCheck.create(d.version_check));
}
['global_reports', 'page_view_reports', 'private_message_reports', 'http_reports', 'user_reports'].forEach(name => {
['global_reports', 'page_view_reports', 'private_message_reports', 'http_reports', 'user_reports', 'mobile_reports'].forEach(name => {
c.set(name, d[name].map(r => Discourse.Report.create(r)));
});

View File

@@ -108,6 +108,28 @@
</table>
</div>
<div class="dashboard-stats">
<table class="table table-condensed table-hover">
<thead>
<tr>
<th class="title" title="{{i18n 'admin.dashboard.mobile_title'}}">{{i18n 'admin.dashboard.mobile_title'}}</th>
<th>{{i18n 'admin.dashboard.reports.today'}}</th>
<th>{{i18n 'admin.dashboard.reports.yesterday'}}</th>
<th>{{i18n 'admin.dashboard.reports.last_7_days'}}</th>
<th>{{i18n 'admin.dashboard.reports.last_30_days'}}</th>
<th>{{i18n 'admin.dashboard.reports.all'}}</th>
</tr>
</thead>
<tbody>
{{#unless loading}}
{{#each r in mobile_reports}}
{{admin-report-counts report=r}}
{{/each}}
{{/unless}}
</tbody>
</table>
</div>
<div class="dashboard-stats">
<table class="table table-condensed table-hover">
<thead>