console.log("Reloading controller"); module.exports = { memory(context,done) { // Wait call? // // Get first result var [ret] = context.manager.call("core-monitor:getStat"); if(ret != undefined) { done(ret.result); } }, bundles(context,done) { var tbl = []; for(var k in context.manager.registry) { var v = context.manager.registry[k]; if(v == undefined) { continue; } tbl.push({ id: v.id, name:v.name, state: v.info.state, package: (v.info.pkgInfo)?v.info.pkgInfo.name:"", version: (v.info.pkgInfo)?v.info.pkgInfo.version:"", author: ((v.info.pkgInfo)?v.info.pkgInfo.author.name:"") || "?", modulePath: v.modulePath, }); } tbl = tbl.sort((a,b) => { return a.id - b.id}); done(tbl); } }