diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2017-03-07 11:48:01 +0100 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2017-03-07 12:46:53 +0100 |
commit | b817ce2d7e6b46fa924838674875b381486344b8 (patch) | |
tree | 9be7b8bf3dd4d50a56105ae1b52e7d8a2cbf386e /app/views/projects/pipelines | |
parent | db2617fd5f690282a7e844a361eac9da6aeea8c7 (diff) | |
download | gitlab-ce-b817ce2d7e6b46fa924838674875b381486344b8.tar.gz |
Sort builds in stage dropdown
Order: failed pending running manual canceled success skipped created
Diffstat (limited to 'app/views/projects/pipelines')
-rw-r--r-- | app/views/projects/pipelines/_stage.html.haml | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/app/views/projects/pipelines/_stage.html.haml b/app/views/projects/pipelines/_stage.html.haml index a0b14a7274a..3feb99cfcd7 100644 --- a/app/views/projects/pipelines/_stage.html.haml +++ b/app/views/projects/pipelines/_stage.html.haml @@ -1,3 +1,5 @@ -- @stage.statuses.latest.each do |status| - %li - = render 'ci/status/dropdown_graph_badge', subject: status +- grouped_statuses = @stage.statuses.latest_ordered.group_by(&:status) +- HasStatus::ORDERED_STATUSES.each do |ordered_status| + - grouped_statuses.fetch(ordered_status, []).each do |status| + %li + = render 'ci/status/dropdown_graph_badge', subject: status |