Commit e73f2d81 authored by Daniele Venzano's avatar Daniele Venzano

Update the status page with termination queue information

parent ddafaa9e
...@@ -36,6 +36,8 @@ class StatusEndpointWeb(ZoeWebRequestHandler): ...@@ -36,6 +36,8 @@ class StatusEndpointWeb(ZoeWebRequestHandler):
executions_in_queue[exec_id] = self.api_endpoint.execution_by_id(None, exec_id) executions_in_queue[exec_id] = self.api_endpoint.execution_by_id(None, exec_id)
for exec_id in stats['running_queue']: for exec_id in stats['running_queue']:
executions_in_queue[exec_id] = self.api_endpoint.execution_by_id(None, exec_id) executions_in_queue[exec_id] = self.api_endpoint.execution_by_id(None, exec_id)
for exec_id in stats['termination_queue']:
executions_in_queue[exec_id] = self.api_endpoint.execution_by_id(None, exec_id)
services_per_node = {} services_per_node = {}
for node in stats['platform_stats']['nodes']: for node in stats['platform_stats']['nodes']:
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<ul> <ul>
<li>Queue length: <span id="sched_queue_len">{{ stats.queue_length }}</span></li> <li>Queue length: <span id="sched_queue_len">{{ stats.queue_length }}</span></li>
<li>Running queue length: <span id="sched_running_queue_len">{{ stats.running_length }}</span></li> <li>Running queue length: <span id="sched_running_queue_len">{{ stats.running_length }}</span></li>
<li>On-going clean-up threads: <span id="termination_threads_count">{{ stats.termination_threads_count }}</span></li> <li>Clean-up queue length: <span id="termination_threads_count">{{ stats.termination_queue_length }}</span></li>
</ul> </ul>
<h4>Queue</h4> <h4>Queue</h4>
...@@ -106,6 +106,41 @@ ...@@ -106,6 +106,41 @@
{% endif %} {% endif %}
</div> </div>
<h4>Clean-up queue</h4>
<p>This queue contains executions that are waiting to be cleaned-up.</p>
<div class="scheduler_queue">
{% for id in stats['termination_queue'] %}
<div class="queue_item" id="{{ id }}">
{% if user.role.can_operate_others %}
<a href="{{ reverse_url('execution_inspect', id) }}">{{ id }}</a> ({{ executions_in_queue[id].owner.username }})
{% else %}
{{ id }} ({{ executions_in_queue[id].owner.username }})
{% endif %}
{% for service in executions_in_queue[id].services %}
{% if service.essential %}
<div class="service essential {{ 'running' if service.status == service.ACTIVE_STATUS }}">
{{ service['name'] }}<br/>
M: <script>format_bytes({{ service['resource_reservation']['memory']['min'] }});</script><br/>
C: {{ service['resource_reservation']['cores']['min'] }}
</div>
{% endif %}
{% endfor %}
{% for service in executions_in_queue[id].services %}
{% if not service.essential %}
<div class="service {{ 'running' if service.status == service.ACTIVE_STATUS }}">
{{ service['name'] }}<br/>
M: <script>format_bytes({{ service['resource_reservation']['memory']['min'] }});</script><br/>
C: {{ service['resource_reservation']['cores']['min'] }}
</div>
{% endif %}
{% endfor %}
</div>
{% endfor %}
{% if stats['running_queue']|length == 0 %}
<p>The running queue is empty.</p>
{% endif %}
</div>
<h3 class="section"><a name="platform">Platform</a></h3> <h3 class="section"><a name="platform">Platform</a></h3>
<ul> <ul>
<li>Total containers: {{ stats.platform_stats.container_count }}</li> <li>Total containers: {{ stats.platform_stats.container_count }}</li>
......
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