Allow extraArgs such that we can launch from menu items easier

This commit is contained in:
Bryan Ashby 2018-01-28 12:56:35 -07:00
parent 7a2df56855
commit 342c37b388
1 changed files with 4 additions and 5 deletions

View File

@ -126,8 +126,7 @@ exports.getModule = class TelnetBridgeModule extends MenuModule {
constructor(options) { constructor(options) {
super(options); super(options);
this.config = options.menuConfig.config; this.config = Object.assign({}, _.get(options, 'menuConf.config'), options.extraArgs);
// defaults
this.config.port = this.config.port || 23; this.config.port = this.config.port || 23;
} }
@ -152,10 +151,10 @@ exports.getModule = class TelnetBridgeModule extends MenuModule {
host : self.config.host, host : self.config.host,
}; };
let clientTerminated;
self.client.term.write(resetScreen()); self.client.term.write(resetScreen());
self.client.term.write(` Connecting to ${connectOpts.host}, please wait...\n`); self.client.term.write(
` Connecting to ${connectOpts.host}, please wait...\n`
);
const telnetConnection = new TelnetClientConnection(self.client); const telnetConnection = new TelnetClientConnection(self.client);