BigW Consortium Gitlab

environment_entity.rb 447 Bytes
Newer Older
1 2 3 4 5
class EnvironmentEntity < Grape::Entity
  include RequestAwareEntity

  expose :id
  expose :name
6 7 8 9 10
  expose :state
  expose :external_url
  expose :environment_type
  expose :last_deployment, using: DeploymentEntity
  expose :stoppable?
11

12
  expose :environment_url do |environment|
13
    namespace_project_environment_url(
14 15
      environment.project.namespace,
      environment.project,
16
      environment)
17 18
  end

19
  expose :created_at, :updated_at
20
end