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
Léo-Paul Géneau
gitlab-ce
Commits
b64cf840
Commit
b64cf840
authored
Dec 08, 2016
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Renders new icons for the pipeline graph
parent
94792273
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
25 additions
and
46 deletions
+25
-46
app/helpers/ci_status_helper.rb
app/helpers/ci_status_helper.rb
+22
-44
app/views/ci/status/_icon_with_name.html.haml
app/views/ci/status/_icon_with_name.html.haml
+2
-1
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/shared/icons/_icon_status_canceled_graph.svg
app/views/shared/icons/_icon_status_canceled_graph.svg
+0
-0
app/views/shared/icons/_icon_status_created_graph.svg
app/views/shared/icons/_icon_status_created_graph.svg
+0
-0
app/views/shared/icons/_icon_status_failed_graph.svg
app/views/shared/icons/_icon_status_failed_graph.svg
+0
-0
app/views/shared/icons/_icon_status_manual_graph.svg
app/views/shared/icons/_icon_status_manual_graph.svg
+0
-0
app/views/shared/icons/_icon_status_pending_graph.svg
app/views/shared/icons/_icon_status_pending_graph.svg
+0
-0
app/views/shared/icons/_icon_status_running_graph.svg
app/views/shared/icons/_icon_status_running_graph.svg
+0
-0
app/views/shared/icons/_icon_status_skipped_graph.svg
app/views/shared/icons/_icon_status_skipped_graph.svg
+0
-0
app/views/shared/icons/_icon_status_success_graph.svg
app/views/shared/icons/_icon_status_success_graph.svg
+0
-0
app/views/shared/icons/_icon_status_warning_graph.svg
app/views/shared/icons/_icon_status_warning_graph.svg
+0
-0
No files found.
app/helpers/ci_status_helper.rb
View file @
b64cf840
...
@@ -25,54 +25,32 @@ module CiStatusHelper
...
@@ -25,54 +25,32 @@ module CiStatusHelper
status
.
humanize
status
.
humanize
end
end
def
ci_icon_for_status
(
status
,
graph:
nil
)
def
ci_icon_for_status
(
status
)
if
detailed_status?
(
status
)
if
detailed_status?
(
status
)
return
custom_icon
(
status
.
icon
)
return
custom_icon
(
status
.
icon
)
end
end
if
graph
icon_name
=
icon_name
=
case
status
case
status
when
'success'
when
'success'
'icon_status_success'
'icon_graph_job_success'
when
'success_with_warnings'
when
'success_with_warnings'
'icon_status_warning'
'icon_graph_job_warning'
when
'failed'
when
'failed'
'icon_status_failed'
'icon_graph_job_failed'
when
'pending'
when
'pending'
'icon_status_pending'
'icon_graph_job_pending'
when
'running'
when
'running'
'icon_status_running'
'icon_graph_job_running'
when
'play'
when
'created'
'icon_play'
'icon_graph_job_created'
when
'created'
when
'skipped'
'icon_status_created'
'icon_graph_job_skipped'
when
'skipped'
else
'icon_status_skipped'
'icon_graph_job_canceled'
else
end
'icon_status_canceled'
else
end
icon_name
=
case
status
when
'success'
'icon_status_success'
when
'success_with_warnings'
'icon_status_warning'
when
'failed'
'icon_status_failed'
when
'pending'
'icon_status_pending'
when
'running'
'icon_status_running'
when
'play'
'icon_play'
when
'created'
'icon_status_created'
when
'skipped'
'icon_status_skipped'
else
'icon_status_canceled'
end
end
custom_icon
(
icon_name
)
custom_icon
(
icon_name
)
end
end
...
...
app/views/ci/status/_icon_with_name.html.haml
View file @
b64cf840
-
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
(
detailed_status
.
icon
)
%span
{
class:
klass
}=
custom_icon
(
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 @
b64cf840
=
render
"ci/status/icon_with_name"
,
subject:
subject
=
render
"ci/status/icon_with_name"
,
subject:
subject
,
graph:
true
-
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/shared/icons/_icon_
graph_job_cancelled
.svg
→
app/views/shared/icons/_icon_
status_canceled_graph
.svg
View file @
b64cf840
File moved
app/views/shared/icons/_icon_
graph_job_created
.svg
→
app/views/shared/icons/_icon_
status_created_graph
.svg
View file @
b64cf840
File moved
app/views/shared/icons/_icon_
graph_job_failed
.svg
→
app/views/shared/icons/_icon_
status_failed_graph
.svg
View file @
b64cf840
File moved
app/views/shared/icons/_icon_
graph_job_manual
.svg
→
app/views/shared/icons/_icon_
status_manual_graph
.svg
View file @
b64cf840
File moved
app/views/shared/icons/_icon_
graph_job_pending
.svg
→
app/views/shared/icons/_icon_
status_pending_graph
.svg
View file @
b64cf840
File moved
app/views/shared/icons/_icon_
graph_job_running
.svg
→
app/views/shared/icons/_icon_
status_running_graph
.svg
View file @
b64cf840
File moved
app/views/shared/icons/_icon_
graph_job_skipped
.svg
→
app/views/shared/icons/_icon_
status_skipped_graph
.svg
View file @
b64cf840
File moved
app/views/shared/icons/_icon_
graph_job_success
.svg
→
app/views/shared/icons/_icon_
status_success_graph
.svg
View file @
b64cf840
File moved
app/views/shared/icons/_icon_
graph_job_warning
.svg
→
app/views/shared/icons/_icon_
status_warning_graph
.svg
View file @
b64cf840
File moved
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