mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
Don't cache the problems list with the rest of the dashboard data
This commit is contained in:
parent
2df46a9d0a
commit
18634ad00d
2 changed files with 3 additions and 4 deletions
|
@ -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 a new issue