* client: show MAC address as default

This commit is contained in:
Ildar Kamalov 2019-05-23 14:56:40 +03:00 committed by Simon Zolin
parent 8a8c7329f7
commit 9cc824d852
1 changed files with 10 additions and 10 deletions

View File

@ -46,7 +46,7 @@ class Clients extends Component {
} }
return { return {
identifier: 'ip', identifier: CLIENT_ID.IP,
use_global_settings: true, use_global_settings: true,
}; };
}; };
@ -71,15 +71,7 @@ class Clients extends Component {
Header: this.props.t('table_client'), Header: this.props.t('table_client'),
accessor: 'ip', accessor: 'ip',
Cell: (row) => { Cell: (row) => {
if (row.value) { if (row.original && row.original.mac) {
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 ( return (
<div className="logs__row logs__row--overflow"> <div className="logs__row logs__row--overflow">
<span className="logs__text" title={row.original.mac}> <span className="logs__text" title={row.original.mac}>
@ -87,6 +79,14 @@ class Clients extends Component {
</span> </span>
</div> </div>
); );
} else 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>
);
} }
return ''; return '';