Instances list in admin (#2095)
* Add admin/instances index action * Add link to instances admin page * View lists instances * Instances, grouped by domain, ordered by count * Use Account.remote scope * Extract method: Account.by_domain_accounts
This commit is contained in:
1 parent
66d8f99a30
commit
55e1503522
8 files changed
+66
No files matched your search
@@ -0,0 +1,15 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Admin
|
||||
class InstancesController < BaseController
|
||||
def index
|
||||
@instances = ordered_instances.page(params[:page])
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def ordered_instances
|
||||
Account.remote.by_domain_accounts
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user