Dashboard: be more precise in percentage
to avoid to display 'done' with few jobs remaining
This commit is contained in:
parent
4b77ae843d
commit
20a8ee0745
@ -96,7 +96,7 @@ class Fetcher(object):
|
||||
unresolvable = 0
|
||||
if building + failed + succeeded == 0:
|
||||
return {'building': -1}
|
||||
return { 'building': 1000 - int(building * 1000 / (building + failed + succeeded + broken)),
|
||||
return { 'building': 10000 - int(building * 10000 / (building + failed + succeeded + broken)),
|
||||
'failed': failed,
|
||||
'broken': broken,
|
||||
'unresolvable': unresolvable }
|
||||
|
@ -1,7 +1,7 @@
|
||||
{% set progress = project.build_summary(repository) %}
|
||||
{% if progress['building'] >= 0 %}
|
||||
{% if progress['building'] < 1000 %}
|
||||
{{ progress['building'] / 10}}% done
|
||||
{% if progress['building'] < 10000 %}
|
||||
{{ progress['building'] / 100}}% done
|
||||
{% else %}
|
||||
done
|
||||
{% endif %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user