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
Boxiang Sun
gitlab-ce
Commits
1e8271b6
Commit
1e8271b6
authored
Dec 09, 2016
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adds new partial for graph icons.
Fix tests
parent
78757a0d
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
27 additions
and
8 deletions
+27
-8
app/views/ci/status/_graph_icon_with_name.html.haml
app/views/ci/status/_graph_icon_with_name.html.haml
+12
-0
app/views/ci/status/_graph_icon_with_name_and_action.html.haml
...iews/ci/status/_graph_icon_with_name_and_action.html.haml
+8
-0
app/views/ci/status/_icon_with_name.html.haml
app/views/ci/status/_icon_with_name.html.haml
+1
-2
app/views/ci/status/_icon_with_name_and_action.html.haml
app/views/ci/status/_icon_with_name_and_action.html.haml
+1
-1
app/views/projects/stage/_graph.html.haml
app/views/projects/stage/_graph.html.haml
+1
-1
app/views/projects/stage/_in_stage_group.html.haml
app/views/projects/stage/_in_stage_group.html.haml
+1
-1
spec/features/projects/pipelines/pipeline_spec.rb
spec/features/projects/pipelines/pipeline_spec.rb
+3
-3
No files found.
app/views/ci/status/_graph_icon_with_name.html.haml
0 → 100644
View file @
1e8271b6
-
detailed_status
=
subject
.
detailed_status
(
current_user
)
-
details_path
=
detailed_status
.
details_path
if
detailed_status
.
has_details?
-
klass
=
"ci-status-icon ci-status-icon-
#{
detailed_status
}
"
-
graph_status_icon
=
"
#{
detailed_status
.
icon
}
_graph"
-
if
details_path
=
link_to
details_path
,
class:
klass
,
data:
{
toggle:
'tooltip'
,
title:
"
#{
subject
.
name
}
-
#{
detailed_status
}
"
}
do
%span
{
class:
klass
}=
custom_icon
(
graph_status_icon
)
.ci-status-text
=
subject
.
name
-
else
%span
{
class:
klass
}=
custom_icon
(
graph_status_icon
)
.ci-status-text
=
subject
.
name
app/views/ci/status/_graph_icon_with_name_and_action.html.haml
0 → 100644
View file @
1e8271b6
=
render
"ci/status/graph_icon_with_name"
,
subject:
subject
-
detailed_status
=
subject
.
detailed_status
(
current_user
)
-
if
detailed_status
.
has_action?
=
link_to
detailed_status
.
action_path
,
method:
detailed_status
.
action_method
,
title:
"
#{
subject
.
name
}
:
#{
detailed_status
.
action_title
}
"
,
class:
'ci-action-icon-container'
do
%i
.ci-action-icon-wrapper
=
icon
(
detailed_status
.
action_icon
,
class:
detailed_status
.
action_class
)
app/views/ci/status/_icon_with_name.html.haml
View file @
1e8271b6
-
detailed_status
=
subject
.
detailed_status
(
current_user
)
-
detailed_status
=
subject
.
detailed_status
(
current_user
)
-
details_path
=
detailed_status
.
details_path
if
detailed_status
.
has_details?
-
details_path
=
detailed_status
.
details_path
if
detailed_status
.
has_details?
-
klass
=
"ci-status-icon ci-status-icon-
#{
detailed_status
}
"
-
klass
=
"ci-status-icon ci-status-icon-
#{
detailed_status
}
"
-
status_icon
=
graph
?
"
#{
detailed_status
.
icon
}
_graph"
:
detailed_status
.
icon
-
if
details_path
-
if
details_path
=
link_to
details_path
,
class:
klass
,
data:
{
toggle:
'tooltip'
,
title:
"
#{
subject
.
name
}
-
#{
detailed_status
}
"
}
do
=
link_to
details_path
,
class:
klass
,
data:
{
toggle:
'tooltip'
,
title:
"
#{
subject
.
name
}
-
#{
detailed_status
}
"
}
do
%span
{
class:
klass
}=
custom_icon
(
status_
icon
)
%span
{
class:
klass
}=
custom_icon
(
detailed_status
.
icon
)
.ci-status-text
=
subject
.
name
.ci-status-text
=
subject
.
name
-
else
-
else
%span
{
class:
klass
}=
custom_icon
(
detailed_status
.
icon
)
%span
{
class:
klass
}=
custom_icon
(
detailed_status
.
icon
)
...
...
app/views/ci/status/_icon_with_name_and_action.html.haml
View file @
1e8271b6
=
render
"ci/status/icon_with_name"
,
subject:
subject
,
graph:
true
=
render
"ci/status/icon_with_name"
,
subject:
subject
-
detailed_status
=
subject
.
detailed_status
(
current_user
)
-
detailed_status
=
subject
.
detailed_status
(
current_user
)
-
if
detailed_status
.
has_action?
-
if
detailed_status
.
has_action?
...
...
app/views/projects/stage/_graph.html.haml
View file @
1e8271b6
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
%li
.build
{
class:
(
"playable"
if
is_playable
)
}
%li
.build
{
class:
(
"playable"
if
is_playable
)
}
.curve
.curve
.build-content
.build-content
=
render
'ci/status/icon_with_name_and_action'
,
subject:
status
=
render
'ci/status/
graph_
icon_with_name_and_action'
,
subject:
status
-
else
-
else
%li
.build
%li
.build
.curve
.curve
...
...
app/views/projects/stage/_in_stage_group.html.haml
View file @
1e8271b6
...
@@ -10,4 +10,4 @@
...
@@ -10,4 +10,4 @@
%ul
%ul
-
subject
.
each
do
|
status
|
-
subject
.
each
do
|
status
|
%li
.dropdown-build
%li
.dropdown-build
=
render
'ci/status/icon_with_name_and_action'
,
subject:
status
=
render
'ci/status/
graph_
icon_with_name_and_action'
,
subject:
status
spec/features/projects/pipelines/pipeline_spec.rb
View file @
1e8271b6
...
@@ -40,7 +40,7 @@ describe "Pipelines", feature: true, js: true do
...
@@ -40,7 +40,7 @@ describe "Pipelines", feature: true, js: true do
context
'pipeline graph'
do
context
'pipeline graph'
do
it
'shows a running icon and a cancel action for the running build'
do
it
'shows a running icon and a cancel action for the running build'
do
page
.
within
(
'.stage-column:
first-child
.build:first-child'
)
do
page
.
within
(
'.stage-column:
nth-child(2)
.build:first-child'
)
do
expect
(
page
).
to
have_selector
(
'.ci-status-icon-running'
)
expect
(
page
).
to
have_selector
(
'.ci-status-icon-running'
)
expect
(
page
).
to
have_content
(
'deploy'
)
expect
(
page
).
to
have_content
(
'deploy'
)
expect
(
page
).
to
have_selector
(
'.ci-action-icon-container .fa-ban'
)
expect
(
page
).
to
have_selector
(
'.ci-action-icon-container .fa-ban'
)
...
@@ -56,7 +56,7 @@ describe "Pipelines", feature: true, js: true do
...
@@ -56,7 +56,7 @@ describe "Pipelines", feature: true, js: true do
end
end
it
'shows the failed icon and a retry action for the failed build'
do
it
'shows the failed icon and a retry action for the failed build'
do
page
.
within
(
'.stage-column:
nth-child(2)
.build'
)
do
page
.
within
(
'.stage-column:
first-child
.build'
)
do
expect
(
page
).
to
have_selector
(
'.ci-status-icon-failed'
)
expect
(
page
).
to
have_selector
(
'.ci-status-icon-failed'
)
expect
(
page
).
to
have_content
(
'test'
)
expect
(
page
).
to
have_content
(
'test'
)
expect
(
page
).
to
have_selector
(
'.ci-action-icon-container .fa-refresh'
)
expect
(
page
).
to
have_selector
(
'.ci-action-icon-container .fa-refresh'
)
...
@@ -64,7 +64,7 @@ describe "Pipelines", feature: true, js: true do
...
@@ -64,7 +64,7 @@ describe "Pipelines", feature: true, js: true do
end
end
it
'shows the skipped icon and a play action for the manual build'
do
it
'shows the skipped icon and a play action for the manual build'
do
page
.
within
(
'.stage-column:
first-child
.build:nth-child(2)'
)
do
page
.
within
(
'.stage-column:
nth-child(2)
.build:nth-child(2)'
)
do
expect
(
page
).
to
have_selector
(
'.ci-status-icon-skipped'
)
expect
(
page
).
to
have_selector
(
'.ci-status-icon-skipped'
)
expect
(
page
).
to
have_content
(
'manual'
)
expect
(
page
).
to
have_content
(
'manual'
)
expect
(
page
).
to
have_selector
(
'.ci-action-icon-container .ci-play-icon'
)
expect
(
page
).
to
have_selector
(
'.ci-action-icon-container .ci-play-icon'
)
...
...
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