diff --git a/client/src/components/Settings/Dhcp/Leases.js b/client/src/components/Settings/Dhcp/Leases.js index 3fb1197a..04935c80 100644 --- a/client/src/components/Settings/Dhcp/Leases.js +++ b/client/src/components/Settings/Dhcp/Leases.js @@ -1,32 +1,49 @@ -import React from 'react'; +import React, { Component } from 'react'; import PropTypes from 'prop-types'; import ReactTable from 'react-table'; import { Trans, withNamespaces } from 'react-i18next'; -const columns = [{ - Header: 'MAC', - accessor: 'mac', -}, { - Header: 'IP', - accessor: 'ip', -}, { - Header: dhcp_table_hostname, - accessor: 'hostname', -}, { - Header: dhcp_table_expires, - accessor: 'expires', -}]; +class Leases extends Component { + cellWrap = ({ value }) => ( +
+ + {value} + +
+ ); -const Leases = props => ( - -); + render() { + const { leases, t } = this.props; + return ( + dhcp_table_hostname, + accessor: 'hostname', + Cell: this.cellWrap, + }, { + Header: dhcp_table_expires, + accessor: 'expires', + Cell: this.cellWrap, + }, + ]} + showPagination={false} + noDataText={t('dhcp_leases_not_found')} + minRows={6} + className="-striped -highlight card-table-overflow" + /> + ); + } +} Leases.propTypes = { leases: PropTypes.array,