diff options
Diffstat (limited to 'wqflask')
-rw-r--r-- | wqflask/wqflask/jupyter_notebooks.py | 21 | ||||
-rw-r--r-- | wqflask/wqflask/templates/jupyter_notebooks.html | 24 |
2 files changed, 45 insertions, 0 deletions
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%} + +<div class="container"> + <h1>Current Notebooks</h1> + + {%for item in links:%} + <div class="jupyter-links"> + <a href="{{item.get('main_url')}}" + title="Access running notebook for '{{item.get('notebook_name')}}' on GeneNetwork" + class="main-link">{{item.get("notebook_name")}}</a> + <a href="{{item.get('src_link_url')}}" + title="Link to the notebook repository for {{item.get('notebook_name', '_')}}" + class="src-link">View Source</a> + </div> + {%endfor%} +</div> + +{%endblock%} |