[ARVADOS] updated: 52f0c22a42444d1db0648870ae42f918bd3f63c1
git at public.curoverse.com
git at public.curoverse.com
Mon Sep 22 14:27:56 EDT 2014
Summary of changes:
.../app/views/application/_job_progress.html.erb | 21 +++------------------
1 file changed, 3 insertions(+), 18 deletions(-)
via 52f0c22a42444d1db0648870ae42f918bd3f63c1 (commit)
from 5ee5b90b5d7554d049c9071ed7bb812d1b7ca74a (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 52f0c22a42444d1db0648870ae42f918bd3f63c1
Author: radhika <radhika at curoverse.com>
Date: Mon Sep 22 14:26:46 2014 -0400
3381: do not convert percentages into integers by using ceil. When we do this, we are sometimes ending up with percentage sum of > 100%.
diff --git a/apps/workbench/app/views/application/_job_progress.html.erb b/apps/workbench/app/views/application/_job_progress.html.erb
index f942c44..49ba39d 100644
--- a/apps/workbench/app/views/application/_job_progress.html.erb
+++ b/apps/workbench/app/views/application/_job_progress.html.erb
@@ -21,24 +21,9 @@
if defined? scaleby
percent_total_tasks *= scaleby
end
- failed_percent = (failed * percent_total_tasks).ceil
- success_percent = (done * percent_total_tasks).ceil
- running_percent = (running * percent_total_tasks).ceil
-
- # We used ceil instead of round to compute percents to handle the situation
- # where one of them is much larger than the other(s). However, this may
- # have resulted in total percent > 100, hence we need to account for that.
- if (failed_percent + success_percent + running_percent) > 100
- overflow = failed_percent + success_percent + running_percent - 100
- # decrease the biggest by the overlow amount
- if (failed_percent > success_percent) && (failed_percent > running_percent)
- failed_percent -= overflow
- elsif (success_percent > failed_percent) && (success_percent > running_percent)
- success_percent -= overflow
- else
- running_percent -= overflow
- end
- end
+ failed_percent = failed * percent_total_tasks
+ success_percent = done * percent_total_tasks
+ running_percent = running * percent_total_tasks
end
%>
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list