Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiago Botelho <tiagonbotelho@hotmail.com>2018-05-23 18:28:14 +0300
committerRémy Coutable <remy@rymai.me>2018-05-23 18:28:14 +0300
commit58313de43091a535b2e540d77e5d863bbd5021f1 (patch)
tree9a211106836d34cf4e7c077ec0f6d4fd8d4996e3 /app/controllers/projects/prometheus
parenta2dbca4a27b8f380652bf1165f89238895b0f5d8 (diff)
Render 404 when prometheus adapter is disabled in Prometheus metrics controller
Diffstat (limited to 'app/controllers/projects/prometheus')
-rw-r--r--app/controllers/projects/prometheus/metrics_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/projects/prometheus/metrics_controller.rb b/app/controllers/projects/prometheus/metrics_controller.rb
index 1dd886409a5..c6b6243b553 100644
--- a/app/controllers/projects/prometheus/metrics_controller.rb
+++ b/app/controllers/projects/prometheus/metrics_controller.rb
@@ -25,7 +25,7 @@ module Projects
end
def require_prometheus_metrics!
- render_404 unless prometheus_adapter.can_query?
+ render_404 unless prometheus_adapter&.can_query?
end
end
end