added mongo info function, change admin redis template to database template

This commit is contained in:
Baris Usakli
2013-12-05 14:24:18 -05:00
parent 67d5ea83e7
commit 519d376071
6 changed files with 38 additions and 8 deletions

View File

@@ -71,7 +71,15 @@
}
module.info = function(callback) {
throw new Error('not-implemented');
db.stats({scale:1024}, function(err, stats) {
stats.avgObjSize = (stats.avgObjSize / 1024).toFixed(2);
stats.mongo = true;
//remove this when andrew adds in undefined checking to templates
stats.redis = false;
callback(err, stats);
});
}
// key