Commit 6875796c authored by Ash McKenzie's avatar Ash McKenzie

Merge branch 'reduce_prometheus_adapter' into 'master'

Improve #has_metrics? and Environment#has_terminals?

See merge request gitlab-org/gitlab-ce!29847
parents d6b9f61d 3129cbd5
......@@ -179,7 +179,7 @@ class Deployment < ApplicationRecord
end
def has_metrics?
prometheus_adapter&.can_query? && success?
success? && prometheus_adapter&.can_query?
end
def metrics
......
......@@ -155,7 +155,7 @@ class Environment < ApplicationRecord
end
def has_terminals?
deployment_platform.present? && available? && last_deployment.present?
available? && deployment_platform.present? && last_deployment.present?
end
def terminals
......@@ -163,7 +163,7 @@ class Environment < ApplicationRecord
end
def has_metrics?
prometheus_adapter&.can_query? && available?
available? && prometheus_adapter&.can_query?
end
def metrics
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment