diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-08 12:07:53 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-08 12:07:53 +0300 |
commit | a821bd6ad17e304ca93838a411410a44ee9cff9f (patch) | |
tree | 5444ab20a2f8b22db736a93c5c376928dde8e450 /app/models/deployment_metrics.rb | |
parent | f6e985dba4d0f5b1ede95e9174d30dd6a8bedf0d (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/deployment_metrics.rb')
-rw-r--r-- | app/models/deployment_metrics.rb | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/app/models/deployment_metrics.rb b/app/models/deployment_metrics.rb index 20f0ec3e9b6..c5f8b03f25b 100644 --- a/app/models/deployment_metrics.rb +++ b/app/models/deployment_metrics.rb @@ -34,20 +34,10 @@ class DeploymentMetrics def prometheus_adapter strong_memoize(:prometheus_adapter) do - service = project.find_or_initialize_service('prometheus') - - if service.can_query? - service - else - cluster_prometheus - end + Gitlab::Prometheus::Adapter.new(project, cluster).prometheus_adapter end end - def cluster_prometheus - cluster.application_prometheus if cluster&.application_prometheus_available? - end - def has_metrics_and_can_query? has_metrics? && prometheus_adapter.can_query? end |