95e2c3a93202ee912624bb730724313faae7c886 chmalee Wed Dec 4 16:41:31 2024 -0800 Use the DataTables select API instead of implementing my own checkboxes Working child/parent rows. Just need to add checkboxes to the children and indent them a smidge Fix log in for api key in pre-finish hook. Make the pre-finish hook determine if we came from hubtools or not and don't create hub.txts if we did. Fix writing of parentRows. Make client not use .child() but instead show or hide based on a load time constraint, which is not quite working all the way yet Make select/deselect work with child files. Remove some dead code Make deletes work by moving any requested directories to the end of the delete list and then deleting the directories so rmdir doesn't fail Fix new table rows not animating on add Make newly updloaded files show up in table include their parent dir and hub.txt, and indent them appropriately Hash filenames to file objects in the client so we don't add duplicate rows to the table when multiple files are uploaded at once. Update the selected file div after deleting files. Make clicks on hub.txt files load the hub. Turn the file clicked on to pack. Remove some old copy from the template page Revert early experimental commit when trying to allow bigDataUrl uploads directly through hgCustom Fix up some comments to be more correct Remove old CGI experiment diff --git src/hg/lib/customFactory.c src/hg/lib/customFactory.c index c3af836..b9ade75 100644 --- src/hg/lib/customFactory.c +++ src/hg/lib/customFactory.c @@ -3480,73 +3480,51 @@ if (!isprint(string[i]) && !isspace(string[i])) return TRUE; return FALSE; } static boolean bigDataOopsRecognizer(struct customFactory *fac, struct customPp *cpp, char *type, struct customTrack *track) /* errAbort if looks like user uploaded a bigData file, otherwise return FALSE. */ { char *line = customFactoryNextRealTilTrack(cpp); if (line == NULL) return FALSE; if (hasUnprintable(line, 6)) { char *fileName = customPpFileName(cpp); - dumpStack("bigDataOoops: fileName = '%s'\n", fileName); - errAbort("bigDataOops: fileName = '%s'\n", fileName); if (type == NULL &&isNotEmpty(fileName)) { if (endsWith(fileName, ".bam")) type = "bam"; else if (endsWith(fileName, ".bb") || endsWith(fileName, ".bigBed")) type = "bigBed"; else if (endsWith(fileName, ".inter.bb") || endsWith(fileName, ".inter.bigBed")) type = "bigInteract"; else if (endsWith(fileName, ".bw") || endsWith(fileName, ".bigWig")) type = "bigWig"; } char *docUrl = NULL; if (isNotEmpty(type)) docUrl = bigDataDocPath(type); struct dyString *dataName = dyStringNew(0); if (isNotEmpty(fileName) && !sameString(fileName, CT_NO_FILE_NAME) && !startsWith("memory://", fileName)) dyStringPrintf(dataName, " (%s)", fileName); else if (track->tdb && track->tdb->shortLabel && differentString(track->tdb->shortLabel, CT_DEFAULT_TRACK_NAME)) dyStringPrintf(dataName, " (%s)", track->tdb->shortLabel); - if (cfgOptionBooleanDefault("storeUserFiles", FALSE)) - { - // figure out if user is logged in: - // 1. if so, save 'line', which is really a binary data, to username encoded directory - // 2. if not, do regular oops recognizer - // TODO: make sure the correct loader is called after this - // essential that the struct customTrack * track structure - // gets filled in correctly for the loader to work because the - // 'line' will not exist at that point - // For now I think the best thing is to store the file and construct - // a bigDataUrl to it, then re do the custom track load - // so the right factory is called - //char *userName = (loginSystemEnabled() || wikiLinkEnabled()) ? wikiLinkUserName() : NULL; - //if (userName) - // { - // storeUserFiles(fileName, line); - // customPpReuse(cpp, line); - // return TRUE; - // } - } if (docUrl) errAbort("It appears that you are directly uploading binary data of type %s%s. " "Custom tracks of this type require the files to be accessible by " "public http/https/ftp. Our <a href='../goldenPath/help/hgTrackHubHelp.html#Hosting' target=_blank>track hub documentation</a> " "lists third-party services where you can " "store custom track or track hub files. " "Once the files are available on the internet, file URLs can be entered as-is, one per line, " "or via the bigDataUrl " "setting on a "track" line. " "See <A HREF='%s' TARGET=_BLANK>%s custom track documentation</A> for " "more information and examples.", type, dataName->string, docUrl, type); else errAbort("It appears that you are directly uploading binary data in an unrecognized " "format%s. For custom track formatting information, please see "