Pardon the noise. More tab to space conversion!

This commit is contained in:
Bryan Ashby 2018-06-22 21:26:46 -06:00
parent c3635bb26b
commit 1d8be6b014
128 changed files with 8017 additions and 8017 deletions

View file

@ -1,25 +1,25 @@
/* jslint node: true */
'use strict';
// ENiGMA½
const MenuModule = require('./menu_module.js').MenuModule;
const ViewController = require('./view_controller.js').ViewController;
const getActiveNodeList = require('./client_connections.js').getActiveNodeList;
const stringFormat = require('./string_format.js');
// ENiGMA½
const MenuModule = require('./menu_module.js').MenuModule;
const ViewController = require('./view_controller.js').ViewController;
const getActiveNodeList = require('./client_connections.js').getActiveNodeList;
const stringFormat = require('./string_format.js');
// deps
const async = require('async');
const _ = require('lodash');
// deps
const async = require('async');
const _ = require('lodash');
exports.moduleInfo = {
name : 'Who\'s Online',
desc : 'Who is currently online',
author : 'NuSkooler',
packageName : 'codes.l33t.enigma.whosonline'
name : 'Who\'s Online',
desc : 'Who is currently online',
author : 'NuSkooler',
packageName : 'codes.l33t.enigma.whosonline'
};
const MciViewIds = {
OnlineList : 1,
OnlineList : 1,
};
exports.getModule = class WhosOnlineModule extends MenuModule {
@ -33,26 +33,26 @@ exports.getModule = class WhosOnlineModule extends MenuModule {
return cb(err);
}
const self = this;
const vc = self.viewControllers.allViews = new ViewController( { client : self.client } );
const self = this;
const vc = self.viewControllers.allViews = new ViewController( { client : self.client } );
async.series(
[
function loadFromConfig(callback) {
const loadOpts = {
callingMenu : self,
mciMap : mciData.menu,
noInput : true,
callingMenu : self,
mciMap : mciData.menu,
noInput : true,
};
return vc.loadFromMenuConfig(loadOpts, callback);
},
function populateList(callback) {
const onlineListView = vc.getView(MciViewIds.OnlineList);
const listFormat = self.menuConfig.config.listFormat || '{node} - {userName} - {action} - {timeOn}';
const nonAuthUser = self.menuConfig.config.nonAuthUser || 'Logging In';
const otherUnknown = self.menuConfig.config.otherUnknown || 'N/A';
const onlineList = getActiveNodeList(self.menuConfig.config.authUsersOnly).slice(0, onlineListView.height);
const onlineListView = vc.getView(MciViewIds.OnlineList);
const listFormat = self.menuConfig.config.listFormat || '{node} - {userName} - {action} - {timeOn}';
const nonAuthUser = self.menuConfig.config.nonAuthUser || 'Logging In';
const otherUnknown = self.menuConfig.config.otherUnknown || 'N/A';
const onlineList = getActiveNodeList(self.menuConfig.config.authUsersOnly).slice(0, onlineListView.height);
onlineListView.setItems(_.map(onlineList, oe => {
if(oe.authenticated) {