diff --git a/interface/src/components/LoadingNotification.js b/interface/src/components/LoadingNotification.js index 5765412..db1cd31 100644 --- a/interface/src/components/LoadingNotification.js +++ b/interface/src/components/LoadingNotification.js @@ -22,7 +22,7 @@ const useStyles = makeStyles(theme => ({ export default function LoadingNotification(props) { const classes = useStyles(); - const { fetched, errorMessage, onReset, children } = props; + const { fetched, errorMessage, onReset, render } = props; return (
{ @@ -37,7 +37,7 @@ export default function LoadingNotification(props) {
: - children + render() :
@@ -53,5 +53,6 @@ export default function LoadingNotification(props) { LoadingNotification.propTypes = { fetched: PropTypes.bool.isRequired, onReset: PropTypes.func.isRequired, - errorMessage: PropTypes.string + errorMessage: PropTypes.string, + render: PropTypes.func.isRequired }; diff --git a/interface/src/containers/APSettings.js b/interface/src/containers/APSettings.js index 3e8cab2..45ae270 100644 --- a/interface/src/containers/APSettings.js +++ b/interface/src/containers/APSettings.js @@ -19,14 +19,16 @@ class APSettings extends Component { - - + errorMessage={errorMessage} + render={() => + + } + /> ) } diff --git a/interface/src/containers/APStatus.js b/interface/src/containers/APStatus.js index 354a1da..eadaf9b 100644 --- a/interface/src/containers/APStatus.js +++ b/interface/src/containers/APStatus.js @@ -107,9 +107,11 @@ class APStatus extends Component { - {this.renderAPStatus(data, classes)} - + errorMessage={errorMessage} + render={ + () => this.renderAPStatus(data, classes) + } + /> ) } diff --git a/interface/src/containers/ManageUsers.js b/interface/src/containers/ManageUsers.js index 63727cd..6b91556 100644 --- a/interface/src/containers/ManageUsers.js +++ b/interface/src/containers/ManageUsers.js @@ -19,15 +19,17 @@ class ManageUsers extends Component { - - + errorMessage={errorMessage} + render={() => + + } + /> ) } diff --git a/interface/src/containers/NTPSettings.js b/interface/src/containers/NTPSettings.js index 2b903a8..9393545 100644 --- a/interface/src/containers/NTPSettings.js +++ b/interface/src/containers/NTPSettings.js @@ -19,14 +19,16 @@ class NTPSettings extends Component { - - + errorMessage={errorMessage} + render={() => + + } + /> ) } diff --git a/interface/src/containers/NTPStatus.js b/interface/src/containers/NTPStatus.js index 195f5fa..f58e467 100644 --- a/interface/src/containers/NTPStatus.js +++ b/interface/src/containers/NTPStatus.js @@ -132,9 +132,11 @@ class NTPStatus extends Component { - {this.renderNTPStatus(data, classes)} - + errorMessage={errorMessage} + render={ + () => this.renderNTPStatus(data, classes) + } + /> ); } diff --git a/interface/src/containers/OTASettings.js b/interface/src/containers/OTASettings.js index 189e620..46fd4ec 100644 --- a/interface/src/containers/OTASettings.js +++ b/interface/src/containers/OTASettings.js @@ -19,15 +19,17 @@ class OTASettings extends Component { - - + errorMessage={errorMessage} + render={() => + + } + /> ) } diff --git a/interface/src/containers/SecuritySettings.js b/interface/src/containers/SecuritySettings.js index e1c70a6..9ee2c55 100644 --- a/interface/src/containers/SecuritySettings.js +++ b/interface/src/containers/SecuritySettings.js @@ -19,14 +19,16 @@ class SecuritySettings extends Component { - - + errorMessage={errorMessage} + render={() => + + } + /> ) } diff --git a/interface/src/containers/SystemStatus.js b/interface/src/containers/SystemStatus.js index b9c1410..560c936 100644 --- a/interface/src/containers/SystemStatus.js +++ b/interface/src/containers/SystemStatus.js @@ -84,7 +84,7 @@ class SystemStatus extends Component { ); } - renderNTPStatus(data, classes) { + renderSystemStatus(data, classes) { return (
@@ -104,9 +104,11 @@ class SystemStatus extends Component { - {this.renderNTPStatus(data, classes)} - + errorMessage={errorMessage} + render={ + () => this.renderSystemStatus(data, classes) + } + /> ) } diff --git a/interface/src/containers/WiFiSettings.js b/interface/src/containers/WiFiSettings.js index fb0bfb0..9c0802d 100644 --- a/interface/src/containers/WiFiSettings.js +++ b/interface/src/containers/WiFiSettings.js @@ -42,17 +42,19 @@ class WiFiSettings extends Component { - - + errorMessage={errorMessage} + render={() => + + } + /> ) } diff --git a/interface/src/containers/WiFiStatus.js b/interface/src/containers/WiFiStatus.js index 4c47f2c..43724d9 100644 --- a/interface/src/containers/WiFiStatus.js +++ b/interface/src/containers/WiFiStatus.js @@ -144,9 +144,11 @@ class WiFiStatus extends Component { - {this.renderWiFiStatus(data, classes)} - + errorMessage={errorMessage} + render={ + () => this.renderWiFiStatus(data, classes) + } + /> ); } diff --git a/interface/src/project/DemoController.js b/interface/src/project/DemoController.js index 4a711c5..4eb3579 100644 --- a/interface/src/project/DemoController.js +++ b/interface/src/project/DemoController.js @@ -17,7 +17,7 @@ class DemoController extends Component { componentDidMount() { this.props.loadData(); } - + render() { const { data, fetched, errorMessage, saveData, loadData, handleValueChange } = this.props; return ( @@ -25,14 +25,16 @@ class DemoController extends Component { - - + errorMessage={errorMessage} + render={() => + + } + /> ) } @@ -43,11 +45,11 @@ const useStyles = makeStyles(theme => ({ marginRight: theme.spacing(2), marginTop: theme.spacing(2), }, - blinkSpeedLabel:{ + blinkSpeedLabel: { marginBottom: theme.spacing(5), } })); - + function DemoControllerForm(props) { const { demoSettings, onSubmit, onReset, handleValueChange } = props; const classes = useStyles();