|
|
@ -5,6 +5,8 @@ module Admin
|
|
|
|
before_action :set_instances, only: :index
|
|
|
|
before_action :set_instances, only: :index
|
|
|
|
before_action :set_instance, except: :index
|
|
|
|
before_action :set_instance, except: :index
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LOGS_LIMIT = 5
|
|
|
|
|
|
|
|
|
|
|
|
def index
|
|
|
|
def index
|
|
|
|
authorize :instance, :index?
|
|
|
|
authorize :instance, :index?
|
|
|
|
preload_delivery_failures!
|
|
|
|
preload_delivery_failures!
|
|
|
@ -13,7 +15,7 @@ module Admin
|
|
|
|
def show
|
|
|
|
def show
|
|
|
|
authorize :instance, :show?
|
|
|
|
authorize :instance, :show?
|
|
|
|
@time_period = (6.days.ago.to_date...Time.now.utc.to_date)
|
|
|
|
@time_period = (6.days.ago.to_date...Time.now.utc.to_date)
|
|
|
|
@action_logs = Admin::ActionLogFilter.new(target_domain: @instance.domain).results.limit(5)
|
|
|
|
@action_logs = Admin::ActionLogFilter.new(target_domain: @instance.domain).results.limit(LOGS_LIMIT)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
def destroy
|
|
|
|
def destroy
|
|
|
|