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
0
Merge Requests
0
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
Tatuya Kamada
gitlab-ce
Commits
52e0c4ba
Commit
52e0c4ba
authored
Dec 09, 2016
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix tests
Fix broken tests
parent
94e0f402
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
10 additions
and
7 deletions
+10
-7
app/assets/javascripts/pipelines.js.es6
app/assets/javascripts/pipelines.js.es6
+4
-1
app/views/projects/ci/builds/_build_pipeline.html.haml
app/views/projects/ci/builds/_build_pipeline.html.haml
+2
-2
app/views/projects/generic_commit_statuses/_generic_commit_status_pipeline.html.haml
...commit_statuses/_generic_commit_status_pipeline.html.haml
+1
-1
app/views/projects/pipelines/_with_tabs.html.haml
app/views/projects/pipelines/_with_tabs.html.haml
+1
-1
spec/javascripts/fixtures/pipeline_graph.html.haml
spec/javascripts/fixtures/pipeline_graph.html.haml
+1
-1
spec/views/projects/pipelines/show.html.haml_spec.rb
spec/views/projects/pipelines/show.html.haml_spec.rb
+1
-1
No files found.
app/assets/javascripts/pipelines.js.es6
View file @
52e0c4ba
...
@@ -15,7 +15,9 @@
...
@@ -15,7 +15,9 @@
addMarginToBuildColumns() {
addMarginToBuildColumns() {
this.pipelineGraph = document.querySelector('.js-pipeline-graph');
this.pipelineGraph = document.querySelector('.js-pipeline-graph');
const secondChildBuildNodes = document.querySelector('.js-pipeline-graph').querySelectorAll('.build:nth-child(2)');
const secondChildBuildNodes = this.pipelineGraph.querySelectorAll('.build:nth-child(2)');
for (const buildNodeIndex in secondChildBuildNodes) {
for (const buildNodeIndex in secondChildBuildNodes) {
const buildNode = secondChildBuildNodes[buildNodeIndex];
const buildNode = secondChildBuildNodes[buildNodeIndex];
const firstChildBuildNode = buildNode.previousElementSibling;
const firstChildBuildNode = buildNode.previousElementSibling;
...
@@ -28,6 +30,7 @@
...
@@ -28,6 +30,7 @@
const columnBuilds = previousColumn.querySelectorAll('.build');
const columnBuilds = previousColumn.querySelectorAll('.build');
if (columnBuilds.length === 1) previousColumn.classList.add('no-margin');
if (columnBuilds.length === 1) previousColumn.classList.add('no-margin');
}
}
this.pipelineGraph.classList.remove('hidden');
this.pipelineGraph.classList.remove('hidden');
}
}
}
}
...
...
app/views/projects/ci/builds/_build_pipeline.html.haml
View file @
52e0c4ba
-
is_playable
=
subject
.
playable?
&&
can?
(
current_user
,
:update_build
,
@project
)
-
is_playable
=
subject
.
playable?
&&
can?
(
current_user
,
:update_build
,
@project
)
-
if
is_playable
-
if
is_playable
=
link_to
play_namespace_project_build_path
(
subject
.
project
.
namespace
,
subject
.
project
,
subject
,
return_to:
request
.
original_url
),
method: :post
,
data:
{
toggle:
'tooltip'
,
title:
"
#{
subject
.
name
}
- play"
,
container:
'.pipeline-graph'
,
placement:
'bottom'
}
do
=
link_to
play_namespace_project_build_path
(
subject
.
project
.
namespace
,
subject
.
project
,
subject
,
return_to:
request
.
original_url
),
method: :post
,
data:
{
toggle:
'tooltip'
,
title:
"
#{
subject
.
name
}
- play"
,
container:
'.
js-
pipeline-graph'
,
placement:
'bottom'
}
do
=
ci_icon_for_status
(
'play'
)
=
ci_icon_for_status
(
'play'
)
.ci-status-text
=
subject
.
name
.ci-status-text
=
subject
.
name
-
elsif
can?
(
current_user
,
:read_build
,
@project
)
-
elsif
can?
(
current_user
,
:read_build
,
@project
)
=
link_to
namespace_project_build_path
(
subject
.
project
.
namespace
,
subject
.
project
,
subject
),
data:
{
toggle:
'tooltip'
,
title:
"
#{
subject
.
name
}
-
#{
subject
.
status
}
"
,
container:
'.pipeline-graph'
,
placement:
'bottom'
}
do
=
link_to
namespace_project_build_path
(
subject
.
project
.
namespace
,
subject
.
project
,
subject
),
data:
{
toggle:
'tooltip'
,
title:
"
#{
subject
.
name
}
-
#{
subject
.
status
}
"
,
container:
'.
js-
pipeline-graph'
,
placement:
'bottom'
}
do
%span
{
class:
"ci-status-icon ci-status-icon-#{subject.status}"
}
%span
{
class:
"ci-status-icon ci-status-icon-#{subject.status}"
}
=
ci_icon_for_status
(
subject
.
status
)
=
ci_icon_for_status
(
subject
.
status
)
.ci-status-text
=
subject
.
name
.ci-status-text
=
subject
.
name
...
...
app/views/projects/generic_commit_statuses/_generic_commit_status_pipeline.html.haml
View file @
52e0c4ba
%a
{
data:
{
toggle:
'tooltip'
,
title:
"#{subject.name} - #{subject.status}"
,
container:
'.pipeline-graph'
,
placement:
'bottom'
}
}
%a
{
data:
{
toggle:
'tooltip'
,
title:
"#{subject.name} - #{subject.status}"
,
container:
'.
js-
pipeline-graph'
,
placement:
'bottom'
}
}
-
if
subject
.
target_url
-
if
subject
.
target_url
=
link_to
subject
.
target_url
do
=
link_to
subject
.
target_url
do
%span
{
class:
"ci-status-icon ci-status-icon-#{subject.status}"
}
%span
{
class:
"ci-status-icon ci-status-icon-#{subject.status}"
}
...
...
app/views/projects/pipelines/_with_tabs.html.haml
View file @
52e0c4ba
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
.tab-content
.tab-content
#js-tab-pipeline
.tab-pane
#js-tab-pipeline
.tab-pane
.build-content.middle-block
.build-content.middle-block
.js-pipeline-graph
=
render
"projects/pipelines/graph"
,
pipeline:
pipeline
=
render
"projects/pipelines/graph"
,
pipeline:
pipeline
#js-tab-builds
.tab-pane
#js-tab-builds
.tab-pane
...
...
spec/javascripts/fixtures/pipeline_graph.html.haml
View file @
52e0c4ba
%div
.pipeline-visualization.pipeline-graph
%div
.pipeline-visualization.
js-
pipeline-graph
%ul
.stage-column-list
%ul
.stage-column-list
%li
.stage-column
%li
.stage-column
.stage-name
.stage-name
...
...
spec/views/projects/pipelines/show.html.haml_spec.rb
View file @
52e0c4ba
...
@@ -28,7 +28,7 @@ describe 'projects/pipelines/show' do
...
@@ -28,7 +28,7 @@ describe 'projects/pipelines/show' do
it
'shows a graph with grouped stages'
do
it
'shows a graph with grouped stages'
do
render
render
expect
(
rendered
).
to
have_css
(
'.pipeline-graph'
)
expect
(
rendered
).
to
have_css
(
'.
js-
pipeline-graph'
)
expect
(
rendered
).
to
have_css
(
'.grouped-pipeline-dropdown'
)
expect
(
rendered
).
to
have_css
(
'.grouped-pipeline-dropdown'
)
# stages
# stages
...
...
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