BigW Consortium Gitlab

job_group_entity.rb 312 Bytes
Newer Older
1 2 3 4 5 6
class JobGroupEntity < Grape::Entity
  include RequestAwareEntity

  expose :name
  expose :size
  expose :detailed_status, as: :status, with: StatusEntity
7
  expose :jobs, with: JobEntity
8 9 10 11 12 13

  private

  alias_method :group, :object

  def detailed_status
14
    group.detailed_status(request.current_user)
15 16
  end
end