2013-07-17 13:35:36 +01:00
|
|
|
json.advisory do
|
2014-01-21 04:51:49 +00:00
|
|
|
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')
|
2014-01-21 04:51:49 +00:00
|
|
|
|
2013-07-17 13:35:36 +01:00
|
|
|
json.build_lists @advisory.build_lists do |build_list|
|
|
|
|
json.(build_list, :id)
|
2014-01-21 04:51:49 +00:00
|
|
|
json.url api_v1_build_list_path(build_list.id, format: :json)
|
2012-10-18 12:22:31 +01:00
|
|
|
end
|
|
|
|
|
2013-07-17 13:35:36 +01:00
|
|
|
json.affected_in @packages_info do |package_info|
|
2014-01-21 04:51:49 +00:00
|
|
|
json.partial! 'api/v1/platforms/platform', platform: package_info[0]
|
2012-10-19 15:56:29 +01:00
|
|
|
|
2013-07-17 13:35:36 +01:00
|
|
|
json.projects package_info[1] do |info|
|
2014-01-21 04:51:49 +00:00
|
|
|
json.partial! 'api/v1/projects/project', project: info[0]
|
|
|
|
|
2012-10-18 12:22:31 +01:00
|
|
|
packages = info[1]
|
2013-07-17 13:35:36 +01:00
|
|
|
json.srpm packages[:srpm]
|
|
|
|
json.rpm packages[:rpm]
|
2012-10-18 12:22:31 +01:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|