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:
authorsyasonik <syasonik@gitlab.com>2019-04-16 10:01:43 +0300
committersyasonik <syasonik@gitlab.com>2019-04-24 13:23:03 +0300
commit3d302879f431aed213c0b9d6308c7dff9a9c3958 (patch)
tree65751aa47207e4c3265a2d8ef6760bd2b49cb07d /app/controllers
parent18183f404e492bcdb9818e2fb29b50dafdbca247 (diff)
Add unit tests and fix broken endpoint
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/projects/environments_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/projects/environments_controller.rb b/app/controllers/projects/environments_controller.rb
index b10f0c7b7db..da35d8d37f7 100644
--- a/app/controllers/projects/environments_controller.rb
+++ b/app/controllers/projects/environments_controller.rb
@@ -158,11 +158,11 @@ class Projects::EnvironmentsController < Projects::ApplicationController
end
def metrics_dashboard
- access_denied! unless Feature.enabled?(:environment_metrics_use_prometheus_endpoint, project)
+ render_403 and return unless Feature.enabled?(:environment_metrics_use_prometheus_endpoint, project)
respond_to do |format|
format.json do
- dashboard = MetricsDashboardService.new.get_dashboard
+ dashboard = MetricsDashboardService.new(@project).get_dashboard
render json: dashboard, status: :ok
end