diff options
author | zsloan | 2019-06-14 13:43:10 -0500 |
---|---|---|
committer | zsloan | 2019-06-14 13:43:10 -0500 |
commit | 0a69a6cda09b4014eaa4f0b94beb00de39c4983e (patch) | |
tree | 97849319aa43c5b1593532b48f8fad38d499b31c | |
parent | 467a3141abd2ed358f80bcb420402b258d112da3 (diff) | |
download | genenetwork2-0a69a6cda09b4014eaa4f0b94beb00de39c4983e.tar.gz |
Added some metadata to top of global search results
-rw-r--r-- | wqflask/wqflask/gsearch.py | 3 | ||||
-rw-r--r-- | wqflask/wqflask/templates/gsearch_gene.html | 3 | ||||
-rw-r--r-- | wqflask/wqflask/templates/gsearch_pheno.html | 7 |
3 files changed, 9 insertions, 4 deletions
diff --git a/wqflask/wqflask/gsearch.py b/wqflask/wqflask/gsearch.py index 5910d77b..8df8c9a3 100644 --- a/wqflask/wqflask/gsearch.py +++ b/wqflask/wqflask/gsearch.py @@ -61,6 +61,7 @@ class GSearch(object): with Bench("Running query"): logger.sql(sql) re = g.db.execute(sql).fetchall() + trait_list = [] with Bench("Creating trait objects"): for i, line in enumerate(re): @@ -100,6 +101,7 @@ class GSearch(object): trait_list.append(this_trait) + self.trait_count = len(trait_list) self.trait_list = json.dumps(trait_list) elif self.type == "phenotype": @@ -186,4 +188,5 @@ class GSearch(object): trait_list.append(this_trait) + self.trait_count = len(trait_list) self.trait_list = json.dumps(trait_list) diff --git a/wqflask/wqflask/templates/gsearch_gene.html b/wqflask/wqflask/templates/gsearch_gene.html index 97b09929..62a2944c 100644 --- a/wqflask/wqflask/templates/gsearch_gene.html +++ b/wqflask/wqflask/templates/gsearch_gene.html @@ -9,7 +9,8 @@ <div class="container" style="width: 2000px;"> - <p>You searched for {{ terms }}.</p> + <h3>GN searched 754 datasets and 39765944 traits across 10 species, and found {{ trait_count }} results that match your query. + You can filter these results by adding key words in the fields below and you can also sort results on most columns.</h3> <p>To study a record, click on its Record ID below.<br />Check records below and click Add button to add to selection.</p> <div> diff --git a/wqflask/wqflask/templates/gsearch_pheno.html b/wqflask/wqflask/templates/gsearch_pheno.html index a34c2796..2a0e5c0c 100644 --- a/wqflask/wqflask/templates/gsearch_pheno.html +++ b/wqflask/wqflask/templates/gsearch_pheno.html @@ -9,7 +9,8 @@ <div class="container"> - <p>You searched for {{ terms }}.</p> + <h3>GN searched 51 datasets and 13763 traits across 10 species, and found {{ trait_count }} results that match your query. + You can filter these results by adding key words in the fields below and you can also sort results on most columns.</h3> <p>To study a record, click on its ID below.<br />Check records below and click Add button to add to selection.</p> <div> @@ -28,8 +29,8 @@ <button class="btn btn-default" id="export_traits">Download CSV</button> </form> <br /> - <div> - <table id="trait_table" width="100%" class="table-hover table-striped cell-border" style="float: left;"> + <div style="width: 100%;"> + <table id="trait_table" class="table-hover table-striped cell-border" style="float: left;"> <tbody> <td colspan="100%" align="center"><br><b><font size="15">Loading...</font></b><br></td> </tbody> |