Skip to content

Commit

Permalink
Fixed typo, removed unused variables
Browse files Browse the repository at this point in the history
  • Loading branch information
Doug Youch committed Sep 10, 2010
1 parent f999fa8 commit 03709b2
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions app/controllers/emarketing_controller.rb
Expand Up @@ -233,17 +233,13 @@ def real_time_stats_request
def real_time_charts_request
range = (params[:range] || 5).to_i
intervals = (params[:intervals] || 10).to_i
update_only = (params[:update] || 0).to_i == 1
update_only = params[:update]
site_node_id = params[:site_node_id]

now = Time.now
now = now.to_i - (now.to_i % range.minutes)
to = now
from = now - (range*intervals).minutes

uniques = []
hits = []
labels = []
groups = []
if site_node_id
site_node = SiteNode.find_by_id site_node_id
Expand All @@ -252,6 +248,6 @@ def real_time_charts_request
groups = DomainLogEntry.traffic Time.at(from), range.minutes, intervals
end

return render :json => DomainLogGroup.chart_data(groups, :desc => true).merge(:range => range)
return render :json => DomainLogGroup.traffic_chart_data(groups, :desc => true, :update_only => update_only).merge(:range => range)
end
end

0 comments on commit 03709b2

Please sign in to comment.