Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZ.J. van de Weg <git@zjvandeweg.nl>2017-06-23 13:18:52 +0300
committerZ.J. van de Weg <git@zjvandeweg.nl>2017-06-23 15:50:03 +0300
commit9b2ae90d2cac9184f9c66051e8040559771dac98 (patch)
tree08b0ac6af5e8c9ab599b40f7c9356f0fd1d2b15a /app/helpers/graph_helper.rb
parent13d39971f33e4064bd5c8da1865cc874e1005e52 (diff)
Remove references to build in pipeline charts
Being the good boyscouts, but mainly because of [the comment in the review](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/12378#note_33302115) the words used for classes and variables are changed to not use builds anymore.
Diffstat (limited to 'app/helpers/graph_helper.rb')
-rw-r--r--app/helpers/graph_helper.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/helpers/graph_helper.rb b/app/helpers/graph_helper.rb
index bb7bdd82281..2e9b72e9613 100644
--- a/app/helpers/graph_helper.rb
+++ b/app/helpers/graph_helper.rb
@@ -17,10 +17,10 @@ module GraphHelper
ids.zip(parent_spaces)
end
- def success_ratio(success:, failed:)
- return 100 if failed.zero?
+ def success_ratio(counts)
+ return 100 if counts[:failed].zero?
- ratio = (success.to_f / (success + failed)) * 100
+ ratio = (counts[:success].to_f / (counts[:success] + counts[:failed])) * 100
ratio.to_i
end
end