Add Who's Online mod
This commit is contained in:
parent
e475bacdf8
commit
15cf37c55c
|
@ -11,7 +11,7 @@ var clientConnections = [];
|
||||||
exports.clientConnections = clientConnections;
|
exports.clientConnections = clientConnections;
|
||||||
|
|
||||||
function getActiveConnections() {
|
function getActiveConnections() {
|
||||||
return clientConnections.length;
|
return clientConnections;
|
||||||
}
|
}
|
||||||
|
|
||||||
function addNewClient(client, clientSock) {
|
function addNewClient(client, clientSock) {
|
||||||
|
|
|
@ -105,7 +105,7 @@ function getPredefinedMCIValue(client, code) {
|
||||||
// :TODO: cpu load average (over N seconds): http://stackoverflow.com/questions/9565912/convert-the-output-of-os-cpus-in-node-js-to-percentage
|
// :TODO: cpu load average (over N seconds): http://stackoverflow.com/questions/9565912/convert-the-output-of-os-cpus-in-node-js-to-percentage
|
||||||
// :TODO: Node version/info
|
// :TODO: Node version/info
|
||||||
|
|
||||||
AN : function activeNodes() { return clientConnections.getActiveConnections().toString(); },
|
AN : function activeNodes() { return clientConnections.getActiveConnections().length.toString(); },
|
||||||
|
|
||||||
TC : function totalCalls() { return sysProp.getSystemProperty('login_count').toString(); },
|
TC : function totalCalls() { return sysProp.getSystemProperty('login_count').toString(); },
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,6 @@ var MenuModule = require('../core/menu_module.js').MenuModule;
|
||||||
var userDb = require('../core/database.js').dbs.user;
|
var userDb = require('../core/database.js').dbs.user;
|
||||||
var ViewController = require('../core/view_controller.js').ViewController;
|
var ViewController = require('../core/view_controller.js').ViewController;
|
||||||
var getSystemLoginHistory = require('../core/stats.js').getSystemLoginHistory;
|
var getSystemLoginHistory = require('../core/stats.js').getSystemLoginHistory;
|
||||||
var colorCodes = require('../core/color_codes.js');
|
|
||||||
|
|
||||||
var moment = require('moment');
|
var moment = require('moment');
|
||||||
var async = require('async');
|
var async = require('async');
|
||||||
|
@ -89,8 +88,6 @@ LastCallersModule.prototype.mciReady = function(mciData, cb) {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
function populateList(callback) {
|
function populateList(callback) {
|
||||||
var callersView = vc.getView(MciCodeIds.CallerList);
|
|
||||||
|
|
||||||
var listFormat = self.menuConfig.config.listFormat || '{userName} - {location} - {affils} - {ts}';
|
var listFormat = self.menuConfig.config.listFormat || '{userName} - {location} - {affils} - {ts}';
|
||||||
var dateTimeFormat = self.menuConfig.config.dateTimeFormat || 'ddd MMM DD';
|
var dateTimeFormat = self.menuConfig.config.dateTimeFormat || 'ddd MMM DD';
|
||||||
|
|
||||||
|
@ -118,4 +115,4 @@ LastCallersModule.prototype.mciReady = function(mciData, cb) {
|
||||||
cb(err);
|
cb(err);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
};
|
||||||
|
|
|
@ -484,6 +484,10 @@
|
||||||
value: { command: "L" }
|
value: { command: "L" }
|
||||||
action: @menu:mainMenuLastCallers
|
action: @menu:mainMenuLastCallers
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
value: { command: "W" }
|
||||||
|
action: @menu:mainMenuWhosOnline
|
||||||
|
}
|
||||||
{
|
{
|
||||||
value: { command: "Y" }
|
value: { command: "Y" }
|
||||||
action: @menu:mainMenuUserStats
|
action: @menu:mainMenuUserStats
|
||||||
|
@ -512,6 +516,12 @@
|
||||||
art: LASTCALL
|
art: LASTCALL
|
||||||
options: { pause: true }
|
options: { pause: true }
|
||||||
}
|
}
|
||||||
|
mainMenuWhosOnline: {
|
||||||
|
desc: Who's Online
|
||||||
|
module: whos_online
|
||||||
|
art: WHOSON
|
||||||
|
options: { pause: true }
|
||||||
|
}
|
||||||
mainMenuUserStats: {
|
mainMenuUserStats: {
|
||||||
desc: User Stats
|
desc: User Stats
|
||||||
art: STATUS
|
art: STATUS
|
||||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -133,6 +133,15 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mainMenuWhosOnline: {
|
||||||
|
config: {
|
||||||
|
listFormat: "|00|01|36{node:<6.6}{userName:<17.17}{affils:<19.19}{action:<20.20}{timeOn:<8}"
|
||||||
|
}
|
||||||
|
mci: {
|
||||||
|
VM1: { height: 10 }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
messageAreaMessageList: {
|
messageAreaMessageList: {
|
||||||
config: {
|
config: {
|
||||||
listFormat: "|00|01|37{msgNum:>4} |00|37- |36{subj:<29.29} {from:<20.20} {ts} |01|31{newIndicator}"
|
listFormat: "|00|01|37{msgNum:>4} |00|37- |36{subj:<29.29} {from:<20.20} {ts} |01|31{newIndicator}"
|
||||||
|
|
Loading…
Reference in New Issue