summaryrefslogtreecommitdiff
path: root/openstack_dashboard
diff options
context:
space:
mode:
authorDoug Fish <drfish@us.ibm.com>2015-04-14 15:05:41 -0500
committerSean Dague <sean@dague.net>2015-04-23 23:25:13 +0000
commit89d9f46750a7506d6910ae792c14ad47feaf53c3 (patch)
treed5632b986930c859d9bf40d72c0142972d96ec79 /openstack_dashboard
parentbd9a28699b8a3b6d681919d78b826564da941ce7 (diff)
downloadhorizon-89d9f46750a7506d6910ae792c14ad47feaf53c3.tar.gz
Format numbers in a locale sensitive manner
Create Volume, Create Snapshot, Extend Volume and Flavors and Quota all fail to format numbers in a locale sensitive manner. This patch changes the code to use the intcomma filter before quota, instead of after. Once quota has added text the number can no longer be formatted. (Pulled from gate, can't pass checks) Change-Id: Id9749d9b25d93185b917708b85471e6f765033e2 Closes-Bug: 1314801 (cherry picked from commit 0872b4a40334a6df863f88e5aa56b31363aff28e)
Diffstat (limited to 'openstack_dashboard')
-rw-r--r--openstack_dashboard/dashboards/project/instances/templates/instances/_flavors_and_quotas.html6
-rw-r--r--openstack_dashboard/dashboards/project/volumes/templates/volumes/volumes/_extend_limits.html2
-rw-r--r--openstack_dashboard/dashboards/project/volumes/templates/volumes/volumes/_limits.html4
-rw-r--r--openstack_dashboard/dashboards/project/volumes/templates/volumes/volumes/_snapshot_limits.html2
4 files changed, 7 insertions, 7 deletions
diff --git a/openstack_dashboard/dashboards/project/instances/templates/instances/_flavors_and_quotas.html b/openstack_dashboard/dashboards/project/instances/templates/instances/_flavors_and_quotas.html
index 8c3416f0d..e14d15933 100644
--- a/openstack_dashboard/dashboards/project/instances/templates/instances/_flavors_and_quotas.html
+++ b/openstack_dashboard/dashboards/project/instances/templates/instances/_flavors_and_quotas.html
@@ -19,21 +19,21 @@
<h4>{% trans "Project Limits" %}</h4>
<div class="quota_title clearfix">
<strong>{% trans "Number of Instances" %}</strong>
- {% blocktrans with used=usages.totalInstancesUsed|intcomma quota=usages.maxTotalInstances|quotainf|intcomma %}<p>{{ used }} of {{ quota }} Used</p>{% endblocktrans %}
+ {% blocktrans with used=usages.totalInstancesUsed|intcomma quota=usages.maxTotalInstances|intcomma|quotainf %}<p>{{ used }} of {{ quota }} Used</p>{% endblocktrans %}
</div>
<div id="{{ resize_instance|yesno:"quota_resize_instance,quota_instances" }}" class="quota_bar" data-progress-indicator-flavor data-quota-limit="{{ usages.maxTotalInstances }}" data-quota-used="{{ usages.totalInstancesUsed }}">
</div>
<div class="quota_title clearfix">
<strong>{% trans "Number of VCPUs" %}</strong>
- {% blocktrans with used=usages.totalCoresUsed|intcomma quota=usages.maxTotalCores|quotainf|intcomma %}<p>{{ used }} of {{ quota }} Used</p>{% endblocktrans %}
+ {% blocktrans with used=usages.totalCoresUsed|intcomma quota=usages.maxTotalCores|intcomma|quotainf %}<p>{{ used }} of {{ quota }} Used</p>{% endblocktrans %}
</div>
<div id="quota_vcpus" class="quota_bar" data-progress-indicator-flavor data-quota-limit="{{ usages.maxTotalCores }}" data-quota-used="{{ usages.totalCoresUsed }}">
</div>
<div class="quota_title clearfix">
<strong>{% trans "Total RAM" %}</strong>
- {% blocktrans with used=usages.totalRAMUsed|intcomma quota=usages.maxTotalRAMSize|quotainf|intcomma %}<p>{{ used }} of {{ quota }} MB Used</p>{% endblocktrans %}
+ {% blocktrans with used=usages.totalRAMUsed|intcomma quota=usages.maxTotalRAMSize|intcomma|quotainf %}<p>{{ used }} of {{ quota }} MB Used</p>{% endblocktrans %}
</div>
<div id="quota_ram" data-progress-indicator-flavor data-quota-limit="{{ usages.maxTotalRAMSize }}" data-quota-used="{{ usages.totalRAMUsed }}" class="quota_bar">
</div>
diff --git a/openstack_dashboard/dashboards/project/volumes/templates/volumes/volumes/_extend_limits.html b/openstack_dashboard/dashboards/project/volumes/templates/volumes/volumes/_extend_limits.html
index 6ec6a03ea..815ceeba8 100644
--- a/openstack_dashboard/dashboards/project/volumes/templates/volumes/volumes/_extend_limits.html
+++ b/openstack_dashboard/dashboards/project/volumes/templates/volumes/volumes/_extend_limits.html
@@ -8,7 +8,7 @@
<div class="quota_title clearfix">
<strong>{% trans "Total Gigabytes" %} <span>({{ usages.gigabytesUsed|intcomma }} {% trans "GB" %})</span></strong>
- <p>{{ usages.maxTotalVolumeGigabytes|quota:_("GB")|intcomma }}</p>
+ <p>{{ usages.maxTotalVolumeGigabytes|intcomma|quota:_("GB") }}</p>
</div>
<div id="quota_size" data-progress-indicator-for="id_new_size" data-quota-limit="{{ usages.maxTotalVolumeGigabytes }}" data-quota-used="{{ usages.gigabytesUsed }}" class="quota_bar">
diff --git a/openstack_dashboard/dashboards/project/volumes/templates/volumes/volumes/_limits.html b/openstack_dashboard/dashboards/project/volumes/templates/volumes/volumes/_limits.html
index 7df18735e..27ad12306 100644
--- a/openstack_dashboard/dashboards/project/volumes/templates/volumes/volumes/_limits.html
+++ b/openstack_dashboard/dashboards/project/volumes/templates/volumes/volumes/_limits.html
@@ -8,7 +8,7 @@
<div class="quota_title clearfix">
<strong>{% trans "Total Gigabytes" %} <span>({% block gigabytes_used %}{{ usages.gigabytesUsed|intcomma }}{% endblock %} {% trans "GB" %})</span></strong>
- <p>{{ usages.maxTotalVolumeGigabytes|quota:_("GB")|intcomma }}</p>
+ <p>{{ usages.maxTotalVolumeGigabytes|intcomma|quota:_("GB") }}</p>
</div>
<div id="quota_size" data-progress-indicator-for="id_size" data-quota-limit="{{ usages.maxTotalVolumeGigabytes }}" data-quota-used={% block gigabytes_used_progress %}"{{ usages.gigabytesUsed }}"{% endblock %} class="quota_bar">
@@ -16,7 +16,7 @@
<div class="quota_title clearfix">
<strong>{% block type_title %}{% trans "Number of Volumes" %}{% endblock %} <span>({% block used %}{{ usages.volumesUsed|intcomma }}{% endblock %})</span></strong>
- <p>{% block total %}{{ usages.maxTotalVolumes|quota|intcomma }}{% endblock %}</p>
+ <p>{% block total %}{{ usages.maxTotalVolumes|intcomma|quota }}{% endblock %}</p>
</div>
<div id={% block type_id %}"quota_volumes"{% endblock %} data-progress-indicator-step-by="1" data-quota-limit={% block total_progress %}"{{ usages.maxTotalVolumes }}"{% endblock %} data-quota-used={% block used_progress %}"{{ usages.volumesUsed }}"{% endblock %} class="quota_bar">
diff --git a/openstack_dashboard/dashboards/project/volumes/templates/volumes/volumes/_snapshot_limits.html b/openstack_dashboard/dashboards/project/volumes/templates/volumes/volumes/_snapshot_limits.html
index cc8e14f67..1f3c5323f 100644
--- a/openstack_dashboard/dashboards/project/volumes/templates/volumes/volumes/_snapshot_limits.html
+++ b/openstack_dashboard/dashboards/project/volumes/templates/volumes/volumes/_snapshot_limits.html
@@ -26,7 +26,7 @@
{% endblock %}
{% block total %}
- {{ usages.maxTotalSnapshots|quota|intcomma }}
+ {{ usages.maxTotalSnapshots|intcomma|quota }}
{% endblock %}
{% block type_id %}