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:
Jozef, Can you look into this, maybe we are not using correct number helper method here. ~Harpreet
https://github.com/ManageIQ/manageiq/pull/11008
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(-)
Verified in 5.7.0.3. Floats are rounded reasonably.
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