Commit 3dcdd65c authored by Daniele Venzano's avatar Daniele Venzano

Display quotas in the web pages

parent c14ebfcc
......@@ -125,6 +125,7 @@ class ExecutionInspectWeb(ZoeWebRequestHandler):
"e": e,
"services_info": services_info,
"endpoints": endpoints,
'killed_at': e.time_submit + datetime.timedelta(hours=e.owner.quota.runtime_limit)
}
if get_conf().enable_plots and e.time_start is not None:
......
......@@ -37,6 +37,7 @@
{% endif %}
<li>Status: <span style="font-weight: bold;">{{ e.status }}</span></li>
{% if e.is_running %}
<li>Will be killed at: <script>format_timestamp("{{ killed_at }}")</script></li>
<li>Actions:
<a href="{{ reverse_url("execution_terminate", e.id) }}">Terminate</a>
</li>
......
......@@ -17,10 +17,14 @@
{% block content %}
<h2>Welcome to Zoe Analytics</h2>
<p>You have {{ running_executions|length }} execution{{ "s" if running_executions|length != 1 }} running{% if running_executions|length > 0 %}
with a total reservation of <script>format_bytes({{ total_memory }}, 2);</script> of memory and {{ total_cores }} cores.
{% else %}.{% endif %}
</p>
<h3>Quota usage</h3>
<ul>
<li>Your quota is: {{ user.quota.name }}</li>
<li>{{ running_executions|length }} of {{ user.quota.concurrent_executions }} running execution{{ "s" if user.quota.concurrent_executions > 1 }}</li>
<li><script>format_bytes({{ total_memory }}, 2);</script> of <script>format_bytes({{ user.quota.memory }}, 2);</script> of memory</li>
<li>{{ total_cores }} of {{ user.quota.cores }} cores</li>
<li>Executions will be automatically killed after <script>document.write(moment.duration({{ user.quota.runtime_limit }}, "hours").humanize())</script></li>
</ul>
{% if running_executions|length > 0 %}
<div class="execution_table">
......@@ -106,4 +110,16 @@
</div>
{% endif %}
<h3>Role details</h3>
<ul>
<li>Your role is: {{ user.role.name }}</li>
<li>Can access status page: {{ user.role.can_see_status }}</li>
<li>Can change Zoe configuration: {{ user.role.can_change_config }}</li>
<li>Can operate on other users: {{ user.role.can_operate_others }}</li>
<li>Can delete executions: {{ user.role.can_delete_executions }}</li>
<li>Can access the API: {{ user.role.can_access_api }}</li>
<li>Can customize ZApp resource reservations: {{ user.role.can_customize_resources }}</li>
<li>Can access the full ZApp shop: {{ user.role.can_access_full_zapp_shop }}</li>
</ul>
{% endblock %}
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