diff --git a/openstack_dashboard/dashboards/project/volumes/templates/volumes/_limits.html b/openstack_dashboard/dashboards/project/volumes/templates/volumes/_limits.html index b70a310bf7..35888d2c12 100644 --- a/openstack_dashboard/dashboards/project/volumes/templates/volumes/_limits.html +++ b/openstack_dashboard/dashboards/project/volumes/templates/volumes/_limits.html @@ -48,13 +48,15 @@ data-quota-limit={% block total_progress %}"{{ usages.maxTotalVolumes }}"{% endblock %} data-quota-used={% block used_progress %}"{{ usages.volumesUsed }}"{% endblock %} class="quota_bar"> - {% widthratio usages.volumesUsed usages.maxTotalVolumes 100 as volumes_percent %} - {% if usages.numRequestedItems %} - {% widthratio 100 usages.maxTotalVolumes usages.numRequestedItems as single_step %} - {% else %} - {% widthratio 100 usages.maxTotalVolumes 1 as single_step %} - {% endif %} - {% bs_progress_bar volumes_percent single_step %} + {% block show_progress_bar %} + {% widthratio usages.volumesUsed usages.maxTotalVolumes 100 as volumes_percent %} + {% if usages.numRequestedItems %} + {% widthratio 100 usages.maxTotalVolumes usages.numRequestedItems as single_step %} + {% else %} + {% widthratio 100 usages.maxTotalVolumes 1 as single_step %} + {% endif %} + {% bs_progress_bar volumes_percent single_step %} + {% endblock %} {{ endminifyspace }} diff --git a/openstack_dashboard/dashboards/project/volumes/templates/volumes/_snapshot_limits.html b/openstack_dashboard/dashboards/project/volumes/templates/volumes/_snapshot_limits.html index e7cbc48500..237fcc688e 100644 --- a/openstack_dashboard/dashboards/project/volumes/templates/volumes/_snapshot_limits.html +++ b/openstack_dashboard/dashboards/project/volumes/templates/volumes/_snapshot_limits.html @@ -1,5 +1,5 @@ {% extends "project/volumes/_limits.html" %} -{% load i18n horizon humanize %} +{% load i18n horizon humanize bootstrap %} {% block title %} {% trans "From here you can create a snapshot of a volume." %} @@ -40,3 +40,13 @@ {% block used_progress %} "{{ usages.snapshotsUsed }}" {% endblock %} + +{% block show_progress_bar %} + {% widthratio usages.snapshotsUsed usages.maxTotalSnapshots 100 as volumes_percent %} + {% if usages.numRequestedItems %} + {% widthratio usages.numRequestedItems usages.maxTotalSnapshots 100 as single_step %} + {% else %} + {% widthratio 1 usages.maxTotalSnapshots 100 as single_step %} + {% endif %} + {% bs_progress_bar volumes_percent single_step %} +{% endblock %}