!7
html {
if (webAuthed()) {
if (eq(uri, "/clean")) {
gc();
S answer = n(killThreadsOfExpiredMainClasses(), "thread") + " killed";
sleepSeconds(1);
gc();
ret answer;
}
}
L classes = allMainClasses();
new L l;
for (Class c : classes) {
S s = className(c);
RuntimeException e = null;
//s += ", " + str(callOpt(c, 'getProgramID));
s += ", " + getOpt(c, 'programID);
pcall {
e = (RuntimeException) callOpt(c, 'asRuntimeException, new Exception);
}
if (e != null) s += ", " + firstFileNameFromStackTrace(e);
Bool lic = cast getOpt(c, 'licensed_yes);
if (eq(lic, true)) {} // licensed
else s += ", license: " + lic;
L threads = registeredThreads(c);
if (nempty(threads))
s += ", threads: " + threadNames(threads);
l.add(s);
}
ret p("Have " + n(classes, "class") + ".")
+ ul_htmlEncode(l);
}