mirror of
https://github.com/Novartis/cellxgene-gateway.git
synced 2026-09-29 03:28:12 +08:00
#7 added link to terminate loaded dataset
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user