Rick Watson
5 years ago
7 changed files with 79 additions and 86 deletions
-
11interface/src/AppRouting.js
-
4interface/src/components/MenuAppBar.js
-
39interface/src/containers/APConfiguration.js
-
37interface/src/containers/NTPConfiguration.js
-
4interface/src/forms/UserForm.js
-
35interface/src/sections/AccessPoint.js
-
35interface/src/sections/NetworkTime.js
@ -1,39 +0,0 @@ |
|||
import React, { Component } from 'react'; |
|||
|
|||
import Tabs from '@material-ui/core/Tabs'; |
|||
import Tab from '@material-ui/core/Tab'; |
|||
|
|||
import MenuAppBar from '../components/MenuAppBar'; |
|||
import APSettings from './APSettings'; |
|||
import APStatus from './APStatus'; |
|||
|
|||
class APConfiguration extends Component { |
|||
|
|||
constructor(props) { |
|||
super(props); |
|||
this.state = { |
|||
selectedTab: "apStatus", |
|||
selectedNetwork: null |
|||
}; |
|||
} |
|||
|
|||
handleTabChange = (event, selectedTab) => { |
|||
this.setState({ selectedTab }); |
|||
}; |
|||
|
|||
render() { |
|||
const { selectedTab } = this.state; |
|||
return ( |
|||
<MenuAppBar sectionTitle="AP Configuration"> |
|||
<Tabs value={selectedTab} onChange={this.handleTabChange} indicatorColor="primary" textColor="primary" variant="fullWidth"> |
|||
<Tab value="apStatus" label="AP Status" /> |
|||
<Tab value="apSettings" label="AP Settings" /> |
|||
</Tabs> |
|||
{selectedTab === "apStatus" && <APStatus />} |
|||
{selectedTab === "apSettings" && <APSettings />} |
|||
</MenuAppBar> |
|||
) |
|||
} |
|||
} |
|||
|
|||
export default APConfiguration; |
@ -1,37 +0,0 @@ |
|||
import React, { Component } from 'react'; |
|||
import MenuAppBar from '../components/MenuAppBar'; |
|||
import NTPSettings from './NTPSettings'; |
|||
import NTPStatus from './NTPStatus'; |
|||
|
|||
import Tabs from '@material-ui/core/Tabs'; |
|||
import Tab from '@material-ui/core/Tab'; |
|||
|
|||
class NTPConfiguration extends Component { |
|||
|
|||
constructor(props) { |
|||
super(props); |
|||
this.state = { |
|||
selectedTab: "ntpStatus" |
|||
}; |
|||
} |
|||
|
|||
handleTabChange = (event, selectedTab) => { |
|||
this.setState({ selectedTab }); |
|||
}; |
|||
|
|||
render() { |
|||
const { selectedTab } = this.state; |
|||
return ( |
|||
<MenuAppBar sectionTitle="NTP Configuration"> |
|||
<Tabs value={selectedTab} onChange={this.handleTabChange} indicatorColor="primary" textColor="primary" variant="fullWidth"> |
|||
<Tab value="ntpStatus" label="NTP Status" /> |
|||
<Tab value="ntpSettings" label="NTP Settings" /> |
|||
</Tabs> |
|||
{selectedTab === "ntpStatus" && <NTPStatus />} |
|||
{selectedTab === "ntpSettings" && <NTPSettings />} |
|||
</MenuAppBar> |
|||
) |
|||
} |
|||
} |
|||
|
|||
export default NTPConfiguration |
@ -0,0 +1,35 @@ |
|||
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 ( |
|||
<MenuAppBar sectionTitle="AP Configuration"> |
|||
<Tabs value={this.props.match.url} onChange={this.handleTabChange} indicatorColor="primary" textColor="primary" variant="fullWidth"> |
|||
<Tab value="/ap/status" label="AP Status" /> |
|||
<Tab value="/ap/settings" label="AP Settings" /> |
|||
</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; |
@ -0,0 +1,35 @@ |
|||
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 NTPSettings from '../containers/NTPSettings'; |
|||
import NTPStatus from '../containers/NTPStatus'; |
|||
|
|||
class NetworkTime extends Component { |
|||
|
|||
handleTabChange = (event, path) => { |
|||
this.props.history.push(path); |
|||
}; |
|||
|
|||
render() { |
|||
return ( |
|||
<MenuAppBar sectionTitle="Network Time"> |
|||
<Tabs value={this.props.match.url} onChange={this.handleTabChange} indicatorColor="primary" textColor="primary" variant="fullWidth"> |
|||
<Tab value="/ntp/status" label="NTP Status" /> |
|||
<Tab value="/ntp/settings" label="NTP Settings" /> |
|||
</Tabs> |
|||
<Switch> |
|||
<AuthenticatedRoute exact={true} path="/ntp/status" component={NTPStatus} /> |
|||
<AuthenticatedRoute exact={true} path="/ntp/settings" component={NTPSettings} /> |
|||
<Redirect to="/ntp/status" /> |
|||
</Switch> |
|||
</MenuAppBar> |
|||
) |
|||
} |
|||
} |
|||
|
|||
export default NetworkTime |
Write
Preview
Loading…
Cancel
Save
Reference in new issue