Skip to content

Commit

Permalink
Added rounding for Memory/CPU ratios in Cluster textual helper
Browse files Browse the repository at this point in the history
  • Loading branch information
Jozef Zigmund committed Sep 5, 2016
1 parent 6e158f7 commit 5aa1e7c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/helpers/ems_cluster_helper/textual_summary.rb
Expand Up @@ -106,13 +106,14 @@ def textual_aggregate_vm_memory
{:label => _("Total Configured Memory"),
:value => _("%{number} (Virtual to Real Ratio: %{ratio})") %
{:number => number_to_human_size(@record.aggregate_vm_memory.megabytes, :precision => 2),
:ratio => @record.v_ram_vr_ratio}}
:ratio => @record.v_ram_vr_ratio.round(2)}}
end

def textual_aggregate_vm_cpus
{:label => _("Total Configured CPUs"),
:value => _("%{number} (Virtual to Real Ratio: %{ratio})") %
{:number => number_with_delimiter(@record.aggregate_vm_cpus), :ratio => @record.v_cpu_vr_ratio}}
{:number => number_with_delimiter(@record.aggregate_vm_cpus),
:ratio => @record.v_cpu_vr_ratio.round(2)}}
end

def textual_ems
Expand Down

0 comments on commit 5aa1e7c

Please sign in to comment.