Commit db79a42b authored by Daniele Venzano's avatar Daniele Venzano
Browse files

Executions can be deleted from the web page

parent a7407263
......@@ -67,6 +67,18 @@ def execution_terminate(execution_id):
return redirect(url_for('web.home_user'))
@catch_exceptions
def execution_delete(execution_id):
uid, role = get_auth(request)
assert isinstance(config.api_endpoint, zoe_api.api_endpoint.APIEndpoint)
success, message = config.api_endpoint.execution_delete(uid, role, execution_id)
if not success:
raise zoe_api.exceptions.ZoeException(message)
return redirect(url_for('web.home_user'))
@catch_exceptions
def execution_inspect(execution_id):
uid, role = get_auth(request)
......@@ -77,7 +89,7 @@ def execution_inspect(execution_id):
services_info = {}
if e.service_list is not None:
for s in e.service_list:
services_info[s.id] = config.api_endpoint.service_inspect(s)
services_info[s.id] = config.api_endpoint.service_inspect(uid, role, s)
template_vars = {
"e": e,
......
......@@ -41,7 +41,8 @@
{% if e.status == "running" or e.status == "submitted" %}
<td><a href="/executions/terminate/{{ e.id }}">Terminate</a></td>
{% else %}
<td><a href="/executions/restart/{{ e.id }}">Restart</a></td>
<td><a href="/executions/restart/{{ e.id }}">Restart</a>,
<a href="/executions/delete/{{ e.id }}">Delete</a></td>
{% endif %}
</tr>
{% endfor %}
......
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