From d905866c9a025f6af4d08432d978349ab09348c0 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Mon, 8 Nov 2021 05:02:36 +0300 Subject: Build UI for Jupyter Notebooks Launcher * Build a HTML UI for the Jupyter Notebooks Launcher feature that fits in, aesthetically, with that of the whole GeneNetwork look and feel. --- wqflask/wqflask/jupyter_notebooks.py | 21 +++++++++++++++++++++ wqflask/wqflask/templates/jupyter_notebooks.html | 24 ++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 wqflask/wqflask/jupyter_notebooks.py create mode 100644 wqflask/wqflask/templates/jupyter_notebooks.html (limited to 'wqflask') diff --git a/wqflask/wqflask/jupyter_notebooks.py b/wqflask/wqflask/jupyter_notebooks.py new file mode 100644 index 00000000..c7d5ffa3 --- /dev/null +++ b/wqflask/wqflask/jupyter_notebooks.py @@ -0,0 +1,21 @@ +from Flask import BluePrint, render_template + +jupyter_notebooks = Blueprint('jupyter_notebooks', __name__) + +@jupyter_notebooks.route("/jupyter-notebooks-launcher", methods=("GET",)) +def jupyter_notebooks_launcher(): + links = ( + { + "main_url": "http://notebook.genenetwork.org/51091/tree?", + "notebook_name": "COVID-19 in mybinder.org federation", + "src_link_url": "https://github.com/jgarte/covid19_in_binder"}, + { + "main_url": "http://notebook.genenetwork.org/35639/tree?", + "notebook_name": "Simple requirements.txt based example", + "src_link_url": "https://github.com/jgarte/requirements"}, + { + "main_url": "http://notebook.genenetwork.org/40733/tree?", + "notebook_name": "Guile Jupyter Notebook Querying GeneNetwork API", + "src_link_url": "https://github.com/jgarte/guile-notebook-genenetwork-api"}) + + return render_template("jupyter_notebooks.html", links=links) diff --git a/wqflask/wqflask/templates/jupyter_notebooks.html b/wqflask/wqflask/templates/jupyter_notebooks.html new file mode 100644 index 00000000..4dce0f27 --- /dev/null +++ b/wqflask/wqflask/templates/jupyter_notebooks.html @@ -0,0 +1,24 @@ +{%extends "base.html"%} + +{%block title%} +Jupyter Notebooks +{%endblock%} + +{%block content%} + +