class Stats::DaysController < Stats::ServiceBaseController
  def index
    @data = ::Stats::Deprecated.average_usage_by_weekdays_for_all_metrics(@service)
    action = use_old_charts? ? 'old_index' : 'index'
    render action: action
  end

  def show
    @day = params[:id]
    @metric = @service.metrics.find(params[:metric_id])
    @data = ::Stats::Deprecated.usage_in_day(@service, :day => @day, :metric => @metric)
  end

end
