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
ba6f263d
Commit
ba6f263d
authored
May 11, 2017
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve ci action icon function
parent
2e92c5c4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
18 deletions
+13
-18
app/assets/javascripts/vue_shared/ci_action_icons.js
app/assets/javascripts/vue_shared/ci_action_icons.js
+13
-18
No files found.
app/assets/javascripts/vue_shared/ci_action_icons.js
View file @
ba6f263d
...
@@ -3,24 +3,19 @@ import retrySVG from 'icons/_icon_action_retry.svg';
...
@@ -3,24 +3,19 @@ import retrySVG from 'icons/_icon_action_retry.svg';
import
playSVG
from
'
icons/_icon_action_play.svg
'
;
import
playSVG
from
'
icons/_icon_action_play.svg
'
;
import
stopSVG
from
'
icons/_icon_action_stop.svg
'
;
import
stopSVG
from
'
icons/_icon_action_stop.svg
'
;
/**
* For the provided action returns the respective SVG
*
* @param {String} action
* @return {SVG|String}
*/
export
default
function
getActionIcon
(
action
)
{
export
default
function
getActionIcon
(
action
)
{
let
icon
;
const
icons
=
{
switch
(
action
)
{
icon_action_cancel
:
cancelSVG
,
case
'
icon_action_cancel
'
:
icon_action_play
:
playSVG
,
icon
=
cancelSVG
;
icon_action_retry
:
retrySVG
,
break
;
icon_action_stop
:
stopSVG
,
case
'
icon_action_retry
'
:
};
icon
=
retrySVG
;
break
;
case
'
icon_action_play
'
:
icon
=
playSVG
;
break
;
case
'
icon_action_stop
'
:
icon
=
stopSVG
;
break
;
default
:
icon
=
''
;
}
return
icon
;
return
icon
s
[
action
]
||
''
;
}
}
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