gitlab-org--gitlab-foss/app/serializers/job_group_entity.rb

17 lines
312 B
Ruby
Raw Normal View History

2017-05-06 12:45:46 -04:00
class JobGroupEntity < Grape::Entity
include RequestAwareEntity
expose :name
expose :size
expose :detailed_status, as: :status, with: StatusEntity
2017-06-07 05:36:41 -04:00
expose :jobs, with: JobEntity
2017-05-06 12:45:46 -04:00
private
alias_method :group, :object
def detailed_status
2017-05-09 00:15:34 -04:00
group.detailed_status(request.current_user)
2017-05-06 12:45:46 -04:00
end
end