From 1f470de17eba27d4406bb2840d5301cab3ccffda Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Thu, 5 Nov 2020 11:31:50 +0000 Subject: Using 'DOCS' instead of 'BLOG' --- bh20simplewebuploader/templates/blog.html | 5 ++--- bh20simplewebuploader/templates/home.html | 2 +- bh20simplewebuploader/templates/menu.html | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) (limited to 'bh20simplewebuploader/templates') diff --git a/bh20simplewebuploader/templates/blog.html b/bh20simplewebuploader/templates/blog.html index 88ce4c3..fa08f5b 100644 --- a/bh20simplewebuploader/templates/blog.html +++ b/bh20simplewebuploader/templates/blog.html @@ -9,12 +9,11 @@ {{ embed|safe }}
-

Other blog entries

+

Other documents

{% else %} - {% include 'blurb.html' %} -

BLOG Entries:

+

Documents:

{% endif %}
diff --git a/bh20simplewebuploader/templates/home.html b/bh20simplewebuploader/templates/home.html index 77d2fb6..5986d72 100644 --- a/bh20simplewebuploader/templates/home.html +++ b/bh20simplewebuploader/templates/home.html @@ -73,7 +73,7 @@ URI's for disambiguation and machine readable metadata. For examples of - use, see the BLOG. + use, see the docs.

diff --git a/bh20simplewebuploader/templates/menu.html b/bh20simplewebuploader/templates/menu.html index 5d5fdc8..8e6ef52 100644 --- a/bh20simplewebuploader/templates/menu.html +++ b/bh20simplewebuploader/templates/menu.html @@ -6,7 +6,7 @@ STATUS DEMO EXPORT - BLOG + DOCS ABOUT CONTACT -- cgit v1.2.3 From b5143c79de268b844f3a6a63d92c6389b047f35e Mon Sep 17 00:00:00 2001 From: Peter Amstutz Date: Mon, 9 Nov 2020 16:55:33 -0500 Subject: Make it so "pangenome analysis" only runs collect-seqs. Will ensure that metadata is kept up to date. GFA isn't being generated. Will introduce new workflow that uses from_sparql to analyze a subset. Arvados-DCO-1.1-Signed-off-by: Peter Amstutz --- bh20seqanalyzer/main.py | 2 +- bh20simplewebuploader/templates/resource.html | 4 ++-- workflows/update-workflows.sh | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'bh20simplewebuploader/templates') diff --git a/bh20seqanalyzer/main.py b/bh20seqanalyzer/main.py index 5f00080..0906958 100644 --- a/bh20seqanalyzer/main.py +++ b/bh20seqanalyzer/main.py @@ -215,7 +215,7 @@ class SeqAnalyzer: most_recent_analysis = self.api.groups().list(filters=[['owner_uuid', '=', self.pangenome_analysis_project]], order="created_at desc").execute() for m in most_recent_analysis["items"]: - wf = self.get_workflow_output_from_project(m["uuid"], "arv-main.cwl") + wf = self.get_workflow_output_from_project(m["uuid"], "collect-seqs.cwl") if wf is None: continue src = self.api.collections().get(uuid=wf["output_uuid"]).execute() diff --git a/bh20simplewebuploader/templates/resource.html b/bh20simplewebuploader/templates/resource.html index fc52f13..4c50fb9 100644 --- a/bh20simplewebuploader/templates/resource.html +++ b/bh20simplewebuploader/templates/resource.html @@ -10,8 +10,8 @@

All sequences project

All sequences (FASTA) relabled and deduplicated

Metadata (RDF) for all sequences

-

All sequences in Graphical Fragment Assembly (GFA) - More about GFA

-

All sequences in Optimized Dynamic Genome/Graph Implementation (ODGI) - More about ODGI

+ + diff --git a/workflows/update-workflows.sh b/workflows/update-workflows.sh index 3b69a58..5182ec4 100755 --- a/workflows/update-workflows.sh +++ b/workflows/update-workflows.sh @@ -1,3 +1,3 @@ #!/bin/sh arvados-cwl-runner --project-uuid=lugli-j7d0g-5hswinmpyho8dju --update-workflow=lugli-7fd4e-2zp9q4jo5xpif9y fastq2fasta/fastq2fasta.cwl -arvados-cwl-runner --project-uuid=lugli-j7d0g-5hswinmpyho8dju --update-workflow=lugli-7fd4e-mqfu9y3ofnpnho1 pangenome-generate/arv-main.cwl +arvados-cwl-runner --project-uuid=lugli-j7d0g-5hswinmpyho8dju --update-workflow=lugli-7fd4e-mqfu9y3ofnpnho1 pangenome-generate/collect-seqs.cwl -- cgit v1.2.3 From 2e2e2280f59b783759b7b70d410fb7a5c59206d5 Mon Sep 17 00:00:00 2001 From: BonfaceKilz Date: Tue, 10 Nov 2020 03:42:12 +0300 Subject: Add tweet feed * bh20simplewebuploader/main.py (send_home): Fetch tweets from Redis. * bh20simplewebuploader/static/main.css: Add styles for tweets * bh20simplewebuploader/templates/home.html: Add tweet section in frontpage. --- bh20simplewebuploader/main.py | 27 +++++++++++++++++++++++++-- bh20simplewebuploader/static/main.css | 27 +++++++++++++++++++++++++++ bh20simplewebuploader/templates/home.html | 27 +++++++++++++++++++++++---- 3 files changed, 75 insertions(+), 6 deletions(-) (limited to 'bh20simplewebuploader/templates') diff --git a/bh20simplewebuploader/main.py b/bh20simplewebuploader/main.py index 73503b4..d3b9591 100644 --- a/bh20simplewebuploader/main.py +++ b/bh20simplewebuploader/main.py @@ -7,6 +7,7 @@ import logging import os import sys import re +import redis import string import ruamel.yaml as yaml import pkg_resources @@ -252,8 +253,19 @@ def send_home(): """ Send the front page. """ - - return render_template('home.html', menu='HOME', load_map=True) + redis_client = redis.Redis(host=os.environ.get('HOST', 'localhost'), + port=os.environ.get('PORT', 6379), + db=os.environ.get('REDIS_DB', 0)) + tweets = [] + for tweet_id in redis_client.zrevrange('gn2-tweet-score:', + 0, -1): + tweets.append( + {k.decode("utf-8"): v.decode("utf-8") for k, v in + redis_client.hgetall(tweet_id).items()} + ) + return render_template('home.html', menu='HOME', + tweets=tweets, + load_map=True) @app.route('/upload') @@ -652,6 +664,17 @@ def blog_page(): buf = get_html_body('doc/blog/'+blog_content+'.html',"https://github.com/arvados/bh20-seq-resource/blob/master/doc/blog/"+blog_content+".org") return render_template('blog.html',menu='BLOG',embed=buf,blog=blog_content) +@app.route('/feed', methods=['GET']) +def feed(): + redis_client = redis.Redis(host=os.environ.get('HOST', 'localhost'), + port=os.environ.get('PORT', 6379), + db=os.environ.get('REDIS_DB', 0)) + tweets = [redis_client.hgetall(tweet_id) + for tweet_id in redis_client.zrevrange('bh20-tweet-score:', + 0, -1)] + return render_template('feed.html', + menu='FEED', + tweets=tweets) @app.route('/about') def about_page(): diff --git a/bh20simplewebuploader/static/main.css b/bh20simplewebuploader/static/main.css index bc4f705..76a1755 100644 --- a/bh20simplewebuploader/static/main.css +++ b/bh20simplewebuploader/static/main.css @@ -506,3 +506,30 @@ div.status { font-size: 16px; box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2), 0 6px 20px 0 rgba(0,0,0,0.19); } + +.flex-container { + display: flex; + flex-direction: row; + flex-wrap: wrap; + justify-content: space-evenly; +} + +#twitter-feed { + background-color: #f5f8fa; + max-height: 440px; + max-width: 500px; + overflow-y: auto; + padding: 20px; + margin-left: auto; + margin-right: auto; +} + + +#twitter-feed ul { + list-style-type: none; +} + +#twitter-feed ul li { + border-bottom: 2px solid white; + padding-bottom: 20px; +} diff --git a/bh20simplewebuploader/templates/home.html b/bh20simplewebuploader/templates/home.html index 77d2fb6..516fb33 100644 --- a/bh20simplewebuploader/templates/home.html +++ b/bh20simplewebuploader/templates/home.html @@ -22,9 +22,27 @@ or REST API. For more information see the FAQ!.

-
-
-
+ +
+
+
+
+
+ +
+

@@ -76,7 +94,8 @@ use, see the BLOG.

- + + {% include 'footer.html' %} -- cgit v1.2.3