aboutsummaryrefslogtreecommitdiff
path: root/bh20simplewebuploader/main.py
diff options
context:
space:
mode:
authorlltommy2020-06-16 12:43:08 +0200
committerlltommy2020-06-16 12:43:08 +0200
commita2c2342000aea4efa5140afa89e4ed66dd466100 (patch)
treeb8ca1d0c661da3fccb014be455a1e525bf67db5e /bh20simplewebuploader/main.py
parentaf09eb9bc73484f218303d2c492da3adb99441d6 (diff)
downloadbh20-seq-resource-a2c2342000aea4efa5140afa89e4ed66dd466100.tar.gz
bh20-seq-resource-a2c2342000aea4efa5140afa89e4ed66dd466100.tar.lz
bh20-seq-resource-a2c2342000aea4efa5140afa89e4ed66dd466100.zip
starting to include a map
Diffstat (limited to 'bh20simplewebuploader/main.py')
-rw-r--r--bh20simplewebuploader/main.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/bh20simplewebuploader/main.py b/bh20simplewebuploader/main.py
index 840070d..40046c8 100644
--- a/bh20simplewebuploader/main.py
+++ b/bh20simplewebuploader/main.py
@@ -459,6 +459,13 @@ def about_page():
buf = get_html_body('doc/web/about.html')
return render_template('about.html',menu='ABOUT',embed=buf)
+##
+@app.route('/map')
+def map_page():
+ return render_template('map.html',menu='DEMO')
+
+
+
## Dynamic API functions starting here
## This is quick and dirty for now, just to get something out and demonstrate the queries
## Feel free to rename the functions/endpoints, feel free to process result so we get nicer JSON
@@ -522,10 +529,10 @@ def getCountByGPS():
payload = {'query': query, 'format': 'json'}
r = requests.get(baseURL, params=payload)
result = r.json()['results']['bindings']
- return jsonify([{'Fasta Count': x['fastaCount']['value'],
+ return jsonify([{'count': x['fastaCount']['value'],
'Location': x['location']['value'],
'LocationLabel': x['location_label']['value'],
- 'GPS' :x['GPS']['value']} for x in result])
+ 'GPS' :x['GPS']['value'][6:-1]} for x in result])
@app.route('/api/getSEQCountbytech', methods=['GET'])