Add flag counts to admin dashboard

This commit is contained in:
Neil Lalonde
2013-03-12 14:19:01 -04:00
parent 9422adfe66
commit 40c27ff3cf
7 changed files with 32 additions and 5 deletions

View File

@@ -31,7 +31,7 @@ Discourse.AdminDashboardRoute = Discourse.Route.extend({
if( !c.get('reportsCheckedAt') || Date.create('1 hour ago') > c.get('reportsCheckedAt') ) {
// TODO: use one request to get all reports, or maybe one request for all dashboard data including version check.
c.set('reportsCheckedAt', new Date());
['visits', 'signups', 'topics', 'posts', 'total_users'].each(function(reportType){
['visits', 'signups', 'topics', 'posts', 'total_users', 'flags'].each(function(reportType){
c.set(reportType, Discourse.Report.find(reportType));
});
}