Commit 558b4a94 authored by GitLab Bot's avatar GitLab Bot

Automatic merge of gitlab-org/gitlab-ce master

parents f4b02d75 771e3903
......@@ -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
......
......@@ -55,6 +55,8 @@ class Project < ApplicationRecord
VALID_MIRROR_PORTS = [22, 80, 443].freeze
VALID_MIRROR_PROTOCOLS = %w(http https ssh git).freeze
ignore_column :import_status, :import_jid, :import_error
cache_markdown_field :description, pipeline: :description
delegate :feature_available?, :builds_enabled?, :wiki_enabled?,
......
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