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-08 12:33:38 +0300
committerTimothy Andrew <mail@timothyandrew.net>2016-09-08 12:33:38 +0300
commit9901c3df41d37e5d5650e28a5287a8ddf0aa754e (patch)
tree0f10ce6cfa414a45aeb3d260eb4f70b44cbe2774 /app/controllers/projects/cycle_analytics_controller.rb
parentf5b9837c19f48255237eca1e618fc632a45b58b5 (diff)
Add a JSON version of the `CycleAnalytics` page.
Diffstat (limited to 'app/controllers/projects/cycle_analytics_controller.rb')
-rw-r--r--app/controllers/projects/cycle_analytics_controller.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/controllers/projects/cycle_analytics_controller.rb b/app/controllers/projects/cycle_analytics_controller.rb
index 68cc79fb166..9903fae6f7d 100644
--- a/app/controllers/projects/cycle_analytics_controller.rb
+++ b/app/controllers/projects/cycle_analytics_controller.rb
@@ -3,6 +3,11 @@ class Projects::CycleAnalyticsController < Projects::ApplicationController
def show
@cycle_analytics = CycleAnalytics.new(@project, from: parse_start_date)
+
+ respond_to do |format|
+ format.html
+ format.json { render json: @cycle_analytics }
+ end
end
private