* Code cleanup and eslint since -- remove unused variables, clean up RegExs, so on...

This commit is contained in:
Bryan Ashby 2018-01-15 12:22:11 -07:00
parent a106050ba3
commit ac1433e84b
112 changed files with 1375 additions and 1898 deletions

View file

@ -20,7 +20,7 @@ const _ = require('lodash');
location
affiliation
ts
*/
exports.moduleInfo = {
@ -65,7 +65,7 @@ exports.getModule = class LastCallersModule extends MenuModule {
function fetchHistory(callback) {
callersView = vc.getView(MciCodeIds.CallerList);
// fetch up
// fetch up
StatLog.getSystemLogEntries('user_login_history', StatLog.Order.TimestampDesc, 200, (err, lh) => {
loginHistory = lh;
@ -82,12 +82,12 @@ exports.getModule = class LastCallersModule extends MenuModule {
loginHistory = noOpLoginHistory;
}
}
//
// Finally, we need to trim up the list to the needed size
//
loginHistory = loginHistory.slice(0, callersView.dimens.height);
return callback(err);
});
},
@ -99,10 +99,10 @@ exports.getModule = class LastCallersModule extends MenuModule {
const dateTimeFormat = self.menuConfig.config.dateTimeFormat || 'ddd MMM DD';
async.each(
loginHistory,
loginHistory,
(item, next) => {
item.userId = parseInt(item.log_value);
item.ts = moment(item.timestamp).format(dateTimeFormat);
item.ts = moment(item.timestamp).format(dateTimeFormat);
User.getUserName(item.userId, (err, userName) => {
if(err) {