Sha256: e046a3392125e15be7a96419bd9a160ebadf6bac15338b69c170cc15005f1b66

Contents?: true

Size: 579 Bytes

Versions: 53

Compression:

Stored size: 579 Bytes

Contents

class PolicyDashboardController < ApplicationController
  before_action :prefetch_data, :only => :index

  def index
  end

  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
end

Version data entries

53 entries across 53 versions & 1 rubygems

Version Path
foreman_openscap-10.0.3 app/controllers/policy_dashboard_controller.rb
foreman_openscap-10.0.2 app/controllers/policy_dashboard_controller.rb
foreman_openscap-10.0.1 app/controllers/policy_dashboard_controller.rb
foreman_openscap-10.0.0 app/controllers/policy_dashboard_controller.rb
foreman_openscap-9.0.4 app/controllers/policy_dashboard_controller.rb
foreman_openscap-9.0.3 app/controllers/policy_dashboard_controller.rb
foreman_openscap-9.0.2 app/controllers/policy_dashboard_controller.rb
foreman_openscap-9.0.1 app/controllers/policy_dashboard_controller.rb
foreman_openscap-9.0.0 app/controllers/policy_dashboard_controller.rb
foreman_openscap-8.0.0 app/controllers/policy_dashboard_controller.rb
foreman_openscap-7.1.1 app/controllers/policy_dashboard_controller.rb
foreman_openscap-7.1.0 app/controllers/policy_dashboard_controller.rb
foreman_openscap-7.0.0 app/controllers/policy_dashboard_controller.rb
foreman_openscap-6.0.0 app/controllers/policy_dashboard_controller.rb
foreman_openscap-5.2.3 app/controllers/policy_dashboard_controller.rb
foreman_openscap-5.2.2 app/controllers/policy_dashboard_controller.rb
foreman_openscap-5.1.1 app/controllers/policy_dashboard_controller.rb
foreman_openscap-5.2.1 app/controllers/policy_dashboard_controller.rb
foreman_openscap-5.2.0 app/controllers/policy_dashboard_controller.rb
foreman_openscap-5.1.0 app/controllers/policy_dashboard_controller.rb