42 lines
1.4 KiB
HTML
42 lines
1.4 KiB
HTML
{% extends "horizon/common/_modal_form.html" %}
|
|
{% load horizon i18n bootstrap %}
|
|
|
|
{% block modal-body-right %}
|
|
<div class="quota-dynamic">
|
|
<h3>{% trans "Description:" %}</h3>
|
|
<p>{% trans "Allocate a floating IP from a given floating IP pool." %}</p>
|
|
{% if usages %}
|
|
<h3>{% trans "Project Quotas" %}</h3>
|
|
|
|
{% if usages.floatingip %}
|
|
<div class="quota_title">
|
|
<div class="pull-left">
|
|
<strong>{% trans "Floating IP" %}</strong>
|
|
</div>
|
|
<span class="pull-right">
|
|
{% blocktrans with used=usages.floatingip.used quota=usages.floatingip.quota|quotainf %}{{ used }} of {{ quota }} Used{% endblocktrans %}
|
|
</span>
|
|
</div>
|
|
<div id="floating_ip_progress"
|
|
class="quota_bar"
|
|
data-quota-used="{{ usages.floatingip.used }}"
|
|
data-quota-limit="{{ usages.floatingip.quota }}">
|
|
{% widthratio usages.floatingip.used usages.floatingip.quota 100 as ip_percent %}
|
|
{% widthratio 100 usages.floatingip.quota 1 as single_step %}
|
|
{% bs_progress_bar ip_percent single_step %}
|
|
</div>
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
</div>
|
|
<script type="text/javascript" charset="utf-8">
|
|
if(typeof horizon.Quota !== 'undefined') {
|
|
horizon.Quota.init();
|
|
} else {
|
|
addHorizonLoadEvent(function() {
|
|
horizon.Quota.init();
|
|
});
|
|
}
|
|
</script>
|
|
{% endblock %}
|