Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
d61f8a18
Commit
d61f8a18
authored
Oct 17, 2016
by
Annabel Dunstone Gray
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move build order array to HasStatus module
parent
2115c360
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
app/models/concerns/has_status.rb
app/models/concerns/has_status.rb
+1
-0
app/views/projects/builds/_sidebar.html.haml
app/views/projects/builds/_sidebar.html.haml
+1
-2
No files found.
app/models/concerns/has_status.rb
View file @
d61f8a18
...
@@ -5,6 +5,7 @@ module HasStatus
...
@@ -5,6 +5,7 @@ module HasStatus
STARTED_STATUSES
=
%w[running success failed skipped]
STARTED_STATUSES
=
%w[running success failed skipped]
ACTIVE_STATUSES
=
%w[pending running]
ACTIVE_STATUSES
=
%w[pending running]
COMPLETED_STATUSES
=
%w[success failed canceled]
COMPLETED_STATUSES
=
%w[success failed canceled]
ORDERED_STATUSES
=
%w[failed pending running canceled success skipped]
class_methods
do
class_methods
do
def
status_sql
def
status_sql
...
...
app/views/projects/builds/_sidebar.html.haml
View file @
d61f8a18
-
builds
=
@build
.
pipeline
.
builds
.
to_a
-
builds
=
@build
.
pipeline
.
builds
.
to_a
-
statuses
=
[
"failed"
,
"pending"
,
"running"
,
"canceled"
,
"success"
,
"skipped"
]
%aside
.right-sidebar.right-sidebar-expanded.build-sidebar.js-build-sidebar
%aside
.right-sidebar.right-sidebar-expanded.build-sidebar.js-build-sidebar
.block.build-sidebar-header.visible-xs-block.visible-sm-block.append-bottom-default
.block.build-sidebar-header.visible-xs-block.visible-sm-block.append-bottom-default
...
@@ -124,7 +123,7 @@
...
@@ -124,7 +123,7 @@
%a
.stage-item
=
stage
%a
.stage-item
=
stage
.builds-container
.builds-container
-
statuses
.
each
do
|
build_status
|
-
HasStatus
::
ORDERED_STATUSES
.
each
do
|
build_status
|
-
builds
.
select
{
|
build
|
build
.
status
==
build_status
}.
each
do
|
build
|
-
builds
.
select
{
|
build
|
build
.
status
==
build_status
}.
each
do
|
build
|
.build-job
{
class:
sidebar_build_class
(
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
=
link_to
namespace_project_build_path
(
@project
.
namespace
,
@project
,
build
)
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment