1 {# snippet for rendering quota of a User or Group #}
4 {% with cluster_user|quota:object as quota %}
6 <a href=
"{% url cluster-quota object.slug cluster_user.id %}"
7 class=
"quota {%if quota.default%}default{%endif%}">
8 {%if quota.virtual_cpus or quota.ram or quota.disk %}
9 {%if quota.virtual_cpus%}{% trans
"CPUs"%}:{{quota.virtual_cpus}} {%endif%}
10 {%if quota.ram%}{% trans
"Memory" %}:{{quota.ram|mult:
"1048576"|filesizeformat}} {%endif%}
11 {%if quota.disk%}{% trans
"Disk" %}:{{quota.disk|mult:
"1048576"|filesizeformat}} {%endif%}