From 16dec24b6ce6c3493ed5de872fbd5b0ac8eece7c Mon Sep 17 00:00:00 2001 From: barisusakli Date: Thu, 10 Mar 2016 19:55:33 +0200 Subject: [PATCH] sort by hostname --- src/controllers/admin/info.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/controllers/admin/info.js b/src/controllers/admin/info.js index 0bed7fa72b..a5c914f112 100644 --- a/src/controllers/admin/info.js +++ b/src/controllers/admin/info.js @@ -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); };