373b5c4187422a9584814dcfa324028fd2e50f14 chmalee Tue Aug 4 15:00:30 2026 -0700 Have the pre-finish hook return the rows it wrote, and fix the table display bugs that the real row data now lets us resolve, refs #37999 Co-Authored-By: Claude Opus 5 (1M context) diff --git src/hg/js/hgMyData.js src/hg/js/hgMyData.js index cd292b3775f..8e1f0709b9d 100644 --- src/hg/js/hgMyData.js +++ src/hg/js/hgMyData.js @@ -1,2685 +1,2689 @@ /* jshint esversion: 8 */ var debugCartJson = true; function prettyFileSize(num) { if (!num) {return "0B";} if (num < (1024 * 1024)) { return `${(num/1024).toFixed(1)}KB`; } else if (num < (1024 * 1024 * 1024)) { return `${((num/1024)/1024).toFixed(1)}MB`; } else { return `${(((num/1024)/1024)/1024).toFixed(1)}GB`; } } +function renderTimeCell(data, type) { + // DataTables renderer for the two time columns. The server sends seconds since + // the epoch, so the reader sees their own timezone rather than the server's, + // while ordering stays on the number + if (type !== "display") { + return data; + } + if (!data) { + return ""; + } + return new Date(data * 1000).toLocaleString(); +} + function cgiEncode(value) { // copy of cheapgi.c:cgiEncode except we are explicitly leaving '/' characters, and // space becomes '+': let splitVal = value.split('/'); splitVal.forEach((ele, ix) => { if (ele == " ") { splitVal[ix] = '+'; } else { splitVal[ix] = encodeURIComponent(ele); } }); return splitVal.join('/'); } function cgiDecode(value) { // decode an encoded value return decodeURIComponent(value); } function setDbSelectFromAutocomplete(selectEle, item) { // this has been bound to the