Bug 660633

Summary: Division by 3 (three)
Product: [Retired] Beaker Reporter: Jan Sarenik <jsarenik>
Component: web UIAssignee: Dan Callaghan <dcallagh>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: low    
Version: 0.5CC: asaha, bpeck, dcallagh, jneedle, llim, mcsontos, rmancy, xjia
Target Milestone: 0.15   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: UX
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-10-03 02:30:00 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jan Sarenik 2010-12-07 12:32:22 UTC
When there are three jobs (e.g. install, test, reservesys),
the Progress bar in "My Jobs" is missing one little peace most-right.
Of course the status is "Completed", but it would be much
better if one could read it from the Progress bar itself.

Version - 0.5.63

How reproducible: 100%

Steps to Reproduce:
1. Create a new job containing three tasks, e.g.
   --------------------------------------------------------------
   bkr workflow-simple \
        --whiteboard="Cumin Basic Test Automated" \
        --arch=i386 \
        --arch=x86_64 \
        --distro=RHEL5-Server-U5 \
        --family=RedHatEnterpriseLinuxServer5 \
        --task=/distribution/MRG/Messaging/mgmt_cumin_basic \
        --task=/distribution/reservesys
   --------------------------------------------------------------
2. Wait until it ends
3. Click "My Jobs"
  
Actual results: There is a missing one-pixel slice in the Progress bar.

Expected results: All the area should be filled with some colors if the
  job is not running anymore.

Comment 1 Jan Sarenik 2010-12-07 14:04:59 UTC
I meant "one piece" of course :-)

Comment 4 Dan Callaghan 2013-09-17 06:16:56 UTC
We can do round() in the TaskBase.progress_bar method, rather than just int() truncation. That should solve most cases (certainly the 1/3 case) although I suspect it still won't guarantee that the rounded percentages will sum to 100 due to floating point representation inaccuracy.

http://gerrit.beaker-project.org/2264

Comment 8 Amit Saha 2013-09-19 00:51:53 UTC
Verified. A job with three tasks two successful jobs show the width as 67 + 33.
Earlier, it would be showing 66 + 33.

Comment 9 Nick Coghlan 2013-10-03 02:30:00 UTC
Beaker 0.15 has been released.