Commit 54d0ff98 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'build-related-fixes' into 'master'

Build related UI fixes

## Before

![Screen_Shot_2015-12-08_at_13.15.21](/uploads/b72ed55da1f0ec953d2eb077fa4fbb18/Screen_Shot_2015-12-08_at_13.15.21.png)

## After

![Screen_Shot_2015-12-08_at_13.15.01](/uploads/144d8099e2724a51125e392dcbd43ed4/Screen_Shot_2015-12-08_at_13.15.01.png)


See merge request !2015
parents 98368d6e ab85d969
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
/* Common styles for all types */ /* Common styles for all types */
.bs-callout { .bs-callout {
margin: 20px 0; margin: $gl-padding 0;
padding: 20px; padding: $gl-padding;
border-left: 3px solid $border-color; border-left: 3px solid $border-color;
color: $text-color; color: $text-color;
background: $background-color; background: $background-color;
...@@ -42,4 +42,3 @@ ...@@ -42,4 +42,3 @@
border-color: #5cA64d; border-color: #5cA64d;
color: #3c763d; color: #3c763d;
} }
...@@ -333,7 +333,7 @@ table { ...@@ -333,7 +333,7 @@ table {
} }
.well { .well {
margin-bottom: 0; margin-bottom: $gl-padding;
} }
.search_box { .search_box {
...@@ -379,9 +379,8 @@ table { ...@@ -379,9 +379,8 @@ table {
text-align: center; text-align: center;
margin-top: 5px; margin-top: 5px;
margin-bottom: $gl-padding; margin-bottom: $gl-padding;
height: 56px; height: auto;
margin-top: -$gl-padding; margin-top: -$gl-padding;
padding-top: $gl-padding;
&.no-bottom { &.no-bottom {
margin-bottom: 0; margin-bottom: 0;
...@@ -390,6 +389,13 @@ table { ...@@ -390,6 +389,13 @@ table {
&.no-top { &.no-top {
margin-top: 0; margin-top: 0;
} }
li a {
display: inline-block;
padding-top: $gl-padding;
padding-bottom: 11px;
margin-bottom: -1px;
}
} }
.center-middle-menu { .center-middle-menu {
......
...@@ -82,9 +82,6 @@ ...@@ -82,9 +82,6 @@
} }
.center-top-menu { .center-top-menu {
height: 45px;
margin-bottom: 30px;
li a { li a {
font-size: 14px; font-size: 14px;
padding: 19px 10px; padding: 19px 10px;
......
...@@ -2,8 +2,10 @@ ...@@ -2,8 +2,10 @@
margin-bottom: $gl-padding; margin-bottom: $gl-padding;
.panel-heading { .panel-heading {
padding: 10px $gl-padding; padding: 7px $gl-padding;
line-height: 42px !important;
} }
.panel-body { .panel-body {
padding: $gl-padding; padding: $gl-padding;
......
...@@ -220,6 +220,7 @@ pre { ...@@ -220,6 +220,7 @@ pre {
.monospace { .monospace {
font-family: $monospace_font; font-family: $monospace_font;
font-size: 90%;
} }
code { code {
......
...@@ -67,9 +67,4 @@ ...@@ -67,9 +67,4 @@
color: #3084bb !important; color: #3084bb !important;
} }
} }
.build-top-menu {
margin-top: 0;
margin-bottom: 2px;
}
} }
...@@ -136,7 +136,7 @@ ...@@ -136,7 +136,7 @@
font-family: $monospace_font; font-family: $monospace_font;
font-weight: bold; font-weight: bold;
overflow: hidden; overflow: hidden;
font-size: 14px; font-size: 90%;
margin: 0 3px; margin: 0 3px;
} }
......
...@@ -28,7 +28,7 @@ class Projects::ApplicationController < ApplicationController ...@@ -28,7 +28,7 @@ class Projects::ApplicationController < ApplicationController
private private
def ci_enabled def builds_enabled
return render_404 unless @project.builds_enabled? return render_404 unless @project.builds_enabled?
end end
......
...@@ -5,7 +5,7 @@ class Projects::GraphsController < Projects::ApplicationController ...@@ -5,7 +5,7 @@ class Projects::GraphsController < Projects::ApplicationController
before_action :require_non_empty_project before_action :require_non_empty_project
before_action :assign_ref_vars before_action :assign_ref_vars
before_action :authorize_download_code! before_action :authorize_download_code!
before_action :ci_enabled, only: :ci before_action :builds_enabled, only: :ci
def show def show
respond_to do |format| respond_to do |format|
......
...@@ -264,6 +264,8 @@ class Projects::MergeRequestsController < Projects::ApplicationController ...@@ -264,6 +264,8 @@ class Projects::MergeRequestsController < Projects::ApplicationController
@merge_request_diff = @merge_request.merge_request_diff @merge_request_diff = @merge_request.merge_request_diff
@ci_commit = @merge_request.ci_commit
if @merge_request.locked_long_ago? if @merge_request.locked_long_ago?
@merge_request.unlock_mr @merge_request.unlock_mr
@merge_request.close @merge_request.close
......
...@@ -199,7 +199,7 @@ module Ci ...@@ -199,7 +199,7 @@ module Ci
end end
def ci_yaml_file 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 rescue
nil nil
end end
......
...@@ -28,9 +28,9 @@ ...@@ -28,9 +28,9 @@
.form-actions .form-actions
- if current_user.private_token - if current_user.private_token
= f.submit 'Reset private token', data: { confirm: "Are you sure?" }, class: "btn btn-default btn-build-token" = f.submit 'Reset private token', data: { confirm: "Are you sure?" }, class: "btn btn-default"
- else - else
= f.submit 'Generate', class: "btn btn-default btn-build-token" = f.submit 'Generate', class: "btn btn-default"
- unless current_user.ldap_user? - unless current_user.ldap_user?
.panel.panel-default .panel.panel-default
......
...@@ -3,10 +3,10 @@ ...@@ -3,10 +3,10 @@
.project-issuable-filter .project-issuable-filter
.controls .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 .pull-left.hidden-xs
- if @all_builds.running_or_pending.any? - 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 %ul.center-top-menu
%li{class: ('active' if @scope.nil?)} %li{class: ('active' if @scope.nil?)}
...@@ -50,4 +50,3 @@ ...@@ -50,4 +50,3 @@
= render 'projects/commit_statuses/commit_status', commit_status: build, commit_sha: true, stage: true, allow_retry: true = render 'projects/commit_statuses/commit_status', commit_status: build, commit_sha: true, stage: true, allow_retry: true
= paginate @builds, theme: 'gitlab' = paginate @builds, theme: 'gitlab'
- page_title "#{@build.name} (#{@build.id})", "Builds" - page_title "#{@build.name} (##{@build.id})", "Builds"
= render "header_title" = render "header_title"
.build-page .build-page
.gray-content-block .gray-content-block.top-block
Build ##{@build.id} for commit Build ##{@build.id} for commit
%strong.monospace %strong.monospace= link_to @build.commit.short_sha, ci_status_path(@build.commit)
= link_to @build.commit.short_sha, ci_status_path(@build.commit)
from from
= link_to @build.ref, namespace_project_commits_path(@project.namespace, @project, @build.ref) = link_to @build.ref, namespace_project_commits_path(@project.namespace, @project, @build.ref)
#up-build-trace #up-build-trace
- if @commit.matrix_for_ref?(@build.ref) - 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| - @commit.latest_builds_for_ref(@build.ref).each do |build|
%li{class: ('active' if build == @build) } %li{class: ('active' if build == @build) }
= link_to namespace_project_build_path(@project.namespace, @project, build) do = link_to namespace_project_build_path(@project.namespace, @project, build) do
...@@ -22,7 +21,6 @@ ...@@ -22,7 +21,6 @@
- else - else
= build.id = build.id
- if @build.retried? - if @build.retried?
%li.active %li.active
%a %a
...@@ -31,7 +29,7 @@ ...@@ -31,7 +29,7 @@
%i.fa.fa-warning %i.fa.fa-warning
This build was retried. This build was retried.
.gray-content-block.second-block .gray-content-block.middle-block
.build-head .build-head
.clearfix .clearfix
= ci_status_with_icon(@build.status) = ci_status_with_icon(@build.status)
......
%tr.commit_status %tr.commit_status
%td.status %td.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) = ci_status_with_icon(commit_status.status)
%td.commit_status-link %td.commit_status-link
- if commit_status.target_url - if commit_status.target_url
= link_to commit_status.target_url do = link_to commit_status.target_url do
%strong Build ##{commit_status.id} %strong ##{commit_status.id}
- else - else
%strong Build ##{commit_status.id} %strong ##{commit_status.id}
- if commit_status.show_warning? - if commit_status.show_warning?
%i.fa.fa-warning.text-warning %i.fa.fa-warning.text-warning
......
...@@ -12,10 +12,7 @@ ...@@ -12,10 +12,7 @@
.col-md-9 .col-md-9
.votes-holder.pull-right .votes-holder.pull-right
#votes= render 'votes/votes_block', votable: @issue #votes= render 'votes/votes_block', votable: @issue
.participants = render "shared/issuable/participants"
%span= pluralize(@participants.count, 'participant')
- @participants.each do |participant|
= link_to_member(@project, participant, name: false, size: 24)
.col-md-3 .col-md-3
.input-group.cross-project-reference .input-group.cross-project-reference
%span#cross-project-reference.slead.has_tooltip{title: 'Cross-project reference'} %span#cross-project-reference.slead.has_tooltip{title: 'Cross-project reference'}
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
.col-md-9 .col-md-9
.votes-holder.pull-right .votes-holder.pull-right
#votes= render 'votes/votes_block', votable: @merge_request #votes= render 'votes/votes_block', votable: @merge_request
= render "projects/merge_requests/show/participants" = render "shared/issuable/participants"
.col-md-3 .col-md-3
.input-group.cross-project-reference .input-group.cross-project-reference
%span#cross-project-reference.slead.has_tooltip{title: 'Cross-project reference'} %span#cross-project-reference.slead.has_tooltip{title: 'Cross-project reference'}
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
.row .row
%section.col-md-9 %section.col-md-9
= render "projects/notes/notes_with_form" .voting_notes#notes= render "projects/notes/notes_with_form"
%aside.col-md-3 %aside.col-md-3
.issuable-affix .issuable-affix
.context .context
......
- ci_commit = @merge_request.ci_commit - if @ci_commit
- if ci_commit - status = @ci_commit.status
- status = ci_commit.status
.mr-widget-heading .mr-widget-heading
.ci_widget{class: "ci-#{status}"} .ci_widget{class: "ci-#{status}"}
= ci_status_icon(ci_commit) = ci_status_icon(@ci_commit)
%span CI build #{status} %span CI build #{status}
for #{@merge_request.last_commit_short_sha}. for #{@merge_request.last_commit_short_sha}.
%span.ci-coverage %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? - elsif @merge_request.has_ci?
- # Compatibility with old CI integrations (ex jenkins) when you request status from CI server via AJAX - # Compatibility with old CI integrations (ex jenkins) when you request status from CI server via AJAX
......
- 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| = 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 = hidden_field_tag :authenticity_token, form_authenticity_token
......
.append-bottom-20 .gray-content-block.top-block.append-bottom-default
.tree-ref-holder
= render partial: 'shared/ref_switcher', locals: {destination: 'graph'} = render partial: 'shared/ref_switcher', locals: {destination: 'graph'}
.pull-right.visible-lg.light You can move around the graph by using the arrow keys.
.oneline
You can move around the graph by using the arrow keys.
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
%p.light Keep stable branches secure and force developers to use Merge Requests %p.light Keep stable branches secure and force developers to use Merge Requests
%hr %hr
.well.append-bottom-20 .well
%p Protected branches are designed to %p Protected branches are designed to
%ul %ul
%li prevent pushes from everybody except #{link_to "masters", help_page_path("permissions", "permissions"), class: "vlink"} %li prevent pushes from everybody except #{link_to "masters", help_page_path("permissions", "permissions"), class: "vlink"}
......
.participants .participants
%span #{@participants.count} participants %span
= pluralize @participants.count, "participant"
- @participants.each do |participant| - @participants.each do |participant|
= link_to_member(@project, participant, name: false, size: 24) = link_to_member(@project, participant, name: false, size: 24)
...@@ -19,7 +19,7 @@ describe "Builds" do ...@@ -19,7 +19,7 @@ describe "Builds" do
end end
it { expect(page).to have_content 'Running' } 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.short_sha }
it { expect(page).to have_content @build.ref } it { expect(page).to have_content @build.ref }
it { expect(page).to have_content @build.name } it { expect(page).to have_content @build.name }
...@@ -32,7 +32,7 @@ describe "Builds" do ...@@ -32,7 +32,7 @@ describe "Builds" do
end end
it { expect(page).to have_content 'No builds to show' } 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 end
context "All builds" do context "All builds" do
...@@ -45,7 +45,7 @@ describe "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.short_sha }
it { expect(page).to have_content @build.ref } it { expect(page).to have_content @build.ref }
it { expect(page).to have_content @build.name } 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
end end
...@@ -53,11 +53,11 @@ describe "Builds" do ...@@ -53,11 +53,11 @@ describe "Builds" do
before do before do
@build.run! @build.run!
visit namespace_project_builds_path(@gl_project.namespace, @gl_project) visit namespace_project_builds_path(@gl_project.namespace, @gl_project)
click_link "Cancel all" click_link "Cancel running"
end end
it { expect(page).to have_content 'No builds to show' } 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 end
describe "GET /:project/builds/:id" do describe "GET /:project/builds/:id" do
......
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