Sha256: fa0d3bb7450fa6c2aff4e7b1806232efea4ea7ad11d9a00f27e36f7764ee41c6

Contents?: true

Size: 568 Bytes

Versions: 248

Compression:

Stored size: 568 Bytes

Contents

module Katello
  class ErrataController < Katello::ApplicationController
    def auto_complete
      repo_ids = readable_repos(:pulp_id)

      results = Errata.autocomplete_search("#{params[:term]}*", repo_ids)
      results = results.map { |erratum| {label: erratum.id_title, value: erratum.errata_id} }

      render :json => results
    end

    private

    def readable_repos(attribute)
      repos = []
      repos += Product.readable_repositories.pluck(attribute)
      repos += ContentView.readable_repositories.pluck(attribute)
      repos
    end
  end
end

Version data entries

248 entries across 248 versions & 1 rubygems

Version Path
katello-4.14.2 app/controllers/katello/errata_controller.rb
katello-4.15.0 app/controllers/katello/errata_controller.rb
katello-4.15.0.rc2 app/controllers/katello/errata_controller.rb
katello-4.15.0.rc1 app/controllers/katello/errata_controller.rb
katello-4.14.1 app/controllers/katello/errata_controller.rb
katello-4.14.0 app/controllers/katello/errata_controller.rb
katello-4.14.0.rc3 app/controllers/katello/errata_controller.rb
katello-4.14.0.rc2 app/controllers/katello/errata_controller.rb
katello-4.14.0.rc1.1 app/controllers/katello/errata_controller.rb
katello-4.14.0.rc1 app/controllers/katello/errata_controller.rb
katello-4.13.1 app/controllers/katello/errata_controller.rb
katello-4.13.0 app/controllers/katello/errata_controller.rb
katello-4.12.1 app/controllers/katello/errata_controller.rb
katello-4.13.0.rc1 app/controllers/katello/errata_controller.rb
katello-4.12.0 app/controllers/katello/errata_controller.rb
katello-4.12.0.rc3 app/controllers/katello/errata_controller.rb
katello-4.12.0.rc2 app/controllers/katello/errata_controller.rb
katello-4.12.0.rc1 app/controllers/katello/errata_controller.rb
katello-4.11.1 app/controllers/katello/errata_controller.rb
katello-4.11.0 app/controllers/katello/errata_controller.rb