Commit e52de677 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Remove Continuous Integration from project menu

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent c0b79a75
module Ci module Ci
class ProjectsController < Ci::ApplicationController class ProjectsController < Ci::ApplicationController
before_action :authenticate_user!, except: [:build, :badge, :show] before_action :authenticate_user!, except: [:build, :badge]
before_action :authenticate_public_page!, only: :show before_action :authorize_access_project!, except: [:badge]
before_action :project, only: [:build, :show, :badge, :toggle_shared_runners, :dumped_yaml]
before_action :authorize_access_project!, except: [:build, :badge, :show, :new]
before_action :authorize_manage_project!, only: [:toggle_shared_runners, :dumped_yaml] before_action :authorize_manage_project!, only: [:toggle_shared_runners, :dumped_yaml]
before_action :authenticate_token!, only: [:build]
before_action :no_cache, only: [:badge] before_action :no_cache, only: [:badge]
protect_from_forgery except: :build protect_from_forgery
layout 'ci/project', except: [:index]
def show
@ref = params[:ref]
@commits = @project.commits.reverse_order
if @ref
# unscope is required, because of default_scope defined in Ci::Build
builds = @project.builds.unscope(:select, :order).where(ref: @ref).select(:commit_id).distinct
@commits = @commits.where(id: builds)
end
@commits = @commits.page(params[:page]).per(20)
end
# Project status badge # Project status badge
# Image with build status for sha or ref # Image with build status for sha or ref
......
= render 'ci/shared/guide' unless @project.setup_finished?
- if current_user && can?(current_user, :manage_project, gl_project) && !@project.any_runners?
.alert.alert-danger
Builds for this project wont be served unless you configure runners on
= link_to "Runners page", runners_path(@project.gl_project)
%ul.nav.nav-tabs.append-bottom-20
%li{class: ref_tab_class}
= link_to 'All commits', ci_project_path(@project)
- @project.tracked_refs.each do |ref|
%li{class: ref_tab_class(ref)}
= link_to ref, ci_project_path(@project, ref: ref)
- if @ref && !@project.tracked_refs.include?(@ref)
%li{class: 'active'}
= link_to @ref, ci_project_path(@project, ref: @ref)
%li.pull-right
= link_to 'Go to project', project_path(gl_project), class: 'btn btn-sm'
%table.table.builds
%thead
%tr
%th Status
%th Commit
%th Message
%th Branch
%th Total duration
%th Finished at
- if @project.coverage_enabled?
%th Coverage
= render @commits
= paginate @commits
- if @commits.empty?
.bs-callout
%h4 No commits yet
...@@ -5,12 +5,6 @@ ...@@ -5,12 +5,6 @@
%span %span
Back to project Back to project
%li.separate-item %li.separate-item
= nav_link path: ['projects#show', 'commits#show', 'builds#show'] do
= link_to ci_project_path(@project) do
= icon('list-alt fw')
%span
Commits
%span.count= @project.commits.count
= nav_link path: ['services#index', 'services#edit'] do = nav_link path: ['services#index', 'services#edit'] do
= link_to ci_project_services_path(@project) do = link_to ci_project_services_path(@project) do
= icon('share fw') = icon('share fw')
......
...@@ -76,13 +76,6 @@ ...@@ -76,13 +76,6 @@
Merge Requests Merge Requests
%span.count.merge_counter= @project.merge_requests.opened.count %span.count.merge_counter= @project.merge_requests.opened.count
- if @project.gitlab_ci?
= nav_link(controller: [:ci, :project]) do
= link_to ci_project_path(@project.gitlab_ci_project), title: 'Continuous Integration', data: {placement: 'right'} do
= icon('building fw')
%span
Continuous Integration
- if project_nav_tab? :settings - if project_nav_tab? :settings
= nav_link(controller: [:project_members, :teams]) do = nav_link(controller: [:project_members, :teams]) do
= link_to namespace_project_project_members_path(@project.namespace, @project), title: 'Members', class: 'team-tab tab', data: {placement: 'right'} do = link_to namespace_project_project_members_path(@project.namespace, @project), title: 'Members', class: 'team-tab tab', data: {placement: 'right'} do
......
...@@ -60,3 +60,13 @@ ...@@ -60,3 +60,13 @@
= icon('building fw') = icon('building fw')
%span %span
CI Settings CI Settings
= nav_link path: ['ci/services#index', 'ci/services#edit'] do
= link_to ci_project_services_path(@project.gitlab_ci_project) do
= icon('share fw')
%span
CI Services
= nav_link path: 'events#index' do
= link_to ci_project_events_path(@project.gitlab_ci_project) do
= icon('book fw')
%span
CI Events
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment