From f219a6421a5c56ddd37665270ea83921c5c0b959 Mon Sep 17 00:00:00 2001 From: Tatiana Ovchinnikova Date: Mon, 31 Jan 2022 13:59:19 -0600 Subject: Fix Project Limits for resize instance dialog Resize instance dialog should use proper calls for quota and usage. This patch fixes that. Change-Id: Ied6fd4ad69b38a721b23700c98344e0edf14771b (cherry picked from commit e2bb7d833526e3ea6117cb2a5d58cbf90548c6da) --- .../templates/instances/_flavors_and_quotas.html | 40 +++++++++++----------- 1 file changed, 20 insertions(+), 20 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 1f4b272a4..99a6e321b 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 @@ -20,7 +20,7 @@
{% trans "Number of Instances" %} - {% blocktrans trimmed with used=usages.instances.used|intcomma quota=usages.instances.quota|intcomma|quotainf %} + {% blocktrans trimmed with used=usages.totalInstancesUsed|intcomma quota=usages.maxTotalInstances|intcomma|quotainf %} {{ used }} of {{ quota }} Used {% endblocktrans %} @@ -30,9 +30,9 @@
- {% widthratio usages.instances.used usages.instances.quota 100 as instance_percent %} + data-quota-limit="{{ usages.maxTotalInstances }}" + data-quota-used="{{ usages.totalInstancesUsed }}"> + {% widthratio usages.totalInstancesUsed usages.maxTotalInstances 100 as instance_percent %} {% bs_progress_bar instance_percent 0 %}
{{ endminifyspace }} @@ -40,7 +40,7 @@
{% trans "Number of VCPUs" %} - {% blocktrans trimmed with used=usages.cores.used|intcomma quota=usages.cores.quota|intcomma|quotainf %} + {% blocktrans trimmed with used=usages.totalCoresUsed|intcomma quota=usages.maxTotalCores|intcomma|quotainf %} {{ used }} of {{ quota }} Used {% endblocktrans %} @@ -50,9 +50,9 @@
- {% widthratio usages.cores.used usages.cores.quota 100 as vcpu_percent %} + data-quota-limit="{{ usages.maxTotalCores }}" + data-quota-used="{{ usages.totalCoresUsed }}"> + {% widthratio usages.totalCoresUsed usages.maxTotalCores 100 as vcpu_percent %} {% bs_progress_bar vcpu_percent 0 %}
{{ endminifyspace }} @@ -60,7 +60,7 @@
{% trans "Total RAM" %} - {% blocktrans trimmed with used=usages.ram.used|intcomma quota=usages.ram.quota|intcomma|quotainf %} + {% blocktrans trimmed with used=usages.totalRAMUsed|intcomma quota=usages.maxTotalRAMSize|intcomma|quotainf %} {{ used }} of {{ quota }} MB Used {% endblocktrans %} @@ -70,9 +70,9 @@
- {% widthratio usages.ram.used usages.ram.quota 100 as vcpu_percent %} + data-quota-limit="{{ usages.maxTotalRAMSize }}" + data-quota-used="{{ usages.totalRAMUsed }}"> + {% widthratio usages.totalRAMUsed usages.maxTotalRAMSize 100 as vcpu_percent %} {% bs_progress_bar vcpu_percent 0 %}
{{ endminifyspace }} @@ -81,7 +81,7 @@
{% trans "Number of Volumes" %} - {% blocktrans with used=usages.volumes.used|intcomma quota=usages.volumes.quota|intcomma|quotainf %} + {% blocktrans with used=usages.totalVolumesUsed|intcomma quota=usages.maxTotalVolumes|intcomma|quotainf %} {{ used }} of {{ quota }} Used {% endblocktrans %} @@ -89,16 +89,16 @@
- {% widthratio usages.volumes.used usages.volumes.quota 100 as volume_percent %} + data-quota-limit="{{ usages.maxTotalVolumes }}" + data-quota-used="{{ usages.totalVolumesUsed }}"> + {% widthratio usages.totalVolumesUsed usages.maxTotalVolumes 100 as volume_percent %} {% bs_progress_bar volume_percent 0 %}
{% trans "Total Volume Storage" %} - {% blocktrans with used=usages.gigabytes.used|intcomma quota=usages.gigabytes.quota|intcomma|quotainf %} + {% blocktrans with used=usages.totalGigabytesUsed|intcomma quota=usages.maxTotalVolumeGigabytes|intcomma|quotainf %} {{ used }} of {{ quota }} GiB Used {% endblocktrans %} @@ -106,9 +106,9 @@
- {% widthratio usages.gigabytes.used usages.gigabytes.quota 100 as volume_storage_percent %} + data-quota-limit="{{ usages.maxTotalVolumeGigabytes }}" + data-quota-used="{{ usages.totalGigabytesUsed }}"> + {% widthratio usages.totalGigabytesUsed usages.maxTotalVolumeGigabytes 100 as volume_storage_percent %} {% bs_progress_bar volume_storage_percent 0 %}
{% endif %} -- cgit v1.2.1