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
1cd9b3b8
Commit
1cd9b3b8
authored
Aug 17, 2016
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Split pipeline status item for Commit Status and Build
parent
fd09311d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
15 deletions
+27
-15
app/models/ci/pipeline.rb
app/models/ci/pipeline.rb
+2
-2
app/views/projects/ci/builds/_build_pipeline.html.haml
app/views/projects/ci/builds/_build_pipeline.html.haml
+12
-0
app/views/projects/commit/_pipeline.html.haml
app/views/projects/commit/_pipeline.html.haml
+4
-13
app/views/projects/generic_commit_statuses/_generic_commit_status_pipeline.html.haml
...commit_statuses/_generic_commit_status_pipeline.html.haml
+9
-0
No files found.
app/models/ci/pipeline.rb
View file @
1cd9b3b8
...
...
@@ -78,8 +78,8 @@ module Ci
CommitStatus
.
where
(
pipeline:
pluck
(
:id
)).
stages
end
def
stages
statuses
.
order
(
:stage_idx
).
latest
.
group_by
(
&
:stage
)
def
stages
_with_latest_statuses
statuses
.
latest
.
order
(
:stage_idx
)
.
group_by
(
&
:stage
)
end
def
project_id
...
...
app/views/projects/ci/builds/_build_pipeline.html.haml
0 → 100644
View file @
1cd9b3b8
%li
.build
.build-content
%span
{
class:
"ci-status-link ci-status-icon-#{subject.status}"
}
-
if
subject
.
playable?
&&
can?
(
current_user
,
:update_build
,
@project
)
=
link_to
play_namespace_project_build_path
(
subject
.
project
.
namespace
,
subject
.
project
,
subject
,
return_to:
request
.
original_url
),
method: :post
,
title:
'Play'
do
=
icon
(
'play'
)
-
elsif
can?
(
current_user
,
:read_build
,
@project
)
&&
subject
.
started?
=
link_to
namespace_project_build_path
(
subject
.
project
.
namespace
,
subject
.
project
,
subject
)
do
=
ci_icon_for_status
(
subject
.
status
)
-
else
=
ci_icon_for_status
(
subject
.
status
)
=
subject
.
name
app/views/projects/commit/_pipeline.html.haml
View file @
1cd9b3b8
.row-content-block.build-content.middle-block.pipeline-graph
.pipeline-visualization
%ul
.stage-column-list
-
stages
=
pipeline
.
sta
tuses
.
latest
.
order
(
:stage_idx
).
group_by
(
&
:stage
)
-
stages
.
each
do
|
stage
,
build
s
|
-
stages
=
pipeline
.
sta
ges_with_latest_statuses
-
stages
.
each
do
|
stage
,
statuse
s
|
%li
.stage-column
.stage-name
%a
{
name:
stage
}
...
...
@@ -10,17 +10,8 @@
=
stage
.
titleize
.builds-container
%ul
-
builds
.
each
do
|
build
|
%li
.build
.build-content
%span
{
class:
"ci-status-link ci-status-icon-#{build.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
-
statuses
.
each
do
|
status
|
=
render
"projects/
#{
status
.
to_partial_path
}
_pipeline"
,
subject:
status
.row-content-block.build-content.middle-block.pipeline-graph
.pull-right
...
...
app/views/projects/generic_commit_statuses/_generic_commit_status_pipeline.html.haml
0 → 100644
View file @
1cd9b3b8
%li
.build
.build-content
%span
{
class:
"ci-status-link ci-status-icon-#{subject.status}"
}
-
if
subject
.
target_url
-
link_to
subject
.
target_url
do
=
ci_icon_for_status
(
subject
.
status
)
-
else
=
ci_icon_for_status
(
subject
.
status
)
=
subject
.
name
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