2016-12-07 10:46:37 -05:00
|
|
|
class StatusEntity < Grape::Entity
|
|
|
|
include RequestAwareEntity
|
2017-04-13 06:09:20 -04:00
|
|
|
include CiStatusHelper
|
2016-12-07 10:46:37 -05:00
|
|
|
|
2017-04-13 06:09:20 -04:00
|
|
|
format_with(:status_favicon_path) do |favicon_name|
|
|
|
|
ci_status_favicon_path(favicon_name)
|
|
|
|
end
|
|
|
|
|
|
|
|
expose :icon, :text, :label, :group
|
2016-12-07 10:46:37 -05:00
|
|
|
|
|
|
|
expose :has_details?, as: :has_details
|
|
|
|
expose :details_path
|
2017-04-13 06:09:20 -04:00
|
|
|
|
|
|
|
expose :favicon, format_with: :status_favicon_path
|
2016-12-07 10:46:37 -05:00
|
|
|
end
|