mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-15 10:16:12 +01:00
sort by hostname
This commit is contained in:
@@ -17,6 +17,9 @@ infoController.get = function(req, res, next) {
|
||||
info = [];
|
||||
pubsub.publish('sync:node:info:start');
|
||||
setTimeout(function() {
|
||||
info.sort(function(a, b) {
|
||||
return (a.os.hostname < b.os.hostname) ? -1 : (a.os.hostname > b.os.hostname) ? 1 : 0;
|
||||
});
|
||||
res.render('admin/development/info', {info: info, infoJSON: JSON.stringify(info, null, 4), host: os.hostname(), port: nconf.get('port')});
|
||||
}, 200);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user