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.15.0.rc2 app/views/katello/api/v2/content_view_filters/base.json.rabl
katello-4.15.0.rc1 app/views/katello/api/v2/content_view_filters/base.json.rabl
katello-4.14.1 app/views/katello/api/v2/content_view_filters/base.json.rabl
katello-4.14.0 app/views/katello/api/v2/content_view_filters/base.json.rabl
katello-4.14.0.rc3 app/views/katello/api/v2/content_view_filters/base.json.rabl
katello-4.14.0.rc2 app/views/katello/api/v2/content_view_filters/base.json.rabl
katello-4.14.0.rc1.1 app/views/katello/api/v2/content_view_filters/base.json.rabl
katello-4.14.0.rc1 app/views/katello/api/v2/content_view_filters/base.json.rabl
katello-4.13.1 app/views/katello/api/v2/content_view_filters/base.json.rabl
katello-4.13.0 app/views/katello/api/v2/content_view_filters/base.json.rabl
katello-4.12.1 app/views/katello/api/v2/content_view_filters/base.json.rabl
katello-4.13.0.rc1 app/views/katello/api/v2/content_view_filters/base.json.rabl
katello-4.12.0 app/views/katello/api/v2/content_view_filters/base.json.rabl
katello-4.12.0.rc3 app/views/katello/api/v2/content_view_filters/base.json.rabl
katello-4.12.0.rc2 app/views/katello/api/v2/content_view_filters/base.json.rabl
katello-4.12.0.rc1 app/views/katello/api/v2/content_view_filters/base.json.rabl
katello-4.11.1 app/views/katello/api/v2/content_view_filters/base.json.rabl
katello-4.11.0 app/views/katello/api/v2/content_view_filters/base.json.rabl
katello-4.11.0.rc2 app/views/katello/api/v2/content_view_filters/base.json.rabl
katello-4.11.0.rc1 app/views/katello/api/v2/content_view_filters/base.json.rabl