- client: Clear input field when switching from logs page
Close #1523 Squashed commit of the following: commit 9ae9b0e480c2ec6bd835faf4caccacd8c1fdfe9f Author: ArtemBaskal <a.baskal@adguard.com> Date: Fri Jul 3 17:56:34 2020 +0300 Setup babel and apply everywhere nullish coalescing and optional chaining operators commit 0966063842a79078e1d61a54c271e18c9427b2b1 Merge: 42a54f2b21dfb5ffAuthor: ArtemBaskal <a.baskal@adguard.com> Date: Fri Jul 3 16:59:34 2020 +0300 Merge branch 'master' into fix/1523 commit 42a54f2ba0d8f5f4e4c04f16abc507b5d9009035 Author: ArtemBaskal <a.baskal@adguard.com> Date: Fri Jul 3 13:30:25 2020 +0300 Center mobile tooltip buttons commit 9cdd501a863b596f1d903f8dd3c449ffbe4c1604 Author: ArtemBaskal <a.baskal@adguard.com> Date: Fri Jul 3 13:21:37 2020 +0300 Add cross icon to clear input on click commit 1308b93c42ffea2ffb7457c34aef96e5cdaccaf2 Merge: 265fec7cda546790Author: ArtemBaskal <a.baskal@adguard.com> Date: Mon Jun 29 19:42:04 2020 +0300 Merge branch 'master' of ssh://bit.adguard.com:7999/dns/adguard-home commit 265fec7c72656b0c4738623cb470f1c14736230a Author: ArtemBaskal <a.baskal@adguard.com> Date: Mon Jun 29 19:41:37 2020 +0300 - client: Clear input field when switching from logs page
This commit is contained in:
@@ -11,23 +11,20 @@ const getClientCell = ({
|
||||
row, t, isDetailed, toggleBlocking, autoClients, processingRules,
|
||||
}) => {
|
||||
const {
|
||||
reason, client, domain, info: { name },
|
||||
reason, client, domain, info: { name, whois_info },
|
||||
} = row.original;
|
||||
|
||||
const autoClient = autoClients.find((autoClient) => autoClient.name === client);
|
||||
const country = autoClient && autoClient.whois_info && autoClient.whois_info.country;
|
||||
const city = autoClient && autoClient.whois_info && autoClient.whois_info.city;
|
||||
const network = autoClient && autoClient.whois_info && autoClient.whois_info.orgname;
|
||||
const source = autoClient && autoClient.source;
|
||||
const source = autoClient?.source;
|
||||
|
||||
const id = nanoid();
|
||||
|
||||
const data = {
|
||||
address: client,
|
||||
name,
|
||||
country,
|
||||
city,
|
||||
network,
|
||||
country: whois_info?.country,
|
||||
city: whois_info?.city,
|
||||
network: whois_info?.orgname,
|
||||
source_label: source,
|
||||
};
|
||||
|
||||
|
||||
@@ -57,8 +57,8 @@ const getDomainCell = (props) => {
|
||||
const sourceData = getSourceData(tracker);
|
||||
|
||||
const knownTrackerDataObj = {
|
||||
name_table_header: tracker && tracker.name,
|
||||
category_label: tracker && captitalizeWords(tracker.category),
|
||||
name_table_header: tracker?.name,
|
||||
category_label: hasTracker && captitalizeWords(tracker.category),
|
||||
source_label: sourceData
|
||||
&& <a href={sourceData.url} target="_blank" rel="noopener noreferrer"
|
||||
className="link--green">{sourceData.name}</a>,
|
||||
|
||||
@@ -36,8 +36,7 @@ const getResponseCell = (row, filtering, t, isDetailed) => {
|
||||
const { filters, whitelistFilters } = filtering;
|
||||
const formattedElapsedMs = formatElapsedMs(elapsedMs, t);
|
||||
|
||||
const statusLabel = t((FILTERED_STATUS_TO_META_MAP[reason]
|
||||
&& FILTERED_STATUS_TO_META_MAP[reason].label) || reason);
|
||||
const statusLabel = t(FILTERED_STATUS_TO_META_MAP[reason]?.label || reason);
|
||||
const boldStatusLabel = <span className="font-weight-bold">{statusLabel}</span>;
|
||||
const filter = getFilterName(filters, whitelistFilters, filterId, t);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user