From 446eecb85275352dcd4c3e2c6054461da2a51ca7 Mon Sep 17 00:00:00 2001
From: Annabel Dunstone <annabel.dunstone@gmail.com>
Date: Thu, 7 Jul 2016 13:40:40 -0500
Subject: [PATCH] Move pipeline ID to commit column; add status; branch style
 updates

---
 app/assets/stylesheets/pages/builds.scss      | 32 ++++++++++++++++++-
 .../projects/ci/pipelines/_pipeline.html.haml |  9 +++---
 app/views/projects/pipelines/index.html.haml  |  4 +--
 3 files changed, 38 insertions(+), 7 deletions(-)

diff --git a/app/assets/stylesheets/pages/builds.scss b/app/assets/stylesheets/pages/builds.scss
index e8f1935d239..76024933650 100644
--- a/app/assets/stylesheets/pages/builds.scss
+++ b/app/assets/stylesheets/pages/builds.scss
@@ -83,7 +83,37 @@
   }
 }
 
-table.builds {
+
+.table.builds {
+
+  tr {
+    th {
+      padding: 18px 10px;
+      border: none;
+    }
+  }
+
+  tbody {
+    border-top-width: 1px;
+  }
+
+  .branch-commit {
+
+    .branch-name {
+      max-width: 180px;
+      overflow: hidden;
+      display: inline-block;
+      white-space: nowrap;
+      vertical-align: top;
+      text-overflow: ellipsis;
+      margin-left: 10px;
+    }
+
+    .commit-id {
+      color: $gl-link-color;
+    }
+  }
+
   .build-link {
     a {
       color: $gl-dark-link-color;
diff --git a/app/views/projects/ci/pipelines/_pipeline.html.haml b/app/views/projects/ci/pipelines/_pipeline.html.haml
index f2c19797206..daeaf7f99eb 100644
--- a/app/views/projects/ci/pipelines/_pipeline.html.haml
+++ b/app/views/projects/ci/pipelines/_pipeline.html.haml
@@ -1,14 +1,15 @@
 - status = pipeline.status
 %tr.commit
   %td.commit-link
-    = link_to namespace_project_pipeline_path(@project.namespace, @project, pipeline.id), class: "ci-status ci-#{status}" do
-      = ci_icon_for_status(status)
-      %strong ##{pipeline.id}
+    = link_to namespace_project_pipeline_path(@project.namespace, @project, pipeline.id) do
+      = ci_status_with_icon(status)
+
 
   %td
     %div.branch-commit
+      %span ##{pipeline.id}
       - if pipeline.ref
-        = link_to pipeline.ref, namespace_project_commits_path(@project.namespace, @project, pipeline.ref), class: "monospace"
+        = link_to pipeline.ref, namespace_project_commits_path(@project.namespace, @project, pipeline.ref), class: "monospace branch-name"
         &middot;
       = link_to pipeline.short_sha, namespace_project_commit_path(@project.namespace, @project, pipeline.sha), class: "commit-id monospace"
       &nbsp;
diff --git a/app/views/projects/pipelines/index.html.haml b/app/views/projects/pipelines/index.html.haml
index 7c225e2b282..e1c82a8179d 100644
--- a/app/views/projects/pipelines/index.html.haml
+++ b/app/views/projects/pipelines/index.html.haml
@@ -45,13 +45,13 @@
       .table-holder
         %table.table.builds
           %tbody
-            %th ID
+            %th Status
             %th Commit
             - stages.each do |stage|
               %th.stage
                 %span.has-tooltip{ title: "#{stage.titleize}" }
                   = stage.titleize
-            %th Duration
+            %%th
             %th
           = render @pipelines, commit_sha: true, stage: true, allow_retry: true, stages: stages
 
-- 
2.30.9