aboutsummaryrefslogtreecommitdiff
path: root/gn2/wqflask
diff options
context:
space:
mode:
authorzsloan2024-10-22 16:30:17 +0000
committerzsloan2024-10-22 16:30:17 +0000
commit05eab16f9e034d99bf74a224eb55b5856a4e7e15 (patch)
tree04c100f2c92a5de484b7f3bfe8888b98702913f1 /gn2/wqflask
parent5aa4e80366c940f653b59a7c0d686bc56d6aae8d (diff)
downloadgenenetwork2-05eab16f9e034d99bf74a224eb55b5856a4e7e15.tar.gz
Add GN2 Fallback link to index page and and error page/text
Also removed the error callback from the menu AJAX call since it seems to just duplicate the error message (which is also handled by the statusCode function)
Diffstat (limited to 'gn2/wqflask')
-rw-r--r--gn2/wqflask/static/new/javascript/dataset_select_menu_orig.js8
-rw-r--r--gn2/wqflask/templates/error.html2
-rwxr-xr-xgn2/wqflask/templates/index_page.html4
3 files changed, 10 insertions, 4 deletions
diff --git a/gn2/wqflask/static/new/javascript/dataset_select_menu_orig.js b/gn2/wqflask/static/new/javascript/dataset_select_menu_orig.js
index 2875eabd..1a738e2d 100644
--- a/gn2/wqflask/static/new/javascript/dataset_select_menu_orig.js
+++ b/gn2/wqflask/static/new/javascript/dataset_select_menu_orig.js
@@ -14,9 +14,14 @@ range = function(size, startAt=0) {
indicate_error = function (jqXHR, textStatus, errorThrown) {
errorElement = document.createElement("span");
errorElement.setAttribute("class", "alert-danger");
+ fallbackLink = document.createElement('a');
+ fallbackLink.href = "https://fallback.genenetwork.org";
+ fallbackLink.title = "GN2 Fallback";
+ fallbackLink.appendChild(document.createTextNode("GN2 Fallback Server."));
errorText = document.createTextNode(
- "There was an error retrieving and setting the menu. Try again later.");
+ "There was an error retrieving and setting the menu. Try visiting the ");
errorElement.appendChild(errorText);
+ errorElement.appendChild(fallbackLink);
if (document.getElementById("search")){
form = document.getElementById("search").getElementsByTagName("form")[0];
form.prepend(errorElement);
@@ -41,7 +46,6 @@ if (typeof gn_server_url === 'undefined'){
$.ajax(gn_server_url +'/menu/generate/json', {
dataType: 'json',
success: process_json,
- error: indicate_error,
statusCode: {
...defaultStatusCodeFunctions,
}
diff --git a/gn2/wqflask/templates/error.html b/gn2/wqflask/templates/error.html
index 7d2b2625..f38d6dca 100644
--- a/gn2/wqflask/templates/error.html
+++ b/gn2/wqflask/templates/error.html
@@ -14,7 +14,7 @@
<p>
This error is not what we wanted to see. Unfortunately errors
are part of all software systems and we need to resolve this
- together.
+ together. Try using the GN2 <a href="https://fallback.genenetwork.org/">Fallback instance.</a>
</p>
<p>
<b>It is important to report this ERROR so we can fix it for everyone</b>.
diff --git a/gn2/wqflask/templates/index_page.html b/gn2/wqflask/templates/index_page.html
index 7044e9e3..bacf7557 100755
--- a/gn2/wqflask/templates/index_page.html
+++ b/gn2/wqflask/templates/index_page.html
@@ -412,12 +412,14 @@
</ul>
</ul>
<ul>
- <li>GeneNetwork v2</li>
+ <li>GeneNetwork 2</li>
<ul>
<li>
<a href="https://genenetwork.org/">Main website</a> at UTHSC
</li>
+ <li><a href="https://fallback.genenetwork.org/">Backup</a> instance of GN2</li>
</ul>
+
</ul>
<ul>
<li>GeneNetwork v1</li>