gitlab-org--gitlab-foss/app/controllers/admin
Stan Hu 08c3e59aee Optimize /admin/applications so that it does not timeout
On our dev instance, /admin/applications as not loading because:

1. There was an unindexed query by `application_id`.
2. There was an expensive query that attempted to load 1 million
   unique entries via ActiveRecord just to find the unique count.

We fix the first issue by adding an index for that column.

We fix the second issue with a simple SELECT COUNT(DISTINCT
resource_owner_id) SQL query.

In addition, we add pagination to avoid loading more than 20
applications at once.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/67228
2019-09-09 21:51:57 -07:00
..
clusters
abuse_reports_controller.rb
appearances_controller.rb
application_controller.rb
application_settings_controller.rb Settings API: domain_{black,white}list should be arrays 2019-09-09 15:14:52 +02:00
applications_controller.rb Optimize /admin/applications so that it does not timeout 2019-09-09 21:51:57 -07:00
background_jobs_controller.rb
broadcast_messages_controller.rb
clusters_controller.rb
dashboard_controller.rb Application Statistics API 2019-09-09 03:38:42 +00:00
deploy_keys_controller.rb
gitaly_servers_controller.rb
groups_controller.rb Preload routes information 2019-09-03 12:16:03 +02:00
health_check_controller.rb
hook_logs_controller.rb
hooks_controller.rb
identities_controller.rb
impersonation_tokens_controller.rb
impersonations_controller.rb
jobs_controller.rb
keys_controller.rb
labels_controller.rb
logs_controller.rb
projects_controller.rb
requests_profiles_controller.rb Bring backward compatibility for request profiles 2019-07-23 09:30:00 +00:00
runner_projects_controller.rb
runners_controller.rb
services_controller.rb
spam_logs_controller.rb
system_info_controller.rb
users_controller.rb CE Port: Log impersonation actions in audit log 2019-07-23 11:44:09 +05:30