2019-05-26 21:27:35 +01:00
|
|
|
import React, { Component } from 'react';
|
|
|
|
import { Redirect, Switch } from 'react-router-dom'
|
|
|
|
|
|
|
|
import Tabs from '@material-ui/core/Tabs';
|
|
|
|
import Tab from '@material-ui/core/Tab';
|
|
|
|
|
|
|
|
import AuthenticatedRoute from '../authentication/AuthenticatedRoute';
|
|
|
|
import MenuAppBar from '../components/MenuAppBar';
|
|
|
|
import APSettings from '../containers/APSettings';
|
|
|
|
import APStatus from '../containers/APStatus';
|
|
|
|
|
|
|
|
class AccessPoint extends Component {
|
|
|
|
|
|
|
|
handleTabChange = (event, path) => {
|
|
|
|
this.props.history.push(path);
|
|
|
|
};
|
|
|
|
|
|
|
|
render() {
|
|
|
|
return (
|
2019-05-26 22:07:16 +01:00
|
|
|
<MenuAppBar sectionTitle="Access Point">
|
2019-05-26 21:27:35 +01:00
|
|
|
<Tabs value={this.props.match.url} onChange={this.handleTabChange} indicatorColor="primary" textColor="primary" variant="fullWidth">
|
2019-05-26 22:07:16 +01:00
|
|
|
<Tab value="/ap/status" label="Access Point Status" />
|
|
|
|
<Tab value="/ap/settings" label="Access Point Settings" />
|
2019-05-26 21:27:35 +01:00
|
|
|
</Tabs>
|
|
|
|
<Switch>
|
|
|
|
<AuthenticatedRoute exact={true} path="/ap/status" component={APStatus} />
|
|
|
|
<AuthenticatedRoute exact={true} path="/ap/settings" component={APSettings} />
|
|
|
|
<Redirect to="/ap/status" />
|
|
|
|
</Switch>
|
|
|
|
</MenuAppBar>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default AccessPoint;
|