tuskar-ui/horizon/templates/horizon/common/_quota_summary.html
Tihomir Trifonov 4c88b9b597 Added a check for volume service in quota functions
When displaying the quotas, we have to check if
volume service is present in the service catalog.
If not - then to remove the volume quotas from
the result object.

Fixes bug 1075319

Change-Id: Icd049a5b147cac039add1570a166d775fd0d6ec4
2012-11-09 15:00:30 +02:00

22 lines
1.6 KiB
HTML

{% load i18n horizon humanize sizeformat %}
<div class="quota-dynamic">
<h3>{% trans "Quota Summary" %}</h3>
<strong>{% trans "Used" %}<span> {{ usage.quotas.instances.used|intcomma }} </span> {% trans "of" %} <span> {{ usage.quotas.instances.quota|intcomma }} </span>{% trans "Available Instances" %} </strong>
{% horizon_progress_bar usage.quotas.instances.used usage.quotas.instances.quota %}
<strong>{% trans "Used" %} <span> {{ usage.quotas.cores.used|intcomma }} </span>{% trans "of" %}<span> {{ usage.quotas.cores.quota|intcomma }} </span>{% trans "Available vCPUs" %} </strong>
{% horizon_progress_bar usage.quotas.cores.used usage.quotas.cores.quota %}
<strong>{% trans "Used" %} <span> {{ usage.quotas.ram.used|intcomma }} MB </span>{% trans "of" %}<span> {{ usage.quotas.ram.quota|intcomma }} MB </span>{% trans "Available RAM" %} </strong>
{% horizon_progress_bar usage.quotas.ram.used usage.quotas.ram.quota %}
{% if usage.quotas.volumes %}
<strong>{% trans "Used" %} <span> {{ usage.quotas.volumes.used|intcomma }} </span>{% trans "of" %}<span> {{ usage.quotas.volumes.quota|intcomma }} </span>{% trans "Available volumes" %} </strong>
{% horizon_progress_bar usage.quotas.volumes.used usage.quotas.volumes.quota %}
<strong>{% trans "Used" %} <span> {{ usage.quotas.gigabytes.used|intcomma }} GB </span>{% trans "of" %}<span> {{ usage.quotas.gigabytes.quota|intcomma }} GB </span>{% trans "Available volume storage" %} </strong>
{% horizon_progress_bar usage.quotas.gigabytes.used usage.quotas.gigabytes.quota %}
{% endif %}
</div>