Fork of the excellent esp8266-react - https://github.com/rjwats/esp8266-react
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
809 B
30 lines
809 B
import React, { Component } from 'react';
|
|
|
|
import {restController, RestControllerProps, RestFormLoader, SectionContent } from '../components';
|
|
import { SYSTEM_STATUS_ENDPOINT } from '../api';
|
|
|
|
import SystemStatusForm from './SystemStatusForm';
|
|
import { SystemStatus } from './types';
|
|
|
|
type SystemStatusControllerProps = RestControllerProps<SystemStatus>;
|
|
|
|
class SystemStatusController extends Component<SystemStatusControllerProps> {
|
|
|
|
componentDidMount() {
|
|
this.props.loadData();
|
|
}
|
|
|
|
render() {
|
|
return (
|
|
<SectionContent title="System Status">
|
|
<RestFormLoader
|
|
{...this.props}
|
|
render={formProps => <SystemStatusForm {...formProps} />}
|
|
/>
|
|
</SectionContent>
|
|
);
|
|
}
|
|
|
|
}
|
|
|
|
export default restController(SYSTEM_STATUS_ENDPOINT, SystemStatusController);
|