summaryrefslogtreecommitdiff
path: root/app/presenters
diff options
context:
space:
mode:
authorMayra Cabrera <mcabrera@gitlab.com>2018-04-05 21:04:42 +0000
committerGrzegorz Bizon <grzegorz@gitlab.com>2018-04-05 21:04:42 +0000
commitd54cf868f81ca957c8322661b11e6755d9ea5a85 (patch)
tree39ef104a65a13fc41a5fcc3a79b9e1ec9c154d3d /app/presenters
parentdd271e246001a06609592eef109d154291305d32 (diff)
downloadgitlab-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.rb16
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