mirror of
https://github.com/internetee/registry.git
synced 2025-07-27 21:16:12 +02:00
Temporarily changed date_from for stats
This commit is contained in:
parent
ea48a1cca1
commit
533b10aad1
1 changed files with 3 additions and 2 deletions
|
@ -50,9 +50,9 @@ module Repp
|
||||||
|
|
||||||
def set_date_params
|
def set_date_params
|
||||||
@date_to = to_date(search_params[:end_date]).end_of_month
|
@date_to = to_date(search_params[:end_date]).end_of_month
|
||||||
@date_from = to_date(search_params[:start_date] || '01.00')
|
@date_from = to_date(search_params[:start_date] || '01.22')
|
||||||
@date_compare_to = to_date(search_params[:compare_to_end_date]).end_of_month
|
@date_compare_to = to_date(search_params[:compare_to_end_date]).end_of_month
|
||||||
@date_compare_from = to_date(search_params[:compare_to_start_date] || '01.00')
|
@date_compare_from = to_date(search_params[:compare_to_start_date] || '01.22')
|
||||||
end
|
end
|
||||||
|
|
||||||
def to_date(date_param)
|
def to_date(date_param)
|
||||||
|
@ -94,6 +94,7 @@ module Repp
|
||||||
def domains_by_registrar(date_to, date_from)
|
def domains_by_registrar(date_to, date_from)
|
||||||
domain_versions = ::Version::DomainVersion.where('object_changes IS NOT NULL')
|
domain_versions = ::Version::DomainVersion.where('object_changes IS NOT NULL')
|
||||||
.where('created_at >= ? AND created_at <= ?', date_from, date_to)
|
.where('created_at >= ? AND created_at <= ?', date_from, date_to)
|
||||||
|
.select(:event, :object, :object_changes)
|
||||||
registrar_counts = Hash.new(0)
|
registrar_counts = Hash.new(0)
|
||||||
processed_domains = []
|
processed_domains = []
|
||||||
Rails.logger.info "Processing total #{domain_versions.size} log_domain records"
|
Rails.logger.info "Processing total #{domain_versions.size} log_domain records"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue