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:
authorTimothy Andrew <mail@timothyandrew.net>2016-09-17 09:38:23 +0300
committerTimothy Andrew <mail@timothyandrew.net>2016-09-17 09:46:48 +0300
commitedb38d69cc6cffef46b6c7b957ad97ce213173cf (patch)
treee41eae3d77847cd4189ef3c7c21d29543c8fa0ea /app/controllers/projects/cycle_analytics_controller.rb
parent7d69ff3ddf0fb83c6a1ec02f85b01b454080b647 (diff)
Move cycle analytics JSON generation to a helper.
1. Use a new format, with each stage having a `title`, `description`, and `value.
Diffstat (limited to 'app/controllers/projects/cycle_analytics_controller.rb')
-rw-r--r--app/controllers/projects/cycle_analytics_controller.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/controllers/projects/cycle_analytics_controller.rb b/app/controllers/projects/cycle_analytics_controller.rb
index 9903fae6f7d..dd0acc57425 100644
--- a/app/controllers/projects/cycle_analytics_controller.rb
+++ b/app/controllers/projects/cycle_analytics_controller.rb
@@ -1,4 +1,6 @@
class Projects::CycleAnalyticsController < Projects::ApplicationController
+ include CycleAnalyticsHelper
+
before_action :authorize_read_cycle_analytics!
def show
@@ -6,7 +8,7 @@ class Projects::CycleAnalyticsController < Projects::ApplicationController
respond_to do |format|
format.html
- format.json { render json: @cycle_analytics }
+ format.json { render json: cycle_analytics_json(@cycle_analytics) }
end
end