app/views/katello/api/v2/content_views/base.json.rabl in katello-4.0.3 vs app/views/katello/api/v2/content_views/base.json.rabl in katello-4.1.0.rc1

- old
+ new

@@ -2,21 +2,34 @@ extends 'katello/api/v2/common/org_reference' attributes :composite attributes :component_ids attributes :default -attributes :force_puppet_environment attributes :version_count -attributes :latest_version +attributes :latest_version, :latest_version_id attributes :auto_publish attributes :solve_dependencies attributes :import_only node :next_version do |content_view| content_view.next_version.to_f.to_s end +child :last_task => :last_task do |_task| + attributes :task_id => :id + attributes :status => :result + node :last_sync_words do |object| + if object.try(:created_at) + time_ago_in_words(Time.parse(object.created_at.to_s)) + end + end +end + +child :latest_version_env => :latest_version_environments do + attributes :id, :name, :label +end + node :last_published do |content_view| unless content_view.versions.empty? content_view.versions.order(:created_at).last.created_at end end @@ -40,16 +53,10 @@ attributes :id, :name, :label, :content_type end attributes :repository_ids end -child :puppet_modules => :puppet_modules do - attributes :id, :name, :author, :uuid - attributes :created_at - attributes :updated_at -end - child :versions => :versions do attributes :id, :version attributes :created_at => :published attributes :environment_ids end @@ -63,11 +70,11 @@ :promote_or_remove_content_views => cv.promotable_or_removable? } end child :components => :components do - attributes :id, :name, :label, :content_view_id, :version, :puppet_module_count + attributes :id, :name, :label, :content_view_id, :version child :environments => :environments do attributes :id, :name, :label end @@ -83,9 +90,13 @@ child :content_view_components => :content_view_components do extends "katello/api/v2/content_view_components/show" end child :activation_keys => :activation_keys do + attributes :id, :name +end + +child :hosts => :hosts do attributes :id, :name end extends 'katello/api/v2/common/timestamps'