2018-02-26 00:11:31 +00:00
|
|
|
import React, { Component } from 'react';
|
|
|
|
|
2019-05-19 20:22:01 +00:00
|
|
|
import { Redirect, Switch } from 'react-router';
|
2019-05-14 21:47:04 +00:00
|
|
|
|
|
|
|
import * as Authentication from './authentication/Authentication';
|
|
|
|
import AuthenticationWrapper from './authentication/AuthenticationWrapper';
|
|
|
|
import AuthenticatedRoute from './authentication/AuthenticatedRoute';
|
2019-05-19 20:22:01 +00:00
|
|
|
import UnauthenticatedRoute from './authentication/UnauthenticatedRoute';
|
2018-02-26 00:11:31 +00:00
|
|
|
|
2019-05-14 22:18:24 +00:00
|
|
|
import SignInPage from './containers/SignInPage';
|
2019-05-26 19:49:15 +00:00
|
|
|
|
|
|
|
import WiFiConnection from './sections/WiFiConnection';
|
2019-05-26 20:27:35 +00:00
|
|
|
import AccessPoint from './sections/AccessPoint';
|
|
|
|
import NetworkTime from './sections/NetworkTime';
|
|
|
|
import Security from './sections/Security';
|
2019-05-26 21:02:27 +00:00
|
|
|
import System from './sections/System';
|
2018-02-26 00:11:31 +00:00
|
|
|
|
|
|
|
class AppRouting extends Component {
|
2019-05-14 21:47:04 +00:00
|
|
|
|
|
|
|
componentWillMount() {
|
|
|
|
Authentication.clearLoginRedirect();
|
|
|
|
}
|
|
|
|
|
|
|
|
render() {
|
|
|
|
return (
|
|
|
|
<AuthenticationWrapper>
|
|
|
|
<Switch>
|
2019-05-19 20:22:01 +00:00
|
|
|
<UnauthenticatedRoute exact path="/" component={SignInPage} />
|
2019-05-26 19:49:15 +00:00
|
|
|
<AuthenticatedRoute exact path="/wifi/*" component={WiFiConnection} />
|
2019-05-26 20:27:35 +00:00
|
|
|
<AuthenticatedRoute exact path="/ap/*" component={AccessPoint} />
|
|
|
|
<AuthenticatedRoute exact path="/ntp/*" component={NetworkTime} />
|
2019-05-26 21:02:27 +00:00
|
|
|
<AuthenticatedRoute exact path="/system/*" component={System} />
|
2019-05-26 18:09:34 +00:00
|
|
|
<AuthenticatedRoute exact path="/security/*" component={Security} />
|
2019-05-14 21:47:04 +00:00
|
|
|
<Redirect to="/" />
|
|
|
|
</Switch>
|
|
|
|
</AuthenticationWrapper>
|
|
|
|
)
|
|
|
|
}
|
2018-02-26 00:11:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export default AppRouting;
|