mirror of
https://github.com/internetee/registry.git
synced 2025-07-03 01:33:36 +02:00
Story#116962601 - faster epp logs
This commit is contained in:
parent
8f1f31f8de
commit
5373c76c40
3 changed files with 16 additions and 2 deletions
|
@ -5,7 +5,11 @@ class Admin::ReppLogsController < AdminController
|
|||
def index
|
||||
@q = ApiLog::ReppLog.search(params[:q])
|
||||
@q.sorts = 'id desc' if @q.sorts.empty?
|
||||
@repp_logs = @q.result.page(params[:page])
|
||||
|
||||
@repp_logs = @q.result
|
||||
@repp_logs = @repp_logs.where("extract(epoch from created_at) >= extract(epoch from ?::timestamp)", Time.parse(params[:q][:created_at_gteq])) if params[:q][:created_at_gteq]
|
||||
@repp_logs = @repp_logs.where("extract(epoch from created_at) <= extract(epoch from ?::timestamp)", Time.parse(params[:q][:created_at_lteq])) if params[:q][:created_at_lteq]
|
||||
@repp_logs = @repp_logs.page(params[:page])
|
||||
end
|
||||
|
||||
def show
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue