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-1.0.10 app/controllers/policy_dashboard_controller.rb
foreman_openscap-2.0.1 app/controllers/policy_dashboard_controller.rb
foreman_openscap-1.0.9 app/controllers/policy_dashboard_controller.rb
foreman_openscap-2.0.0 app/controllers/policy_dashboard_controller.rb
foreman_openscap-1.0.8 app/controllers/policy_dashboard_controller.rb
foreman_openscap-1.0.7 app/controllers/policy_dashboard_controller.rb
foreman_openscap-1.0.6 app/controllers/policy_dashboard_controller.rb
foreman_openscap-1.0.5 app/controllers/policy_dashboard_controller.rb
foreman_openscap-1.0.4 app/controllers/policy_dashboard_controller.rb
foreman_openscap-1.0.3 app/controllers/policy_dashboard_controller.rb
foreman_openscap-1.0.2 app/controllers/policy_dashboard_controller.rb
foreman_openscap-1.0.1 app/controllers/policy_dashboard_controller.rb
foreman_openscap-1.0.0 app/controllers/policy_dashboard_controller.rb