Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
zoe
main
Commits
db79a42b
Commit
db79a42b
authored
Jun 23, 2016
by
Daniele Venzano
Browse files
Executions can be deleted from the web page
parent
a7407263
Changes
2
Hide whitespace changes
Inline
Side-by-side
zoe_api/web/executions.py
View file @
db79a42b
...
...
@@ -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
,
...
...
zoe_api/web/templates/home_user.html
View file @
db79a42b
...
...
@@ -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 %}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment