diff --git a/cellxgene_gateway/gateway.py b/cellxgene_gateway/gateway.py index 6480e0f..b1ac9df 100644 --- a/cellxgene_gateway/gateway.py +++ b/cellxgene_gateway/gateway.py @@ -203,6 +203,14 @@ def do_relaunch(path): match.terminate() return redirect(url_for("do_view", path=path), code=302) +@app.route("/terminate/", 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') diff --git a/cellxgene_gateway/templates/cache_status.html b/cellxgene_gateway/templates/cache_status.html index cafaee4..aad3813 100644 --- a/cellxgene_gateway/templates/cache_status.html +++ b/cellxgene_gateway/templates/cache_status.html @@ -35,19 +35,25 @@ status message http_status + actions {% for entry in entry_list %} {{ entry.pid }} - {{ entry.dataset }} + {{ entry.dataset }} {{ entry.port }} {{ entry.launchtime }} {{ entry.timestamp }} {{ entry.status }} {{ entry.message }} {{ entry.http_status }} + + {% if entry.status == 'loaded' %} + terminate + {% endif %} + {% endfor %}