address code review

This commit is contained in:
Iuri Matias 2018-10-18 07:10:14 -04:00 committed by Pascal Precht
parent 923bacf22f
commit d5cd0b0ff7
No known key found for this signature in database
GPG Key ID: 0EE28D8D6FD85D7D
5 changed files with 8 additions and 5 deletions

View File

@ -42,7 +42,7 @@ class Console extends Component {
renderNav() { renderNav() {
return ( return (
<Nav tabs> <Nav tabs>
{this.props.processes.filter((p) => ["embark", "blockchain"].indexOf(p.name) >= 0).map((process) => ( {this.props.processes.map((process) => (
<NavItem key={process.name}> <NavItem key={process.name}>
<NavLink <NavLink
className={classnames({ active: this.state.activeTab === process.name })} className={classnames({ active: this.state.activeTab === process.name })}
@ -79,7 +79,7 @@ class Console extends Component {
return ( return (
<TabContent activeTab={this.state.activeTab}> <TabContent activeTab={this.state.activeTab}>
{processes.filter((p) => ["embark", "blockchain"].indexOf(p.name) >= 0).map(process => ( {processes.map(process => (
<TabPane key={process.name} tabId={process.name}> <TabPane key={process.name} tabId={process.name}>
<Logs> <Logs>
{processLogs {processLogs

View File

@ -33,7 +33,7 @@ const sidebarNavItems = {items: [
{url: "/embark/explorer/blocks", icon: "fa fa-stop", name: "Blocks"}, {url: "/embark/explorer/blocks", icon: "fa fa-stop", name: "Blocks"},
{url: "/embark/explorer/transactions", icon: "fa fa-tree", name: "Transactions"} {url: "/embark/explorer/transactions", icon: "fa fa-tree", name: "Transactions"}
]}, ]},
{name: "Editor", url: "/embark/fiddle", icon: "fa fa-codepen"}, {name: "Editor", url: "/embark/editor", icon: "fa fa-codepen"},
{name: "Documentation", url: "/embark/documentation", icon: "fa fa-book"}, {name: "Documentation", url: "/embark/documentation", icon: "fa fa-book"},
{name: "Utils", url: "/embark/utilities/converter", icon: "fa fa-cog", children: [ {name: "Utils", url: "/embark/utilities/converter", icon: "fa fa-cog", children: [
{url: "/embark/utilities/converter", icon: "fa fa-plug", name: "Converter"}, {url: "/embark/utilities/converter", icon: "fa fa-plug", name: "Converter"},

View File

@ -85,6 +85,10 @@ const sorter = {
const filtrer = { const filtrer = {
processes: function(process, index, self) { processes: function(process, index, self) {
if (["embark", "blockchain"].indexOf(process.name) === -1) return false;
return index === self.findIndex((t) => t.name === process.name);
},
services: function(process, index, self) {
return index === self.findIndex((t) => t.name === process.name); return index === self.findIndex((t) => t.name === process.name);
}, },
processLogs: function(processLog, index, self) { processLogs: function(processLog, index, self) {

View File

@ -20,7 +20,7 @@ const routes = (
<Route path="/embark/deployment/" component={DeploymentContainer} /> <Route path="/embark/deployment/" component={DeploymentContainer} />
<Route path="/embark/contracts/:contractName" component={ContractLayoutContainer} /> <Route path="/embark/contracts/:contractName" component={ContractLayoutContainer} />
<Route path="/embark/contracts" component={ContractsContainer} /> <Route path="/embark/contracts" component={ContractsContainer} />
<Route path="/embark/fiddle" component={FiddleLayout} /> <Route path="/embark/editor" component={FiddleLayout} />
<Route path="/embark/utilities" component={UtilsLayout} /> <Route path="/embark/utilities" component={UtilsLayout} />
<Route component={NoMatch} /> <Route component={NoMatch} />
</Switch> </Switch>

View File

@ -24,7 +24,6 @@ class ProcessManager {
this.servicesState = {} this.servicesState = {}
this.events.on("servicesState", (servicesState) => { this.events.on("servicesState", (servicesState) => {
this.servicesState = servicesState; this.servicesState = servicesState;
//console.dir(this.servicesState)
}) })
self.plugin.registerAPICall( self.plugin.registerAPICall(