diff options
author | Kushal Pandya <kushalspandya@gmail.com> | 2017-03-31 09:20:11 +0000 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2017-03-31 09:20:11 +0000 |
commit | 9a0f96f9adaf38ae45a1f7b147c196aa12ba451f (patch) | |
tree | 0c55f474ed8500789efb655396b98974ece180e9 /app/serializers | |
parent | 75fe1277c6291202416255a410e85b6dc742dda8 (diff) | |
download | gitlab-ce-9a0f96f9adaf38ae45a1f7b147c196aa12ba451f.tar.gz |
Add metrics button to Environment Overview page
Diffstat (limited to 'app/serializers')
-rw-r--r-- | app/serializers/environment_entity.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/serializers/environment_entity.rb b/app/serializers/environment_entity.rb index 4c017960628..4ff15a78115 100644 --- a/app/serializers/environment_entity.rb +++ b/app/serializers/environment_entity.rb @@ -9,6 +9,13 @@ class EnvironmentEntity < Grape::Entity expose :last_deployment, using: DeploymentEntity expose :stop_action? + expose :metrics_path, if: -> (environment, _) { environment.has_metrics? } do |environment| + metrics_namespace_project_environment_path( + environment.project.namespace, + environment.project, + environment) + end + expose :environment_path do |environment| namespace_project_environment_path( environment.project.namespace, |