Merge branch 'cleanup-ci-integration' into 'master'

Remove deprecated CI events from project settings page

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>

cc @ayufan 

Part of #2594 

See merge request !1694
This commit is contained in:
Dmitriy Zaporozhets 2015-10-28 13:53:41 +00:00
commit be0631e1cd
8 changed files with 1 additions and 83 deletions

View file

@ -12,6 +12,7 @@ v 8.2.0 (unreleased)
- Use git follow flag for commits page when retrieve history for file or directory
- Show merge request CI status on merge requests index page
- Fix: 500 error returned if destroy request without HTTP referer (Kazuki Shimizu)
- Remove deprecated CI events from project settings page
v 8.1.1
- Fix cloning Wiki repositories via HTTP (Stan Hu)

View file

@ -1,21 +0,0 @@
module Ci
class EventsController < Ci::ApplicationController
EVENTS_PER_PAGE = 50
before_action :authenticate_user!
before_action :project
before_action :authorize_manage_project!
layout 'ci/project'
def index
@events = project.events.order("created_at DESC").page(params[:page]).per(EVENTS_PER_PAGE)
end
private
def project
@project ||= Ci::Project.find(params[:project_id])
end
end
end

View file

@ -4,8 +4,6 @@ module Ci
before_action :project
before_action :authorize_manage_project!
layout 'ci/project'
def create
@runner = Ci::Runner.find(params[:runner_project][:runner_id])

View file

@ -1,20 +0,0 @@
%h3.page-title Events
.table-holder
%table.table
%thead
%tr
%th User ID
%th Description
%th When
- @events.each do |event|
%tr
%td
= event.user_id
%td
= event.description
%td.light
= time_ago_in_words event.updated_at
ago
= paginate @events

View file

@ -1,11 +0,0 @@
!!! 5
%html{ lang: "en"}
= render 'layouts/head'
%body{class: "ci-body #{user_application_theme}", 'data-page' => body_data_page}
- header_title @project.name, ci_project_path(@project)
- if current_user
= render "layouts/header/default", title: header_title
- else
= render "layouts/header/public", title: header_title
= render 'layouts/ci/page', sidebar: 'nav_project'

View file

@ -65,8 +65,3 @@
= 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

View file

@ -23,8 +23,6 @@ Gitlab::Application.routes.draw do
end
resources :runner_projects, only: [:create, :destroy]
resources :events, only: [:index]
end
resource :user_sessions do

View file

@ -1,22 +0,0 @@
require 'spec_helper'
describe "Events" do
let(:user) { create(:user) }
let(:project) { FactoryGirl.create :ci_project }
let(:event) { FactoryGirl.create :ci_admin_event, project: project }
before do
login_as(user)
project.gl_project.team << [user, :master]
end
describe "GET /ci/project/:id/events" do
before do
event
visit ci_project_events_path(project)
end
it { expect(page).to have_content "Events" }
it { expect(page).to have_content event.description }
end
end