diff options
author | Tatiana Ovchinnikova <t.v.ovtchinnikova@gmail.com> | 2022-01-31 13:59:19 -0600 |
---|---|---|
committer | Tatiana Ovchinnikova <t.v.ovtchinnikova@gmail.com> | 2022-02-28 20:28:01 +0000 |
commit | 8ddc7363c8efd3d6acf044e1b489eb13fa9036ca (patch) | |
tree | fd8548a92e9060390696decb2b891f1f66f38ccd | |
parent | 23aa36a946d5426e5bddc2f59ab6c1774c28cc32 (diff) | |
download | horizon-8ddc7363c8efd3d6acf044e1b489eb13fa9036ca.tar.gz |
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)
-rw-r--r-- | openstack_dashboard/dashboards/project/instances/templates/instances/_flavors_and_quotas.html | 40 |
1 files 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 @@ <div class="quota_title"> <strong class="pull-left">{% trans "Number of Instances" %}</strong> <span class="pull-right"> - {% 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 %} </span> @@ -30,9 +30,9 @@ <div id="{{ resize_instance|yesno:"quota_resize_instance,quota_instances" }}" class="quota_bar" data-progress-indicator-flavor - data-quota-limit="{{ usages.instances.quota }}" - data-quota-used="{{ usages.instances.used }}"> - {% 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 %} </div> {{ endminifyspace }} @@ -40,7 +40,7 @@ <div class="quota_title"> <strong class="pull-left">{% trans "Number of VCPUs" %}</strong> <span class="pull-right"> - {% 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 %} </span> @@ -50,9 +50,9 @@ <div id="quota_vcpus" class="quota_bar" data-progress-indicator-flavor - data-quota-limit="{{ usages.cores.quota }}" - data-quota-used="{{ usages.cores.used }}"> - {% 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 %} </div> {{ endminifyspace }} @@ -60,7 +60,7 @@ <div class="quota_title"> <strong class="pull-left">{% trans "Total RAM" %}</strong> <span class="pull-right"> - {% 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 %} </span> @@ -70,9 +70,9 @@ <div id="quota_ram" class="quota_bar" data-progress-indicator-flavor - data-quota-limit="{{ usages.ram.quota }}" - data-quota-used="{{ usages.ram.used }}"> - {% 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 %} </div> {{ endminifyspace }} @@ -81,7 +81,7 @@ <div class="quota_title"> <strong class="pull-left">{% trans "Number of Volumes" %}</strong> <span class="pull-right"> - {% 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 %} </span> @@ -89,16 +89,16 @@ <div id="quota_volume" class="quota_bar" data-progress-indicator-flavor - data-quota-limit="{{ usages.volumes.quota }}" - data-quota-used="{{ usages.volumes.used }}"> - {% 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 %} </div> <div class="quota_title"> <strong class="pull-left">{% trans "Total Volume Storage" %}</strong> <span class="pull-right"> - {% 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 %} </span> @@ -106,9 +106,9 @@ <div id="quota_volume_storage" class="quota_bar" data-progress-indicator-flavor - data-quota-limit="{{ usages.gigabytes.quota }}" - data-quota-used="{{ usages.gigabytes.used }}"> - {% 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 %} </div> {% endif %} |