Add Who's online docs, minor doc updates to last callers, and code cleanup
This commit is contained in:
parent
28afc56d84
commit
0d7a20027c
|
@ -38,7 +38,7 @@ function getActiveNodeList(authUsersOnly) {
|
||||||
node : ac.node,
|
node : ac.node,
|
||||||
authenticated : ac.user.isAuthenticated(),
|
authenticated : ac.user.isAuthenticated(),
|
||||||
userId : ac.user.userId,
|
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.userName = ac.user.username;
|
||||||
entry.realName = ac.user.properties.real_name;
|
entry.realName = ac.user.properties.real_name;
|
||||||
entry.location = ac.user.properties.location;
|
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');
|
const diff = now.diff(moment(ac.user.properties.last_login_timestamp), 'minutes');
|
||||||
entry.timeOn = moment.duration(diff, 'minutes');
|
entry.timeOn = moment.duration(diff, 'minutes');
|
||||||
|
|
|
@ -23,7 +23,7 @@ Available `config` block entries:
|
||||||
* `actionIndicatorDefault`: Default indicator when an action is not set. Defaults to "-".
|
* `actionIndicatorDefault`: Default indicator when an action is not set. Defaults to "-".
|
||||||
|
|
||||||
### Theming
|
### Theming
|
||||||
When in a list view, the following `itemFormat` object is provided:
|
The following `itemFormat` object is provided to MCI 1 (ie: `%VM1`):
|
||||||
* `userId`: User ID.
|
* `userId`: User ID.
|
||||||
* `realName`: User's real name or "N/A".
|
* `realName`: User's real name or "N/A".
|
||||||
* `ts`: Timestamp in `dateTimeFormat` format.
|
* `ts`: Timestamp in `dateTimeFormat` format.
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
---
|
||||||
|
layout: page
|
||||||
|
title: Who's Online
|
||||||
|
---
|
||||||
|
## The Who's OnlineModule
|
||||||
|
The built in `whos_online` module provides a basic who's online mod.
|
||||||
|
|
||||||
|
### Theming
|
||||||
|
The following `itemFormat` object is provided to MCI 1 (ie: `%VM1`):
|
||||||
|
* `userId`: User ID.
|
||||||
|
* `node`: Node ID the user is connected to.
|
||||||
|
* `timeOn`: A human friendly amount of time the user has been online.
|
||||||
|
* `realName`: User's real name.
|
||||||
|
* `location`: User's location.
|
||||||
|
* `affiliation` or `affils`: Users affiliations.
|
||||||
|
* `action`: Current action/view in the system taken from the `desc` field of the current MenuModule they are interacting with. For example, "Playing L.O.R.D".
|
||||||
|
|
Loading…
Reference in New Issue