Commit 32fed7b9 authored by Olga Brani's avatar Olga Brani
Browse files

Fixes for report page

Bypass group list page
parent d04e5d7b
......@@ -402,7 +402,7 @@ form.quotas-form legend span.info span { width:395px; }
.stats ul { margin:0; padding:0; list-style:none outside none; }
.stats ul li { margin:0 0 1em 0; padding:0 0 1em 0; list-style:none outside none; background:url(../images/stats-line.jpg) repeat-x left bottom}
.stats .bar { padding: 0; text-align:center; float:left; width:200px;}
.stats .bar div { width:340px; height:30px; border:1px solid #000;}
.stats .bar div { width:340px; height:30px; border:1px solid #000; margin-top:20px;}
.stats .bar span { text-align:right; display:block; height:100%; color:#fff; line-height:30px; font-size:1.231em; text-indent:50px;}
.stats .red .bar span { background:#ef4f54; }
.stats .yellow .bar span { background:#f6921e; }
......@@ -414,8 +414,8 @@ form.quotas-form legend span.info span { width:395px; }
.stats .vm .img-wrap { background-image:url(../images/vm-stats.png) }
.stats .ram .img-wrap { background-image:url(../images/ram-stats.png) }
.stats .network .img-wrap { background-image:url(../images/network-stats.png) }
.stats .disk .img-wrap { background-image:url(../images/disk-stats.png) }
.stats .storage .img-wrap { background-image:url(../images/storage-stats.png) }
.stats .disksize .img-wrap { background-image:url(../images/disk-stats.png) }
.stats .diskspace .img-wrap { background-image:url(../images/storage-stats.png) }
.stats .bandwidth .img-wrap { background-image:url(../images/bandwidth-stats.png) }
.stats .red .img-wrap { background-position: 15px 7px; }
......
......@@ -22,7 +22,7 @@
</form>
{% else %}
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. <br>You can <a href="{% url group_create_list %}">create a new group</a> or <a href="{% url group_search %}">join</a> to an existing one.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. <br>You can <!--<a href="{% url group_create_list %}">create a new group</a>--> <a href="{% url group_add 'course' %}">create a new group</a>or <a href="{% url group_search %}">join</a> to an existing one.</p>
<div class="widjets">
<a href="#" class="widjet-x" title="remove boxes">X</a>
......@@ -30,7 +30,8 @@
<li>
<div>
<p>WELCOME!<br>Connect with a world of people who share your passions.<br>With millions of groups at your fingertips, it's easy to find the group that's best for you -- no matter your interest.</p><p style="text-align: center"><img alt="THINK ABOUT IT" src="/static/im/images/create.png"></p>
<p class="btn"><a href="{% url group_create_list %}" class="submit">CREATE</a></p>
<p class="btn"><a href="{% url group_add 'course' %}" class="submit">CREATE</a></p>
<!--<p class="btn"><a href="{% url group_create_list %}" class="submit">CREATE</a></p>-->
</div>
</li>
<li>
......
......@@ -7,20 +7,21 @@
<div class="stats clearfix">
<ul>
{% for r in data %}
<li class="clearfix {{ r.load_class }} {{ r.name}}">
{% with resource_presentation|lookup:r.name as resource_info %}
<li class="clearfix {{ r.load_class }} {{ r.name|get_value_after_dot}}">
<div class="img-wrap">&nbsp;</div>
<div class="info">
<h3>{{ r.description }}</h3>
<h3>{{ resource_info.report_desc }}</h3>
<p>
{{ r.ratio|floatformat }}% Used<br>
You are using {{ r.currValue }} {{ r.unit }} out of your {{ r.maxValue }}{{ r.unit }} {{ r.plural|capfirst }} - Aouch!
You are using {{ r.currValue }} {{ r.unit }} out of your {{ r.maxValue }} {{ r.unit }} {% if resource_info.is_abbreviation %}{{ r.name|get_value_after_dot|upper }}{% else %}{{ r.name|get_value_after_dot }}{% endif %}{% if not r.unit %}s {% endif %}
</p>
</div>
<div class="bar">
<div><span style="width:{{ r.ratio|floatformat }}%;">{{ r.ratio|floatformat }}% &nbsp;&nbsp;</span></div>
</div>
</li>
{% endwith %}
{% endfor %}
</ul>
</div>
......
......@@ -664,6 +664,45 @@ def change_email(request, activation_key=None,
extra_context))
resource_presentation = {
'compute': {
'help_text':'group compute help text',
'is_abbreviation':False,
'report_desc':''
},
'storage': {
'help_text':'group storage help text',
'is_abbreviation':False,
'report_desc':''
},
'pithos+.diskspace': {
'help_text':'resource pithos+.diskspace help text',
'is_abbreviation':False,
'report_desc':'Diskspace used'
},
'cyclades.vm': {
'help_text':'resource cyclades.vm help text resource cyclades.vm help text resource cyclades.vm help text resource cyclades.vm help text',
'is_abbreviation':True,
'report_desc':'Number of Virtual Machines'
},
'cyclades.disksize': {
'help_text':'resource cyclades.disksize help text',
'is_abbreviation':False,
'report_desc':'Amount of Disksize used'
},
'cyclades.ram': {
'help_text':'resource cyclades.ram help text',
'is_abbreviation':True,
'report_desc':'RAM used'
},
'cyclades.cpu': {
'help_text':'resource cyclades.cpu help text',
'is_abbreviation':True,
'report_desc':'CPUs used'
}
}
@require_http_methods(["GET", "POST"])
@signed_terms_required
@login_required
......@@ -695,34 +734,7 @@ def group_add(request, kind_name='default'):
except:
return HttpResponseBadRequest(_('No such group kind'))
resource_presentation = {
'compute': {
'help_text':'group compute help text',
},
'storage': {
'help_text':'group storage help text',
},
'pithos+.diskspace': {
'help_text':'resource pithos+.diskspace help text',
'is_abbreviation':False,
},
'cyclades.vm': {
'help_text':'resource cyclades.vm help text resource cyclades.vm help text resource cyclades.vm help text resource cyclades.vm help text',
'is_abbreviation':True,
},
'cyclades.disksize': {
'help_text':'resource cyclades.disksize help text',
'is_abbreviation':False,
},
'cyclades.ram': {
'help_text':'resource cyclades.ram help text',
'is_abbreviation':True,
},
'cyclades.cpu': {
'help_text':'resource cyclades.cpu help text',
'is_abbreviation':True,
}
}
post_save_redirect = '/im/group/%(id)s/'
context_processors = None
......@@ -1166,6 +1178,7 @@ def resource_list(request):
messages.error(request, result.reason)
return render_response('im/resource_list.html',
data=data,
resource_presentation=resource_presentation,
context_instance=get_context(request))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment