diff --git a/embark-ui/src/components/Layout.js b/embark-ui/src/components/Layout.js index e2619d973..212da0106 100644 --- a/embark-ui/src/components/Layout.js +++ b/embark-ui/src/components/Layout.js @@ -9,7 +9,6 @@ const navBarItems = [ {value: "Home", to: "/embark", icon: "home", LinkComponent: NavLink}, {value: "Contracts", to: "/embark/contracts", icon: "box", LinkComponent: NavLink}, {value: "Explorer", to: "/embark/explorer/accounts", icon: "activity", LinkComponent: NavLink}, - {value: "Processes", to: "/embark/processes", icon: "cpu", LinkComponent: NavLink}, {value: "Fiddle", to: "/embark/fiddle", icon: "codepen", LinkComponent: NavLink}, {value: "Documentation", to: "/embark/documentation", icon: "file-text", LinkComponent: NavLink} ]; diff --git a/embark-ui/src/components/Process.js b/embark-ui/src/components/Process.js deleted file mode 100644 index 215ef3c91..000000000 --- a/embark-ui/src/components/Process.js +++ /dev/null @@ -1,31 +0,0 @@ -import React, {Component} from 'react'; -import PropTypes from 'prop-types'; -import {Page} from "tabler-react"; -import Convert from 'ansi-to-html'; -import Logs from './Logs'; - -const convert = new Convert(); - -class Process extends Component { - render() { - const {processLogs, process}= this.props; - return ( - - {process.name} -

State: {process.state}

- - { - processLogs.map((item, i) =>

) - } -
-
- ); - } -} - -Process.propTypes = { - process: PropTypes.object, - processLogs: PropTypes.arrayOf(PropTypes.object) -}; - -export default Process; diff --git a/embark-ui/src/components/ProcessesLayout.js b/embark-ui/src/components/ProcessesLayout.js deleted file mode 100644 index 8036aad56..000000000 --- a/embark-ui/src/components/ProcessesLayout.js +++ /dev/null @@ -1,64 +0,0 @@ -import PropTypes from "prop-types"; -import React, {Component} from 'react'; -import connect from "react-redux/es/connect/connect"; -import {NavLink, Route, Switch, Redirect} from 'react-router-dom'; -import { - Page, - Grid, - List -} from "tabler-react"; - -import ProcessContainer from '../containers/ProcessContainer'; -import {getProcesses} from "../reducers/selectors"; -import Loading from "./Loading"; - -const routePrefix = '/embark/processes'; - -class ProcessesLayout extends Component { - render() { - if (this.props.processes.length === 0) { - return ; - } - return ( - - Processes -
- - {this.props.processes.map((process, index) => { - return ( - {process.name} - ); - })} - - -
-
- - - } /> - - - -
); - } -} - -ProcessesLayout.propTypes = { - processes: PropTypes.arrayOf(PropTypes.object), - match: PropTypes.object -}; - -function mapStateToProps(state) { - return {processes: getProcesses(state)}; -} - -export default connect( - mapStateToProps -)(ProcessesLayout); - diff --git a/embark-ui/src/containers/ProcessContainer.js b/embark-ui/src/containers/ProcessContainer.js deleted file mode 100644 index 37baf5dfa..000000000 --- a/embark-ui/src/containers/ProcessContainer.js +++ /dev/null @@ -1,55 +0,0 @@ -import React, {Component} from 'react'; -import {connect} from 'react-redux'; -import PropTypes from 'prop-types'; -import {withRouter} from "react-router-dom"; -import {processLogs as processLogsAction, listenToProcessLogs} from '../actions'; -import DataWrapper from "../components/DataWrapper"; -import Process from "../components/Process"; -import {getProcess, getProcessLogsByProcess} from "../reducers/selectors"; - -class ProcessContainer extends Component { - componentDidMount() { - if (this.props.process.state === 'running' && this.props.processLogs.length === 0) { - this.props.fetchProcessLogs(this.props.match.params.processName); - this.props.listenToProcessLogs(this.props.match.params.processName); - } - } - - render() { - return ( - ( -
- -
- )} /> - ); - } -} - -ProcessContainer.propTypes = { - fetchProcessLogs: PropTypes.func, - listenToProcessLogs: PropTypes.func, - process: PropTypes.object, - processLogs: PropTypes.arrayOf(PropTypes.object), - error: PropTypes.string, - loading: PropTypes.bool, - match: PropTypes.object -}; - -function mapStateToProps(state, props) { - return { - process: getProcess(state, props.match.params.processName), - processLogs: getProcessLogsByProcess(state, props.match.params.processName), - error: state.errorMessage, - loading: state.loading - }; -} - -export default withRouter(connect( - mapStateToProps, - { - fetchProcessLogs: processLogsAction.request, - listenToProcessLogs - } -)(ProcessContainer)); diff --git a/embark-ui/src/routes.js b/embark-ui/src/routes.js index 1764385ec..163dbb806 100644 --- a/embark-ui/src/routes.js +++ b/embark-ui/src/routes.js @@ -6,7 +6,6 @@ import ContractsContainer from './containers/ContractsContainer'; import ContractContainer from './containers/ContractLayoutContainer'; import NoMatch from './components/NoMatch'; import ExplorerLayout from './components/ExplorerLayout'; -import ProcessesLayout from './components/ProcessesLayout'; import FiddleLayout from './components/FiddleLayout'; const routes = ( @@ -14,7 +13,6 @@ const routes = ( -