Project

General

Profile

« Previous | Next » 

Revision 9f1c910a

Added by Ohad Levy almost 10 years ago

fixes #7009, N+1 (actually 6+1) queries in dashboard page

View differences:

app/helpers/dashboard_helper.rb
def latest_events
# 6 reports + header fits the events box nicely...
summary = Report.authorized(:view_reports).my_reports.interesting.search_for('reported > "7 days ago"').limit(6)
Report.authorized(:view_reports).my_reports.interesting.search_for('reported > "7 days ago"').limit(6).includes(:host)
end
def translated_header(shortname, longname)

Also available in: Unified diff