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

19 lines
355 B
Ruby
Raw Normal View History

# frozen_string_literal: true
2017-05-06 12:45:46 -04:00
class JobGroupEntity < Grape::Entity
include RequestAwareEntity
expose :name
expose :size
expose :detailed_status, as: :status, with: DetailedStatusEntity
expose :jobs, with: Ci::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