summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-09-23 16:16:45 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-09-23 16:24:46 +0200
commiteae27d1ecbfec7ea928b27e0ffc96abeb4a49f7a (patch)
tree01bef6563a1313b7bdf13d214bdabd44781d2891 /app/controllers
parent4bc1e040d4b7d73bd7afb3dbb95c87983eef2b04 (diff)
downloadgitlab-ce-eae27d1ecbfec7ea928b27e0ffc96abeb4a49f7a.tar.gz
Move CI charts to project graphs area
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/ci/charts_controller.rb24
-rw-r--r--app/controllers/projects/graphs_controller.rb10
2 files changed, 10 insertions, 24 deletions
diff --git a/app/controllers/ci/charts_controller.rb b/app/controllers/ci/charts_controller.rb
deleted file mode 100644
index aa875e70987..00000000000
--- a/app/controllers/ci/charts_controller.rb
+++ /dev/null
@@ -1,24 +0,0 @@
-module Ci
- class ChartsController < Ci::ApplicationController
- before_action :authenticate_user!
- before_action :project
- before_action :authorize_access_project!
- before_action :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
diff --git a/app/controllers/projects/graphs_controller.rb b/app/controllers/projects/graphs_controller.rb
index 0b6f7f5c91e..8bc5746a42c 100644
--- a/app/controllers/projects/graphs_controller.rb
+++ b/app/controllers/projects/graphs_controller.rb
@@ -23,6 +23,16 @@ class Projects::GraphsController < Projects::ApplicationController
@commits_per_month = @commits_graph.commits_per_month
end
+ def ci
+ ci_project = @project.gitlab_ci_project
+
+ @charts = {}
+ @charts[:week] = Ci::Charts::WeekChart.new(ci_project)
+ @charts[:month] = Ci::Charts::MonthChart.new(ci_project)
+ @charts[:year] = Ci::Charts::YearChart.new(ci_project)
+ @charts[:build_times] = Ci::Charts::BuildTime.new(ci_project)
+ end
+
private
def fetch_graph