summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2016-05-20 18:50:16 -0500
committerKamil Trzcinski <ayufan@ayufan.eu>2016-05-21 01:17:33 -0500
commit1cbc898223d2f9b78cb6494108d2aed00d19d00e (patch)
tree11862574db8b41292ea48542e18efa6b516360f6
parentec86644545c1c2567dfaacb6d53d150a5dfa28d6 (diff)
downloadgitlab-ce-1cbc898223d2f9b78cb6494108d2aed00d19d00e.tar.gz
Improve design of Pipeline view
-rw-r--r--CHANGELOG1
-rw-r--r--app/assets/stylesheets/pages/pipelines.scss26
-rw-r--r--app/views/projects/ci/commits/_commit.html.haml31
-rw-r--r--app/views/projects/commit/_ci_stage.html.haml1
-rw-r--r--app/views/projects/pipelines/index.html.haml6
5 files changed, 44 insertions, 21 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 67fca2c6f6d..0884ac1947d 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -13,6 +13,7 @@ v 8.8.0 (unreleased)
- 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 creation of Ci::Commit object which can lead to pending, failed in some scenarios
- Improve multiple branch push performance by memoizing permission checking
- Log to application.log when an admin starts and stops impersonating a user
diff --git a/app/assets/stylesheets/pages/pipelines.scss b/app/assets/stylesheets/pages/pipelines.scss
index 546176b65e4..87b0562c29a 100644
--- a/app/assets/stylesheets/pages/pipelines.scss
+++ b/app/assets/stylesheets/pages/pipelines.scss
@@ -1,4 +1,24 @@
-.pipeline-stage {
- overflow: hidden;
- text-overflow: ellipsis;
+.pipelines {
+ .stage {
+ max-width: 0;
+ 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;
+ }
}
diff --git a/app/views/projects/ci/commits/_commit.html.haml b/app/views/projects/ci/commits/_commit.html.haml
index 13162b41f9b..2ea9333913c 100644
--- a/app/views/projects/ci/commits/_commit.html.haml
+++ b/app/views/projects/ci/commits/_commit.html.haml
@@ -12,10 +12,10 @@
&middot;
= link_to commit.short_sha, namespace_project_commit_path(@project.namespace, @project, commit.sha), class: "commit-id monospace"
&nbsp;
- - 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,30 +23,33 @@
- if commit.builds.any?(&:stuck?)
%span.label.label-warning stuck
- %p
- %span
- - 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"
- - else
- Cant find HEAD commit for this branch
+ %p.commit-title
+ - if commit_data = commit.commit_data
+ = 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
- 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 || 'skipped'}", title: tooltip do
= ci_icon_for_status(status)
+ - else
+ .light
+ \-
%td
- if commit.started_at && commit.finished_at
- %p
+ %p.duration
= icon("clock-o")
&nbsp;
#{duration_in_words(commit.finished_at, commit.started_at)}
- if commit.finished_at
- %p
+ %p.finished_at
= icon("calendar")
&nbsp;
#{time_ago_with_tooltip(commit.finished_at)}
@@ -67,11 +70,9 @@
%span #{build.name}
- if can?(current_user, :update_pipeline, @project)
- &nbsp;
- 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")
- &nbsp;
- 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")
diff --git a/app/views/projects/commit/_ci_stage.html.haml b/app/views/projects/commit/_ci_stage.html.haml
index aaa318e1eb3..ae7bb01223e 100644
--- a/app/views/projects/commit/_ci_stage.html.haml
+++ b/app/views/projects/commit/_ci_stage.html.haml
@@ -1,6 +1,7 @@
%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)
diff --git a/app/views/projects/pipelines/index.html.haml b/app/views/projects/pipelines/index.html.haml
index 9d5b6d367c9..4e2e8190700 100644
--- a/app/views/projects/pipelines/index.html.haml
+++ b/app/views/projects/pipelines/index.html.haml
@@ -44,7 +44,7 @@
- else
#{@scope.titleize} for this project
-%ul.content-list
+%ul.content-list.pipelines
- stages = @pipelines.stages
- if @pipelines.blank?
%li
@@ -56,8 +56,8 @@
%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