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