Commit 464ee873 authored by Alok Saldanha's avatar Alok Saldanha
Browse files

#7 added link to terminate loaded dataset

parent 2f2541d2
......@@ -203,6 +203,14 @@ def do_relaunch(path):
match.terminate()
return redirect(url_for("do_view", path=path), code=302)
@app.route("/terminate/<path:path>", methods=["GET"])
def do_terminate(path):
dataset = get_dataset(path)
match = cache.check_entry(dataset)
if not match is None:
match.terminate()
return redirect(url_for("do_GET_status"), code=302)
def main():
logging.basicConfig(level=logging.INFO, format='%(asctime)s:%(name)s:%(levelname)s:%(message)s')
......
......@@ -35,19 +35,25 @@
<th>status</th>
<th>message</th>
<th>http_status</th>
<th>actions</th>
</tr>
</thead>
<tbody>
{% for entry in entry_list %}
<tr>
<td>{{ entry.pid }}</td>
<td>{{ entry.dataset }}</td>
<td><a href="{{ url_for('do_view', path=entry.dataset) }}">{{ entry.dataset }}</a></td>
<td>{{ entry.port }}</td>
<td class="timestamp">{{ entry.launchtime }}</td>
<td class="timestamp">{{ entry.timestamp }}</td>
<td>{{ entry.status }}</td>
<td>{{ entry.message }}</td>
<td>{{ entry.http_status }}</td>
<td>
{% if entry.status == 'loaded' %}
<a href="{{ url_for('do_terminate', path=entry.dataset) }}"> terminate </a>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
......
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