diff --git a/app/assets/stylesheets/pages/pipelines.scss b/app/assets/stylesheets/pages/pipelines.scss new file mode 100644 index 0000000000000000000000000000000000000000..7d90a4bebc54922ad50cad97a186a1113d48b9ba --- /dev/null +++ b/app/assets/stylesheets/pages/pipelines.scss @@ -0,0 +1,5 @@ +.pipeline-stage { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} diff --git a/app/controllers/projects/pipelines_controller.rb b/app/controllers/projects/pipelines_controller.rb index 78b85ea9a71199c28898455d9743de54dd1edaa1..19071cc9e434eea89c6c6590dc2cc595d3136a29 100644 --- a/app/controllers/projects/pipelines_controller.rb +++ b/app/controllers/projects/pipelines_controller.rb @@ -25,7 +25,7 @@ class Projects::PipelinesController < Projects::ApplicationController flash[:alert] = e.message render 'new' rescue - flash[:alert] = 'Undefined error' + flash[:alert] = 'The pipeline could not be created. Please try again.' render 'new' end end diff --git a/app/models/commit_status.rb b/app/models/commit_status.rb index 6fef1c038e94d13d4a81663c28398a3d06d24d90..1548a51e942c4c6798c41605db721669043f55ab 100644 --- a/app/models/commit_status.rb +++ b/app/models/commit_status.rb @@ -14,6 +14,7 @@ class CommitStatus < ActiveRecord::Base alias_attribute :author, :user scope :latest, -> { where(id: unscope(:select).select('max(id)').group(:name, :commit_id)) } + scope :retried, -> { where.not(id: latest) } scope :ordered, -> { order(:name) } scope :ignored, -> { where(allow_failure: true, status: [:failed, :canceled]) } diff --git a/app/views/projects/ci/commits/_commit.html.haml b/app/views/projects/ci/commits/_commit.html.haml index 90ac41666d01d1e4a102aa7c5c743218647b6835..13162b41f9b514865f874cbdc20141125d9d895b 100644 --- a/app/views/projects/ci/commits/_commit.html.haml +++ b/app/views/projects/ci/commits/_commit.html.haml @@ -19,7 +19,7 @@ - if commit.triggered? %span.label.label-primary triggered - if commit.yaml_errors.present? - %span.label.label-danger.has-tooltip(title="#{commit.yaml_errors}") yaml invalid + %span.label.label-danger.has-tooltip{ title: "#{commit.yaml_errors}" } yaml invalid - if commit.builds.any?(&:stuck?) %span.label.label-warning stuck @@ -36,7 +36,7 @@ %td - if status = stages_status[stage] - tooltip = "#{stage.titleize}: #{status}" - %span.has-tooltip(title="#{tooltip}"){class: "ci-status-icon-#{status}"} + %span.has-tooltip{ title: "#{tooltip}", class: "ci-status-icon-#{status}" } = ci_icon_for_status(status) %td @@ -74,4 +74,4 @@ - if commit.active? = link_to cancel_namespace_project_pipeline_path(@project.namespace, @project, commit.id), class: 'btn btn-remove has-tooltip', title: "Cancel", method: :post do - = icon("remove", class: "cred") + = icon("remove") diff --git a/app/views/projects/commit/_ci_stage.html.haml b/app/views/projects/commit/_ci_stage.html.haml index bdadf2944c41e66829267e4b6bf2763f4b8e8da0..aaa318e1eb3f0c947ace8b1ecd63abaab59e3d4d 100644 --- a/app/views/projects/commit/_ci_stage.html.haml +++ b/app/views/projects/commit/_ci_stage.html.haml @@ -1,16 +1,14 @@ -- latest = statuses.latest -- retried = statuses.where.not(id: latest) %tr %th{colspan: 10} %strong - - status = latest.status + - status = statuses.latest.status %span{class: "ci-status-link ci-status-icon-#{status}"} = ci_icon_for_status(status) - if stage = stage.titleize.pluralize - = render latest.ordered, coverage: @project.build_coverage_enabled?, tage: false, ref: false, allow_retry: true - = render retried.ordered, coverage: @project.build_coverage_enabled?, stage: false, ref: false, retried: true + = render statuses.latest.ordered, coverage: @project.build_coverage_enabled?, stage: false, ref: false, allow_retry: true + = render statuses.retried.ordered, coverage: @project.build_coverage_enabled?, stage: false, ref: false, retried: true %tr %td{colspan: 10} diff --git a/app/views/projects/commit/_commit_box.html.haml b/app/views/projects/commit/_commit_box.html.haml index 77fb0bc73575e4e1d8b2af580ca6450420aabb4e..30ec47cc8e3cc2b5a63cc77fb73aadaa9618e790 100644 --- a/app/views/projects/commit/_commit_box.html.haml +++ b/app/views/projects/commit/_commit_box.html.haml @@ -27,14 +27,14 @@ .pull-right = link_to namespace_project_pipeline_path(@project.namespace, @project, pipeline), class: "ci-status ci-#{pipeline.status}" do = ci_icon_for_status(pipeline.status) - pipeline: + Pipeline: = ci_label_for_status(pipeline.status) - elsif @commit.status .pull-right = link_to builds_namespace_project_commit_path(@project.namespace, @project, @commit.id), class: "ci-status ci-#{@commit.status}" do = ci_icon_for_status(@commit.status) - build: + Build: = ci_label_for_status(@commit.status) %span.light Authored by diff --git a/app/views/projects/pipelines/index.html.haml b/app/views/projects/pipelines/index.html.haml index af55ef42a6e10b766fb93905486fd562ae4b5889..9d5b6d367c9f115172f48a89245b5b0d7ff1158b 100644 --- a/app/views/projects/pipelines/index.html.haml +++ b/app/views/projects/pipelines/index.html.haml @@ -27,7 +27,7 @@ - if can? current_user, :create_pipeline, @project = link_to new_namespace_project_pipeline_path(@project.namespace, @project), class: 'btn btn-create' do = icon('plus') - New + New pipeline - unless @repository.gitlab_ci_yml = link_to 'Get started with Pipelines', help_page_path('ci/quick_start', 'README'), class: 'btn btn-info' @@ -36,7 +36,7 @@ = icon('wrench') %span CI Lint -.gray-content-block +.row-content-block - if @scope == 'running' Running pipelines for this project - elsif @scope.nil? @@ -57,8 +57,8 @@ %th Commit - stages.each do |stage| %th - %span.has-tooltip(title="#{stage.titleize}") - = truncate(stage.titleize.pluralize, length: 8) + %span.pipeline-stage.has-tooltip{ title: "#{stage.titleize}" } + = stage.titleize.pluralize %th %th = render @pipelines, commit_sha: true, stage: true, allow_retry: true, stages: stages diff --git a/app/views/projects/pipelines/new.html.haml b/app/views/projects/pipelines/new.html.haml index 39b1571b9cfa6cf8b746f6d5f95eeb502aa7a0f1..534a495dd85891de35f384bd52be68f253562c67 100644 --- a/app/views/projects/pipelines/new.html.haml +++ b/app/views/projects/pipelines/new.html.haml @@ -9,7 +9,7 @@ New Pipeline %hr -= form_tag namespace_project_pipelines_path, method: :post, id: "new-pipeline-form", class: "form-horizontal js-create-branch-form js-requires-input" do += form_tag namespace_project_pipelines_path, method: :post, id: "new-pipeline-form", class: "form-horizontal js-new-pipeline-form js-requires-input" do .form-group = label_tag :ref, 'Create for', class: 'control-label' .col-sm-10 @@ -22,4 +22,4 @@ :javascript var availableRefs = #{@project.repository.ref_names.to_json}; - new NewBranchForm($('.js-create-branch-form'), availableRefs) + new NewBranchForm($('.js-new-pipeline-form'), availableRefs)