2018-02-26 00:11:31 +00:00
|
|
|
import React, { Component } from 'react';
|
|
|
|
import MenuAppBar from '../components/MenuAppBar';
|
|
|
|
import NTPSettings from './NTPSettings';
|
|
|
|
import NTPStatus from './NTPStatus';
|
|
|
|
|
2018-05-18 23:29:14 +01:00
|
|
|
import Tabs from '@material-ui/core/Tabs';
|
|
|
|
import Tab from '@material-ui/core/Tab';
|
2018-02-26 00:11:31 +00:00
|
|
|
|
|
|
|
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">
|
2019-04-29 00:29:31 +01:00
|
|
|
<Tabs value={selectedTab} onChange={this.handleTabChange} indicatorColor="primary" textColor="primary" variant="scrollable">
|
2018-02-26 00:11:31 +00:00
|
|
|
<Tab value="ntpStatus" label="NTP Status" />
|
|
|
|
<Tab value="ntpSettings" label="NTP Settings" />
|
|
|
|
</Tabs>
|
|
|
|
{selectedTab === "ntpStatus" && <NTPStatus />}
|
|
|
|
{selectedTab === "ntpSettings" && <NTPSettings />}
|
|
|
|
</MenuAppBar>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default NTPConfiguration
|