about summary refs log tree commit diff
path: root/bh20simplewebuploader/static
diff options
context:
space:
mode:
Diffstat (limited to 'bh20simplewebuploader/static')
-rw-r--r--bh20simplewebuploader/static/main.js8
-rw-r--r--bh20simplewebuploader/static/map.js4
2 files changed, 2 insertions, 10 deletions
diff --git a/bh20simplewebuploader/static/main.js b/bh20simplewebuploader/static/main.js
index 6e63ed3..89bc603 100644
--- a/bh20simplewebuploader/static/main.js
+++ b/bh20simplewebuploader/static/main.js
@@ -66,13 +66,6 @@ function fetchHTMLTable(apiEndPoint) {
         .then(data => {
             console.log(data)
             htmlString="<table>"
-
-            // 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<data.length;i++) {
-                htmlString=htmlString+"<tr><td><a href='#' onclick='fetchSEQByLocation(\""+data[i]["key"]+"\");'>"+data[i]["label"]+"</a></td><td>"+data[i]["count"]+"<td></tr>"
-            }
-            */
             for (var i=0; i<data.length;i++) {
                 let url = data[i]["key"];
                 let label = data[i]["label"];
@@ -97,7 +90,6 @@ function fetchHTMLTable(apiEndPoint) {
   }
 ]
 
-
  */
 let searchGlobal = (toHTML) => {
     let m =  document.getElementById('search-input').value;
diff --git a/bh20simplewebuploader/static/map.js b/bh20simplewebuploader/static/map.js
index cabb63d..c01659f 100644
--- a/bh20simplewebuploader/static/map.js
+++ b/bh20simplewebuploader/static/map.js
@@ -86,7 +86,7 @@ function buildMapMarkers(data) {
             }}});
     // ---- Build the marker list
     for (let i = 0; i < data.length; i++) {
-        let {"count": fastaCount, GPS, LocationLabel: label } = data[i];
+        let {"count": fastaCount, GPS, Location: location, LocationLabel: label } = data[i];
         let countSeq = Number(fastaCount);
 
         let coordinates = GPS.split(" ");
@@ -95,7 +95,7 @@ function buildMapMarkers(data) {
             [lon, lat] = coordinates.map(parseFloat);
             let point = L.point()
             marker = new seqMarker([lat, lon],markerOptions={title: fastaCount+" sequences",sequences: countSeq});
-            marker.bindPopup("<b>" + label + "</b><br/>" + "SARS-CoV-2<br/>sequences: " +fastaCount);
+            marker.bindPopup("<b>" + label + "</b><br/>" + "SARS-CoV-2<br/><a href=\"/location?label="+location+"\">sequences: " +fastaCount + "</a>");
             markers.addLayer(marker);
         }
     }