diff options
Diffstat (limited to 'app/serializers/environment_entity.rb')
-rw-r--r-- | app/serializers/environment_entity.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/serializers/environment_entity.rb b/app/serializers/environment_entity.rb index 3473b4aebc8..6457127d831 100644 --- a/app/serializers/environment_entity.rb +++ b/app/serializers/environment_entity.rb @@ -27,7 +27,7 @@ class EnvironmentEntity < Grape::Entity ops.merge(except: UNNECESSARY_ENTRIES_FOR_UPCOMING_DEPLOYMENT)) end - expose :metrics_path, if: -> (*) { environment.has_metrics? } do |environment| + expose :metrics_path, if: -> (*) { expose_metrics_path? } do |environment| metrics_project_environment_path(environment.project, environment) end @@ -101,6 +101,10 @@ class EnvironmentEntity < Grape::Entity def cluster deployment_platform.cluster end + + def expose_metrics_path? + !Feature.enabled?(:remove_monitor_metrics) && environment.has_metrics? + end end EnvironmentEntity.prepend_mod_with('EnvironmentEntity') |