From d49e6f355010a31a080da75789b46603989925ad Mon Sep 17 00:00:00 2001
From: Annabel Dunstone <annabel.dunstone@gmail.com>
Date: Wed, 27 Jul 2016 11:51:52 -0500
Subject: [PATCH] Add pipeline icon to admin builds; position warning icon
 after sha

---
 app/views/admin/builds/_build.html.haml       |  7 ++++---
 app/views/projects/ci/builds/_build.html.haml | 13 +++++--------
 2 files changed, 9 insertions(+), 11 deletions(-)

diff --git a/app/views/admin/builds/_build.html.haml b/app/views/admin/builds/_build.html.haml
index ce818c30c30..6d1ccf32b56 100644
--- a/app/views/admin/builds/_build.html.haml
+++ b/app/views/admin/builds/_build.html.haml
@@ -11,16 +11,17 @@
       - else
         %span.build-link ##{build.id}
 
-      - if build.stuck?
-        %i.fa.fa-warning.text-warning
-
       - if build.ref
+        .icon-container
+          = build.tag? ? icon('tag') : icon('code-fork')
         = link_to build.ref, namespace_project_commits_path(build.project.namespace, build.project, build.ref), class: "monospace branch-name"
       - else
         .light none
       = custom_icon("icon_commit")
 
       = link_to build.short_sha, namespace_project_commit_path(build.project.namespace, build.project, build.sha), class: "monospace commit-id"
+      - if build.stuck?
+        %i.fa.fa-warning.text-warning
 
       .label-container
         - if build.tags.any?
diff --git a/app/views/projects/ci/builds/_build.html.haml b/app/views/projects/ci/builds/_build.html.haml
index a3114771a42..91081435220 100644
--- a/app/views/projects/ci/builds/_build.html.haml
+++ b/app/views/projects/ci/builds/_build.html.haml
@@ -13,13 +13,6 @@
       - else
         %span ##{build.id}
 
-      - if build.stuck?
-        .icon-container
-          = icon('warning', class: 'text-warning has-tooltip', title: 'Build is stuck. Check runners.')
-      - if defined?(retried) && retried
-        .icon-container
-          = icon('warning', class: 'text-warning has-tooltip', title: 'Build was retried.')
-
       - if defined?(ref) && ref
         - if build.ref
           .icon-container
@@ -33,6 +26,11 @@
       - if defined?(commit_sha) && commit_sha
         = link_to build.short_sha, namespace_project_commit_path(build.project.namespace, build.project, build.sha), class: "commit-id monospace"
 
+      - if build.stuck?
+        = icon('warning', class: 'text-warning has-tooltip', title: 'Build is stuck. Check runners.')
+      - if defined?(retried) && retried
+        = icon('warning', class: 'text-warning has-tooltip', title: 'Build was retried.')
+
       .label-container
         - if build.tags.any?
           - build.tags.each do |tag|
@@ -47,7 +45,6 @@
         - if build.manual?
           %span.label.label-info manual
 
-
   - if defined?(runner) && runner
     %td
       - if build.try(:runner)
-- 
GitLab