Warning: session_start(): open(/var/lib/php/sessions/sess_mjnrv95brmaqc534ijd0kg3pac, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
sclass G22NetworksFromAllDBsPanel {
G22Utils g22utils;
// Each script is registered to a non-persistent Concepts object
// loaded temporarily but connected to the appropriate db dir
JObjectTable table;
ReliableSingleThread rstUpdate = new(r _updateTable);
transient SingleComponentPanel scpDetail = singleComponentPanel();
*(G22Utils *g22utils) {}
visualize {
table = new JObjectTable;
table.itemToMap = script -> litorderedmap(
"DB" := fileName(scriptToDBDir(script)),
"ID" := str(script.id),
"Description" := script.description);
var tbl = table.visualize();
rstUpdate!;
tablePopupMenuItem_top(table.table, "Open project", rThread {
g22utils.masterStuff.openDatabase(table.selected()._concepts.conceptsDir());
});
table.onSelect(script -> {
if (script == null) scpDetail.clear();
else {
scpDetail.set(jTodo());
}
});
ret withTopAndBottomMargin(jCenteredRaisedSection("Networks from all projects",
jvsplit(tbl, scpDetail)));
}
File networkToDBDir(G22Network network) {
ret network == null ?: network._concepts.conceptsDir();
}
void _updateTable {
table.setData_force(concatLists(
map_pcall(g22utils.gazelleDBs(), db -> {
var classFinder = g22utils.masterStuff.makeClassFinder();
var cc = newConceptsWithClassFinder(db.conceptsFile(), classFinder);
cc.loadFromDisk();
ret list(cc, G22Network);
})));
}
}