diff options
author | Mayra Cabrera <mcabrera@gitlab.com> | 2018-04-05 21:04:42 +0000 |
---|---|---|
committer | Grzegorz Bizon <grzegorz@gitlab.com> | 2018-04-05 21:04:42 +0000 |
commit | d54cf868f81ca957c8322661b11e6755d9ea5a85 (patch) | |
tree | 39ef104a65a13fc41a5fcc3a79b9e1ec9c154d3d /app/presenters | |
parent | dd271e246001a06609592eef109d154291305d32 (diff) | |
download | gitlab-ce-d54cf868f81ca957c8322661b11e6755d9ea5a85.tar.gz |
Resolve "Show `failure_reason` and upgrade tooltips of jobs"
Diffstat (limited to 'app/presenters')
-rw-r--r-- | app/presenters/ci/build_presenter.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/app/presenters/ci/build_presenter.rb b/app/presenters/ci/build_presenter.rb index 255475e1fe6..9afebda19be 100644 --- a/app/presenters/ci/build_presenter.rb +++ b/app/presenters/ci/build_presenter.rb @@ -15,6 +15,8 @@ module Ci def status_title if auto_canceled? "Job is redundant and is auto-canceled by Pipeline ##{auto_canceled_by_id}" + else + tooltip_for_badge end end @@ -28,5 +30,19 @@ module Ci trigger_request.user_variables end end + + def tooltip_message + "#{subject.name} - #{detailed_status.status_tooltip}" + end + + private + + def tooltip_for_badge + detailed_status.badge_tooltip.capitalize + end + + def detailed_status + @detailed_status ||= subject.detailed_status(user) + end end end |