mirror of
https://github.com/Novartis/cellxgene-gateway.git
synced 2026-10-09 12:48: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()
|
match.terminate()
|
||||||
return redirect(url_for("do_view", path=path), code=302)
|
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():
|
def main():
|
||||||
logging.basicConfig(level=logging.INFO, format='%(asctime)s:%(name)s:%(levelname)s:%(message)s')
|
logging.basicConfig(level=logging.INFO, format='%(asctime)s:%(name)s:%(levelname)s:%(message)s')
|
||||||
|
|||||||
@@ -35,19 +35,25 @@
|
|||||||
<th>status</th>
|
<th>status</th>
|
||||||
<th>message</th>
|
<th>message</th>
|
||||||
<th>http_status</th>
|
<th>http_status</th>
|
||||||
|
<th>actions</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for entry in entry_list %}
|
{% for entry in entry_list %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ entry.pid }}</td>
|
<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>{{ entry.port }}</td>
|
||||||
<td class="timestamp">{{ entry.launchtime }}</td>
|
<td class="timestamp">{{ entry.launchtime }}</td>
|
||||||
<td class="timestamp">{{ entry.timestamp }}</td>
|
<td class="timestamp">{{ entry.timestamp }}</td>
|
||||||
<td>{{ entry.status }}</td>
|
<td>{{ entry.status }}</td>
|
||||||
<td>{{ entry.message }}</td>
|
<td>{{ entry.message }}</td>
|
||||||
<td>{{ entry.http_status }}</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>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|||||||
Reference in New Issue
Block a user