diff options
author | Frederick Muriuki Muriithi | 2021-09-20 08:55:01 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2021-09-20 08:55:01 +0300 |
commit | 99bfeeef777bdaa804e4f91cae486a34fdf1e1c2 (patch) | |
tree | 6dfa22f62900c904c68728cfe9d991daaa79193c | |
parent | 03a91557c119fc2c4cdfc36015260034ead0ba98 (diff) | |
download | genenetwork2-99bfeeef777bdaa804e4f91cae486a34fdf1e1c2.tar.gz |
Implement proof-of-concept code to submit data
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* Implement some javascript to activate the "Clustered Heatmap"
button.
This commit provides a proof-of-concept implementation to help with
identifying the requirements for sending and receiving of the
heatmaps data.
-rw-r--r-- | wqflask/wqflask/templates/collections/view.html | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/wqflask/wqflask/templates/collections/view.html b/wqflask/wqflask/templates/collections/view.html index 09f9dd21..783458fc 100644 --- a/wqflask/wqflask/templates/collections/view.html +++ b/wqflask/wqflask/templates/collections/view.html @@ -253,6 +253,27 @@ $("#make_default").on("click", function(){ make_default(); }); + + $("#clustered-heatmaps").on("click", function() { + heatmap_url = $(this).attr("data-url") + console.log("heatmap url:", heatmap_url) + traits = $(".trait_checkbox:checked").map(function() { + return this.value + }).get(); + console.log("SELECTED TRAITS", traits); + $.ajax({ + type: "POST", + url: heatmap_url, + contentType: "application/json", + data: JSON.stringify({ + "traits_names": traits + }), + dataType: "JSON", + success: function(res) { + console.log("results:", res) + } + }); + }); }); </script> |