WIP
This commit is contained in:
50
core/wfc.js
50
core/wfc.js
@@ -1,17 +1,67 @@
|
|||||||
// ENiGMA½
|
// ENiGMA½
|
||||||
const { MenuModule } = require('./menu_module');
|
const { MenuModule } = require('./menu_module');
|
||||||
|
|
||||||
|
// deps
|
||||||
|
const async = require('async');
|
||||||
|
const _ = require('lodash');
|
||||||
|
|
||||||
exports.moduleInfo = {
|
exports.moduleInfo = {
|
||||||
name : 'WFC',
|
name : 'WFC',
|
||||||
desc : 'Semi-Traditional Waiting For Caller',
|
desc : 'Semi-Traditional Waiting For Caller',
|
||||||
author : 'NuSkooler',
|
author : 'NuSkooler',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const FormIds = {
|
||||||
|
main : 0,
|
||||||
|
};
|
||||||
|
|
||||||
|
const MciViewIds = {
|
||||||
|
main : {
|
||||||
|
nodeStatus : 0,
|
||||||
|
quickLogView : 1,
|
||||||
|
|
||||||
|
customRangeStart : 10,
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// Secure + 2FA + root user + 'wfc' group.
|
||||||
|
const DefaultACS = 'SCAF2ID1GM[wfc]';
|
||||||
|
|
||||||
exports.getModule = class WaitingForCallerModule extends MenuModule {
|
exports.getModule = class WaitingForCallerModule extends MenuModule {
|
||||||
constructor(options) {
|
constructor(options) {
|
||||||
super(options);
|
super(options);
|
||||||
|
|
||||||
this.config = Object.assign({}, _.get(options, 'menuConfig.config'), { extraArgs : options.extraArgs });
|
this.config = Object.assign({}, _.get(options, 'menuConfig.config'), { extraArgs : options.extraArgs });
|
||||||
|
|
||||||
|
this.config.acs = this.config.acs || DefaultACS;
|
||||||
|
if (!this.config.acs.includes('SC')) {
|
||||||
|
this.config.acs = 'SC' + this.config.acs; // secure connection at the very, very least
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
mciReady(mciData, cb) {
|
||||||
|
super.mciReady(mciData, err => {
|
||||||
|
if (err) {
|
||||||
|
return cb(err);
|
||||||
|
}
|
||||||
|
|
||||||
|
async.series(
|
||||||
|
[
|
||||||
|
(callback) => {
|
||||||
|
return this.prepViewController('main', FormIds.main, mciData.menu, callback);
|
||||||
|
},
|
||||||
|
(callback) => {
|
||||||
|
// const requiredCodes = [
|
||||||
|
// ];
|
||||||
|
// return this.validateMCIByViewIds('main', requiredCodes, callback);
|
||||||
|
return callback(null);
|
||||||
|
},
|
||||||
|
],
|
||||||
|
err => {
|
||||||
|
return cb(err);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -251,7 +251,7 @@
|
|||||||
submit: {
|
submit: {
|
||||||
*: [
|
*: [
|
||||||
{
|
{
|
||||||
value: { message: null }
|
value: { messageIndex: null }
|
||||||
action: @method:selectMessage
|
action: @method:selectMessage
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -799,7 +799,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// default prompt entry used by the 'msg_lsit' module
|
// default prompt entry used by the 'msg_list' module
|
||||||
deleteMessageFromListPrompt: {
|
deleteMessageFromListPrompt: {
|
||||||
art: MSGDELPMPT
|
art: MSGDELPMPT
|
||||||
mci: {
|
mci: {
|
||||||
|
|||||||
Reference in New Issue
Block a user