Libraryless. Click here for Pure Java version (2714L/19K/59K).
!752 static S webLogProgramID = "#1002576"; static S webLog = "webLog"; static S html(S subUri, Map<S, S> params) { if (!master()) ret "Sorry, not authorized."; L<S> keepFields = litlist("full", "n"); boolean full = webTrue(params.get("full")); L data; // contains maps or structure()-d maps if (full) data = scanLog(getProgramFile(webLogProgramID, webLog)); else data = (L) call(getMainBot(), "getRecentWebLog"); new StringBuffer buf; pcall { int x = 0; int n; if (!empty(params.get("n"))) n = parseInt(params.get("n")); else n = max(0, l(data)-1)/100*100; for (int i = min(n+100, l(data))-1; i >= n; i--) { S entry = structureOrText(data.get(i)); buf.append("Entry " + (i+1) + ": " + entry + "\n"); } } ret p(href(selfLink(params, keepFields, "full", "0"), "Recent Log") + " | " + href(selfLink(params, keepFields, "full", "1"), "Full Log")) + p("n=" + l(data)) + pageNav(params, keepFields, l(data), "n") // has its own <p> + sourceCodeToHTML(buf); }
Began life as a copy of #1002378
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment