aboutsummaryrefslogtreecommitdiff
path: root/gn2
diff options
context:
space:
mode:
Diffstat (limited to 'gn2')
-rw-r--r--gn2/wqflask/oauth2/data.py4
-rw-r--r--gn2/wqflask/static/new/javascript/auth/search_phenotypes.js4
-rw-r--r--gn2/wqflask/templates/oauth2/data-list-phenotype.html2
3 files changed, 6 insertions, 4 deletions
diff --git a/gn2/wqflask/oauth2/data.py b/gn2/wqflask/oauth2/data.py
index 29d68be0..b7c7800c 100644
--- a/gn2/wqflask/oauth2/data.py
+++ b/gn2/wqflask/oauth2/data.py
@@ -70,7 +70,9 @@ def __search_phenotypes__(query, template, **kwargs):
selected_traits=selected_traits, search_results=search_results,
search_endpoint=urljoin(
authserver_uri(), "auth/data/search"),
- gn_server_url = authserver_uri(),
+ auth_server_url=authserver_uri(),
+ pheno_results_template=urljoin(
+ authserver_uri(), "auth/data/search/phenotype/<jobid>"),
results_endpoint=urljoin(
authserver_uri(),
f"auth/data/search/phenotype/{job_id}"),
diff --git a/gn2/wqflask/static/new/javascript/auth/search_phenotypes.js b/gn2/wqflask/static/new/javascript/auth/search_phenotypes.js
index 99ecb16e..e9ef2683 100644
--- a/gn2/wqflask/static/new/javascript/auth/search_phenotypes.js
+++ b/gn2/wqflask/static/new/javascript/auth/search_phenotypes.js
@@ -96,8 +96,8 @@ function display_search_results(data, textStatus, jqXHR) {
* @param {UUID}: The job id to fetch data for
*/
function fetch_search_results(job_id, success, error=default_error_fn) {
- host = $("#frm-search-traits").attr("data-gn-server-url");
- endpoint = host + "auth/data/search/phenotype/" + job_id
+ endpoint = $("#frm-search-traits").attr(
+ "data-pheno-results-template").replace("<jobid>", job_id);
$("#txt-search").prop("disabled", true);
$.ajax(
endpoint,
diff --git a/gn2/wqflask/templates/oauth2/data-list-phenotype.html b/gn2/wqflask/templates/oauth2/data-list-phenotype.html
index e5172c70..b23c16e2 100644
--- a/gn2/wqflask/templates/oauth2/data-list-phenotype.html
+++ b/gn2/wqflask/templates/oauth2/data-list-phenotype.html
@@ -113,7 +113,7 @@
<form id="frm-search-traits"
action="#"
method="POST"
- data-gn-server-url="{{gn_server_url}}">
+ data-pheno-results-template="{{pheno_results_template}}">
{%if dataset_type == "mrna"%}
<legend>mRNA: Search</legend>
{%else%}