Commit 747a1f45 authored by Daniele Venzano's avatar Daniele Venzano
Browse files

Fix HTML templates and clarify an error message

parent 04ae8956
......@@ -62,7 +62,7 @@ class APIEndpoint:
new_id = self.sql.execution_new(exec_name, uid, application_description)
success, message = self.master.execution_start(new_id)
if not success:
raise zoe_web.exceptions.ZoeException(message)
raise zoe_web.exceptions.ZoeException('The Zoe master is unavailable, execution will be submitted automatically when the master is back up.')
return new_id
def execution_terminate(self, uid, role, exec_id):
......
......@@ -66,8 +66,8 @@ class APIManager:
log.warning('Timeout waiting for master reply')
self._disconnect()
if retries_left == 0:
log.error('Master is unreachable, abandoning request')
return False, 'Master is unreachable, abandoning request'
log.error('Master is unreachable, abandoning API request')
return False, 'Master is unreachable, abandoning API request'
log.warning('Reconnecting and retrying request...')
self._connect()
......
......@@ -51,7 +51,7 @@ class QueryAPI(Resource):
elif what == 'execution':
if role != 'admin':
filters['user_id'] = uid
execs = config.api_endpoint.execution_list(uid, role, filters)
execs = config.api_endpoint.execution_list(uid, role, **filters)
return [x.serialize() for x in execs]
else:
raise ZoeRestAPIException('unknown query {}'.format(what))
......
......@@ -22,26 +22,26 @@
<tbody>
{% for e in executions %}
<tr class="{{ loop.cycle('odd', 'even') }}">
<td><a href="/executions/inspect/{{ e['id'] }}">{{ e['name'] }}</a></td>
<td><a href="/executions/inspect/{{ e.id }}">{{ e.name }}</a></td>
{% if is_admin %}
<td>{{ e['owner'] }}</td>
<td>{{ e.user_id }}</td>
{% endif %}
<td>{{ e['status'] }}</td>
<td><script>format_timestamp("{{ e['time_scheduled'] }}")</script></td>
{% if e['time_started'] == None %}
<td>{{ e.status }}</td>
<td><script>format_timestamp("{{ e.time_submit }}")</script></td>
{% if e.time_start == None %}
<td>not yet</td>
{% else %}
<td><script>format_timestamp("{{ e['time_started'] }}")</script></td>
<td><script>format_timestamp("{{ e.time_start }}")</script></td>
{% endif %}
{% if e['time_finished'] == None %}
{% if e.time_end == None %}
<td>not yet</td>
{% else %}
<td><script>format_timestamp("{{ e['time_finished'] }}")</script></td>
<td><script>format_timestamp("{{ e.time_end }}")</script></td>
{% endif %}
{% if e['status'] == "running" or e['status'] == "scheduled" %}
<td><a href="/executions/terminate/{{ e['id'] }}">Terminate</a></td>
{% 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></td>
{% endif %}
</tr>
{% endfor %}
......@@ -49,5 +49,4 @@
</table>
</div>
<h5>Gateway url: <code>{{ user_gateway }}</code></h5>
{% endblock %}
......@@ -5,7 +5,7 @@
<p>Welcome to Zoe</p>
<ul>
<li><a href="{{ url_for('web.home_guest') }}">Guest start page</a></li>
<li><a href="{{ url_for('web.home_user') }}">Guest start page</a></li>
<li><a href="{{ url_for('web.home_user') }}">User start page</a></li>
</ul>
......
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