Commit d61f8a18 authored by Annabel Dunstone Gray's avatar Annabel Dunstone Gray

Move build order array to HasStatus module

parent 2115c360
......@@ -5,6 +5,7 @@ module HasStatus
STARTED_STATUSES = %w[running success failed skipped]
ACTIVE_STATUSES = %w[pending running]
COMPLETED_STATUSES = %w[success failed canceled]
ORDERED_STATUSES = %w[failed pending running canceled success skipped]
class_methods do
def status_sql
......
- builds = @build.pipeline.builds.to_a
- statuses = ["failed", "pending", "running", "canceled", "success", "skipped"]
%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,7 +123,7 @@
%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: sidebar_build_class(build, @build), data: {stage: build.stage}}
= link_to namespace_project_build_path(@project.namespace, @project, build) do
......
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