From 2a14feab75b915f44161bf59669afebfaa081e7a Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Thu, 2 Aug 2018 12:04:34 -0400 Subject: [PATCH] fix errors and add swarm --- embark-ui/src/containers/ProcessesContainer.js | 17 +++++++---------- lib/modules/swarm/index.js | 7 ++++++- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/embark-ui/src/containers/ProcessesContainer.js b/embark-ui/src/containers/ProcessesContainer.js index 3f21cddd..c98bc026 100644 --- a/embark-ui/src/containers/ProcessesContainer.js +++ b/embark-ui/src/containers/ProcessesContainer.js @@ -20,24 +20,21 @@ class ProcessesContainer extends Component { return ; } - if (processes.error) { - return ( -

- Error loading processes: {processes.error.message || processes.error} -

- ); - } - const processNames = Object.keys(processes.data); return (
- + {processes.error &&

+ Error: {processes.error.message || processes.error} +

} + + {processNames && processNames.length && {processNames.map(processName => { return ( ); })} - +
} +
); } diff --git a/lib/modules/swarm/index.js b/lib/modules/swarm/index.js index 32a5363f..03058617 100644 --- a/lib/modules/swarm/index.js +++ b/lib/modules/swarm/index.js @@ -27,6 +27,10 @@ class Swarm { return; } + this.events.request('processes:register', 'swarm', (cb) => { + self.startProcess(cb); + }); + this.bzz = new Web3Bzz(this.providerUrl); this.setServiceCheck(); @@ -89,7 +93,8 @@ class Swarm { events: self.events, storageConfig: self.storageConfig, webServerConfig: self.webServerConfig, - blockchainConfig: self.blockchainConfig + blockchainConfig: self.blockchainConfig, + embark: self.embark }); self.logger.trace(`Storage module: Launching swarm process...`); return storageProcessesLauncher.launchProcess('swarm', callback);