b4ecdd4d8460be76fec8cc30bd300ef449cc6fac
chmalee
Mon Nov 24 15:11:14 2025 -0800
Show a warning message when a user tries hubspace on genome-euro or genome-asia telling them to try on US server. This is a temporary measure until we can add a special workaround to get around the captcha from client code, refs #36290
diff --git src/hg/js/hgMyData.js src/hg/js/hgMyData.js
index a39a5bfc2e5..9aa6daa1e2d 100644
--- src/hg/js/hgMyData.js
+++ src/hg/js/hgMyData.js
@@ -1493,30 +1493,32 @@
function handleErrorState(jqXHR, textStatus) {
cart.defaultErrorCallback(jqXHR, textStatus);
}
let inited = false; // keep track of first init for tab switching purposes
function init() {
cart.setCgiAndUrl(fileListEndpoint);
cart.debug(debugCartJson);
// get the file list immediately upon page load
let activeTab = $("#tabs").tabs( "option", "active" );
if (activeTab === 3) {
let url = new URL(window.location.href);
if (url.protocol === "http:") {
warn(`The hub upload feature is only available over HTTPS. Please load the HTTPS version of ` +
`our site: https:${url.host}${url.pathname}${url.search}`);
+ } else if ((url.protocol + "//" + url.host) !== loginHost) {
+ warn(`The hub upload feature is only avaiable on our US based public site (${loginHost}) for speed purposes. Please go there to upload your hubs, copy the links to the hub.txt files, then use the Connected Hubs tab here to view your files.`);
} else if (!inited && isLoggedIn) {
cart.send({ getHubSpaceUIState: {}}, handleRefreshState, handleErrorState);
cart.flush();
} else {
showExistingFiles([]);
}
}
}
return { init: init,
uiState: uiState,
defaultDb: defaultDb,
makeGenomeSelectOptions: makeGenomeSelectOptions,
detectFileType: detectFileType,
};