Bug 1365664

Summary: Some floats do not have reasonable rounding
Product: Red Hat CloudForms Management Engine Reporter: Milan Falešník <mfalesni>
Component: UI - OPSAssignee: Jozef Zigmund <jzigmund>
Status: CLOSED ERRATA QA Contact: Matouš Mojžíš <mmojzis>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.6.0CC: dajohnso, hkataria, jhardy, mpovolny, obarenbo, simaishi
Target Milestone: GA   
Target Release: 5.7.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: general:ui
Fixed In Version: 5.7.0.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-01-04 12:59:28 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: Bug
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: CFME Core Target Upstream Version:
Embargoed:

Description Milan Falešník 2016-08-09 19:25:01 UTC
Description of problem:
Seeing some numeric values in the summary of clusters, they have too many unnecessary decimal places.

Version-Release number of selected component (if applicable):
5.6.1, but I believe it is common in all versions

How reproducible:
when you have good numbers

Steps to Reproduce:
1. Check eg. Cluster - open a summary of some cluster
2. Look at numeric values

Actual results:

In my env, I am getting something like this

Totals for VMs
Total Configured Memory	1.47 TB (Virtual to Real Ratio: 3.3000000000000003)
Total Configured CPUs	741 (Virtual to Real Ratio: 20.6)

CPUs value is okay, but the decimal places for the memory are useless and just waste space.

Expected results:
Values are rounded to a couple of decimal places (2 or 3).


Additional info:

Comment 2 Harpreet Kataria 2016-08-29 19:23:06 UTC
Jozef,

Can you look into this, maybe we are not using correct number helper method here.

~Harpreet

Comment 4 CFME Bot 2016-09-05 19:35:47 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/5aa1e7c9366fb8d0b635ab36545c7c863c45721a

commit 5aa1e7c9366fb8d0b635ab36545c7c863c45721a
Author:     Jozef Zigmund <jzigmund>
AuthorDate: Mon Sep 5 14:05:51 2016 +0200
Commit:     Jozef Zigmund <jzigmund>
CommitDate: Mon Sep 5 14:31:50 2016 +0200

    Added rounding for Memory/CPU ratios in Cluster textual helper
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1365664

 app/helpers/ems_cluster_helper/textual_summary.rb | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comment 5 Matouš Mojžíš 2016-10-05 08:44:25 UTC
Verified in 5.7.0.3. Floats are rounded reasonably.

Comment 7 errata-xmlrpc 2017-01-04 12:59:28 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2017-0012.html