diff options
author | Robert Speicher <rspeicher@gmail.com> | 2021-01-20 22:34:23 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2021-01-20 22:34:23 +0300 |
commit | 6438df3a1e0fb944485cebf07976160184697d72 (patch) | |
tree | 00b09bfd170e77ae9391b1a2f5a93ef6839f2597 /app/controllers/admin | |
parent | 42bcd54d971da7ef2854b896a7b34f4ef8601067 (diff) |
Add latest changes from gitlab-org/gitlab@13-8-stable-eev13.8.0-rc42
Diffstat (limited to 'app/controllers/admin')
-rw-r--r-- | app/controllers/admin/application_settings_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/admin/dev_ops_report_controller.rb | 8 | ||||
-rw-r--r-- | app/controllers/admin/projects_controller.rb | 4 |
3 files changed, 13 insertions, 1 deletions
diff --git a/app/controllers/admin/application_settings_controller.rb b/app/controllers/admin/application_settings_controller.rb index 56ec10fa43a..179e6ef60fb 100644 --- a/app/controllers/admin/application_settings_controller.rb +++ b/app/controllers/admin/application_settings_controller.rb @@ -31,7 +31,7 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController feature_category :source_code_management, [:repository, :clear_repository_check_states] feature_category :continuous_integration, [:ci_cd, :reset_registration_token] - feature_category :collection, [:usage_data] + feature_category :usage_ping, [:usage_data] feature_category :integrations, [:integrations] feature_category :pages, [:lets_encrypt_terms_of_service] diff --git a/app/controllers/admin/dev_ops_report_controller.rb b/app/controllers/admin/dev_ops_report_controller.rb index 59b2200fb59..4ebc643be33 100644 --- a/app/controllers/admin/dev_ops_report_controller.rb +++ b/app/controllers/admin/dev_ops_report_controller.rb @@ -3,6 +3,8 @@ class Admin::DevOpsReportController < Admin::ApplicationController include Analytics::UniqueVisitsHelper + helper_method :show_adoption? + track_unique_visits :show, target_id: 'i_analytics_dev_ops_score' feature_category :devops_reports @@ -12,4 +14,10 @@ class Admin::DevOpsReportController < Admin::ApplicationController @metric = DevOpsReport::Metric.order(:created_at).last&.present end # rubocop: enable CodeReuse/ActiveRecord + + def show_adoption? + false + end end + +Admin::DevOpsReportController.prepend_if_ee('EE::Admin::DevOpsReportController') diff --git a/app/controllers/admin/projects_controller.rb b/app/controllers/admin/projects_controller.rb index c4564478462..39718793c1d 100644 --- a/app/controllers/admin/projects_controller.rb +++ b/app/controllers/admin/projects_controller.rb @@ -57,6 +57,10 @@ class Admin::ProjectsController < Admin::ApplicationController namespace = Namespace.find_by(id: params[:new_namespace_id]) ::Projects::TransferService.new(@project, current_user, params.dup).execute(namespace) + if @project.errors[:new_namespace].present? + flash[:alert] = @project.errors[:new_namespace].first + end + @project.reset redirect_to admin_project_path(@project) end |