diff --git a/app/assets/javascripts/admin/routes/admin_dashboard_route.js b/app/assets/javascripts/admin/routes/admin_dashboard_route.js index a29ee9af853..3698742ff95 100644 --- a/app/assets/javascripts/admin/routes/admin_dashboard_route.js +++ b/app/assets/javascripts/admin/routes/admin_dashboard_route.js @@ -20,7 +20,6 @@ Discourse.AdminDashboardRoute = Discourse.Route.extend({ fetchDashboardData: function(c) { if( !c.get('dashboardFetchedAt') || Date.create('1 hour ago', 'en') > c.get('dashboardFetchedAt') ) { c.set('dashboardFetchedAt', new Date()); - c.set('problemsFetchedAt', new Date()); Discourse.AdminDashboard.find().then(function(d) { if( Discourse.SiteSettings.version_checks ){ c.set('versionCheck', Discourse.VersionCheck.create(d.version_check)); @@ -30,13 +29,14 @@ Discourse.AdminDashboardRoute = Discourse.Route.extend({ }); c.set('admins', d.admins); c.set('moderators', d.moderators); - c.set('problems', d.problems); c.set('top_referrers', d.top_referrers); c.set('top_traffic_sources', d.top_traffic_sources); c.set('top_referred_topics', d.top_referred_topics); c.set('loading', false); }); - } else if( !c.get('problemsFetchedAt') || Date.create(c.problemsCheckInterval, 'en') > c.get('problemsFetchedAt') ) { + } + + if( !c.get('problemsFetchedAt') || Date.create(c.problemsCheckInterval, 'en') > c.get('problemsFetchedAt') ) { c.set('problemsFetchedAt', new Date()); c.loadProblems(); } diff --git a/app/models/admin_dashboard_data.rb b/app/models/admin_dashboard_data.rb index a4e0513ee08..b28a6227348 100644 --- a/app/models/admin_dashboard_data.rb +++ b/app/models/admin_dashboard_data.rb @@ -46,7 +46,6 @@ class AdminDashboardData def as_json @json ||= { reports: REPORTS.map { |type| Report.find(type).as_json }, - problems: problems, admins: User.admins.count, moderators: User.moderators.count, top_referrers: IncomingLinksReport.find('top_referrers').as_json,