* client: remove redundant table formatting for runtime clients table

This commit is contained in:
Ildar Kamalov 2019-05-23 15:06:33 +03:00 committed by Simon Zolin
parent 9cc824d852
commit 702db84e39
1 changed files with 10 additions and 28 deletions

View File

@ -34,42 +34,24 @@ class AutoClients extends Component {
return ''; return '';
}; };
cellWrap = ({ value }) => (
<div className="logs__row logs__row--overflow">
<span className="logs__text" title={value}>
{value}
</span>
</div>
);
columns = [ columns = [
{ {
Header: this.props.t('table_client'), Header: this.props.t('table_client'),
accessor: 'ip', accessor: 'ip',
Cell: (row) => { Cell: this.cellWrap,
if (row.value) {
return (
<div className="logs__row logs__row--overflow">
<span className="logs__text" title={row.value}>
{row.value} <em>(IP)</em>
</span>
</div>
);
} else if (row.original && row.original.mac) {
return (
<div className="logs__row logs__row--overflow">
<span className="logs__text" title={row.original.mac}>
{row.original.mac} <em>(MAC)</em>
</span>
</div>
);
}
return '';
},
}, },
{ {
Header: this.props.t('table_name'), Header: this.props.t('table_name'),
accessor: 'name', accessor: 'name',
Cell: ({ value }) => ( Cell: this.cellWrap,
<div className="logs__row logs__row--overflow">
<span className="logs__text" title={value}>
{value}
</span>
</div>
),
}, },
{ {
Header: this.props.t('table_statistics'), Header: this.props.t('table_statistics'),