mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-11-03 20:45:58 +01:00 
			
		
		
		
	display both redis/mongo info if available
This commit is contained in:
		@@ -211,8 +211,29 @@ adminController.flags.get = function(req, res, next) {
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
adminController.database.get = function(req, res, next) {
 | 
			
		||||
	db.info(function (err, data) {
 | 
			
		||||
		res.render('admin/advanced/database', data);
 | 
			
		||||
	async.parallel({
 | 
			
		||||
		redis: function(next) {
 | 
			
		||||
			if (nconf.get('redis')) {
 | 
			
		||||
				var rdb = require('../database/redis');
 | 
			
		||||
				var cxn = rdb.connect();
 | 
			
		||||
				rdb.info(cxn, next);
 | 
			
		||||
			} else {
 | 
			
		||||
				next();
 | 
			
		||||
			}
 | 
			
		||||
		},
 | 
			
		||||
		mongo: function(next) {
 | 
			
		||||
			if (nconf.get('mongo')) {
 | 
			
		||||
				var mdb = require('../database/mongo');
 | 
			
		||||
				mdb.info(mdb.client, next);
 | 
			
		||||
			} else {
 | 
			
		||||
				next();
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	}, function(err, results) {
 | 
			
		||||
		if (err) {
 | 
			
		||||
			return next(err);
 | 
			
		||||
		}
 | 
			
		||||
		res.render('admin/advanced/database', results);
 | 
			
		||||
	});
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user