4ab10833a68e3f95eb8449def2b67fac9416fb91 hiram Thu Apr 11 11:06:02 2019 -0700 now with 404 error for open problems and scrolling text window with margin refs #18869 diff --git src/hg/hubApi/hubApi.c src/hg/hubApi/hubApi.c index a81f253..68ac29a 100644 --- src/hg/hubApi/hubApi.c +++ src/hg/hubApi/hubApi.c @@ -842,42 +842,44 @@ if (NULL == genome) { hPrintf("<h4>odd error, can not find a gnomeList ? at url: '%s'</h4>\n", hubTop->url); return; } // testing /list/tracks?db=ce11 // testing /list/tracks? hubUrl genome=_araTha1 hPrintf("<ul>\n"); long lastTime = clock1000(); for ( ; genome; genome = genome->next ) { ++totalAssemblyCount; + char urlReference[2048]; if (isNotEmpty(genome->twoBitPath)) { hPrintf("<li><b>Assembly genome</b> '%s' <b>twoBitPath</b>: '%s'</li>\n", genome->name, genome->twoBitPath); char *chromName = NULL; struct chromInfo *ci = trackHubAllChromInfo(genome->name); unsigned chromSize = largestChromInfo(ci, &chromName); char sizeString[64]; sprintLongWithCommas(sizeString, chromSize); hPrintf("<li><b>Sequence count</b> %d, <b>largest</b>: %s at %s bases</li>\n", slCount(ci), chromName, sizeString); + safef(urlReference, sizeof(urlReference), " <a href='%s/getData/sequence?hubUrl=%s;genome=%s;chrom=%s;start=%u;end=%u' target=_blank>JSON example sequence output: %s:%u-%u</a>", urlPrefix, hubTop->url, genome->name, chromName, chromSize/4, (chromSize/4)+128, chromName, chromSize/4, (chromSize/4)+128); + hPrintf("<li>%s</li>\n", urlReference); } - char urlReference[2048]; - safef(urlReference, sizeof(urlReference), " <a href='%s/list/tracks?hubUrl=%s&genome=%s' target=_blank>JSON output: list tracks</a>", urlPrefix, hubTop->url, genome->name); + safef(urlReference, sizeof(urlReference), " <a href='%s/list/tracks?hubUrl=%s&genome=%s' target=_blank>JSON example list tracks output</a>", urlPrefix, hubTop->url, genome->name); hPrintf("<li>%s</li>\n", urlReference); hubInfo("organism", genome->organism); hubInfo("name", genome->name); hubInfo("description", genome->description); hubInfo("groups", genome->groups); hubInfo("defaultPos", genome->defaultPos); hubInfo("trackDbFile", genome->trackDbFile); hubAssemblySettings(hubTop, genome); if (measureTiming || debug) { long thisTime = clock1000(); hPrintf("<li><em>processing time %s: %ld millis</em></li>\n", genome->name, thisTime - lastTime); hPrintf("<hr>\n"); } if (timeOutReached()) @@ -1270,30 +1272,32 @@ void (*apiFunction)(char **) = hel->val; (*apiFunction)(words); return; } else commandError = TRUE; } (void) hubPublicDbLoadAll(); webStartJWest(cart, database, "UCSC JSON API interface"); // webStartGbNoBanner(cart, database, "UCSC JSON API interface"); // webStartGbOptionalBanner(cart, database, "UCSC JSON API interface", TRUE, FALSE); hPrintf("<div class='container-fluid gbPage'>\n"); +/* these style mentions need to go into custom css file */ +hPrintf("<div style='border:10px solid white'>\n"); if (debug) { hPrintf("<ul>\n"); hPrintf("<li>hgBotDelay: %d</li>\n", botDelay); char *envVar = getenv("BROWSER_HOST"); hPrintf("<li>BROWSER_HOST:%s</li>\n", envVar); envVar = getenv("CONTEXT_DOCUMENT_ROOT"); hPrintf("<li>CONTEXT_DOCUMENT_ROOT:%s</li>\n", envVar); envVar = getenv("CONTEXT_PREFIX"); hPrintf("<li>CONTEXT_PREFIX:%s</li>\n", envVar); envVar = getenv("DOCUMENT_ROOT"); hPrintf("<li>DOCUMENT_ROOT:%s</li>\n", envVar); envVar = getenv("HTTP_HOST"); hPrintf("<li>HTTP_HOST:%s</li>\n", envVar); @@ -1352,62 +1356,64 @@ if (debug) hPrintf("<em>hub open time: %ld millis</em><br>\n", thisTime - lastTime); } hPrintf("<h3>Please refer to <a href='../../goldenPath/help/api.html'>API help</a> documentation for more information about the JSON data API operation.</h3>\n"); hPrintf("<h3>See also: <a href='../../goldenPath/help/trackDb/trackDbHub.html' target=_blank>Track definition document</a> for definitions of track settings.</h3>\n"); if (debug) showCartDump(); hPrintf("<h2>Explore hub or database assemblies and tracks</h2>\n"); hPrintf("<h3>Select one of these three sources, and display options:</h3>\n"); selectionForm(); -hPrintf("<p>\n"); +/* these style mentions need to go into custom css file */ +hPrintf("<div style='border:1px solid black;height:500px;overflow:scroll'>\n"); if (sameWord(RADIO_UCSCDB, selectRadio)) /* requested UCSC db track list */ { tracksForUcscDb(ucscDb); } else { hPrintf("<h3>%s url: <em>%s</em></h3>\n", sameWord(RADIO_PUBHUB,selectRadio) ? "Public hub" : "Other hub", urlInput); hPrintf("<ul>\n"); hubInfo("hub name", hub->name); hubInfo("short label", hub->shortLabel); hubInfo("long label", hub->longLabel); hubInfo("genomes file", hub->genomesFile); hubInfo("default db", hub->defaultDb); hubInfo("description url", hub->descriptionUrl); hubInfo("email", hub->email); if (debug) { hubInfo("version", hub->version); /* UCSC internal info */ hubInfo("level", hub->level); /* UCSC internal info */ } hPrintf("</ul>\n"); genomeList(hub); } if (timedOut) hPrintf("<h1>Reached time out %ld seconds</h1>", timeOutSeconds); if (measureTiming || debug) hPrintf("<em>Overall total time: %ld millis</em><br>\n", clock1000() - enteredMainTime); -hPrintf("</p>\n"); +hPrintf("</div> <!-- end of text analysis output -->\n"); +hPrintf("</div> <!-- end of surrounding border-->\n"); hPrintf("</div> <!-- end this page contents -->\n"); webIncludeFile("inc/jWestFooter.html"); webEndJWest(); // cartWebEnd(); } /* void doMiddle(struct cart *theCart) */ /* Null terminated list of CGI Variables we don't want to save * permanently. */ static char *excludeVars[] = {"Submit", "submit", "sourceSelected", "selectRadio", "ucscGenome", "publicHubs", "clade", NULL,}; int main(int argc, char *argv[]) /* Process command line. */ { enteredMainTime = clock1000();