getActiveNodeList -> getActiveConnectionList (be consistent)

This commit is contained in:
Bryan Ashby 2018-11-13 20:03:54 -07:00
parent 5a74cdc8d9
commit d8f0708310
3 changed files with 8 additions and 8 deletions

View File

@ -11,7 +11,7 @@ const moment = require('moment');
const hashids = require('hashids'); const hashids = require('hashids');
exports.getActiveConnections = getActiveConnections; exports.getActiveConnections = getActiveConnections;
exports.getActiveNodeList = getActiveNodeList; exports.getActiveConnectionList = getActiveConnectionList;
exports.addNewClient = addNewClient; exports.addNewClient = addNewClient;
exports.removeClient = removeClient; exports.removeClient = removeClient;
exports.getConnectionByUserId = getConnectionByUserId; exports.getConnectionByUserId = getConnectionByUserId;
@ -26,7 +26,7 @@ function getActiveConnections(authUsersOnly = false) {
}); });
} }
function getActiveNodeList(authUsersOnly) { function getActiveConnectionList(authUsersOnly) {
if(!_.isBoolean(authUsersOnly)) { if(!_.isBoolean(authUsersOnly)) {
authUsersOnly = true; authUsersOnly = true;

View File

@ -5,7 +5,7 @@
const { MenuModule } = require('./menu_module.js'); const { MenuModule } = require('./menu_module.js');
const { Errors } = require('./enig_error.js'); const { Errors } = require('./enig_error.js');
const { const {
getActiveNodeList, getActiveConnectionList,
getConnectionByNodeId, getConnectionByNodeId,
} = require('./client_connections.js'); } = require('./client_connections.js');
const UserInterruptQueue = require('./user_interrupt_queue.js'); const UserInterruptQueue = require('./user_interrupt_queue.js');
@ -110,7 +110,7 @@ exports.getModule = class NodeMessageModule extends MenuModule {
location : 'N/A', location : 'N/A',
affils : 'N/A', affils : 'N/A',
timeOn : 'N/A', timeOn : 'N/A',
}].concat(getActiveNodeList(true) }].concat(getActiveConnectionList(true)
.map(node => Object.assign(node, { text : node.node.toString() } )) .map(node => Object.assign(node, { text : node.node.toString() } ))
).filter(node => node.node !== this.client.node); // remove our client's node ).filter(node => node.node !== this.client.node); // remove our client's node
this.nodeList.sort( (a, b) => a.node - b.node ); // sort by node this.nodeList.sort( (a, b) => a.node - b.node ); // sort by node

View File

@ -3,7 +3,7 @@
// ENiGMA½ // ENiGMA½
const { MenuModule } = require('./menu_module.js'); const { MenuModule } = require('./menu_module.js');
const { getActiveNodeList } = require('./client_connections.js'); const { getActiveConnectionList } = require('./client_connections.js');
const { Errors } = require('./enig_error.js'); const { Errors } = require('./enig_error.js');
// deps // deps
@ -43,7 +43,7 @@ exports.getModule = class WhosOnlineModule extends MenuModule {
return cb(Errors.MissingMci(`Missing online list MCI ${MciViewIds.onlineList}`)); return cb(Errors.MissingMci(`Missing online list MCI ${MciViewIds.onlineList}`));
} }
const onlineList = getActiveNodeList(true).slice(0, onlineListView.height).map( const onlineList = getActiveConnectionList(true).slice(0, onlineListView.height).map(
oe => Object.assign(oe, { text : oe.userName, timeOn : _.upperFirst(oe.timeOn.humanize()) }) oe => Object.assign(oe, { text : oe.userName, timeOn : _.upperFirst(oe.timeOn.humanize()) })
); );