diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-12-02 16:59:25 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-12-02 16:59:25 +0300 |
commit | e718bab9e16be3b1bbdcf8dada5825b7e595682d (patch) | |
tree | 8a280cf6411c9fab23210a92309cac20bc797de2 /app/helpers/ci_status_helper.rb | |
parent | 6789bd25ef8686e47ea2fd047e737aefd5033526 (diff) |
"CI build passed", not "CI build success"
Diffstat (limited to 'app/helpers/ci_status_helper.rb')
-rw-r--r-- | app/helpers/ci_status_helper.rb | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/app/helpers/ci_status_helper.rb b/app/helpers/ci_status_helper.rb index 0ecf77bb45e..70f8c9ae221 100644 --- a/app/helpers/ci_status_helper.rb +++ b/app/helpers/ci_status_helper.rb @@ -8,6 +8,10 @@ module CiStatusHelper ci_icon_for_status(ci_commit.status) end + def ci_status_label(ci_commit) + ci_label_for_status(ci_commit.status) + end + def ci_status_color(ci_commit) case ci_commit.status when 'success' @@ -23,7 +27,15 @@ module CiStatusHelper def ci_status_with_icon(status) content_tag :span, class: "ci-status ci-#{status}" do - ci_icon_for_status(status) + ' '.html_safe + status + ci_icon_for_status(status) + ' '.html_safe + ci_label_for_status(status) + end + end + + def ci_label_for_status(status) + if status == 'success' + 'passed' + else + status end end @@ -46,7 +58,7 @@ module CiStatusHelper def render_ci_status(ci_commit) link_to ci_status_path(ci_commit), class: "c#{ci_status_color(ci_commit)}", - title: "Build status: #{ci_commit.status}", + title: "Build status: #{ci_status_label(ci_commit)}", data: { toggle: 'tooltip', placement: 'left' } do ci_status_icon(ci_commit) end |