This repository has been archived on 2024-06-09. You can view files and clone it, but cannot push or open issues/pull-requests.
2017-04-18 21:09:07 +02:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Admin
|
|
|
|
class InstancesController < BaseController
|
|
|
|
def index
|
2017-05-31 20:38:44 +02:00
|
|
|
@instances = ordered_instances
|
2017-04-18 21:09:07 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
2017-05-31 20:38:44 +02:00
|
|
|
def paginated_instances
|
|
|
|
Account.remote.by_domain_accounts.page(params[:page])
|
|
|
|
end
|
|
|
|
helper_method :paginated_instances
|
|
|
|
|
2017-04-18 21:09:07 +02:00
|
|
|
def ordered_instances
|
2017-05-31 20:38:44 +02:00
|
|
|
paginated_instances.map { |account| Instance.new(account) }
|
2017-04-18 21:09:07 +02:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|