Class: PolicyDashboardController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- PolicyDashboardController
- Defined in:
- app/controllers/policy_dashboard_controller.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
4 5 |
# File 'app/controllers/policy_dashboard_controller.rb', line 4 def index end |
#prefetch_data ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'app/controllers/policy_dashboard_controller.rb', line 7 def prefetch_data @policy = ::ForemanOpenscap::Policy.find(params[:id]) dashboard = ForemanOpenscap::PolicyDashboard::Data.new(@policy, params[:search]) @report = dashboard.report @latest_reports = ForemanOpenscap::ArfReport .includes(:host) .of_policy(@policy.id) .latest .paginate(:page => params[:page], :per_page => params[:per_page]) end |