2018-12-12 15:12:51 +00:00
|
|
|
import React from 'react';
|
|
|
|
import PropTypes from 'prop-types';
|
|
|
|
import ReactTable from 'react-table';
|
|
|
|
import { withNamespaces } from 'react-i18next';
|
|
|
|
|
|
|
|
const columns = [{
|
|
|
|
Header: 'MAC',
|
|
|
|
accessor: 'mac',
|
|
|
|
}, {
|
|
|
|
Header: 'IP',
|
|
|
|
accessor: 'ip',
|
|
|
|
}, {
|
|
|
|
Header: 'Hostname',
|
|
|
|
accessor: 'hostname',
|
|
|
|
}, {
|
|
|
|
Header: 'Expires',
|
|
|
|
accessor: 'expires',
|
|
|
|
}];
|
|
|
|
|
|
|
|
const Leases = props => (
|
|
|
|
<ReactTable
|
2018-12-13 11:38:00 +00:00
|
|
|
data={props.leases || []}
|
2018-12-12 15:12:51 +00:00
|
|
|
columns={columns}
|
|
|
|
showPagination={false}
|
|
|
|
noDataText={ props.t('dhcp_leases_not_found') }
|
|
|
|
minRows={6}
|
|
|
|
className="-striped -highlight card-table-overflow"
|
|
|
|
/>
|
|
|
|
);
|
|
|
|
|
|
|
|
Leases.propTypes = {
|
|
|
|
leases: PropTypes.array,
|
|
|
|
t: PropTypes.func,
|
|
|
|
};
|
|
|
|
|
|
|
|
export default withNamespaces()(Leases);
|