diff options
author | Pawel Chojnacki <pawel@chojnacki.ws> | 2018-03-01 20:14:54 +0300 |
---|---|---|
committer | Pawel Chojnacki <pawel@chojnacki.ws> | 2018-03-01 20:33:49 +0300 |
commit | 8ad9cd5581dafeb7a24da7ed119a30761a0a72fe (patch) | |
tree | 8a9796c20ca958738ba74ec008383dc5fc787a18 /app/controllers/projects/prometheus | |
parent | 2c090539f2dbdbc11c18598c7952a5de497047ea (diff) |
Implement PrometheusDeploymentLocator + fix metrics controller
Diffstat (limited to 'app/controllers/projects/prometheus')
-rw-r--r-- | app/controllers/projects/prometheus/metrics_controller.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/app/controllers/projects/prometheus/metrics_controller.rb b/app/controllers/projects/prometheus/metrics_controller.rb index 255fbf254fb..ec3c49059e1 100644 --- a/app/controllers/projects/prometheus/metrics_controller.rb +++ b/app/controllers/projects/prometheus/metrics_controller.rb @@ -1,6 +1,8 @@ module Projects module Prometheus class MetricsController < Projects::ApplicationController + include PrometheusAdapterLocator + before_action :authorize_admin_project! before_action :require_prometheus_metrics! @@ -20,10 +22,6 @@ module Projects private - def prometheus_adapter - project.prometheus_service - end - def require_prometheus_metrics! render_404 unless prometheus_adapter.can_query? end |