refactor command handler
This commit is contained in:
parent
cd9c3c8317
commit
89616537b8
|
@ -35,9 +35,7 @@ class Dashboard {
|
||||||
self.events.on('status', monitor.setStatus.bind(monitor));
|
self.events.on('status', monitor.setStatus.bind(monitor));
|
||||||
self.events.on('servicesState', monitor.availableServices.bind(monitor));
|
self.events.on('servicesState', monitor.availableServices.bind(monitor));
|
||||||
|
|
||||||
self.events.setCommandHandler("console:command", (cmd, cb) => {
|
self.events.setCommandHandler("console:command", monitor.executeCmd.bind(monitor));
|
||||||
cb(monitor.executeCmd(cmd));
|
|
||||||
});
|
|
||||||
|
|
||||||
self.logger.info('========================'.bold.green);
|
self.logger.info('========================'.bold.green);
|
||||||
self.logger.info(('Welcome to Embark ' + self.version).yellow.bold);
|
self.logger.info(('Welcome to Embark ' + self.version).yellow.bold);
|
||||||
|
|
Loading…
Reference in New Issue