ac3191c7e768e8c0c8f6c376526f029ad39f4e1b max Thu Sep 10 05:57:18 2026 -0700 hgHubConnect: on mirrors, show the Hub Upload tab as instructions, not a dialog On a site that is not the login host the tab used to render the full upload UI with a warning dialog layered over it. Show only a message instead: where to upload, a direct link to the Hub Upload tab on the US site, and how to get an uploaded hub onto this site via Connected Hubs or a hub-connecting URL. refs #38323 diff --git src/hg/js/hgMyData.js src/hg/js/hgMyData.js index 2ff488e654e..b92a55d5086 100644 --- src/hg/js/hgMyData.js +++ src/hg/js/hgMyData.js @@ -3024,43 +3024,70 @@ return true; } return false; } function handleRefreshState(jsonData, textStatus) { if (checkJsonData(jsonData, 'handleRefreshState')) { handleGetFileList(jsonData, true); } } function handleErrorState(jqXHR, textStatus) { cart.defaultErrorCallback(jqXHR, textStatus); } + function showMirrorOnlyMessage() { + // On the mirrors there is no upload infrastructure, so instead of layering a + // dialog over a tab that cannot be used, replace the tab with instructions on + // where to upload and how to get the uploaded hub back onto this site. + let uploadUrl = `${loginHost}/cgi-bin/hgHubConnect#hubUpload`; + let hostName = loginHost.replace(/^https?:\/\//, ""); + $("#hubUpload").html( + `
Files can only be uploaded on our main US-based site, for speed reasons. ` + + `Your uploaded files are stored there and are not copied to this mirror.
` + + `Go to Hub Upload on ${hostName}
` + + `A hub that you upload there can be used on any of our sites, including this one. ` + + `To use one of your uploaded hubs here:
` + + `