diff options
author | Emiliano Ciavatta | 2020-07-18 11:09:18 +0000 |
---|---|---|
committer | Emiliano Ciavatta | 2020-07-18 11:09:18 +0000 |
commit | 1317044508a9b7adf0d4d9faf4b9f75f5834a0c9 (patch) | |
tree | 40fbfa9b5e8f93e084f53a2a02498b72c414e955 /frontend/src/components/ConnectionContent.js | |
parent | db8ff43c5e1595c02e2ba67c3c78f239723f95bd (diff) |
Add service_port filter
Diffstat (limited to 'frontend/src/components/ConnectionContent.js')
-rw-r--r-- | frontend/src/components/ConnectionContent.js | 31 |
1 files changed, 8 insertions, 23 deletions
diff --git a/frontend/src/components/ConnectionContent.js b/frontend/src/components/ConnectionContent.js index 2028158..40fdcad 100644 --- a/frontend/src/components/ConnectionContent.js +++ b/frontend/src/components/ConnectionContent.js @@ -1,9 +1,7 @@ import React, {Component} from 'react'; import './ConnectionContent.scss'; -import {Col, Container, Dropdown, Row} from 'react-bootstrap'; +import {Dropdown} from 'react-bootstrap'; import axios from 'axios'; -import {withRouter} from "react-router-dom"; -import {Redirect} from "react-router"; class ConnectionContent extends Component { @@ -19,12 +17,6 @@ class ConnectionContent extends Component { this.setFormat = this.setFormat.bind(this); } - componentDidMount() { - if ('format' in this.props.match.params) { - this.setFormat(this.props.match.params.format); - } - } - componentDidUpdate(prevProps, prevState, snapshot) { if (this.props.connection !== null && ( this.props.connection !== prevProps.connection || this.state.format !== prevState.format)) { @@ -51,11 +43,8 @@ class ConnectionContent extends Component { return <div>nope</div>; } - const format = this.state.format !== "default" ? `/${this.state.format}` : ""; - const redirect = <Redirect push to={`/connections/${this.props.connection.id}${format}`}/>; - let payload = content.map((c, i) => - <span key={`content-${i}`} className={c.from_client ? "from-client" : "from-server"} title="cccccc"> + <span key={`content-${i}`} className={c.from_client ? "from-client" : "from-server"}> {c.content} </span> ); @@ -63,11 +52,11 @@ class ConnectionContent extends Component { return ( <div className="connection-content"> <div className="connection-content-options"> - <Container> - <Row> - <Col md={2}>ciao</Col> - </Row> - </Container> + {/*<Container>*/} + {/* <Row>*/} + {/* <Col md={2}>ciao</Col>*/} + {/* </Row>*/} + {/*</Container>*/} <Dropdown onSelect={this.setFormat} > @@ -92,10 +81,6 @@ class ConnectionContent extends Component { </div> <pre>{payload}</pre> - - {/*{redirect}*/} - - </div> ); } @@ -103,4 +88,4 @@ class ConnectionContent extends Component { } -export default withRouter(ConnectionContent); +export default ConnectionContent; |