import React from 'react'; import Table from '@material-ui/core/Table'; import TableBody from '@material-ui/core/TableBody'; import TableCell from '@material-ui/core/TableCell'; import TableHead from '@material-ui/core/TableHead'; import TableRow from '@material-ui/core/TableRow'; import {withStyles} from '@material-ui/core/styles'; import Grid from '@material-ui/core/Grid'; import AMQPAPI from '../../AMQPApi' import Paper from '@material-ui/core/Paper'; const styles = theme => ({ tableContainer: { width: '100%', }, table: { width: '100%', }, formContainer: { width: 300, }, form: { marginLeft: theme.spacing.unit * 1, }, submit: { marginTop: theme.spacing.unit * 3, }, tableHead: { fontWeight: 'bold', } }); class Channels extends React.Component { constructor() { super(); this.state = { channels: [], }; this.loadChannels() } loadChannels = () => { AMQPAPI.get('/channels') .then(response => this.setState({channels: response.data.items ? response.data.items : []})) }; tableItems = () => { const {classes} = this.props; let rowId = 0; return (