Revision 9fb6675f
Added by Shlomi Zadok about 8 years ago
app/services/dashboard/data.rb | ||
---|---|---|
@hosts ||= Host.authorized(:view_hosts, Host).search_for(filter)
|
||
end
|
||
|
||
def latest_events
|
||
# 9 reports + header fits the events box nicely...
|
||
@latest_events ||= ConfigReport.authorized(:view_config_reports).my_reports.interesting.where(:host_id => hosts.pluck(:id)).search_for('reported > "7 days ago"').limit(9).includes(:host)
|
||
end
|
||
|
||
private
|
||
|
||
attr_writer :report
|
Also available in: Unified diff
Fixes #14748 - latest_events should use filters