Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2016-11-22 16:29:25 +0300
committerJames Lopez <james@jameslopez.es>2017-01-17 13:32:54 +0300
commit02e1e4819234662faddd7d8eb5c54d9bfdf9e7e6 (patch)
treed789f920c5d3dd66f140c9dcfe774ac158623ca4 /app/controllers/projects/cycle_analytics_controller.rb
parent8639ea1b0315045c0e4a5ad8d6419903507850c3 (diff)
more refactoring and fixing old specs
Diffstat (limited to 'app/controllers/projects/cycle_analytics_controller.rb')
-rw-r--r--app/controllers/projects/cycle_analytics_controller.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/app/controllers/projects/cycle_analytics_controller.rb b/app/controllers/projects/cycle_analytics_controller.rb
index 73fe3c9c4c9..93dbe2819e7 100644
--- a/app/controllers/projects/cycle_analytics_controller.rb
+++ b/app/controllers/projects/cycle_analytics_controller.rb
@@ -6,7 +6,9 @@ class Projects::CycleAnalyticsController < Projects::ApplicationController
before_action :authorize_read_cycle_analytics!
def show
- @cycle_analytics = ::CycleAnalytics.new(@project, current_user, from: start_date(cycle_analytics_params))
+ @cycle_analytics = ::CycleAnalytics.new(@project, options: options)
+
+ @cycle_analytics_no_data = @cycle_analytics.no_stats?
respond_to do |format|
format.html
@@ -25,8 +27,8 @@ class Projects::CycleAnalyticsController < Projects::ApplicationController
def cycle_analytics_json
{
summary: @cycle_analytics.summary,
- stats: nil, # TODO
- permissions: @cycle_analytics.permissions(user: current_user)# TODO
+ stats: @cycle_analytics.stats,
+ permissions: @cycle_analytics.permissions(user: current_user)
}
end
end