9e1a9c369a05df82c4d92a7ead7d97e00ac08be4 max Wed May 7 08:09:31 2025 -0700 changing hubConnect to remove the redirect, refs #29899 diff --git src/hg/hgHubConnect/hgHubConnect.c src/hg/hgHubConnect/hgHubConnect.c index 11005440a50..e383ef29c36 100644 --- src/hg/hgHubConnect/hgHubConnect.c +++ src/hg/hgHubConnect/hgHubConnect.c @@ -1411,72 +1411,66 @@ hubUpdateStatus( errCatch->message->string, NULL); else hubUpdateStatus(NULL, hub); errCatchFree(&errCatch); hDisconnectCentral(&conn); } static int doRedirect(struct cart *theCart) { struct hubConnectStatus *hub = hubConnectNewHub(); if (hub == NULL) return 0; -char headerText[1024]; - char *errorMessage; hubFindOrAddUrlInStatusTable(cart, hub->hubUrl, &errorMessage); // if there is an error message, we stay in hgHubConnect if (errorMessage != NULL) return 0; getDbAndGenome(cart, &database, &organism, oldVars); -int redirDelay = 3; -printf( "<META HTTP-EQUIV=\"REFRESH\" CONTENT=\"%d;URL=%s?%s\">", - redirDelay,"../cgi-bin/hgGateway",cartSidUrlString(cart)); +char headerText[1024]; safef(headerText, sizeof(headerText), "Hub Connect Successful"); cartWebStart(cart, NULL, "%s", headerText); -hPrintf("You will be automatically redirected to the gateway page for this hub's default database " - "(<A HREF=\"../cgi-bin/hgGateway?%s\">%s</A>) in %d seconds.<BR><BR>", - cartSidUrlString(cart),trackHubSkipHubName(database),redirDelay); - struct trackHub *tHub = hub->trackHub; -if (tHub->email != NULL) - { - hPrintf("<B>This hub is provided courtesy of <A HREF=\"mailto:%s\">%s</A>.</B> Please contact them with any questions.", tHub->email, tHub->email); - } -hPrintf("<BR><BR>"); -hPrintf("Hub: %s<BR><BR>", tHub->longLabel); -hPrintf("Hub Genomes: "); +hPrintf("<P><B>Hub Description:</B> %s</P>", tHub->longLabel); +hPrintf("<P><B>Contact email:</B> <A HREF=\"mailto:%s\">%s</A>.</B> Please contact them with questions about the data.</P>", tHub->email, tHub->email); struct trackHubGenome *genomeList = tHub->genomeList; -bool firstTime = TRUE; +hPrintf("<P>Select a genome assembly below to go back to the genome browser, with this hub connected:</P>"); +hPrintf("<ul>"); for(; genomeList; genomeList = genomeList->next) { - if (!firstTime) - hPrintf(","); - firstTime = FALSE; - hPrintf("<A href=\"../cgi-bin/hgTracks?db=%s&%s&position=lastDbPos\">%s</A>",genomeList->name, - cartSidUrlString(cart),trackHubSkipHubName(genomeList->name)); + char *desc = genomeList->description; + if (desc==NULL) + desc = hFreezeFromDb(genomeList->name); + + char *org = trackHubSkipHubName( genomeList->organism ); + if (org==NULL) + org = hOrganism(genomeList->name); + + hPrintf("<li><A href=\"../cgi-bin/hgTracks?db=%s&%s&position=lastDbPos\">%s: %s</A></li>",genomeList->name, + cartSidUrlString(cart), org, desc); } -hPrintf("<BR><BR>"); +hPrintf("</ul>"); + return 1; } static void doResetHub(struct cart *theCart) { char *url = cartOptionalString(cart, hgHubCheckUrl); if (url != NULL) { udcSetCacheTimeout(1); unsigned id = hubResetError(url); tryHubOpen(id); } else errAbort("must specify url in %s\n", hgHubDataText);