Rick Watson
5 years ago
6 changed files with 61 additions and 39 deletions
-
4interface/src/AppRouting.js
-
30interface/src/components/MenuAppBar.js
-
4interface/src/containers/APStatus.js
-
13interface/src/containers/NTPStatus.js
-
15interface/src/containers/OTAConfiguration.js
-
34interface/src/sections/System.js
@ -1,15 +0,0 @@ |
|||
import React, { Component } from 'react'; |
|||
import MenuAppBar from '../components/MenuAppBar'; |
|||
import OTASettings from './OTASettings'; |
|||
|
|||
class OTAConfiguration extends Component { |
|||
render() { |
|||
return ( |
|||
<MenuAppBar sectionTitle="OTA Configuration"> |
|||
<OTASettings /> |
|||
</MenuAppBar> |
|||
) |
|||
} |
|||
} |
|||
|
|||
export default OTAConfiguration |
@ -0,0 +1,34 @@ |
|||
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 OTASettings from '../containers/OTASettings'; |
|||
|
|||
class System extends Component { |
|||
|
|||
handleTabChange = (event, path) => { |
|||
this.props.history.push(path); |
|||
}; |
|||
|
|||
render() { |
|||
return ( |
|||
<MenuAppBar sectionTitle="System"> |
|||
<Tabs value={this.props.match.url} onChange={this.handleTabChange} indicatorColor="primary" textColor="primary" variant="fullWidth"> |
|||
<Tab value="/system/status" label="System Status" /> |
|||
<Tab value="/system/ota" label="OTA Updates" /> |
|||
</Tabs> |
|||
<Switch> |
|||
<AuthenticatedRoute exact={true} path="/system/status" component={OTASettings} /> |
|||
<AuthenticatedRoute exact={true} path="/system/ota" component={OTASettings} /> |
|||
<Redirect to="/system/status" /> |
|||
</Switch> |
|||
</MenuAppBar> |
|||
) |
|||
} |
|||
} |
|||
|
|||
export default System |
Write
Preview
Loading…
Cancel
Save
Reference in new issue