Skip to content
Snippets Groups Projects
Commit d61f8a18 authored by Annabel Dunstone Gray's avatar Annabel Dunstone Gray
Browse files

Move build order array to HasStatus module

parent 2115c360
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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
Loading
Loading
- 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
Loading
Loading
@@ -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
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment