Add header for ci graphs and check that it is enabled

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
Dmitriy Zaporozhets 2015-09-24 09:44:38 +02:00
parent ea58395525
commit 64e12d5853
No known key found for this signature in database
GPG Key ID: 161B5D6A44D3D88A
2 changed files with 8 additions and 0 deletions

View File

@ -1,6 +1,7 @@
class Projects::ApplicationController < ApplicationController
before_action :project
before_action :repository
before_action :ci_enabled, only: :ci
layout 'project'
def authenticate_user!
@ -25,4 +26,10 @@ class Projects::ApplicationController < ApplicationController
)
end
end
private
def ci_enabled
return render_404 unless @project.gitlab_ci?
end
end

View File

@ -1,4 +1,5 @@
- page_title "Continuous Integration", "Graphs"
= render "header_title"
= render 'head'
#charts.ci-charts
= render 'projects/graphs/ci/builds'