diff options
author | Nick Thomas <nick@gitlab.com> | 2016-11-22 22:55:56 +0300 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2016-12-19 22:53:04 +0300 |
commit | c3d972f4e861059312c2708dacb57999416fcc70 (patch) | |
tree | 977d60c01a81da4157aa1961b244e9967c9168ee /app/serializers/environment_entity.rb | |
parent | 5378302763e1a461bab5213aa379d5b9e6dc322c (diff) |
Add terminals to the Kubernetes deployment service
Diffstat (limited to 'app/serializers/environment_entity.rb')
-rw-r--r-- | app/serializers/environment_entity.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/serializers/environment_entity.rb b/app/serializers/environment_entity.rb index 7e0fc9c071e..e7ef01258ef 100644 --- a/app/serializers/environment_entity.rb +++ b/app/serializers/environment_entity.rb @@ -8,6 +8,7 @@ class EnvironmentEntity < Grape::Entity expose :environment_type expose :last_deployment, using: DeploymentEntity expose :stoppable? + expose :has_terminals?, as: :has_terminals expose :environment_path do |environment| namespace_project_environment_path( @@ -23,5 +24,12 @@ class EnvironmentEntity < Grape::Entity environment) end + expose :terminal_path, if: ->(environment, _) { environment.has_terminals? } do |environment| + terminal_namespace_project_environment_path( + environment.project.namespace, + environment.project, + environment) + end + expose :created_at, :updated_at end |