Remove unused fullDetails prop on status pages
This commit is contained in:
parent
11a81150d2
commit
33be3ab1b2
@ -29,7 +29,7 @@ class APConfiguration extends Component {
|
||||
<Tab value="apStatus" label="AP Status" />
|
||||
<Tab value="apSettings" label="AP Settings" />
|
||||
</Tabs>
|
||||
{selectedTab === "apStatus" && <APStatus fullDetails={true} />}
|
||||
{selectedTab === "apStatus" && <APStatus />}
|
||||
{selectedTab === "apSettings" && <APSettings />}
|
||||
</MenuAppBar>
|
||||
)
|
||||
|
@ -50,7 +50,7 @@ class APStatus extends Component {
|
||||
return data.active ? "Active" : "Inactive";
|
||||
}
|
||||
|
||||
createListItems(data, fullDetails, classes){
|
||||
createListItems(data, classes){
|
||||
return (
|
||||
<Fragment>
|
||||
<ListItem>
|
||||
@ -83,12 +83,12 @@ class APStatus extends Component {
|
||||
);
|
||||
}
|
||||
|
||||
renderAPStatus(data, fullDetails, classes){
|
||||
renderAPStatus(data, classes){
|
||||
return (
|
||||
<div>
|
||||
<List>
|
||||
<Fragment>
|
||||
{this.createListItems(data, fullDetails, classes)}
|
||||
{this.createListItems(data, classes)}
|
||||
</Fragment>
|
||||
</List>
|
||||
<Button variant="contained" color="secondary" className={classes.button} onClick={this.props.loadData}>
|
||||
@ -99,7 +99,7 @@ class APStatus extends Component {
|
||||
}
|
||||
|
||||
render() {
|
||||
const { data, fetched, errorMessage, classes, fullDetails } = this.props;
|
||||
const { data, fetched, errorMessage, classes } = this.props;
|
||||
|
||||
return (
|
||||
<SectionContent title="AP Status">
|
||||
@ -112,7 +112,7 @@ class APStatus extends Component {
|
||||
</Typography>
|
||||
</div>
|
||||
:
|
||||
data ? this.renderAPStatus(data, fullDetails, classes)
|
||||
data ? this.renderAPStatus(data, classes)
|
||||
:
|
||||
<div>
|
||||
<Typography variant="display1" className={classes.fetching}>
|
||||
|
@ -51,7 +51,7 @@ class NTPStatus extends Component {
|
||||
this.props.loadData();
|
||||
}
|
||||
|
||||
createListItems(data, fullDetails, classes){
|
||||
createListItems(data, classes){
|
||||
return (
|
||||
<Fragment>
|
||||
<ListItem>
|
||||
@ -104,11 +104,11 @@ class NTPStatus extends Component {
|
||||
);
|
||||
}
|
||||
|
||||
renderNTPStatus(data, fullDetails, classes){
|
||||
renderNTPStatus(data, classes){
|
||||
return (
|
||||
<div>
|
||||
<List>
|
||||
{this.createListItems(data, fullDetails, classes)}
|
||||
{this.createListItems(data, classes)}
|
||||
</List>
|
||||
<Button variant="contained" color="secondary" className={classes.button} onClick={this.props.loadData}>
|
||||
Refresh
|
||||
@ -118,7 +118,7 @@ class NTPStatus extends Component {
|
||||
}
|
||||
|
||||
render() {
|
||||
const { data, fetched, errorMessage, classes, fullDetails } = this.props;
|
||||
const { data, fetched, errorMessage, classes } = this.props;
|
||||
|
||||
return (
|
||||
<SectionContent title="NTP Status">
|
||||
@ -131,7 +131,7 @@ class NTPStatus extends Component {
|
||||
</Typography>
|
||||
</div>
|
||||
:
|
||||
data ? this.renderNTPStatus(data, fullDetails, classes)
|
||||
data ? this.renderNTPStatus(data, classes)
|
||||
:
|
||||
<div>
|
||||
<Typography variant="display1" className={classes.fetching}>
|
||||
|
@ -43,7 +43,7 @@ class WiFiConfiguration extends Component {
|
||||
<Tab value="networkScanner" label="Network Scanner" />
|
||||
<Tab value="wifiSettings" label="WiFi Settings" />
|
||||
</Tabs>
|
||||
{selectedTab === "wifiStatus" && <WiFiStatus fullDetails={true} />}
|
||||
{selectedTab === "wifiStatus" && <WiFiStatus />}
|
||||
{selectedTab === "networkScanner" && <WiFiNetworkScanner selectNetwork={this.selectNetwork} />}
|
||||
{selectedTab === "wifiSettings" && <WiFiSettings deselectNetwork={this.deselectNetwork} selectedNetwork={this.state.selectedNetwork} />}
|
||||
</MenuAppBar>
|
||||
|
@ -58,7 +58,7 @@ class WiFiStatus extends Component {
|
||||
return status.dns_ip_1 + (status.dns_ip_2 ? ','+status.dns_ip_2 : '');
|
||||
}
|
||||
|
||||
createListItems(data, fullDetails, classes) {
|
||||
createListItems(data, classes) {
|
||||
return (
|
||||
<Fragment>
|
||||
<ListItem>
|
||||
@ -69,7 +69,7 @@ class WiFiStatus extends Component {
|
||||
</ListItem>
|
||||
<Divider variant="inset" component="li" />
|
||||
{
|
||||
(fullDetails && isConnected(data)) &&
|
||||
isConnected(data) &&
|
||||
<Fragment>
|
||||
<ListItem>
|
||||
<Avatar>
|
||||
@ -108,11 +108,11 @@ class WiFiStatus extends Component {
|
||||
);
|
||||
}
|
||||
|
||||
renderWiFiStatus(data, fullDetails, classes) {
|
||||
renderWiFiStatus(data, classes) {
|
||||
return (
|
||||
<div>
|
||||
<List>
|
||||
{this.createListItems(data, fullDetails, classes)}
|
||||
{this.createListItems(data, classes)}
|
||||
</List>
|
||||
<Button variant="contained" color="secondary" className={classes.button} onClick={this.props.loadData}>
|
||||
Refresh
|
||||
@ -123,7 +123,7 @@ class WiFiStatus extends Component {
|
||||
}
|
||||
|
||||
render() {
|
||||
const { data, fetched, errorMessage, classes, fullDetails } = this.props;
|
||||
const { data, fetched, errorMessage, classes } = this.props;
|
||||
|
||||
return (
|
||||
<SectionContent title="WiFi Status">
|
||||
@ -136,7 +136,7 @@ class WiFiStatus extends Component {
|
||||
</Typography>
|
||||
</div>
|
||||
:
|
||||
data ? this.renderWiFiStatus(data, fullDetails, classes)
|
||||
data ? this.renderWiFiStatus(data, classes)
|
||||
:
|
||||
<div>
|
||||
<Typography variant="display1" className={classes.fetching}>
|
||||
|
Loading…
Reference in New Issue
Block a user