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:
Diffstat (limited to 'app/controllers/ci/charts_controller.rb')
-rw-r--r--app/controllers/ci/charts_controller.rb24
1 files changed, 24 insertions, 0 deletions
diff --git a/app/controllers/ci/charts_controller.rb b/app/controllers/ci/charts_controller.rb
new file mode 100644
index 00000000000..63326ef36cc
--- /dev/null
+++ b/app/controllers/ci/charts_controller.rb
@@ -0,0 +1,24 @@
+module Ci
+ class ChartsController < Ci::ApplicationController
+ before_filter :authenticate_user!
+ before_filter :project
+ before_filter :authorize_access_project!
+ before_filter :authorize_manage_project!
+
+ layout 'ci/project'
+
+ def show
+ @charts = {}
+ @charts[:week] = Ci::Charts::WeekChart.new(@project)
+ @charts[:month] = Ci::Charts::MonthChart.new(@project)
+ @charts[:year] = Ci::Charts::YearChart.new(@project)
+ @charts[:build_times] = Ci::Charts::BuildTime.new(@project)
+ end
+
+ protected
+
+ def project
+ @project = Ci::Project.find(params[:project_id])
+ end
+ end
+end