02d902f77c4015d68b551ed71c90b2c70be02447 hiram Thu May 23 14:03:52 2019 -0700 indicate parent of parent when two levels deep and trackLeavesOnly refs #18869 diff --git src/hg/hubApi/list.c src/hg/hubApi/list.c index 88b4348..5ab6567 100644 --- src/hg/hubApi/list.c +++ src/hg/hubApi/list.c @@ -422,31 +422,35 @@ long long itemCount = 0; if (trackDbSetting(tdb, "tableBrowser")) protectedData = TRUE; else itemCount = dataItemCount(db, tdb); jsonWriteObjectStart(jw, tdb->track); if (tdbIsComposite(tdb)) jsonWriteString(jw, "compositeContainer", "TRUE"); if (tdbIsCompositeView(tdb)) jsonWriteString(jw, "compositeViewContainer", "TRUE"); jsonWriteString(jw, "shortLabel", tdb->shortLabel); jsonWriteString(jw, "type", tdb->type); jsonWriteString(jw, "longLabel", tdb->longLabel); jsonWriteNumber(jw, "itemCount", itemCount); if (tdb->parent) + { jsonWriteString(jw, "parent", tdb->parent->track); + if (tdb->parent->parent) + jsonWriteString(jw, "parentParent", tdb->parent->parent->track); + } if (tdb->settingsHash) { struct hashEl *hel; struct hashCookie hc = hashFirst(tdb->settingsHash); while ((hel = hashNext(&hc)) != NULL) { if (sameWord("track", hel->name)) continue; // already output in header if (sameWord("tableBrowser", hel->name)) jsonWriteBoolean(jw, "protectedData", TRUE); else if (isEmpty((char *)hel->val)) jsonWriteString(jw, hel->name, "empty"); else if (protectedData && sameWord(hel->name, "bigDataUrl")) jsonWriteString(jw, hel->name, "protectedData"); else