From b7b5f1b365afa7bf6dabd51c3e7b454f9dfa76ad Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Sat, 10 Mar 2018 12:46:02 -0500 Subject: [PATCH] move services state event call to monitor itself --- lib/dashboard/dashboard.js | 1 + lib/index.js | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/dashboard/dashboard.js b/lib/dashboard/dashboard.js index 7dfda8f2c..735706cd2 100644 --- a/lib/dashboard/dashboard.js +++ b/lib/dashboard/dashboard.js @@ -33,6 +33,7 @@ class Dashboard { self.events.on('contractsState', monitor.setContracts); self.events.on('status', monitor.setStatus.bind(monitor)); + self.events.on('servicesState', monitor.availableServices.bind(monitor)); self.events.setCommandHandler("console:command", (cmd, cb) => { cb(monitor.executeCmd(cmd)); diff --git a/lib/index.js b/lib/index.js index 2f6ace163..6db66ce3f 100644 --- a/lib/index.js +++ b/lib/index.js @@ -83,9 +83,6 @@ class Embark { }); engine.logger.info('dashboard start'); - engine.events.on('servicesState', function (servicesState) { - dashboard.monitor.availableServices(servicesState); - }); callback(); });