summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-10-07 14:43:58 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-10-07 14:43:58 +0200
commite52de6771f6bf9629fc85213b94ec60721354e80 (patch)
tree7e4e8bd6b502376ae51bd3098dc501bf8da0743f /app
parentc0b79a751c8cbf676900956b14b70edd5dca5010 (diff)
downloadgitlab-ce-e52de6771f6bf9629fc85213b94ec60721354e80.tar.gz
Remove Continuous Integration from project menu
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app')
-rw-r--r--app/controllers/ci/projects_controller.rb23
-rw-r--r--app/views/ci/projects/_info.html.haml0
-rw-r--r--app/views/ci/projects/show.html.haml44
-rw-r--r--app/views/layouts/ci/_nav_project.html.haml6
-rw-r--r--app/views/layouts/nav/_project.html.haml7
-rw-r--r--app/views/layouts/nav/_project_settings.html.haml10
6 files changed, 13 insertions, 77 deletions
diff --git a/app/controllers/ci/projects_controller.rb b/app/controllers/ci/projects_controller.rb
index adb913a783f..5484ae643a6 100644
--- a/app/controllers/ci/projects_controller.rb
+++ b/app/controllers/ci/projects_controller.rb
@@ -1,27 +1,10 @@
module Ci
class ProjectsController < Ci::ApplicationController
- before_action :authenticate_user!, except: [:build, :badge, :show]
- before_action :authenticate_public_page!, only: :show
- before_action :project, only: [:build, :show, :badge, :toggle_shared_runners, :dumped_yaml]
- before_action :authorize_access_project!, except: [:build, :badge, :show, :new]
+ before_action :authenticate_user!, except: [:build, :badge]
+ before_action :authorize_access_project!, except: [:badge]
before_action :authorize_manage_project!, only: [:toggle_shared_runners, :dumped_yaml]
- before_action :authenticate_token!, only: [:build]
before_action :no_cache, only: [:badge]
- protect_from_forgery except: :build
-
- 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
+ protect_from_forgery
# Project status badge
# Image with build status for sha or ref
diff --git a/app/views/ci/projects/_info.html.haml b/app/views/ci/projects/_info.html.haml
deleted file mode 100644
index e69de29bb2d..00000000000
--- a/app/views/ci/projects/_info.html.haml
+++ /dev/null
diff --git a/app/views/ci/projects/show.html.haml b/app/views/ci/projects/show.html.haml
deleted file mode 100644
index f5244696c5d..00000000000
--- a/app/views/ci/projects/show.html.haml
+++ /dev/null
@@ -1,44 +0,0 @@
-= 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
-
diff --git a/app/views/layouts/ci/_nav_project.html.haml b/app/views/layouts/ci/_nav_project.html.haml
index 545abc23d99..db631f24656 100644
--- a/app/views/layouts/ci/_nav_project.html.haml
+++ b/app/views/layouts/ci/_nav_project.html.haml
@@ -5,12 +5,6 @@
%span
Back to project
%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
= link_to ci_project_services_path(@project) do
= icon('share fw')
diff --git a/app/views/layouts/nav/_project.html.haml b/app/views/layouts/nav/_project.html.haml
index a218ec7486c..8ce46d4865b 100644
--- a/app/views/layouts/nav/_project.html.haml
+++ b/app/views/layouts/nav/_project.html.haml
@@ -76,13 +76,6 @@
Merge Requests
%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
= 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
diff --git a/app/views/layouts/nav/_project_settings.html.haml b/app/views/layouts/nav/_project_settings.html.haml
index 9279a846623..f618a18870b 100644
--- a/app/views/layouts/nav/_project_settings.html.haml
+++ b/app/views/layouts/nav/_project_settings.html.haml
@@ -60,3 +60,13 @@
= icon('building fw')
%span
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