rosa-build/app/views/api/v1/advisories/show.json.jbuilder

26 lines
758 B
Plaintext
Raw Normal View History

json.advisory do
json.partial! 'advisory', :advisory => @advisory
2012-10-18 12:22:31 +01:00
json.created_at @advisory.created_at.to_i
json.updated_at @advisory.updated_at.to_i
2012-10-18 14:08:40 +01:00
json.(@advisory, :update_type)
json.references @advisory.references.split('\n')
json.build_lists @advisory.build_lists do |build_list|
json.(build_list, :id)
json.url api_v1_build_list_path(build_list.id, :format => :json)
2012-10-18 12:22:31 +01:00
end
json.affected_in @packages_info do |package_info|
json.partial! 'api/v1/platforms/platform', :platform => package_info[0]
json.projects package_info[1] do |info|
json.partial! 'api/v1/projects/project', :project => info[0]
2012-10-18 12:22:31 +01:00
packages = info[1]
json.srpm packages[:srpm]
json.rpm packages[:rpm]
2012-10-18 12:22:31 +01:00
end
end
end