From 03a91557c119fc2c4cdfc36015260034ead0ba98 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Mon, 20 Sep 2021 06:54:04 +0300 Subject: Provide UI elements for clustered heatmap generation Issue: https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi * wqflask/wqflask/collect.py: provide hard-coded URL for testing * wqflask/wqflask/templates/collections/view.html: provide button Provide a button to trigger the heatmap generation. As a test, we also provide a hard-coded URL for the API endpoint to get the heatmap data. --- wqflask/wqflask/collect.py | 3 ++- wqflask/wqflask/templates/collections/view.html | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/collect.py b/wqflask/wqflask/collect.py index 01274ba9..41ff47ae 100644 --- a/wqflask/wqflask/collect.py +++ b/wqflask/wqflask/collect.py @@ -219,7 +219,8 @@ def view_collection(): json_version.append(jsonable(trait_ob)) collection_info = dict(trait_obs=trait_obs, - uc=uc) + uc=uc, + heatmap_data_url="http://localhost:8080/api/heatmaps/clustered") if "json" in params: return json.dumps(json_version) diff --git a/wqflask/wqflask/templates/collections/view.html b/wqflask/wqflask/templates/collections/view.html index 9ec98ab1..09f9dd21 100644 --- a/wqflask/wqflask/templates/collections/view.html +++ b/wqflask/wqflask/templates/collections/view.html @@ -50,6 +50,12 @@ +