Welcome to mirror list, hosted at ThFree Co, Russian Federation.

job_group_entity.rb « serializers « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 3597d5531facd93d646db7fdb64865ef3f6b8acd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# frozen_string_literal: true

class JobGroupEntity < Grape::Entity
  include RequestAwareEntity

  expose :name
  expose :size
  expose :detailed_status, as: :status, with: DetailedStatusEntity
  expose :jobs, with: Ci::JobEntity

  private

  alias_method :group, :object

  def detailed_status
    group.detailed_status(request.current_user)
  end
end