resource_usage.html 1.32 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
			{% for rname, rdata in resource_catalog.resources.items %}
Olga Brani's avatar
Olga Brani committed
10
		 		<li class="clearfix  {{ rdata.load_class }} {{ rname|get_value_after_dot }}">
Olga Brani's avatar
Olga Brani committed
11 12 13 14
		 			<div class="img-wrap">&nbsp;</div>
		 			<div class="info">
						<h3>{{ rdata.report_desc }}</h3>
						<p>
Olga Brani's avatar
Olga Brani committed
15 16
						 
						 
Olga Brani's avatar
Olga Brani committed
17
						{% if rdata.unit == 'bytes' %}
Olga Brani's avatar
Olga Brani committed
18
							{{ rdata.currValue|sizeof_fmt  }} out of  {{ rdata.maxValue|sizeof_fmt }}
Olga Brani's avatar
Olga Brani committed
19
						{% else %}
Olga Brani's avatar
Olga Brani committed
20
							{{ rdata.currValue }}  out of  {{ rdata.maxValue }} {{ rdata.unit }}
Olga Brani's avatar
Olga Brani committed
21 22 23 24 25
						{% 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 %}