Project

General

Profile

« Previous | Next » 

Revision 459e0feb

Added by Paul Kelly almost 14 years ago

  • ID 459e0feb5c15f2ff8c175e2d46e372b4d83c6a4c

Fixes #249 - Remove AS from reports

Added a searchbar for hostname, reporting period and the type of report.

View differences:

app/controllers/hosts_controller.rb
before_filter :find_multiple, :only => [:multiple_actions, :update_multiple_parameters,
:select_multiple_hostgroup, :select_multiple_environment, :multiple_parameters]
helper :hosts
helper :hosts, :reports
def index
@search = Host.search(params[:search])
......
# shows all reports for a certain host
def reports
@host = Host.find(params[:id])
# set defaults search order - cant use default scope due to bug in AR
# http://github.com/binarylogic/searchlogic/issues#issue/17
params[:search] ||= {}
params[:search][:order] ||= "ascend_by_reported_at"
@search = Report.search(params[:search])
@reports = @search.paginate(:page => params[:page], :conditions => {:host_id => @host}, :include => :host)
end
def query

Also available in: Unified diff