From 9c9512a7e040f8247d259bdc6f9cf55d5d276baf Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Wed, 15 Jul 2020 12:48:12 +0100 Subject: Load metadata locally without pkg_resources --- bh20simplewebuploader/static/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bh20simplewebuploader/static') diff --git a/bh20simplewebuploader/static/main.js b/bh20simplewebuploader/static/main.js index 751e478..4703047 100644 --- a/bh20simplewebuploader/static/main.js +++ b/bh20simplewebuploader/static/main.js @@ -195,7 +195,7 @@ function addField(e) { // Increment the number and use the keypath and number to set IDs and cross // references. // TODO: Heavily dependent on the form field HTML. Maybe we want custom - // elements for the labeled controlsd that know how to be list items? + // elements for the labeled controls that know how to be list items? fieldNumber++ newField.dataset.number = fieldNumber let newID = keypath + '[' + fieldNumber + ']' -- cgit v1.2.3 From 73be46fd1db58f132fa60ff30d33d67927a341a7 Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Thu, 16 Jul 2020 09:48:31 +0100 Subject: Addes ESR logo and cropped CWL logo --- bh20simplewebuploader/static/image/CWL.png | Bin 0 -> 11066 bytes bh20simplewebuploader/static/image/ESR.png | Bin 0 -> 67869 bytes bh20simplewebuploader/templates/footer.html | 6 +++++- doc/blog/using-covid-19-pubseq-part5.org | 4 ++++ 4 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 bh20simplewebuploader/static/image/CWL.png create mode 100644 bh20simplewebuploader/static/image/ESR.png (limited to 'bh20simplewebuploader/static') diff --git a/bh20simplewebuploader/static/image/CWL.png b/bh20simplewebuploader/static/image/CWL.png new file mode 100644 index 0000000..81d1807 Binary files /dev/null and b/bh20simplewebuploader/static/image/CWL.png differ diff --git a/bh20simplewebuploader/static/image/ESR.png b/bh20simplewebuploader/static/image/ESR.png new file mode 100644 index 0000000..557c798 Binary files /dev/null and b/bh20simplewebuploader/static/image/ESR.png differ diff --git a/bh20simplewebuploader/templates/footer.html b/bh20simplewebuploader/templates/footer.html index a1dd4fd..37a6b64 100644 --- a/bh20simplewebuploader/templates/footer.html +++ b/bh20simplewebuploader/templates/footer.html @@ -21,7 +21,7 @@
- +
@@ -29,6 +29,10 @@
+
+ +
+
- +
+
+ +
-- cgit v1.2.3 From 317a04666addffb805ad9c7917eb80a2985aa390 Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Fri, 17 Jul 2020 07:59:01 +0100 Subject: Align Curii image --- bh20simplewebuploader/static/image/curii.logo.ai.png | Bin 0 -> 16739 bytes bh20simplewebuploader/templates/footer.html | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 bh20simplewebuploader/static/image/curii.logo.ai.png (limited to 'bh20simplewebuploader/static') diff --git a/bh20simplewebuploader/static/image/curii.logo.ai.png b/bh20simplewebuploader/static/image/curii.logo.ai.png new file mode 100644 index 0000000..401afad Binary files /dev/null and b/bh20simplewebuploader/static/image/curii.logo.ai.png differ diff --git a/bh20simplewebuploader/templates/footer.html b/bh20simplewebuploader/templates/footer.html index 5a1f3c9..2064036 100644 --- a/bh20simplewebuploader/templates/footer.html +++ b/bh20simplewebuploader/templates/footer.html @@ -21,7 +21,7 @@
- +
-- cgit v1.2.3 From 2c1a907cbfe222d1deed8c31a44d3ea4c382bc3c Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Fri, 17 Jul 2020 08:00:48 +0100 Subject: Add Curii svg --- bh20simplewebuploader/static/image/curii.logo.ai.svg | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 bh20simplewebuploader/static/image/curii.logo.ai.svg (limited to 'bh20simplewebuploader/static') diff --git a/bh20simplewebuploader/static/image/curii.logo.ai.svg b/bh20simplewebuploader/static/image/curii.logo.ai.svg new file mode 100644 index 0000000..e87ea05 --- /dev/null +++ b/bh20simplewebuploader/static/image/curii.logo.ai.svg @@ -0,0 +1,3 @@ + + +image/svg+xml \ No newline at end of file -- cgit v1.2.3 From d3fa51ee16d902fc0bfa414611d5e0bae6618009 Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Fri, 17 Jul 2020 09:09:23 +0100 Subject: Refactoring map code --- bh20simplewebuploader/main.py | 7 +- bh20simplewebuploader/static/main.js | 149 ++++++++------------------ bh20simplewebuploader/static/map.js | 67 ++++++++++++ bh20simplewebuploader/templates/demo-run.html | 26 ----- bh20simplewebuploader/templates/demo.html | 30 +++++- bh20simplewebuploader/templates/footer.html | 3 + bh20simplewebuploader/templates/header.html | 18 ---- bh20simplewebuploader/templates/map.html | 24 ++++- 8 files changed, 164 insertions(+), 160 deletions(-) create mode 100644 bh20simplewebuploader/static/map.js (limited to 'bh20simplewebuploader/static') diff --git a/bh20simplewebuploader/main.py b/bh20simplewebuploader/main.py index 1147176..e8bb507 100644 --- a/bh20simplewebuploader/main.py +++ b/bh20simplewebuploader/main.py @@ -628,7 +628,7 @@ def validated_page(): @app.route('/demo') def demo_page(): - return render_template('demo.html',menu='DEMO') + return render_template('demo.html',menu='DEMO',load_map=True) @app.route('/blog',methods=['GET']) def blog_page(): @@ -644,11 +644,6 @@ def about_page(): buf = get_html_body('doc/web/about.html','https://github.com/arvados/bh20-seq-resource/blob/master/doc/web/about.org') 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 diff --git a/bh20simplewebuploader/static/main.js b/bh20simplewebuploader/static/main.js index 4703047..1633c25 100644 --- a/bh20simplewebuploader/static/main.js +++ b/bh20simplewebuploader/static/main.js @@ -13,70 +13,41 @@ function myFunction() { } } -let map = L.map( 'map', { - center: [37.0902, -95.7129], // Default to U.S.A - minZoom: 3, - zoom: 0 -}); -L.tileLayer( 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { - attribution: '© OpenStreetMap', - subdomains: ['a','b','c'] -}).addTo( map ); - -let markers = L.markerClusterGroup().addTo(map) - - function fetchAPI(apiEndPoint) { - fetch(scriptRoot + apiEndPoint) - .then(response => { - return response.json(); - }) - .then(data => { - console.log(data); - markers.clearLayers(); - document.getElementById("results").classList.remove("invisible"); - document.getElementById("loader").classList.add("invisible"); - if (!(apiEndPoint === "/api/getAllaccessions")) { - for (let i = 0; i < data.length; i++) { - let {"count": fastaCount, GPS, LocationLabel: label } = data[i]; - let coordinates = GPS.split(" "); - if (!(coordinates == null)) { - let lat, lon; - [lon, lat] = coordinates.map(parseFloat); - let point = L.point() - let marker = L.marker([lat, lon]); - marker.bindPopup("" + label + "
" + "FastaCount: " +fastaCount); - markers.addLayer(marker) - }} - } - // Reload the map - map.invalidateSize(); - }); - document.getElementById("results").classList.add("invisible"); - document.getElementById("loader").classList.remove("invisible"); - -} - -// Copy from function above but now added as table instead of plain json -function fetchAPIV2(apiEndPoint) { - fetch(scriptRoot + apiEndPoint) - .then(response => { - return response.json(); - }) - .then(data => { - console.log(data) - htmlString="" - - // Depending on what we want to explore we'd have to call a different function ....? But how to Include that? - for (var i=0; i" - } - htmlString=htmlString+"
"+data[i]["label"]+""+data[i]["count"]+"
" - - document.getElementById("table").innerHTML = htmlString - }); - - document.getElementById("results").classList.add("invisible"); + fetch(scriptRoot + apiEndPoint) + .then(response => { + return response.json(); + }) + .then(data => { + console.log(data); + }); + document.getElementById("map_view").classList.add("invisible"); + document.getElementById("loader").classList.remove("invisible"); +} + +// Copy from function above but now output HTML table instead of plain json +function fetchHTMLTable(apiEndPoint) { + fetch(scriptRoot + apiEndPoint) + .then(response => { + return response.json(); + }) + .then(data => { + console.log(data) + htmlString="" + + // Depending on what we want to explore we'd have to call a different function ....? But how to Include that? + /* + for (var i=0; i" + } +*/ + for (var i=0; i" + } + htmlString=htmlString+"
"+data[i]["label"]+""+data[i]["count"]+"
"+data[i]["label"]+""+data[i]["count"]+"
" + + document.getElementById("table").innerHTML = htmlString + }); } @@ -85,36 +56,39 @@ let search = () => { fetchAPI(scriptRoot + "/api/getDetailsForSeq?seq=" + encodeURIComponent(m)); } +// Get count from Arvados let fetchCount = () => { fetchAPI("/api/getCount"); } +// Get count from Virtuoso let fetchCountDB = () => { fetchAPI("/api/getCountDB"); } let fetchSEQCountBySpecimen = () => { - fetchAPIV2("/api/getSEQCountbySpecimenSource"); + fetchHTMLTable("/api/getSEQCountbySpecimenSource"); } let fetchSEQCountByLocation = () => { - fetchAPIV2("/api/getSEQCountbyLocation"); + fetchHTMLTable("/api/getSEQCountbyLocation"); } let fetchSEQCountByTech = () => { - fetchAPIV2("/api/getSEQCountbytech"); + fetchHTMLTable("/api/getSEQCountbytech"); } let fetchAllaccessions = () => { - fetchAPI("/api/getAllaccessions"); + fetchHTMLTable("/api/getAllaccessions"); }; -let fetchCountByGPS = () => { - fetchAPI("/api/getCountByGPS"); +let fetchMap = () => { + fetchAPI("/api/getCountByGPS"); + updateMapMarkers(); }; let fetchSEQCountbyLocation = () => { - fetchAPIV2("/api/getSEQCountbyLocation"); + fetchHTMLTable("/api/getSEQCountbyLocation"); }; let fetchSEQByLocation = () => { @@ -122,7 +96,7 @@ let fetchSEQByLocation = () => { }; let fetchSEQCountbyContinent = () => { - fetchAPIV2("/api/getSEQCountbyContinent"); + fetchHTMLTable("/api/getSEQCountbyContinent"); } @@ -252,36 +226,3 @@ function on_submit_button() { return false; } } - - - -// - -function drawMap(){ - -// initialize the map on the "map" div with a given center and zoom -var mymap = L.map('mapid').setView([51.505, -0.09], 1); - -L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { - attribution: '© OpenStreetMap contributors' -}).addTo(mymap); - -fetch(scriptRoot + "api/getCountByGPS") - .then(response => { - console.log(response) - return response.json(); - }) - .then(data => { - - for (var i=0; iOpenStreetMap', + subdomains: ['a','b','c'] +}).addTo( map ); + +let markers = L.markerClusterGroup().addTo(map) + + +function drawMap(){ + +// initialize the map on the "map" div with a given center and zoom +var mymap = L.map('mapid').setView([51.505, -0.09], 1); + +L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { + attribution: '© OpenStreetMap contributors' +}).addTo(mymap); + +fetch(scriptRoot + "api/getCountByGPS") + .then(response => { + console.log(response) + return response.json(); + }) + .then(data => { + + for (var i=0; i" + label + "
" + "FastaCount: " +fastaCount); + markers.addLayer(marker) + }} + // Reload the map + map.invalidateSize(); + document.getElementById("map_view").classList.add("invisible"); + document.getElementById("loader").classList.add("invisible"); +} diff --git a/bh20simplewebuploader/templates/demo-run.html b/bh20simplewebuploader/templates/demo-run.html index a8f9edc..e69de29 100644 --- a/bh20simplewebuploader/templates/demo-run.html +++ b/bh20simplewebuploader/templates/demo-run.html @@ -1,26 +0,0 @@ -
-
-

[Demo] Display content sequences by:

-
- - - - - - - -
- -
- -
- - - - -
-
-
diff --git a/bh20simplewebuploader/templates/demo.html b/bh20simplewebuploader/templates/demo.html index 44aded0..2e290c6 100644 --- a/bh20simplewebuploader/templates/demo.html +++ b/bh20simplewebuploader/templates/demo.html @@ -5,8 +5,34 @@ {% include 'banner.html' %} {% include 'menu.html' %} {% include 'search.html' %} -

The Virtuoso database contains public sequences!

- {% include 'demo-run.html' %} +

The Virtuoso database contains public sequences!

+ +
+
+

[Demo] Display content sequences by:

+
+ + + + + + +
+ +
+ +
+ + + + +
+
+
+ {% include 'footer.html' %} +{% endif %} - - diff --git a/bh20simplewebuploader/templates/map.html b/bh20simplewebuploader/templates/map.html index 595af0c..4aa22b9 100644 --- a/bh20simplewebuploader/templates/map.html +++ b/bh20simplewebuploader/templates/map.html @@ -1,7 +1,26 @@ {% include 'header.html' %} - + + + + + + + + + @@ -11,9 +30,6 @@ {% include 'footer.html' %} - - - -- cgit v1.2.3 From 7565f72b1bf0d70426947a50d1b9a62edc48071d Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Fri, 17 Jul 2020 09:45:58 +0100 Subject: Map is back --- bh20simplewebuploader/static/main.css | 2 +- bh20simplewebuploader/static/map.js | 71 +++++++++++++++---------------- bh20simplewebuploader/templates/demo.html | 27 +++++++++++- bh20simplewebuploader/templates/map.html | 49 --------------------- 4 files changed, 61 insertions(+), 88 deletions(-) (limited to 'bh20simplewebuploader/static') diff --git a/bh20simplewebuploader/static/main.css b/bh20simplewebuploader/static/main.css index b28ee9c..9f89045 100644 --- a/bh20simplewebuploader/static/main.css +++ b/bh20simplewebuploader/static/main.css @@ -47,7 +47,7 @@ h2 > svg { float: right; } -#map { +#mapid { width: 800px; height: 440px; border: 1px solid #AAA; diff --git a/bh20simplewebuploader/static/map.js b/bh20simplewebuploader/static/map.js index afc6c3f..e1a4289 100644 --- a/bh20simplewebuploader/static/map.js +++ b/bh20simplewebuploader/static/map.js @@ -1,43 +1,40 @@ -let map = L.map( 'map', { - center: [37.0902, -95.7129], // Default to U.S.A - minZoom: 3, - zoom: 0 + +var map = L.map( 'mapid', { + center: [51.505, -0.09], // Default to U.S.A + minZoom: 2, + zoom: 0 }); + L.tileLayer( 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { - attribution: '© OpenStreetMap', - subdomains: ['a','b','c'] -}).addTo( map ); + attribution: '© OpenStreetMap', + subdomains: ['a','b','c'] +}).addTo(map); -let markers = L.markerClusterGroup().addTo(map) +var markers = L.markerClusterGroup().addTo(mapid) function drawMap(){ + var mymap = map; -// initialize the map on the "map" div with a given center and zoom -var mymap = L.map('mapid').setView([51.505, -0.09], 1); - -L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { - attribution: '© OpenStreetMap contributors' -}).addTo(mymap); - -fetch(scriptRoot + "api/getCountByGPS") - .then(response => { - console.log(response) - return response.json(); - }) - .then(data => { - - for (var i=0; i { + console.log(response) + return response.json(); + }) + .then(data => { + for (var i=0; i" + label + "
" + "FastaCount: " +fastaCount); - markers.addLayer(marker) + // markers.addLayer(marker) }} + */ // Reload the map map.invalidateSize(); - document.getElementById("map_view").classList.add("invisible"); - document.getElementById("loader").classList.add("invisible"); + // document.getElementById("map_view").classList.add("invisible"); + // document.getElementById("loader").classList.add("invisible"); } diff --git a/bh20simplewebuploader/templates/demo.html b/bh20simplewebuploader/templates/demo.html index 2e290c6..3a80abf 100644 --- a/bh20simplewebuploader/templates/demo.html +++ b/bh20simplewebuploader/templates/demo.html @@ -1,10 +1,30 @@ {% include 'header.html' %} + + + + + + + + + {% include 'banner.html' %} {% include 'menu.html' %} {% include 'search.html' %} +

The Virtuoso database contains public sequences!

@@ -26,14 +46,14 @@
- {% include 'footer.html' %} + {% include 'footer.html' %} + diff --git a/bh20simplewebuploader/templates/map.html b/bh20simplewebuploader/templates/map.html index 4aa22b9..e69de29 100644 --- a/bh20simplewebuploader/templates/map.html +++ b/bh20simplewebuploader/templates/map.html @@ -1,49 +0,0 @@ - - - {% include 'header.html' %} - - - - - - - - - - - - {% include 'banner.html' %} - {% include 'menu.html' %} -
- - {% include 'footer.html' %} - - - - - - - - - - - -- cgit v1.2.3 From 06e3922a5541641077b18016e272cddc7e50205b Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Fri, 17 Jul 2020 09:59:32 +0100 Subject: Map refactoring, now shows on HOME --- bh20simplewebuploader/main.py | 2 +- bh20simplewebuploader/static/map.js | 14 ++++++++------ bh20simplewebuploader/templates/demo-run.html | 0 bh20simplewebuploader/templates/demo.html | 21 +-------------------- bh20simplewebuploader/templates/home.html | 15 ++++++++++++++- bh20simplewebuploader/templates/map.html | 0 bh20simplewebuploader/templates/mapheader.html | 16 ++++++++++++++++ 7 files changed, 40 insertions(+), 28 deletions(-) delete mode 100644 bh20simplewebuploader/templates/demo-run.html delete mode 100644 bh20simplewebuploader/templates/map.html create mode 100644 bh20simplewebuploader/templates/mapheader.html (limited to 'bh20simplewebuploader/static') diff --git a/bh20simplewebuploader/main.py b/bh20simplewebuploader/main.py index e8bb507..206f884 100644 --- a/bh20simplewebuploader/main.py +++ b/bh20simplewebuploader/main.py @@ -253,7 +253,7 @@ def send_home(): Send the front page. """ - return render_template('home.html', menu='HOME') + return render_template('home.html', menu='HOME', load_map=True) @app.route('/upload') diff --git a/bh20simplewebuploader/static/map.js b/bh20simplewebuploader/static/map.js index e1a4289..8b8ecba 100644 --- a/bh20simplewebuploader/static/map.js +++ b/bh20simplewebuploader/static/map.js @@ -31,6 +31,7 @@ function drawMap(){ radius: parseInt(data[i]["count"]) //not working for whatever reason }).addTo(mymap); } + // updateMapMarkers(data); }); document.getElementById("map_view").classList.remove("invisible"); @@ -42,11 +43,11 @@ function drawMap(){ /* This function updates the map with markers * */ -function updateMapMarkers() { +function updateMapMarkers(data) { // markers.clearLayers(); // remove all markers // document.getElementById("results").classList.remove("invisible"); - document.getElementById("loader").classList.add("invisible"); - /* + // document.getElementById("loader").classList.add("invisible"); + for (let i = 0; i < data.length; i++) { let {"count": fastaCount, GPS, LocationLabel: label } = data[i]; let coordinates = GPS.split(" "); @@ -57,10 +58,11 @@ function updateMapMarkers() { let marker = L.marker([lat, lon]); marker.bindPopup("" + label + "
" + "FastaCount: " +fastaCount); // markers.addLayer(marker) - }} - */ + } + } + // Reload the map - map.invalidateSize(); + // map.invalidateSize(); // document.getElementById("map_view").classList.add("invisible"); // document.getElementById("loader").classList.add("invisible"); } diff --git a/bh20simplewebuploader/templates/demo-run.html b/bh20simplewebuploader/templates/demo-run.html deleted file mode 100644 index e69de29..0000000 diff --git a/bh20simplewebuploader/templates/demo.html b/bh20simplewebuploader/templates/demo.html index 3a80abf..65ba462 100644 --- a/bh20simplewebuploader/templates/demo.html +++ b/bh20simplewebuploader/templates/demo.html @@ -1,25 +1,7 @@ {% include 'header.html' %} - - - - - - - - - + {% include 'mapheader.html' %} {% include 'banner.html' %} {% include 'menu.html' %} @@ -36,7 +18,6 @@ - diff --git a/bh20simplewebuploader/templates/home.html b/bh20simplewebuploader/templates/home.html index b90a18d..42b08c0 100644 --- a/bh20simplewebuploader/templates/home.html +++ b/bh20simplewebuploader/templates/home.html @@ -1,6 +1,7 @@ {% include 'header.html' %} + {% include 'mapheader.html' %} {% include 'banner.html' %} {% include 'menu.html' %} @@ -44,7 +45,19 @@ -{% include 'footer.html' %} + + + {% include 'footer.html' %} + + + diff --git a/bh20simplewebuploader/templates/map.html b/bh20simplewebuploader/templates/map.html deleted file mode 100644 index e69de29..0000000 diff --git a/bh20simplewebuploader/templates/mapheader.html b/bh20simplewebuploader/templates/mapheader.html new file mode 100644 index 0000000..ca62051 --- /dev/null +++ b/bh20simplewebuploader/templates/mapheader.html @@ -0,0 +1,16 @@ + + + + + + -- cgit v1.2.3 From b8376a3174835d75cb8235c622ac49585f23e8ee Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Fri, 17 Jul 2020 10:20:04 +0100 Subject: Map markers; disabled search again --- bh20simplewebuploader/static/map.js | 23 +++++++---------------- bh20simplewebuploader/templates/demo.html | 13 ++++++++++++- bh20simplewebuploader/templates/search.html | 10 ---------- 3 files changed, 19 insertions(+), 27 deletions(-) (limited to 'bh20simplewebuploader/static') diff --git a/bh20simplewebuploader/static/map.js b/bh20simplewebuploader/static/map.js index 8b8ecba..e877454 100644 --- a/bh20simplewebuploader/static/map.js +++ b/bh20simplewebuploader/static/map.js @@ -6,12 +6,11 @@ var map = L.map( 'mapid', { }); L.tileLayer( 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { - attribution: '© OpenStreetMap', + attribution: '© OpenStreetMap | COVID-19 PubSeq', subdomains: ['a','b','c'] }).addTo(map); -var markers = L.markerClusterGroup().addTo(mapid) - +// var markers = L.markerClusterGroup().addTo(mapid) function drawMap(){ var mymap = map; @@ -22,6 +21,7 @@ function drawMap(){ return response.json(); }) .then(data => { + /* for (var i=0; i" + label + "
" + "FastaCount: " +fastaCount); - // markers.addLayer(marker) + L.marker([lat, lon]).addTo(map) + .bindPopup("" + label + "
" + "FastaCount: " +fastaCount); } } - - // Reload the map - // map.invalidateSize(); - // document.getElementById("map_view").classList.add("invisible"); - // document.getElementById("loader").classList.add("invisible"); } diff --git a/bh20simplewebuploader/templates/demo.html b/bh20simplewebuploader/templates/demo.html index 65ba462..04bf877 100644 --- a/bh20simplewebuploader/templates/demo.html +++ b/bh20simplewebuploader/templates/demo.html @@ -5,10 +5,21 @@ {% include 'banner.html' %} {% include 'menu.html' %} - {% include 'search.html' %}

The Virtuoso database contains public sequences!

+ +

[Demo] Display content sequences by:

diff --git a/bh20simplewebuploader/templates/search.html b/bh20simplewebuploader/templates/search.html index dbdca90..e69de29 100644 --- a/bh20simplewebuploader/templates/search.html +++ b/bh20simplewebuploader/templates/search.html @@ -1,10 +0,0 @@ - - -- cgit v1.2.3 From fdb534f551e11ba5d43bec4aeba2bab4d141700b Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Fri, 17 Jul 2020 10:31:34 +0100 Subject: Using mapcluster again --- bh20simplewebuploader/static/map.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'bh20simplewebuploader/static') diff --git a/bh20simplewebuploader/static/map.js b/bh20simplewebuploader/static/map.js index e877454..36208b5 100644 --- a/bh20simplewebuploader/static/map.js +++ b/bh20simplewebuploader/static/map.js @@ -10,7 +10,6 @@ L.tileLayer( 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { subdomains: ['a','b','c'] }).addTo(map); -// var markers = L.markerClusterGroup().addTo(mapid) function drawMap(){ var mymap = map; @@ -45,6 +44,7 @@ function drawMap(){ * */ function updateMapMarkers(data) { + let markers = L.markerClusterGroup(); for (let i = 0; i < data.length; i++) { let {"count": fastaCount, GPS, LocationLabel: label } = data[i]; let coordinates = GPS.split(" "); @@ -52,8 +52,10 @@ function updateMapMarkers(data) { let lat, lon; [lon, lat] = coordinates.map(parseFloat); let point = L.point() - L.marker([lat, lon]).addTo(map) - .bindPopup("" + label + "
" + "FastaCount: " +fastaCount); + marker = (L.marker([lat, lon])); + // .bindPopup("" + label + "
" + "FastaCount: " +fastaCount)); + markers.addLayer(marker); } } + map.addLayer(markers); } -- cgit v1.2.3 From 22dc44b243674f3acb6ef464985f333cdc983824 Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Fri, 17 Jul 2020 10:32:42 +0100 Subject: Map: show FASTA count --- bh20simplewebuploader/static/map.js | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'bh20simplewebuploader/static') diff --git a/bh20simplewebuploader/static/map.js b/bh20simplewebuploader/static/map.js index 36208b5..5ecf95d 100644 --- a/bh20simplewebuploader/static/map.js +++ b/bh20simplewebuploader/static/map.js @@ -20,17 +20,6 @@ function drawMap(){ return response.json(); }) .then(data => { - /* - for (var i=0; i" + label + "
" + "FastaCount: " +fastaCount)); + marker.bindPopup("" + label + "
" + "FastaCount: " +fastaCount); markers.addLayer(marker); } } -- cgit v1.2.3 From 108a96f8608c3d82c8cfe1d33ebb37501c01413b Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Fri, 17 Jul 2020 10:38:23 +0100 Subject: Align map a bit --- bh20simplewebuploader/static/main.css | 5 +++++ bh20simplewebuploader/templates/demo.html | 2 +- bh20simplewebuploader/templates/home.html | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) (limited to 'bh20simplewebuploader/static') diff --git a/bh20simplewebuploader/static/main.css b/bh20simplewebuploader/static/main.css index 9f89045..6e651a4 100644 --- a/bh20simplewebuploader/static/main.css +++ b/bh20simplewebuploader/static/main.css @@ -385,6 +385,11 @@ div.status { border-bottom: 1px solid #ddd; } +.map { + padding: 20px 32px; + // display: inline-block; +} + .editbutton { float: right; text-align: right; diff --git a/bh20simplewebuploader/templates/demo.html b/bh20simplewebuploader/templates/demo.html index 04bf877..75bc0e2 100644 --- a/bh20simplewebuploader/templates/demo.html +++ b/bh20simplewebuploader/templates/demo.html @@ -37,7 +37,7 @@ -
-