Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorJacob Schatz <jschatz@gitlab.com>2016-10-18 19:46:55 +0300
committerJacob Schatz <jschatz@gitlab.com>2016-10-18 19:46:55 +0300
commitd25a1f305ac504662a74987b329e55e34ee8cd31 (patch)
treefa78658b680c69768cf1dd4a0a86aa4a5f2dcb2f /app/views
parent24b73bc921fa2a47c42a1718a666459cf3bcb505 (diff)
parentd61f8a18e0f7e9d0ed162827f4e8ae2de3756f5c (diff)
Merge branch '21192-retried-builds' into 'master'
Fix retried builds styling #### What does this MR do? Adds background color to retried builds and an icon + tooltip on retried builds in build list #### Screenshots (if relevant) <img src="/uploads/4138dd277c185de3c271b2eb9b459761/Screen_Shot_2016-10-13_at_2.44.27_PM.png" width="500px"> <img src="/uploads/99227d5ed3816a509660fe5a84da5b2a/Screen_Shot_2016-10-13_at_3.01.13_PM.png" width="500px"> #### What are the relevant issue numbers? Closes #21192 See merge request !6109
Diffstat (limited to 'app/views')
-rw-r--r--app/views/projects/builds/_sidebar.html.haml17
-rw-r--r--app/views/projects/ci/builds/_build.html.haml7
2 files changed, 8 insertions, 16 deletions
diff --git a/app/views/projects/builds/_sidebar.html.haml b/app/views/projects/builds/_sidebar.html.haml
index 966633f1f89..b1053028279 100644
--- a/app/views/projects/builds/_sidebar.html.haml
+++ b/app/views/projects/builds/_sidebar.html.haml
@@ -1,5 +1,4 @@
-- builds = @build.pipeline.builds.latest.to_a
-- statuses = ["failed", "pending", "running", "canceled", "success", "skipped"]
+- builds = @build.pipeline.builds.to_a
%aside.right-sidebar.right-sidebar-expanded.build-sidebar.js-build-sidebar
.block.build-sidebar-header.visible-xs-block.visible-sm-block.append-bottom-default
@@ -124,9 +123,9 @@
%a.stage-item= stage
.builds-container
- - statuses.each do |build_status|
+ - HasStatus::ORDERED_STATUSES.each do |build_status|
- builds.select{|build| build.status == build_status}.each do |build|
- .build-job{class: ('active' if build == @build), data: {stage: build.stage}}
+ .build-job{class: sidebar_build_class(build, @build), data: {stage: build.stage}}
= link_to namespace_project_build_path(@project.namespace, @project, build) do
= icon('arrow-right')
= ci_icon_for_status(build.status)
@@ -135,11 +134,5 @@
= build.name
- else
= build.id
-
- - if @build.retried?
- %li.active
- %a
- Build ##{@build.id}
- &middot;
- %i.fa.fa-warning
- This build was retried.
+ - if build.retried?
+ %i.fa.fa-refresh.has-tooltip{data: { container: 'body', placement: 'bottom' }, title: 'Build was retried'}
diff --git a/app/views/projects/ci/builds/_build.html.haml b/app/views/projects/ci/builds/_build.html.haml
index 9248adfde80..bf157e4f64a 100644
--- a/app/views/projects/ci/builds/_build.html.haml
+++ b/app/views/projects/ci/builds/_build.html.haml
@@ -6,7 +6,7 @@
- coverage = local_assigns.fetch(:coverage, false)
- allow_retry = local_assigns.fetch(:allow_retry, false)
-%tr.build.commit
+%tr.build.commit{class: ('retried' if retried)}
%td.status
- if can?(current_user, :read_build, build)
= ci_status_with_icon(build.status, namespace_project_build_url(build.project.namespace, build.project, build))
@@ -35,8 +35,9 @@
- if build.stuck?
= icon('warning', class: 'text-warning has-tooltip', title: 'Build is stuck. Check runners.')
+
- if retried
- = icon('warning', class: 'text-warning has-tooltip', title: 'Build was retried.')
+ = icon('refresh', class: 'text-warning has-tooltip', title: 'Build was retried')
.label-container
- if build.tags.any?
@@ -47,8 +48,6 @@
%span.label.label-info triggered
- if build.try(:allow_failure)
%span.label.label-danger allowed to fail
- - if retried
- %span.label.label-warning retried
- if build.manual?
%span.label.label-info manual