diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-11-07 17:09:53 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-11-07 17:09:53 +0200 |
commit | c453de895878df7f14f0cc1196d6c6e8b1644eca (patch) | |
tree | f2f66754a28468a9a943e185b1b18a04fe8ec34b /app/models/commit.rb | |
parent | 8323ab8a5b4ea14a63d6b8e7b99588eab690ef1a (diff) | |
download | gitlab-ci-c453de895878df7f14f0cc1196d6c6e8b1644eca.tar.gz |
Improve commits page UI/UX
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/models/commit.rb')
-rw-r--r-- | app/models/commit.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/models/commit.rb b/app/models/commit.rb index 3d005b1..f698e39 100644 --- a/app/models/commit.rb +++ b/app/models/commit.rb @@ -109,6 +109,10 @@ class Commit < ActiveRecord::Base end end + def retried_builds + @retried_builds ||= (builds - builds_without_retry) + end + def status if success? 'success' @@ -152,7 +156,7 @@ class Commit < ActiveRecord::Base end def duration - @duration ||= builds.select(&:duration).sum(&:duration).to_i + @duration ||= builds_without_retry.select(&:duration).sum(&:duration).to_i end def finished_at |