Commit a399fe32 authored by Valery Sizov's avatar Valery Sizov

Merge branch 'ci-and-ce-sitting-in-a-tree-k-i-s-s-i-n-g' of...

Merge branch 'ci-and-ce-sitting-in-a-tree-k-i-s-s-i-n-g' of gitlab.com:gitlab-org/gitlab-ce into ci-and-ce-sitting-in-a-tree-k-i-s-s-i-n-g
parents 2c4daf1a f31d8ef2
...@@ -13,7 +13,7 @@ module Ci ...@@ -13,7 +13,7 @@ module Ci
@builds = @runner.builds.order('id DESC').first(30) @builds = @runner.builds.order('id DESC').first(30)
@projects = Ci::Project.all @projects = Ci::Project.all
@projects = @projects.search(params[:search]) if params[:search].present? @projects = @projects.search(params[:search]) if params[:search].present?
@projects = @projects.where("projects.id NOT IN (?)", @runner.projects.pluck(:id)) if @runner.projects.any? @projects = @projects.where("ci_projects.id NOT IN (?)", @runner.projects.pluck(:id)) if @runner.projects.any?
@projects = @projects.page(params[:page]).per(30) @projects = @projects.page(params[:page]).per(30)
end end
......
...@@ -7,7 +7,7 @@ module Ci ...@@ -7,7 +7,7 @@ module Ci
before_action :authorize_manage_project!, except: [:status, :show, :retry, :cancel] before_action :authorize_manage_project!, except: [:status, :show, :retry, :cancel]
before_action :authorize_manage_builds!, only: [:retry, :cancel] before_action :authorize_manage_builds!, only: [:retry, :cancel]
before_action :build, except: [:show] before_action :build, except: [:show]
layout 'ci/project' layout 'ci/build'
def show def show
if params[:id] =~ /\A\d+\Z/ if params[:id] =~ /\A\d+\Z/
......
...@@ -6,7 +6,7 @@ module Ci ...@@ -6,7 +6,7 @@ module Ci
before_action :authorize_access_project!, except: [:status, :show, :cancel] before_action :authorize_access_project!, except: [:status, :show, :cancel]
before_action :authorize_manage_builds!, only: [:cancel] before_action :authorize_manage_builds!, only: [:cancel]
before_action :commit, only: :show before_action :commit, only: :show
layout 'ci/project' layout 'ci/commit'
def show def show
@builds = @commit.builds @builds = @commit.builds
......
...@@ -20,7 +20,7 @@ module Ci ...@@ -20,7 +20,7 @@ module Ci
def update def update
if @service.update_attributes(service_params) if @service.update_attributes(service_params)
redirect_to edit_ci_project_service_path(@project, @service.to_param), notice: 'Service was successfully updated.' redirect_to edit_ci_project_service_path(@project, @service.to_param)
else else
render 'edit' render 'edit'
end end
......
...@@ -26,5 +26,14 @@ module Ci ...@@ -26,5 +26,14 @@ module Ci
def truncate_first_line(message, length = 50) def truncate_first_line(message, length = 50)
truncate(message.each_line.first.chomp, length: length) if message truncate(message.each_line.first.chomp, length: length) if message
end end
def ci_commit_title(commit)
content_tag :span do
link_to(
simple_sanitize(commit.project.name), ci_project_path(commit.project)
) + ' @ ' +
gitlab_commit_link(@project, @commit.sha)
end
end
end end
end end
...@@ -13,11 +13,11 @@ module Ci ...@@ -13,11 +13,11 @@ module Ci
end end
def url_helpers def url_helpers
@url_helpers ||= Ci::Base.new @url_helpers ||= Base.new
end end
def self.method_missing(method, *args, &block) def self.method_missing(method, *args, &block)
@url_helpers ||= Ci::Base.new @url_helpers ||= Base.new
if @url_helpers.respond_to?(method) if @url_helpers.respond_to?(method)
@url_helpers.send(method, *args, &block) @url_helpers.send(method, *args, &block)
......
module Ci module Ci
module TriggersHelper module TriggersHelper
def build_trigger_url(project_id, ref_name) def ci_build_trigger_url(project_id, ref_name)
"#{Settings.gitlab_ci.url}/ci/api/v1/projects/#{project_id}/refs/#{ref_name}/trigger" "#{Settings.gitlab_ci.url}/ci/api/v1/projects/#{project_id}/refs/#{ref_name}/trigger"
end end
end end
......
%h4.page-title
= link_to @project.name, ci_project_path(@project)
@
= @commit.short_sha
%p
= link_to ci_project_ref_commits_path(@project, @commit.ref, @commit.sha) do
← Back to project commit
%hr
#up-build-trace #up-build-trace
- if @commit.matrix? - if @commit.matrix?
%ul.nav.nav-tabs.append-bottom-10 %ul.nav.nav-tabs.append-bottom-10
......
%h4.page-title
= @project.name
@
#{gitlab_commit_link(@project, @commit.sha)}
%p
= link_to ci_project_path(@project) do
← Back to project commits
%hr
.commit-info .commit-info
%pre.commit-message %pre.commit-message
#{@commit.git_commit_message} #{@commit.git_commit_message}
......
%h3 %h3.page-title
Triggers Triggers
%p.light %p.light
......
= image_tag user_avatar_url(current_user, 90), class: 'avatar avatar-inline avatar-tile s90', alt: ''
%h3
Hi, #{@user.name}
- if @user.is_admin?
%span.label.label-success Admin
.profile-block
%p
%span.light Email:
%strong= @user.email
%p
%span.light GitLab profile:
%strong= link_to @user.username, GitlabCi.config.gitlab_server.url + '/u/' + @user.username, target: "_blank"
%h3 Secret Variables %h3.page-title
Secret Variables
%p.light %p.light
These variables will be set to environment by the runner and will be hidden in the build log. These variables will be set to environment by the runner and will be hidden in the build log.
%br %br
......
%h3 %h3.page-title
Web hooks Web hooks
%p.light %p.light
......
.container .container
- if alert || notice
- if alert
.alert.alert-danger= alert
- if notice
.alert.alert-info= notice
- if current_user && current_user.is_admin? && Ci::Runner.count.zero? - if current_user && current_user.is_admin? && Ci::Runner.count.zero?
= render 'ci/shared/no_runners' = render 'ci/shared/no_runners'
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
= link_to ci_admin_events_path do = link_to ci_admin_events_path do
%i.fa.fa-book %i.fa.fa-book
Events Events
= nav_link path: 'runners#index' do = nav_link path: ['runners#index', 'runners#show'] do
= link_to ci_admin_runners_path do = link_to ci_admin_runners_path do
%i.fa.fa-cog %i.fa.fa-cog
Runners Runners
......
= render 'layouts/ci/nav_project',
back_title: 'Back to project commit',
back_url: ci_project_ref_commits_path(@project, @commit.ref, @commit.sha)
= render 'layouts/ci/nav_project',
back_title: 'Back to project commits',
back_url: ci_project_path(@project)
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
%span %span
Back to GitLab Back to GitLab
%li.separate-item %li.separate-item
= nav_link path: 'projects#show' do = nav_link path: 'projects#index' do
= link_to ci_root_path do = link_to ci_root_path do
%i.fa.fa-home %i.fa.fa-home
%span %span
......
%ul.nav.nav-sidebar %ul.nav.nav-sidebar
= nav_link path: 'projects#show' do = nav_link do
= link_to defined?(back_url) ? back_url : ci_root_path, title: defined?(back_title) ? back_title : 'Back to Dashboard', data: {placement: 'right'}, class: 'back-link' do
= icon('caret-square-o-left fw')
%span= defined?(back_title) ? back_title : 'Back to Dashboard'
%li.separate-item
= nav_link path: ['projects#show', 'commits#show', 'builds#show'] do
= link_to ci_project_path(@project) do = link_to ci_project_path(@project) do
%i.fa.fa-list-alt %i.fa.fa-list-alt
%span %span
...@@ -10,7 +15,7 @@ ...@@ -10,7 +15,7 @@
%i.fa.fa-bar-chart %i.fa.fa-bar-chart
%span %span
Charts Charts
= nav_link path: ['runners#index', 'runners#show'] do = nav_link path: ['runners#index', 'runners#show', 'runners#edit'] do
= link_to ci_project_runners_path(@project) do = link_to ci_project_runners_path(@project) do
%i.fa.fa-cog %i.fa.fa-cog
%span %span
...@@ -30,7 +35,7 @@ ...@@ -30,7 +35,7 @@
%i.fa.fa-retweet %i.fa.fa-retweet
%span %span
Triggers Triggers
= nav_link path: 'services#index' 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
%i.fa.fa-share %i.fa.fa-share
%span %span
......
!!! 5
%html{ lang: "en"}
= render 'layouts/head'
%body{class: "ci-body #{user_application_theme}", 'data-page' => body_data_page}
- header_title ci_commit_title(@commit)
- if current_user
= render "layouts/header/default", title: header_title
- else
= render "layouts/header/public", title: header_title
= render 'layouts/ci/page', sidebar: 'nav_build'
!!! 5
%html{ lang: "en"}
= render 'layouts/head'
%body{class: "ci-body #{user_application_theme}", 'data-page' => body_data_page}
- header_title ci_commit_title(@commit)
- if current_user
= render "layouts/header/default", title: header_title
- else
= render "layouts/header/public", title: header_title
= render 'layouts/ci/page', sidebar: 'nav_commit'
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
%html{ lang: "en"} %html{ lang: "en"}
= render 'layouts/head' = render 'layouts/head'
%body{class: "ci-body #{user_application_theme}", 'data-page' => body_data_page} %body{class: "ci-body #{user_application_theme}", 'data-page' => body_data_page}
- header_title = @project.name - header_title @project.name, ci_project_path(@project)
- if current_user - if current_user
= render "layouts/header/default", title: header_title = render "layouts/header/default", title: header_title
- else - else
......
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