ab47b1a355db4af04610515c1dab0371108f4fc1 max Fri Nov 5 17:31:10 2021 -0700 fixing ON/OFF thing again, wording and make window closable, refs #28324 diff --git src/hg/hgHubConnect/hgHubConnect.c src/hg/hgHubConnect/hgHubConnect.c index 7caeb9b..fadb73a 100644 --- src/hg/hgHubConnect/hgHubConnect.c +++ src/hg/hgHubConnect/hgHubConnect.c @@ -439,55 +439,55 @@ "Hub error checking will always refresh the files and never use our remote file cache (see below)." "\n " ); puts(""); // .tabSection puts("
"); puts("

Enable Genome Browser debugging modes

"); puts("
These apply to all connected hubs. By default, caching is activated and track load times are not shown, but you can change these settings while developing your hub:
"); puts("
"); puts("
"); // output the udcTimeout button char *noCacheLabel = "Inactive, never cache"; char *timeout = "5"; char *cacheStatus = "ON"; -char *description = "Do not cache contents at UCSC and always load them from the source server. This means that data access is slower, but you can see the effect of changes to your files immediately on the Genome Browser."; +char *description = "The current status always caches contents at UCSC. This means that data access is faster, but you cannot see the effect of changes to your files on the Genome Browser for at least 5 minutes."; if (cartNonemptyString(cart, "udcTimeout")) { noCacheLabel = "Active, always cache"; timeout = ""; cacheStatus = "OFF"; - description = "Always cache contents at UCSC. This means that data access is faster, but you cannot see the effect of changes to your files on the Genome Browser for at least 5 minutes."; + description = "The current status does not cache contents at UCSC and always load them from the source server. This means that data access is slower, but you can see the effect of changes to your files immediately on the Genome Browser."; } printf("File caching: %s  ", cacheStatus); printf("", timeout, noCacheLabel); printf("
%s
", description); puts("For custom tracks, this affects only the remote formats (bigBed, bigWig, tabix, BAM, CRAM, etc), not text files (BED, PSL, etc), which are stored at UCSC.
"); // output the measureTiming button char *timeLabel = "Show timings"; char *timeVal = "on"; -char *timeDesc = "Shows loading time in milliseconds for each track, to help debug performance problems."; -char *timeStatus = "ON"; +char *timeDesc = "Show no timing measurements."; +char *timeStatus = "OFF"; if (cartNonemptyString(cart, "measureTiming")) { timeLabel = "Hide timings"; timeVal = ""; - timeDesc = "Hide timing measurements."; - timeStatus = "OFF"; + timeDesc = "Shows loading time in milliseconds for each track, to help debug performance problems."; + timeStatus = "ON"; } printf("Load times: %s  ", timeStatus); printf("", timeVal, timeLabel); printf("
%s
", timeDesc); puts("
"); // margin-left puts("
"); // tabSection puts(""); // #hubDeveloper jsOnEventById("click", "hubValidateButton", "makeIframe(event)"); } void printSearchAndFilterBoxes(int searchEnabled, char *hubSearchTerms, char *dbFilter) @@ -1461,31 +1461,33 @@ ); jsIncludeFile("utils.js", NULL); jsIncludeFile("jquery-ui.js", NULL); webIncludeResourceFile("jquery-ui.css"); jsIncludeFile("ajax.js", NULL); jsIncludeFile("hgHubConnect.js", NULL); webIncludeResourceFile("hgHubConnect.css"); jsIncludeFile("jquery.cookie.js", NULL); jsIncludeFile("spectrum.min.js", NULL); // there is no color picker used anywhere on this page. why include this? } void doMiddle(struct cart *theCart) /* Write header and body of html page. */ { cart = theCart; -measureTiming = cartUsualBoolean(cart, "measureTiming", FALSE); +// hgHubConnect's own timing is tied to a special value of measureTiming, since now +// our users use measureTiming a lot more, we need to keep a special mode for us +measureTiming = sameString(cartUsualString(cart, "measureTiming", "full"), "full"); if(cgiIsOnWeb()) checkForGeoMirrorRedirect(cart); if (cartVarExists(cart, hgHubDoClear)) { doClearHub(cart); cartWebEnd(); return; } if (cartVarExists(cart, hgHubCheckUrl)) { doResetHub(cart); } @@ -1504,39 +1506,39 @@ puts(""); puts(""); puts(""); printIncludes(); jsInline("trackData = [];\n"); char *hubUrl = cartOptionalString(cart, "validateHubUrl"); jsInline("document.body.style.margin = 0;\n"); // simulate the look and feel of a dialog window with a blue bar at the top puts("
" "Hub Check" "" "close
"); puts("
"); + jsOnEventByIdF("click", "windowX", "closeIframe()"); if (isEmpty(hubUrl)) printf("Please wait, loading and checking hub, this can take 15 seconds to several minutes."); else { puts("

"); puts("  

"); jsOnEventByIdF("click", "reloadButton", "reloadIframe()"); jsOnEventByIdF("click", "closeButton", "closeIframe()"); - jsOnEventByIdF("click", "windowX", "closeIframe()"); printf("
Finished checking %s
", hubUrl); doValidateNewHub(hubUrl); puts("

Our command line tool hubCheck " "can be used to obtain the same output from a Unix command line.

"); } puts("
"); // margin 10px puts(""); // ui-dialog-titlebar puts(""); // ui-dialog cartWebEnd(); return; } cartWebStart(cart, NULL, "%s", pageTitle);