From cfdfd250a00bce5701b257a300aae00a33e317cb Mon Sep 17 00:00:00 2001 From: Ildar Kamalov Date: Fri, 24 Jul 2020 19:19:51 +0300 Subject: [PATCH] Merge: - client: show filter name on mobile for whitelisted entry Closes #1934 Squashed commit of the following: commit 5127467acfeec1d8a37736ecce7e92ff9f7b30c9 Author: Ildar Kamalov Date: Fri Jul 24 19:10:10 2020 +0300 - client: show filter name if rule present commit f3a3399682b2d842ec399f856e2b586aae9b3ec5 Merge: 63f4c965 3c91b8c7 Author: Ildar Kamalov Date: Fri Jul 24 19:09:32 2020 +0300 Merge branch 'fix/1934' of ssh://bit.adguard.com:7999/dns/adguard-home into fix/1934 commit 3c91b8c70c0e0830a180ed1445e7c0994bc300ad Author: Ildar Kamalov Date: Fri Jul 24 18:54:01 2020 +0300 - client: show filter name for whitelisted entry commit 63f4c9655ed5efe2bf35f1174c6c2b0af52403b5 Author: Ildar Kamalov Date: Fri Jul 24 18:54:01 2020 +0300 - client: show filter name for whitelisted entry --- .../components/Logs/Cells/getResponseCell.js | 17 +++-------------- client/src/components/Logs/Table.js | 2 +- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/client/src/components/Logs/Cells/getResponseCell.js b/client/src/components/Logs/Cells/getResponseCell.js index 4a947725..9bb1912a 100644 --- a/client/src/components/Logs/Cells/getResponseCell.js +++ b/client/src/components/Logs/Cells/getResponseCell.js @@ -49,20 +49,9 @@ const getResponseCell = (row, filtering, t, isDetailed, getFilterName) => { original_response: renderResponses(originalResponse), }; - const getTooltipContent = (reason) => { - switch (reason) { - case FILTERED_STATUS.FILTERED_BLOCKED_SERVICE: - case FILTERED_STATUS.NOT_FILTERED_WHITE_LIST: - case FILTERED_STATUS.FILTERED_BLACK_LIST: { - return Object.entries(COMMON_CONTENT); - } - default: { - return Object.entries({ ...COMMON_CONTENT, filter: '' }); - } - } - }; - - const content = getTooltipContent(reason); + const content = rule + ? Object.entries(COMMON_CONTENT) + : Object.entries({ ...COMMON_CONTENT, filter: '' }); const detailedInfo = isBlocked ? filter : formattedElapsedMs; return ( diff --git a/client/src/components/Logs/Table.js b/client/src/components/Logs/Table.js index 7a05bf18..ea648426 100644 --- a/client/src/components/Logs/Table.js +++ b/client/src/components/Logs/Table.js @@ -355,7 +355,7 @@ const Table = (props) => { response_details: 'title', install_settings_dns: upstream, elapsed: formattedElapsedMs, - filter: isBlocked ? filter : null, + filter: rule ? filter : null, rule_label: rule, response_table_header: response?.join('\n'), response_code: status,