resource_usage.html 1.38 KB
Newer Older
Olga Brani's avatar
Olga Brani committed
1
2
3
4
5
{% extends "im/account_base.html" %}

{% load filters %}

{% block page.body %}
Olga Brani's avatar
Olga Brani committed
6
<div class="maincol {% block innerpage.class %}{% endblock %}"> 
Olga Brani's avatar
Olga Brani committed
7
	<div class="stats clearfix">
Olga Brani's avatar
Olga Brani committed
8
		<ul>
Olga Brani's avatar
Olga Brani committed
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
			{% for rname, rdata in resource_catalog.resources.items %}
		 		<li class="clearfix  {{ rdata.load_class }} {{ rdata.verbose_name}}">
		 			<div class="img-wrap">&nbsp;</div>
		 			<div class="info">
						<h3>{{ rdata.report_desc }}</h3>
						<p>
						{{ rdata.ratio|floatformat }}% Used<br>
						You are using 
						{% if rdata.unit == 'bytes' %}
							{{ rdata.currValue|sizeof_fmt  }} out of your {{ rdata.maxValue|sizeof_fmt }}
						{% else %}
							{{ rdata.currValue }} {{ rdata.unit }} out of your {{ rdata.maxValue }} {{ rdata.unit }}
						{% endif %}		
						{% if rdata.is_abbreviation %}{{ rdata.verbose_name|upper }}{% else %}{{ rdata.verbose_name }}{% endif %}{% if rdata.maxValue|floatformat:"0" != "1" and not rdata.unit %}s {% endif  %}
						</p>
					</div>
					<div class="bar">
Olga Brani's avatar
Olga Brani committed
26
27
28
29
30
31
32
33
34
35
36
						<div>
							<span style="width:{{ rdata.ratio_limited|floatformat }}%;">
								 {% if rdata.ratio > 18  %}
								 <em>{{ rdata.ratio|floatformat }}% &nbsp;&nbsp;</em>	
							</span>
								{% else%}
								&nbsp;
							</span>
							<em>{{ rdata.ratio|floatformat }}% &nbsp;&nbsp;</em>
								{% endif %}
						</div>
Olga Brani's avatar
Olga Brani committed
37
38
39
40
41
42
					</div>
		 		</li>
		 	{% endfor%}
		</ul>
			 
	</div>    
Olga Brani's avatar
Olga Brani committed
43
44
</div>
{% endblock %}