Sha256: 7f7de42bdcff90403828b14867a7fff365aaef6cf0527eb3c3b0beeaa10ac70d

Contents?: true

Size: 1.58 KB

Versions: 50

Compression:

Stored size: 1.58 KB

Contents

object @resource

extends 'katello/api/v2/common/identifier'

node(:type) { |filter| filter.class::CONTENT_TYPE }
attributes :inclusion

child :content_view => :content_view do
  extends 'katello/api/v2/content_views/base'
end

child :repositories => :repositories do
  extends 'katello/api/v2/repositories/base'
end

if @resource.respond_to?(:package_rules)
  attributes :original_packages
end

if @resource.respond_to?(:module_stream_rules)
  attributes :original_module_streams
end

node :rules do |filter|
  if filter.respond_to?(:package_rules)
    filter.package_rules.map do |rule|
      partial('katello/api/v2/content_view_filter_rules/show', :object => rule)
    end

  elsif filter.respond_to?(:package_group_rules)
    filter.package_group_rules.map do |rule|
      partial('katello/api/v2/content_view_filter_rules/show', :object => rule)
    end

  elsif filter.respond_to?(:erratum_rules)
    filter.erratum_rules.map do |rule|
      partial('katello/api/v2/content_view_filter_rules/show', :object => rule)
    end

  elsif filter.respond_to?(:module_stream_rules)
    filter.module_stream_rules.map do |rule|
      partial('katello/api/v2/content_view_filter_rules/show', :object => rule)
    end

  elsif filter.respond_to?(:docker_rules)
    filter.docker_rules.map do |rule|
      partial('katello/api/v2/content_view_filter_rules/show', :object => rule)
    end

  elsif filter.respond_to?(:deb_rules)
    filter.deb_rules.map do |rule|
      partial('katello/api/v2/content_view_filter_rules/show', :object => rule)
    end

  else
    []
  end
end

extends 'katello/api/v2/common/timestamps'

Version data entries

50 entries across 50 versions & 1 rubygems

Version Path
katello-4.10.0 app/views/katello/api/v2/content_view_filters/base.json.rabl
katello-4.9.2 app/views/katello/api/v2/content_view_filters/base.json.rabl
katello-4.10.0.rc2 app/views/katello/api/v2/content_view_filters/base.json.rabl
katello-4.10.0.rc1 app/views/katello/api/v2/content_view_filters/base.json.rabl
katello-4.8.4 app/views/katello/api/v2/content_view_filters/base.json.rabl
katello-4.9.1 app/views/katello/api/v2/content_view_filters/base.json.rabl
katello-4.8.3 app/views/katello/api/v2/content_view_filters/base.json.rabl
katello-4.9.0 app/views/katello/api/v2/content_view_filters/base.json.rabl
katello-4.7.6 app/views/katello/api/v2/content_view_filters/base.json.rabl
katello-4.8.2 app/views/katello/api/v2/content_view_filters/base.json.rabl
katello-4.9.0.rc2 app/views/katello/api/v2/content_view_filters/base.json.rabl
katello-4.9.0.rc1 app/views/katello/api/v2/content_view_filters/base.json.rabl
katello-4.8.1 app/views/katello/api/v2/content_view_filters/base.json.rabl
katello-4.7.5 app/views/katello/api/v2/content_view_filters/base.json.rabl
katello-4.8.0 app/views/katello/api/v2/content_view_filters/base.json.rabl
katello-4.8.0.rc2 app/views/katello/api/v2/content_view_filters/base.json.rabl
katello-4.7.4 app/views/katello/api/v2/content_view_filters/base.json.rabl
katello-4.8.0.rc1 app/views/katello/api/v2/content_view_filters/base.json.rabl
katello-4.7.3 app/views/katello/api/v2/content_view_filters/base.json.rabl
katello-4.7.2 app/views/katello/api/v2/content_view_filters/base.json.rabl