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:
parent
ea58395525
commit
64e12d5853
2 changed files with 8 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
- page_title "Continuous Integration", "Graphs"
|
||||
= render "header_title"
|
||||
= render 'head'
|
||||
#charts.ci-charts
|
||||
= render 'projects/graphs/ci/builds'
|
||||
|
|
Loading…
Reference in a new issue