Sha256: 176fc703bea50fbcabcfa879be276e6197960163d72e0f4e02b10b0914cfdb64

Contents?: true

Size: 797 Bytes

Versions: 91

Compression:

Stored size: 797 Bytes

Contents

module Katello
  class Api::V2::PuppetModulesController < Api::V2::ApiController
    apipie_concern_subst(:a_resource => N_("a puppet module"), :resource => "puppet_modules")
    include Katello::Concerns::Api::V2::RepositoryContentController

    def custom_index_relation(collection)
      if @environment && !@environment.library?
        collection = collection.joins(:content_view_puppet_environments).
            where("#{Katello::ContentViewPuppetEnvironment.table_name}.environment_id" => @environment.id)
      end
      collection
    end

    def custom_collection_by_content_view_version(versions)
      resource_class.joins(:content_view_puppet_environments)
        .where("#{Katello::ContentViewPuppetEnvironment.table_name}.content_view_version_id" => versions)
    end
  end
end

Version data entries

91 entries across 91 versions & 1 rubygems

Version Path
katello-3.18.1 app/controllers/katello/api/v2/puppet_modules_controller.rb
katello-3.18.0 app/controllers/katello/api/v2/puppet_modules_controller.rb
katello-3.17.1 app/controllers/katello/api/v2/puppet_modules_controller.rb
katello-3.16.2 app/controllers/katello/api/v2/puppet_modules_controller.rb
katello-3.18.0.rc2.1 app/controllers/katello/api/v2/puppet_modules_controller.rb
katello-3.18.0.rc2 app/controllers/katello/api/v2/puppet_modules_controller.rb
katello-3.17.0 app/controllers/katello/api/v2/puppet_modules_controller.rb
katello-3.18.0.rc1 app/controllers/katello/api/v2/puppet_modules_controller.rb
katello-3.17.0.rc2.2 app/controllers/katello/api/v2/puppet_modules_controller.rb
katello-3.17.0.rc2.1 app/controllers/katello/api/v2/puppet_modules_controller.rb
katello-3.16.1.2 app/controllers/katello/api/v2/puppet_modules_controller.rb
katello-3.16.1.1 app/controllers/katello/api/v2/puppet_modules_controller.rb
katello-3.17.0.rc2 app/controllers/katello/api/v2/puppet_modules_controller.rb
katello-3.16.1 app/controllers/katello/api/v2/puppet_modules_controller.rb
katello-3.17.0.rc1 app/controllers/katello/api/v2/puppet_modules_controller.rb
katello-3.16.0 app/controllers/katello/api/v2/puppet_modules_controller.rb
katello-3.16.0.rc5.1 app/controllers/katello/api/v2/puppet_modules_controller.rb
katello-3.16.0.rc5 app/controllers/katello/api/v2/puppet_modules_controller.rb
katello-3.16.0.rc4.1 app/controllers/katello/api/v2/puppet_modules_controller.rb
katello-3.15.3.1 app/controllers/katello/api/v2/puppet_modules_controller.rb