Commit 66c01627 authored by Douwe Maan's avatar Douwe Maan Committed by Yorick Peterse

Merge branch 'improve-pipeline-design' into 'master'

Improve design of Pipeline view

## What does this MR do?

Improves current design of Pipelines view when there is multiple stages.
This makes the statuses clickable and makes the view more compact.

## Screenshots (if relevant)

![Screen_Shot_2016-05-21_at_01.20.40](/uploads/dd031b7af7005c7a61f3165fefa8b7c9/Screen_Shot_2016-05-21_at_01.20.40.png)

cc @DouweM @markpundsack @rspeicher @marin 

See merge request !4230
parent 85b4e064
......@@ -33,6 +33,7 @@ v 8.8.0
- Added inline diff styling for `change_title` system notes. (Adam Butler)
- Project#open_branches has been cleaned up and no longer loads entire records into memory.
- Escape HTML in commit titles in system note messages
- Improve design of Pipeline View
- Fix scope used when accessing container registry
- Fix creation of Ci::Commit object which can lead to pending, failed in some scenarios
- Improve multiple branch push performance by memoizing permission checking
......
......@@ -272,7 +272,7 @@
}
.page-with-layout-nav {
margin-top: 50px;
margin-top: $header-height + 2;
&.controls-dropdown-visible {
@media (max-width: $screen-xs-min) {
......
......@@ -280,11 +280,5 @@
background-color: $white-light;
color: $gl-placeholder-color;
}
th,
td {
padding: 16px;
}
}
}
.pipeline-stage {
.pipelines {
.stage {
max-width: 100px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.duration, .finished_at {
margin: 4px 0;
}
.commit-title {
margin: 0;
}
.controls {
white-space: nowrap;
}
.btn {
margin: 4px;
}
}
......@@ -47,4 +47,3 @@
= render "admin/builds/build", build: build
= paginate @builds, theme: 'gitlab'
......@@ -35,9 +35,6 @@
= icon('wrench')
%span CI Lint
.row-content-block
#{(@scope || 'all').capitalize} builds from this project
%ul.content-list
- if @builds.blank?
%li
......
......@@ -57,14 +57,10 @@
%td.duration
- if build.duration
= icon("clock-o")
 
#{duration_in_words(build.finished_at, build.started_at)}
%td.timestamp
- if build.finished_at
= icon("calendar")
 
%span #{time_ago_with_tooltip(build.finished_at)}
- if defined?(coverage) && coverage
......
......@@ -12,10 +12,10 @@
·
= link_to commit.short_sha, namespace_project_commit_path(@project.namespace, @project, commit.sha), class: "commit-id monospace"
 
- if commit.latest?
%span.label.label-success latest
- if commit.tag?
%span.label.label-primary tag
- elsif commit.latest?
%span.label.label-success.has-tooltip{ title: 'Latest build for this branch' } latest
- if commit.triggered?
%span.label.label-primary triggered
- if commit.yaml_errors.present?
......@@ -23,10 +23,9 @@
- if commit.builds.any?(&:stuck?)
%span.label.label-warning stuck
%p
%span
%p.commit-title
- if commit_data = commit.commit_data
= link_to_gfm commit_data.title, namespace_project_commit_path(@project.namespace, @project, commit_data.id), class: "commit-row-message"
= link_to_gfm truncate(commit_data.title, length: 60), namespace_project_commit_path(@project.namespace, @project, commit_data.id), class: "commit-row-message"
- else
Cant find HEAD commit for this branch
......@@ -34,22 +33,19 @@
- stages_status = commit.statuses.stages_status
- stages.each do |stage|
%td
- if status = stages_status[stage]
- tooltip = "#{stage.titleize}: #{status}"
%span.has-tooltip{ title: "#{tooltip}", class: "ci-status-icon-#{status}" }
- status = stages_status[stage]
- tooltip = "#{stage.titleize}: #{status || 'not found'}"
- if status
= link_to namespace_project_pipeline_path(@project.namespace, @project, commit.id, anchor: stage), class: "has-tooltip ci-status-icon-#{status}", title: tooltip do
= ci_icon_for_status(status)
- else
.light.has-tooltip{ title: tooltip }
\-
%td
- if commit.started_at && commit.finished_at
%p
= icon("clock-o")
 
%p.duration
#{duration_in_words(commit.finished_at, commit.started_at)}
- if commit.finished_at
%p
= icon("calendar")
 
#{time_ago_with_tooltip(commit.finished_at)}
%td
.controls.hidden-xs.pull-right
......@@ -67,11 +63,9 @@
%span #{build.name}
- if can?(current_user, :update_pipeline, @project)
 
- if commit.retryable? && commit.builds.failed.any?
= link_to retry_namespace_project_pipeline_path(@project.namespace, @project, commit.id), class: 'btn has-tooltip', title: "Retry", method: :post do
= icon("repeat")
 
- 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")
%tr
%th{colspan: 10}
%strong
%a{name: stage}
- status = statuses.latest.status
%span{class: "ci-status-link ci-status-icon-#{status}"}
= ci_icon_for_status(status)
......
......@@ -50,14 +50,10 @@
%td.duration
- if generic_commit_status.duration
= icon("clock-o")
 
#{duration_in_words(generic_commit_status.finished_at, generic_commit_status.started_at)}
%td.timestamp
- if generic_commit_status.finished_at
= icon("calendar")
 
%span #{time_ago_with_tooltip(generic_commit_status.finished_at)}
- if defined?(coverage) && coverage
......
......@@ -36,15 +36,7 @@
= icon('wrench')
%span CI Lint
.row-content-block
- if @scope == 'running'
Running pipelines for this project
- elsif @scope.nil?
Pipelines for this project
- else
#{@scope.titleize} for this project
%ul.content-list
%ul.content-list.pipelines
- stages = @pipelines.stages
- if @pipelines.blank?
%li
......@@ -56,10 +48,10 @@
%th ID
%th Commit
- stages.each do |stage|
%th
%span.pipeline-stage.has-tooltip{ title: "#{stage.titleize}" }
%th.stage
%span.has-tooltip{ title: "#{stage.titleize}" }
= stage.titleize.pluralize
%th
%th Duration
%th
= render @pipelines, commit_sha: true, stage: true, allow_retry: true, stages: stages
......
......@@ -43,7 +43,6 @@ describe "Builds" do
end
it { expect(page).to have_selector('.nav-links li.active', text: 'All') }
it { expect(page).to have_selector('.row-content-block', text: 'All builds from this project') }
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 }
......
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