Don't cache the problems list with the rest of the dashboard data
This commit is contained in:
parent
2df46a9d0a
commit
18634ad00d
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue