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
fee7992c
Commit
fee7992c
authored
Aug 17, 2016
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix pipelines visualisation rendering
parent
ef767268
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
7 deletions
+15
-7
app/models/ci/build.rb
app/models/ci/build.rb
+1
-1
app/models/ci/pipeline.rb
app/models/ci/pipeline.rb
+4
-0
app/views/projects/commit/_pipeline.html.haml
app/views/projects/commit/_pipeline.html.haml
+10
-6
No files found.
app/models/ci/build.rb
View file @
fee7992c
...
@@ -102,7 +102,7 @@ module Ci
...
@@ -102,7 +102,7 @@ module Ci
end
end
def
playable?
def
playable?
project
.
builds_enabled?
&&
commands
.
present?
&&
manual?
project
.
builds_enabled?
&&
commands
.
present?
&&
manual?
&&
skipped?
end
end
def
play
(
current_user
=
nil
)
def
play
(
current_user
=
nil
)
...
...
app/models/ci/pipeline.rb
View file @
fee7992c
...
@@ -34,6 +34,10 @@ module Ci
...
@@ -34,6 +34,10 @@ module Ci
CommitStatus
.
where
(
pipeline:
pluck
(
:id
)).
stages
CommitStatus
.
where
(
pipeline:
pluck
(
:id
)).
stages
end
end
def
stages
statuses
.
order
(
:stage_idx
).
latest
.
group_by
(
&
:stage
)
end
def
project_id
def
project_id
project
.
id
project
.
id
end
end
...
...
app/views/projects/commit/_pipeline.html.haml
View file @
fee7992c
.row-content-block.build-content.middle-block.pipeline-graph
.row-content-block.build-content.middle-block.pipeline-graph
.pipeline-visualization
.pipeline-visualization
%ul
.stage-column-list
%ul
.stage-column-list
-
pipeline
.
statuses
.
stages
.
each
do
|
stage
|
-
stages
=
pipeline
.
statuses
.
latest
.
order
(
:stage_idx
).
group_by
(
&
:stage
)
-
statuses
=
pipeline
.
statuses
.
where
(
stage:
stage
)
-
stages
.
each
do
|
stage
,
builds
|
-
status
=
statuses
.
latest
.
status
%li
.stage-column
%li
.stage-column
.stage-name
.stage-name
%a
{
name:
stage
}
%a
{
name:
stage
}
...
@@ -11,11 +10,16 @@
...
@@ -11,11 +10,16 @@
=
stage
.
titleize
=
stage
.
titleize
.builds-container
.builds-container
%ul
%ul
-
statuse
s
.
each
do
|
build
|
-
build
s
.
each
do
|
build
|
%li
.build
%li
.build
.build-content
.build-content
%span
{
class:
"ci-status-link ci-status-icon-#{status}"
}
%span
{
class:
"ci-status-link ci-status-icon-#{build.status}"
}
=
ci_icon_for_status
(
status
)
-
if
build
.
try
(
:playable?
)
=
link_to
play_namespace_project_build_path
(
build
.
project
.
namespace
,
build
.
project
,
build
,
return_to:
request
.
original_url
),
method: :post
,
title:
'Play'
do
=
icon
(
'play'
)
-
else
=
link_to
namespace_project_build_url
(
build
.
project
.
namespace
,
build
.
project
,
build
)
do
=
ci_icon_for_status
(
build
.
status
)
=
build
.
name
=
build
.
name
.row-content-block.build-content.middle-block.pipeline-graph
.row-content-block.build-content.middle-block.pipeline-graph
...
...
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