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
|