Sha256: c74e7f8ecd08834577d80ab2257fb45b3bdedc3c132ae57f0cfff4e2fa6583fe

Contents?: true

Size: 409 Bytes

Versions: 3

Compression:

Stored size: 409 Bytes

Contents

module ForemanOpenscap
  module HostsControllerExtensions
    def self.prepended(base)
      base::AJAX_REQUESTS << 'openscap_proxy_changed'
    end

    def process_hostgroup
      @hostgroup = Hostgroup.find(params[:host][:hostgroup_id]) if params[:host][:hostgroup_id].to_i > 0
      return head(:not_found) unless @hostgroup
      @openscap_proxy = @hostgroup.openscap_proxy
      super
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
foreman_openscap-0.9.2 app/controllers/concerns/foreman_openscap/hosts_controller_extensions.rb
foreman_openscap-0.9.1 app/controllers/concerns/foreman_openscap/hosts_controller_extensions.rb
foreman_openscap-0.9.0 app/controllers/concerns/foreman_openscap/hosts_controller_extensions.rb