Commit be0631e1 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

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

Remove deprecated CI events from project settings page
Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>

cc @ayufan 

Part of #2594 

See merge request !1694
parents 52ac3ff1 c9af886d
...@@ -12,6 +12,7 @@ v 8.2.0 (unreleased) ...@@ -12,6 +12,7 @@ v 8.2.0 (unreleased)
- Use git follow flag for commits page when retrieve history for file or directory - Use git follow flag for commits page when retrieve history for file or directory
- Show merge request CI status on merge requests index page - Show merge request CI status on merge requests index page
- Fix: 500 error returned if destroy request without HTTP referer (Kazuki Shimizu) - Fix: 500 error returned if destroy request without HTTP referer (Kazuki Shimizu)
- Remove deprecated CI events from project settings page
v 8.1.1 v 8.1.1
- Fix cloning Wiki repositories via HTTP (Stan Hu) - Fix cloning Wiki repositories via HTTP (Stan Hu)
......
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
...@@ -4,8 +4,6 @@ module Ci ...@@ -4,8 +4,6 @@ module Ci
before_action :project before_action :project
before_action :authorize_manage_project! before_action :authorize_manage_project!
layout 'ci/project'
def create def create
@runner = Ci::Runner.find(params[:runner_project][:runner_id]) @runner = Ci::Runner.find(params[:runner_project][:runner_id])
......
%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
!!! 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'
...@@ -65,8 +65,3 @@ ...@@ -65,8 +65,3 @@
= icon('share fw') = icon('share fw')
%span %span
CI Services 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
...@@ -23,8 +23,6 @@ Gitlab::Application.routes.draw do ...@@ -23,8 +23,6 @@ Gitlab::Application.routes.draw do
end end
resources :runner_projects, only: [:create, :destroy] resources :runner_projects, only: [:create, :destroy]
resources :events, only: [:index]
end end
resource :user_sessions do resource :user_sessions do
......
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
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