summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/assets/stylesheets/framework/callout.scss5
-rw-r--r--app/assets/stylesheets/framework/common.scss12
-rw-r--r--app/assets/stylesheets/framework/mobile.scss3
-rw-r--r--app/assets/stylesheets/framework/panels.scss6
-rw-r--r--app/assets/stylesheets/framework/typography.scss1
-rw-r--r--app/assets/stylesheets/pages/builds.scss5
-rw-r--r--app/assets/stylesheets/pages/merge_requests.scss2
-rw-r--r--app/controllers/projects/application_controller.rb2
-rw-r--r--app/controllers/projects/graphs_controller.rb2
-rw-r--r--app/controllers/projects/merge_requests_controller.rb2
-rw-r--r--app/models/ci/commit.rb2
-rw-r--r--app/views/profiles/accounts/show.html.haml10
-rw-r--r--app/views/projects/builds/index.html.haml5
-rw-r--r--app/views/projects/builds/show.html.haml16
-rw-r--r--app/views/projects/commit_statuses/_commit_status.html.haml11
-rw-r--r--app/views/projects/issues/_discussion.html.haml5
-rw-r--r--app/views/projects/merge_requests/_discussion.html.haml4
-rw-r--r--app/views/projects/merge_requests/widget/_heading.html.haml9
-rw-r--r--app/views/projects/merge_requests/widget/open/_accept.html.haml2
-rw-r--r--app/views/projects/network/_head.html.haml9
-rw-r--r--app/views/projects/protected_branches/index.html.haml2
-rw-r--r--app/views/shared/issuable/_participants.html.haml (renamed from app/views/projects/merge_requests/show/_participants.html.haml)3
-rw-r--r--spec/features/builds_spec.rb10
23 files changed, 66 insertions, 62 deletions
diff --git a/app/assets/stylesheets/framework/callout.scss b/app/assets/stylesheets/framework/callout.scss
index f3ce4e3c219..20a9bfb9816 100644
--- a/app/assets/stylesheets/framework/callout.scss
+++ b/app/assets/stylesheets/framework/callout.scss
@@ -7,8 +7,8 @@
/* Common styles for all types */
.bs-callout {
- margin: 20px 0;
- padding: 20px;
+ margin: $gl-padding 0;
+ padding: $gl-padding;
border-left: 3px solid $border-color;
color: $text-color;
background: $background-color;
@@ -42,4 +42,3 @@
border-color: #5cA64d;
color: #3c763d;
}
-
diff --git a/app/assets/stylesheets/framework/common.scss b/app/assets/stylesheets/framework/common.scss
index 7eabd9c99f7..45357f8b256 100644
--- a/app/assets/stylesheets/framework/common.scss
+++ b/app/assets/stylesheets/framework/common.scss
@@ -333,7 +333,7 @@ table {
}
.well {
- margin-bottom: 0;
+ margin-bottom: $gl-padding;
}
.search_box {
@@ -379,9 +379,8 @@ table {
text-align: center;
margin-top: 5px;
margin-bottom: $gl-padding;
- height: 56px;
+ height: auto;
margin-top: -$gl-padding;
- padding-top: $gl-padding;
&.no-bottom {
margin-bottom: 0;
@@ -390,6 +389,13 @@ table {
&.no-top {
margin-top: 0;
}
+
+ li a {
+ display: inline-block;
+ padding-top: $gl-padding;
+ padding-bottom: 11px;
+ margin-bottom: -1px;
+ }
}
.center-middle-menu {
diff --git a/app/assets/stylesheets/framework/mobile.scss b/app/assets/stylesheets/framework/mobile.scss
index cea47fba192..6f44c323732 100644
--- a/app/assets/stylesheets/framework/mobile.scss
+++ b/app/assets/stylesheets/framework/mobile.scss
@@ -82,9 +82,6 @@
}
.center-top-menu {
- height: 45px;
- margin-bottom: 30px;
-
li a {
font-size: 14px;
padding: 19px 10px;
diff --git a/app/assets/stylesheets/framework/panels.scss b/app/assets/stylesheets/framework/panels.scss
index 406aff3d72c..61053aff91a 100644
--- a/app/assets/stylesheets/framework/panels.scss
+++ b/app/assets/stylesheets/framework/panels.scss
@@ -1,9 +1,11 @@
.panel {
margin-bottom: $gl-padding;
-
+
.panel-heading {
- padding: 10px $gl-padding;
+ padding: 7px $gl-padding;
+ line-height: 42px !important;
}
+
.panel-body {
padding: $gl-padding;
diff --git a/app/assets/stylesheets/framework/typography.scss b/app/assets/stylesheets/framework/typography.scss
index aef338cfa56..c3e4ad0ad00 100644
--- a/app/assets/stylesheets/framework/typography.scss
+++ b/app/assets/stylesheets/framework/typography.scss
@@ -220,6 +220,7 @@ pre {
.monospace {
font-family: $monospace_font;
+ font-size: 90%;
}
code {
diff --git a/app/assets/stylesheets/pages/builds.scss b/app/assets/stylesheets/pages/builds.scss
index da9965f007a..3c2997c1d5a 100644
--- a/app/assets/stylesheets/pages/builds.scss
+++ b/app/assets/stylesheets/pages/builds.scss
@@ -67,9 +67,4 @@
color: #3084bb !important;
}
}
-
- .build-top-menu {
- margin-top: 0;
- margin-bottom: 2px;
- }
}
diff --git a/app/assets/stylesheets/pages/merge_requests.scss b/app/assets/stylesheets/pages/merge_requests.scss
index f21ad694d06..6a1d3bd19d3 100644
--- a/app/assets/stylesheets/pages/merge_requests.scss
+++ b/app/assets/stylesheets/pages/merge_requests.scss
@@ -136,7 +136,7 @@
font-family: $monospace_font;
font-weight: bold;
overflow: hidden;
- font-size: 14px;
+ font-size: 90%;
margin: 0 3px;
}
diff --git a/app/controllers/projects/application_controller.rb b/app/controllers/projects/application_controller.rb
index d3f926b62bc..c2aaf094e68 100644
--- a/app/controllers/projects/application_controller.rb
+++ b/app/controllers/projects/application_controller.rb
@@ -28,7 +28,7 @@ class Projects::ApplicationController < ApplicationController
private
- def ci_enabled
+ def builds_enabled
return render_404 unless @project.builds_enabled?
end
diff --git a/app/controllers/projects/graphs_controller.rb b/app/controllers/projects/graphs_controller.rb
index c3942c52c6c..a8f47069bb4 100644
--- a/app/controllers/projects/graphs_controller.rb
+++ b/app/controllers/projects/graphs_controller.rb
@@ -5,7 +5,7 @@ class Projects::GraphsController < Projects::ApplicationController
before_action :require_non_empty_project
before_action :assign_ref_vars
before_action :authorize_download_code!
- before_action :ci_enabled, only: :ci
+ before_action :builds_enabled, only: :ci
def show
respond_to do |format|
diff --git a/app/controllers/projects/merge_requests_controller.rb b/app/controllers/projects/merge_requests_controller.rb
index 3f47f2ddb2c..c5fb49de46a 100644
--- a/app/controllers/projects/merge_requests_controller.rb
+++ b/app/controllers/projects/merge_requests_controller.rb
@@ -264,6 +264,8 @@ class Projects::MergeRequestsController < Projects::ApplicationController
@merge_request_diff = @merge_request.merge_request_diff
+ @ci_commit = @merge_request.ci_commit
+
if @merge_request.locked_long_ago?
@merge_request.unlock_mr
@merge_request.close
diff --git a/app/models/ci/commit.rb b/app/models/ci/commit.rb
index 971e899de84..cb90b0de63d 100644
--- a/app/models/ci/commit.rb
+++ b/app/models/ci/commit.rb
@@ -199,7 +199,7 @@ module Ci
end
def ci_yaml_file
- gl_project.repository.blob_at(sha, '.gitlab-ci.yml').data
+ @ci_yaml_file ||= gl_project.repository.blob_at(sha, '.gitlab-ci.yml').data
rescue
nil
end
diff --git a/app/views/profiles/accounts/show.html.haml b/app/views/profiles/accounts/show.html.haml
index 319bdd57c39..17e47c622ce 100644
--- a/app/views/profiles/accounts/show.html.haml
+++ b/app/views/profiles/accounts/show.html.haml
@@ -26,11 +26,11 @@
- else
%span You don`t have one yet. Click generate to fix it.
- .form-actions
- - if current_user.private_token
- = f.submit 'Reset private token', data: { confirm: "Are you sure?" }, class: "btn btn-default btn-build-token"
- - else
- = f.submit 'Generate', class: "btn btn-default btn-build-token"
+ .form-actions
+ - if current_user.private_token
+ = f.submit 'Reset private token', data: { confirm: "Are you sure?" }, class: "btn btn-default"
+ - else
+ = f.submit 'Generate', class: "btn btn-default"
- unless current_user.ldap_user?
.panel.panel-default
diff --git a/app/views/projects/builds/index.html.haml b/app/views/projects/builds/index.html.haml
index dab7164153f..742676305a9 100644
--- a/app/views/projects/builds/index.html.haml
+++ b/app/views/projects/builds/index.html.haml
@@ -3,10 +3,10 @@
.project-issuable-filter
.controls
- - if @ci_project && current_user && can?(current_user, :manage_builds, @project)
+ - if @ci_project && can?(current_user, :manage_builds, @project)
.pull-left.hidden-xs
- if @all_builds.running_or_pending.any?
- = link_to 'Cancel all', cancel_all_namespace_project_builds_path(@project.namespace, @project), data: { confirm: 'Are you sure?' }, class: 'btn btn-danger', method: :post
+ = link_to 'Cancel running', cancel_all_namespace_project_builds_path(@project.namespace, @project), data: { confirm: 'Are you sure?' }, class: 'btn btn-danger', method: :post
%ul.center-top-menu
%li{class: ('active' if @scope.nil?)}
@@ -50,4 +50,3 @@
= render 'projects/commit_statuses/commit_status', commit_status: build, commit_sha: true, stage: true, allow_retry: true
= paginate @builds, theme: 'gitlab'
-
diff --git a/app/views/projects/builds/show.html.haml b/app/views/projects/builds/show.html.haml
index 907e1ce10bd..d5e81f84b56 100644
--- a/app/views/projects/builds/show.html.haml
+++ b/app/views/projects/builds/show.html.haml
@@ -1,17 +1,16 @@
-- page_title "#{@build.name} (#{@build.id})", "Builds"
+- page_title "#{@build.name} (##{@build.id})", "Builds"
= render "header_title"
.build-page
- .gray-content-block
+ .gray-content-block.top-block
Build ##{@build.id} for commit
- %strong.monospace
- = link_to @build.commit.short_sha, ci_status_path(@build.commit)
+ %strong.monospace= link_to @build.commit.short_sha, ci_status_path(@build.commit)
from
= link_to @build.ref, namespace_project_commits_path(@project.namespace, @project, @build.ref)
#up-build-trace
- if @commit.matrix_for_ref?(@build.ref)
- %ul.center-top-menu.build-top-menu
+ %ul.center-top-menu.no-top.no-bottom
- @commit.latest_builds_for_ref(@build.ref).each do |build|
%li{class: ('active' if build == @build) }
= link_to namespace_project_build_path(@project.namespace, @project, build) do
@@ -22,7 +21,6 @@
- else
= build.id
-
- if @build.retried?
%li.active
%a
@@ -31,7 +29,7 @@
%i.fa.fa-warning
This build was retried.
- .gray-content-block.second-block
+ .gray-content-block.middle-block
.build-head
.clearfix
= ci_status_with_icon(@build.status)
@@ -140,7 +138,7 @@
%h4.title
Commit
.pull-right
- %small
+ %small
= link_to @build.commit.short_sha, ci_status_path(@build.commit), class: "monospace"
%p
%span.attr-name Branch:
@@ -162,7 +160,7 @@
- if @builds.present?
.build-widget
- %h4.title #{pluralize(@builds.count(:id), "other build")} for
+ %h4.title #{pluralize(@builds.count(:id), "other build")} for
= succeed ":" do
= link_to @build.commit.short_sha, ci_status_path(@build.commit), class: "monospace"
%table.table.builds
diff --git a/app/views/projects/commit_statuses/_commit_status.html.haml b/app/views/projects/commit_statuses/_commit_status.html.haml
index 9a0e7bff3f1..a527bb2f84a 100644
--- a/app/views/projects/commit_statuses/_commit_status.html.haml
+++ b/app/views/projects/commit_statuses/_commit_status.html.haml
@@ -1,13 +1,18 @@
%tr.commit_status
%td.status
- = ci_status_with_icon(commit_status.status)
+ - if commit_status.target_url
+ = link_to commit_status.target_url, class: "ci-status ci-#{commit_status.status}" do
+ = ci_icon_for_status(commit_status.status)
+ = commit_status.status
+ - else
+ = ci_status_with_icon(commit_status.status)
%td.commit_status-link
- if commit_status.target_url
= link_to commit_status.target_url do
- %strong Build ##{commit_status.id}
+ %strong ##{commit_status.id}
- else
- %strong Build ##{commit_status.id}
+ %strong ##{commit_status.id}
- if commit_status.show_warning?
%i.fa.fa-warning.text-warning
diff --git a/app/views/projects/issues/_discussion.html.haml b/app/views/projects/issues/_discussion.html.haml
index b5f522f2079..21eee70b424 100644
--- a/app/views/projects/issues/_discussion.html.haml
+++ b/app/views/projects/issues/_discussion.html.haml
@@ -12,10 +12,7 @@
.col-md-9
.votes-holder.pull-right
#votes= render 'votes/votes_block', votable: @issue
- .participants
- %span= pluralize(@participants.count, 'participant')
- - @participants.each do |participant|
- = link_to_member(@project, participant, name: false, size: 24)
+ = render "shared/issuable/participants"
.col-md-3
.input-group.cross-project-reference
%span#cross-project-reference.slead.has_tooltip{title: 'Cross-project reference'}
diff --git a/app/views/projects/merge_requests/_discussion.html.haml b/app/views/projects/merge_requests/_discussion.html.haml
index ea462561668..3d7bd78dce3 100644
--- a/app/views/projects/merge_requests/_discussion.html.haml
+++ b/app/views/projects/merge_requests/_discussion.html.haml
@@ -12,7 +12,7 @@
.col-md-9
.votes-holder.pull-right
#votes= render 'votes/votes_block', votable: @merge_request
- = render "projects/merge_requests/show/participants"
+ = render "shared/issuable/participants"
.col-md-3
.input-group.cross-project-reference
%span#cross-project-reference.slead.has_tooltip{title: 'Cross-project reference'}
@@ -21,7 +21,7 @@
.row
%section.col-md-9
- = render "projects/notes/notes_with_form"
+ .voting_notes#notes= render "projects/notes/notes_with_form"
%aside.col-md-3
.issuable-affix
.context
diff --git a/app/views/projects/merge_requests/widget/_heading.html.haml b/app/views/projects/merge_requests/widget/_heading.html.haml
index ba5ad22bca7..49aab961712 100644
--- a/app/views/projects/merge_requests/widget/_heading.html.haml
+++ b/app/views/projects/merge_requests/widget/_heading.html.haml
@@ -1,13 +1,12 @@
-- ci_commit = @merge_request.ci_commit
-- if ci_commit
- - status = ci_commit.status
+- if @ci_commit
+ - status = @ci_commit.status
.mr-widget-heading
.ci_widget{class: "ci-#{status}"}
- = ci_status_icon(ci_commit)
+ = ci_status_icon(@ci_commit)
%span CI build #{status}
for #{@merge_request.last_commit_short_sha}.
%span.ci-coverage
- = link_to "View build details", ci_status_path(ci_commit)
+ = link_to "View build details", ci_status_path(@ci_commit)
- elsif @merge_request.has_ci?
- # Compatibility with old CI integrations (ex jenkins) when you request status from CI server via AJAX
diff --git a/app/views/projects/merge_requests/widget/open/_accept.html.haml b/app/views/projects/merge_requests/widget/open/_accept.html.haml
index 9b31014b581..6d12af16140 100644
--- a/app/views/projects/merge_requests/widget/open/_accept.html.haml
+++ b/app/views/projects/merge_requests/widget/open/_accept.html.haml
@@ -1,4 +1,4 @@
-- status_class = @merge_request.ci_commit ? " ci-#{@merge_request.ci_commit.status}" : nil
+- status_class = @ci_commit ? " ci-#{@ci_commit.status}" : nil
= form_for [:merge, @project.namespace.becomes(Namespace), @project, @merge_request], remote: true, method: :post, html: { class: 'accept-mr-form js-requires-input' } do |f|
= hidden_field_tag :authenticity_token, form_authenticity_token
diff --git a/app/views/projects/network/_head.html.haml b/app/views/projects/network/_head.html.haml
index 415c98ec6a6..9e0e0dc6bb0 100644
--- a/app/views/projects/network/_head.html.haml
+++ b/app/views/projects/network/_head.html.haml
@@ -1,3 +1,6 @@
-.append-bottom-20
- = render partial: 'shared/ref_switcher', locals: {destination: 'graph'}
- .pull-right.visible-lg.light You can move around the graph by using the arrow keys.
+.gray-content-block.top-block.append-bottom-default
+ .tree-ref-holder
+ = render partial: 'shared/ref_switcher', locals: {destination: 'graph'}
+
+ .oneline
+ You can move around the graph by using the arrow keys.
diff --git a/app/views/projects/protected_branches/index.html.haml b/app/views/projects/protected_branches/index.html.haml
index 2541105b007..cfd7e1534ca 100644
--- a/app/views/projects/protected_branches/index.html.haml
+++ b/app/views/projects/protected_branches/index.html.haml
@@ -3,7 +3,7 @@
%p.light Keep stable branches secure and force developers to use Merge Requests
%hr
-.well.append-bottom-20
+.well
%p Protected branches are designed to
%ul
%li prevent pushes from everybody except #{link_to "masters", help_page_path("permissions", "permissions"), class: "vlink"}
diff --git a/app/views/projects/merge_requests/show/_participants.html.haml b/app/views/shared/issuable/_participants.html.haml
index c67afe963e7..b4e0def48b6 100644
--- a/app/views/projects/merge_requests/show/_participants.html.haml
+++ b/app/views/shared/issuable/_participants.html.haml
@@ -1,4 +1,5 @@
.participants
- %span #{@participants.count} participants
+ %span
+ = pluralize @participants.count, "participant"
- @participants.each do |participant|
= link_to_member(@project, participant, name: false, size: 24)
diff --git a/spec/features/builds_spec.rb b/spec/features/builds_spec.rb
index 5213ce1099f..1f99a808f87 100644
--- a/spec/features/builds_spec.rb
+++ b/spec/features/builds_spec.rb
@@ -19,7 +19,7 @@ describe "Builds" do
end
it { expect(page).to have_content 'Running' }
- it { expect(page).to have_content 'Cancel all' }
+ it { expect(page).to have_content 'Cancel running' }
it { expect(page).to have_content @build.short_sha }
it { expect(page).to have_content @build.ref }
it { expect(page).to have_content @build.name }
@@ -32,7 +32,7 @@ describe "Builds" do
end
it { expect(page).to have_content 'No builds to show' }
- it { expect(page).to have_content 'Cancel all' }
+ it { expect(page).to have_content 'Cancel running' }
end
context "All builds" do
@@ -45,7 +45,7 @@ describe "Builds" do
it { expect(page).to have_content @build.short_sha }
it { expect(page).to have_content @build.ref }
it { expect(page).to have_content @build.name }
- it { expect(page).to_not have_content 'Cancel all' }
+ it { expect(page).to_not have_content 'Cancel running' }
end
end
@@ -53,11 +53,11 @@ describe "Builds" do
before do
@build.run!
visit namespace_project_builds_path(@gl_project.namespace, @gl_project)
- click_link "Cancel all"
+ click_link "Cancel running"
end
it { expect(page).to have_content 'No builds to show' }
- it { expect(page).to_not have_content 'Cancel all' }
+ it { expect(page).to_not have_content 'Cancel running' }
end
describe "GET /:project/builds/:id" do