Add Who's online docs, minor doc updates to last callers, and code cleanup

This commit is contained in:
Bryan Ashby 2018-07-22 10:55:39 -06:00
parent 28afc56d84
commit 0d7a20027c
3 changed files with 20 additions and 3 deletions

View file

@ -38,7 +38,7 @@ function getActiveNodeList(authUsersOnly) {
node : ac.node,
authenticated : ac.user.isAuthenticated(),
userId : ac.user.userId,
action : _.has(ac, 'currentMenuModule.menuConfig.desc') ? ac.currentMenuModule.menuConfig.desc : 'Unknown',
action : _.get(ac, 'currentMenuModule.menuConfig.desc', 'Unknown'),
};
//
@ -48,7 +48,7 @@ function getActiveNodeList(authUsersOnly) {
entry.userName = ac.user.username;
entry.realName = ac.user.properties.real_name;
entry.location = ac.user.properties.location;
entry.affils = ac.user.properties.affiliation;
entry.affils = entry.affiliation = ac.user.properties.affiliation;
const diff = now.diff(moment(ac.user.properties.last_login_timestamp), 'minutes');
entry.timeOn = moment.duration(diff, 'minutes');