diff options
Diffstat (limited to 'app/controllers/projects/environments_controller.rb')
-rw-r--r-- | app/controllers/projects/environments_controller.rb | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/app/controllers/projects/environments_controller.rb b/app/controllers/projects/environments_controller.rb index d5da24a76de..71195fdb892 100644 --- a/app/controllers/projects/environments_controller.rb +++ b/app/controllers/projects/environments_controller.rb @@ -13,6 +13,7 @@ class Projects::EnvironmentsController < Projects::ApplicationController authorize_metrics_dashboard! push_frontend_feature_flag(:prometheus_computed_alerts) + push_frontend_feature_flag(:disable_metric_dashboard_refresh_rate) end before_action :authorize_read_environment!, except: [:metrics, :additional_metrics, :metrics_dashboard, :metrics_redirect] before_action :authorize_create_environment!, only: [:new, :create] @@ -104,7 +105,7 @@ class Projects::EnvironmentsController < Projects::ApplicationController action_or_env_url = if stop_action - polymorphic_url([project.namespace.becomes(Namespace), project, stop_action]) + polymorphic_url([project, stop_action]) else project_environment_url(project, @environment) end @@ -158,18 +159,14 @@ class Projects::EnvironmentsController < Projects::ApplicationController end def metrics_redirect - environment = project.default_environment - - if environment - redirect_to environment_metrics_path(environment) - else - render :empty_metrics - end + redirect_to project_metrics_dashboard_path(project) end def metrics respond_to do |format| - format.html + format.html do + redirect_to project_metrics_dashboard_path(project, environment: environment ) + end format.json do # Currently, this acts as a hint to load the metrics details into the cache # if they aren't there already |