mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-29 21:38:49 +01:00
Extract methods in pie chart data model
This commit is contained in:
parent
961227da0c
commit
a690e4a4cd
3 changed files with 73 additions and 30 deletions
|
|
@ -181,7 +181,6 @@ class StatsController < ApplicationController
|
|||
actions = Stats::TopContextsQuery.new(current_user).result
|
||||
|
||||
@data = Stats::PieChartData.new(actions, t('stats.spread_of_actions_for_all_context'), 70)
|
||||
@data.calculate
|
||||
|
||||
render :pie_chart_data, :layout => false
|
||||
end
|
||||
|
|
@ -189,7 +188,6 @@ class StatsController < ApplicationController
|
|||
def context_running_actions_data
|
||||
actions = Stats::TopContextsQuery.new(current_user, :running => true).result
|
||||
@data = Stats::PieChartData.new(actions, t('stats.spread_of_running_actions_for_visible_contexts'), 60)
|
||||
@data.calculate
|
||||
|
||||
render :pie_chart_data, :layout => false
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue