Stop displaying admin analytics for current day, as the data is incomplete. Instead, show analytics for any given period up to yesterday
11 lines
343 B
Ruby
11 lines
343 B
Ruby
module Admin
|
|
class OverviewController < Admin::ApplicationController
|
|
layout "admin"
|
|
def index
|
|
@length = (params[:period] || 7).to_i
|
|
@labels = (1..@length).map { |n| n.days.ago.strftime("%b %d") }.reverse
|
|
@analytics = Admin::ChartsData.new(@length).call
|
|
@data_counts = Admin::DataCounts.call
|
|
end
|
|
end
|
|
end
|