Show up to 1 decimal place for instance detail RAM

The current instance details page rounds the amount of RAM to the
nearest integer, which at GB and TB levels does not provide enough
fidelity to be useful, this patch allows the page to display up to one
decimal place if it is required, by changing the filter applied in the
template from mbformat to mb_float_format.

Change-Id: Ida97e83285b64ac6b08260f78f31c69dc37009b0
Closes-Bug: 1384446
This commit is contained in:
Sam Betts 2014-11-27 10:35:06 +00:00
parent ec012c6943
commit 12f57f65a8
1 changed files with 1 additions and 1 deletions

View File

@ -47,7 +47,7 @@
{% if instance.full_flavor %}
<dd>{{ instance.full_flavor.name }}</dd>
<dt>{% trans "RAM" %}</dt>
<dd>{{ instance.full_flavor.ram|mbformat }}</dd>
<dd>{{ instance.full_flavor.ram|mb_float_format }}</dd>
<dt>{% trans "VCPUs" %}</dt>
<dd>{{ instance.full_flavor.vcpus }} {% trans "VCPU" %}</dd>
<dt>{% trans "Disk" %}</dt>