Sha256: 1171cc6969157be0f849b4ac6a50186ac02c7b281854192c688f68acec9fae64

Contents?: true

Size: 1.56 KB

Versions: 26

Compression:

Stored size: 1.56 KB

Contents

object @capsule

attribute :last_sync_time

attribute :download_policy

node :unsyncable_content_types do
  ::Katello::SmartProxyHelper.new(@capsule).unsyncable_content_types
end

child :active_sync_tasks => :active_sync_tasks do
  extends 'foreman_tasks/api/tasks/show'
end
child :last_failed_sync_tasks => :last_failed_sync_tasks do
  extends 'foreman_tasks/api/tasks/show'
end

child @lifecycle_environments => :lifecycle_environments do
  extends 'katello/api/v2/common/identifier'
  extends 'katello/api/v2/common/org_reference'

  attributes :library
  node :syncable do |env|
    @capsule.environment_syncable?(env)
  end

  if @capsule.has_feature?(SmartProxy::PULP_NODE_FEATURE) || @capsule.has_feature?(SmartProxy::PULP3_FEATURE)
    node :counts do |env|
      {
        :content_views => env.content_views.non_default.count
      }
    end

    node :content_views do |env|
      env.content_views.ignore_generated.map do |content_view|
        attributes = {
          :id => content_view.id,
          :label => content_view.label,
          :name => content_view.name,
          :composite => content_view.composite,
          :last_published => content_view.versions.empty? ? nil : content_view.versions.last.created_at,
          :default => content_view.default,
          :up_to_date => @capsule.repos_pending_sync(env, content_view).empty?,
          :counts => {
            :repositories => ::Katello::ContentViewVersion.in_environment(env).find_by(:content_view => content_view)&.archived_repos&.count
          }
        }
        attributes
      end
    end
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
katello-4.9.2 app/views/katello/api/v2/capsule_content/sync_status.json.rabl
katello-4.8.4 app/views/katello/api/v2/capsule_content/sync_status.json.rabl
katello-4.9.1 app/views/katello/api/v2/capsule_content/sync_status.json.rabl
katello-4.8.3 app/views/katello/api/v2/capsule_content/sync_status.json.rabl
katello-4.9.0 app/views/katello/api/v2/capsule_content/sync_status.json.rabl
katello-4.7.6 app/views/katello/api/v2/capsule_content/sync_status.json.rabl
katello-4.8.2 app/views/katello/api/v2/capsule_content/sync_status.json.rabl
katello-4.9.0.rc2 app/views/katello/api/v2/capsule_content/sync_status.json.rabl
katello-4.9.0.rc1 app/views/katello/api/v2/capsule_content/sync_status.json.rabl
katello-4.8.1 app/views/katello/api/v2/capsule_content/sync_status.json.rabl
katello-4.7.5 app/views/katello/api/v2/capsule_content/sync_status.json.rabl
katello-4.8.0 app/views/katello/api/v2/capsule_content/sync_status.json.rabl
katello-4.8.0.rc2 app/views/katello/api/v2/capsule_content/sync_status.json.rabl
katello-4.7.4 app/views/katello/api/v2/capsule_content/sync_status.json.rabl
katello-4.8.0.rc1 app/views/katello/api/v2/capsule_content/sync_status.json.rabl
katello-4.7.3 app/views/katello/api/v2/capsule_content/sync_status.json.rabl
katello-4.7.2 app/views/katello/api/v2/capsule_content/sync_status.json.rabl
katello-4.7.1 app/views/katello/api/v2/capsule_content/sync_status.json.rabl
katello-4.6.2.1 app/views/katello/api/v2/capsule_content/sync_status.json.rabl
katello-4.6.2 app/views/katello/api/v2/capsule_content/sync_status.json.rabl