diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-07-20 15:26:25 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-07-20 15:26:25 +0300 |
commit | a09983ae35713f5a2bbb100981116d31ce99826e (patch) | |
tree | 2ee2af7bd104d57086db360a7e6d8c9d5d43667a /app/controllers/admin | |
parent | 18c5ab32b738c0b6ecb4d0df3994000482f34bd8 (diff) |
Add latest changes from gitlab-org/gitlab@13-2-stable-ee
Diffstat (limited to 'app/controllers/admin')
-rw-r--r-- | app/controllers/admin/application_settings_controller.rb | 1 | ||||
-rw-r--r-- | app/controllers/admin/clusters_controller.rb | 9 | ||||
-rw-r--r-- | app/controllers/admin/jobs_controller.rb | 4 | ||||
-rw-r--r-- | app/controllers/admin/services_controller.rb | 11 |
4 files changed, 21 insertions, 4 deletions
diff --git a/app/controllers/admin/application_settings_controller.rb b/app/controllers/admin/application_settings_controller.rb index 94c82c25357..41a6616d10c 100644 --- a/app/controllers/admin/application_settings_controller.rb +++ b/app/controllers/admin/application_settings_controller.rb @@ -227,6 +227,7 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController :raw_blob_request_limit, :namespace_storage_size_limit, :issues_create_limit, + :default_branch_name, disabled_oauth_sign_in_sources: [], import_sources: [], repository_storages: [], diff --git a/app/controllers/admin/clusters_controller.rb b/app/controllers/admin/clusters_controller.rb index 5b1902fad51..9a642e53d86 100644 --- a/app/controllers/admin/clusters_controller.rb +++ b/app/controllers/admin/clusters_controller.rb @@ -10,6 +10,11 @@ class Admin::ClustersController < Clusters::ClustersController def clusterable @clusterable ||= InstanceClusterablePresenter.fabricate(Clusters::Instance.new, current_user: current_user) end -end -Admin::ClustersController.prepend_if_ee('EE::Admin::ClustersController') + def metrics_dashboard_params + { + cluster: cluster, + cluster_type: :admin + } + end +end diff --git a/app/controllers/admin/jobs_controller.rb b/app/controllers/admin/jobs_controller.rb index a3a18a115e9..7b50a45a9cd 100644 --- a/app/controllers/admin/jobs_controller.rb +++ b/app/controllers/admin/jobs_controller.rb @@ -1,6 +1,8 @@ # frozen_string_literal: true class Admin::JobsController < Admin::ApplicationController + BUILDS_PER_PAGE = 30 + def index # We need all builds for tabs counters @all_builds = Ci::JobsFinder.new(current_user: current_user).execute @@ -8,7 +10,7 @@ class Admin::JobsController < Admin::ApplicationController @scope = params[:scope] @builds = Ci::JobsFinder.new(current_user: current_user, params: params).execute @builds = @builds.eager_load_everything - @builds = @builds.page(params[:page]).per(30) + @builds = @builds.page(params[:page]).per(BUILDS_PER_PAGE).without_count end def cancel_all diff --git a/app/controllers/admin/services_controller.rb b/app/controllers/admin/services_controller.rb index 08ef992e604..e0137accd2d 100644 --- a/app/controllers/admin/services_controller.rb +++ b/app/controllers/admin/services_controller.rb @@ -4,13 +4,18 @@ class Admin::ServicesController < Admin::ApplicationController include ServiceParams before_action :service, only: [:edit, :update] + before_action :whitelist_query_limiting, only: [:index] + before_action only: :edit do + push_frontend_feature_flag(:integration_form_refactor, default_enabled: true) + end def index @services = Service.find_or_create_templates.sort_by(&:title) + @existing_instance_types = Service.instances.pluck(:type) # rubocop: disable CodeReuse/ActiveRecord end def edit - unless service.present? + if service.nil? || Service.instance_exists_for?(service.type) redirect_to admin_application_settings_services_path, alert: "Service is unknown or it doesn't exist" end @@ -34,4 +39,8 @@ class Admin::ServicesController < Admin::ApplicationController @service ||= Service.find_by(id: params[:id], template: true) end # rubocop: enable CodeReuse/ActiveRecord + + def whitelist_query_limiting + Gitlab::QueryLimiting.whitelist('https://gitlab.com/gitlab-org/gitlab/-/issues/220357') + end end |