mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2024-11-15 18:08:30 -07:00
Merge: - client: fix names of clients in the top clients list
Closes #1893 Squashed commit of the following: commit e5de0c4f53558e1ad89dc0069192e534f244f120 Author: Ildar Kamalov <ik@adguard.com> Date: Mon Jul 20 14:29:23 2020 +0300 - client: fix names of clients in the top clients list
This commit is contained in:
parent
87789679f5
commit
c131ac445a
@ -62,7 +62,7 @@ const clientCell = (t, toggleClientStatus, processing, disallowedClients) => fun
|
||||
return (
|
||||
<>
|
||||
<div className="logs__row logs__row--overflow logs__row--column">
|
||||
{formatClientCell(row, true)}
|
||||
{formatClientCell(row, true, false)}
|
||||
</div>
|
||||
{ipMatchListStatus !== IP_MATCH_LIST_STATUS.CIDR
|
||||
&& renderBlockingButton(ipMatchListStatus, value, toggleClientStatus, processing)}
|
||||
|
@ -24,7 +24,7 @@ const getFormattedWhois = (whois) => {
|
||||
);
|
||||
};
|
||||
|
||||
export const formatClientCell = (row, isDetailed = false) => {
|
||||
export const formatClientCell = (row, isDetailed = false, isLogs = true) => {
|
||||
const { value, original: { info } } = row;
|
||||
let whoisContainer = '';
|
||||
let nameContainer = value;
|
||||
@ -33,13 +33,25 @@ export const formatClientCell = (row, isDetailed = false) => {
|
||||
const { name, whois_info } = info;
|
||||
|
||||
if (name) {
|
||||
nameContainer = !whois_info && isDetailed
|
||||
? <small title={value}>{value}</small>
|
||||
: <div className="logs__text logs__text--nowrap" title={`${name} (${value})`}>
|
||||
{name}
|
||||
{' '}
|
||||
<small>{`(${value})`}</small>
|
||||
</div>;
|
||||
if (isLogs) {
|
||||
nameContainer = !whois_info && isDetailed
|
||||
? (
|
||||
<small title={value}>{value}</small>
|
||||
) : (
|
||||
<div className="logs__text logs__text--nowrap" title={`${name} (${value})`}>
|
||||
{name} <small>{`(${value})`}</small>
|
||||
</div>
|
||||
);
|
||||
} else {
|
||||
nameContainer = (
|
||||
<div
|
||||
className="logs__text logs__text--nowrap"
|
||||
title={`${name} (${value})`}
|
||||
>
|
||||
{name} <small>{`(${value})`}</small>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (whois_info && isDetailed) {
|
||||
|
Loading…
Reference in New Issue
Block a user