Commit b6ef1b39 by Kálmán Viktor

dashboard: quick fixes

- wrong icon names
- fixed height for toplist
- some message if user has no templates shared with
parent f40be5ae
...@@ -738,6 +738,10 @@ textarea[name="list-new-namelist"] { ...@@ -738,6 +738,10 @@ textarea[name="list-new-namelist"] {
margin-top: 8px; margin-top: 8px;
} }
#dashboard-files-toplist {
min-height: 204px;
}
#dashboard-files-toplist div.list-group-item { #dashboard-files-toplist div.list-group-item {
color: #555; color: #555;
} }
......
...@@ -72,6 +72,8 @@ ...@@ -72,6 +72,8 @@
</div> </div>
</div> </div>
</div> </div>
{% empty %}
{% trans "You can't start new virtual machines beacuse no templates are shared with you." %}
{% endfor %} {% endfor %}
</div> </div>
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
title="{% trans "A list of your most recent files." %}"> title="{% trans "A list of your most recent files." %}">
<i class="fa fa-info-circle"></i> <i class="fa fa-info-circle"></i>
</span> </span>
<span class="btn btn-default btn-xs infobtn pull-right" <span class="btn btn-default btn-xs pull-right"
title=" title="
{% blocktrans with used=files.quota.readable_used soft=files.quota.readable_soft hard=files.quota.readable_hard %} {% blocktrans with used=files.quota.readable_used soft=files.quota.readable_soft hard=files.quota.readable_hard %}
You are currently using {{ used }}, your soft limit is {{ soft }}, your hard limit is {{ hard }}. You are currently using {{ used }}, your soft limit is {{ soft }}, your hard limit is {{ hard }}.
...@@ -16,7 +16,8 @@ ...@@ -16,7 +16,8 @@
<h3 class="no-margin"><i class="fa fa-briefcase"></i> {% trans "Files" %} <h3 class="no-margin"><i class="fa fa-briefcase"></i> {% trans "Files" %}
</h3> </h3>
</div> </div>
<div class="list-group" id="dashboard-files-toplist"> <div class="list-group">
<div id="dashboard-files-toplist">
{% for t in files.toplist %} {% for t in files.toplist %}
{% if t.TYPE == "F" %} {% if t.TYPE == "F" %}
<div class="list-group-item"> <div class="list-group-item">
...@@ -44,7 +45,12 @@ ...@@ -44,7 +45,12 @@
<div style="clear: both;"></div> <div style="clear: both;"></div>
</a> </a>
{% endif %} {% endif %}
{% empty %}
<div class="list-group-item list-group-item-last no-hover">
{% trans "Your toplist is empty, upload something." %}
</div>
{% endfor %} {% endfor %}
</div>
<div class="list-group-item text-right no-hover"> <div class="list-group-item text-right no-hover">
<form class="pull-left" method="POST" action="{% url "dashboard.views.store-refresh-toplist" %}"> <form class="pull-left" method="POST" action="{% url "dashboard.views.store-refresh-toplist" %}">
{% csrf_token %} {% csrf_token %}
......
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
</h4> </h4>
<dl> <dl>
<dt>{% trans "Suspended at:" %}</dt> <dt>{% trans "Suspended at:" %}</dt>
<dd><i class="fa fa-moon"></i> {{ instance.time_of_suspend|timeuntil }}</dd> <dd><i class="fa fa-moon-o"></i> {{ instance.time_of_suspend|timeuntil }}</dd>
<dt>{% trans "Destroyed at:" %}</dt> <dt>{% trans "Destroyed at:" %}</dt>
<dd><i class="fa fa-times"></i> {{ instance.time_of_delete|timeuntil }}</dd> <dd><i class="fa fa-times"></i> {{ instance.time_of_delete|timeuntil }}</dd>
</dl> </dl>
......
...@@ -307,7 +307,7 @@ class Node(OperatedMixin, TimeStampedModel): ...@@ -307,7 +307,7 @@ class Node(OperatedMixin, TimeStampedModel):
def get_status_icon(self): def get_status_icon(self):
return { return {
'OFFLINE': 'fa-minus-circle', 'OFFLINE': 'fa-minus-circle',
'DISABLED': 'fa-moon', 'DISABLED': 'fa-moon-o',
'MISSING': 'fa-warning', 'MISSING': 'fa-warning',
'ONLINE': 'fa-play-circle'}.get(self.get_state(), 'ONLINE': 'fa-play-circle'}.get(self.get_state(),
'fa-question-circle') 'fa-question-circle')
......
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 sign in to comment