BigW Consortium Gitlab

Commit c8b2aa8d by Grzegorz Bizon

Simplify ci status helper with detailed status

parent 40a11807
...@@ -36,30 +36,30 @@ module CiStatusHelper ...@@ -36,30 +36,30 @@ module CiStatusHelper
end end
def ci_icon_for_status(status) def ci_icon_for_status(status)
if detailed_status?(status)
return custom_icon(status.icon)
end
icon_name = icon_name =
if detailed_status?(status) case status
status.icon 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 else
case status 'icon_status_canceled'
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 end
custom_icon(icon_name) custom_icon(icon_name)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment