Don't cache the problems list with the rest of the dashboard data

This commit is contained in:
Neil Lalonde 2013-05-15 11:09:12 -04:00
parent 2df46a9d0a
commit 18634ad00d
2 changed files with 3 additions and 4 deletions

View File

@ -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();
}

View File

@ -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,