import React, { Component, Fragment } from 'react'; import { withStyles } from '@material-ui/core/styles'; import Button from '@material-ui/core/Button'; import List from '@material-ui/core/List'; import ListItem from '@material-ui/core/ListItem'; import ListItemAvatar from '@material-ui/core/ListItemAvatar'; import ListItemText from '@material-ui/core/ListItemText'; import Avatar from '@material-ui/core/Avatar'; import Divider from '@material-ui/core/Divider'; import DevicesIcon from '@material-ui/icons/Devices'; import MemoryIcon from '@material-ui/icons/Memory'; import ShowChartIcon from '@material-ui/icons/ShowChart'; import SdStorageIcon from '@material-ui/icons/SdStorage'; import DataUsageIcon from '@material-ui/icons/DataUsage'; import { SYSTEM_STATUS_ENDPOINT } from '../constants/Endpoints'; import { restComponent } from '../components/RestComponent'; import LoadingNotification from '../components/LoadingNotification'; import SectionContent from '../components/SectionContent'; const styles = theme => ({ button: { marginRight: theme.spacing(2), marginTop: theme.spacing(2), } }); class SystemStatus extends Component { componentDidMount() { this.props.loadData(); } createListItems(data, classes) { return ( ); } renderNTPStatus(data, classes) { return (
{this.createListItems(data, classes)}
); } render() { const { data, fetched, errorMessage, loadData, classes } = this.props; return ( {this.renderNTPStatus(data, classes)} ) } } export default restComponent(SYSTEM_STATUS_ENDPOINT, withStyles(styles)(SystemStatus));