From d6e2aaad41f916c2080c59cf7b4e42bf87a1a03f Mon Sep 17 00:00:00 2001 From: Emiliano Ciavatta Date: Wed, 30 Sep 2020 22:57:25 +0200 Subject: Complete setup page --- frontend/src/views/MainPane.js | 59 ------------------------------------------ 1 file changed, 59 deletions(-) delete mode 100644 frontend/src/views/MainPane.js (limited to 'frontend/src/views/MainPane.js') diff --git a/frontend/src/views/MainPane.js b/frontend/src/views/MainPane.js deleted file mode 100644 index d2950ab..0000000 --- a/frontend/src/views/MainPane.js +++ /dev/null @@ -1,59 +0,0 @@ -import React, {Component} from 'react'; -import './MainPane.scss'; -import Connections from "./Connections"; -import ConnectionContent from "../components/ConnectionContent"; -import {Route, Switch, withRouter} from "react-router-dom"; -import PcapPane from "../components/panels/PcapPane"; -import backend from "../backend"; -import RulePane from "../components/panels/RulePane"; -import ServicePane from "../components/panels/ServicePane"; - -class MainPane extends Component { - - constructor(props) { - super(props); - this.state = { - selectedConnection: null, - loading: false - }; - } - - componentDidMount() { - const match = this.props.location.pathname.match(/^\/connections\/([a-f0-9]{24})$/); - if (match != null) { - this.setState({loading: true}); - backend.get(`/api/connections/${match[1]}`) - .then(res => this.setState({selectedConnection: res.json, loading: false})) - .catch(error => console.log(error)); - } - } - - render() { - return ( -
-
-
-
- { - !this.state.loading && - this.setState({selectedConnection: c})} - initialConnection={this.state.selectedConnection} /> - } -
-
- - } /> - } /> - } /> - } /> - } /> - -
-
-
-
- ); - } -} - -export default withRouter(MainPane); -- cgit v1.2.3-70-g09d2