diff --git a/client/public/index.html b/client/public/index.html index 5770a133..efc480f6 100644 --- a/client/public/index.html +++ b/client/public/index.html @@ -2,7 +2,7 @@ - + diff --git a/client/public/install.html b/client/public/install.html index 39b9baed..913280fa 100644 --- a/client/public/install.html +++ b/client/public/install.html @@ -2,7 +2,7 @@ - + diff --git a/client/public/login.html b/client/public/login.html index a2cb3cbb..fb696649 100644 --- a/client/public/login.html +++ b/client/public/login.html @@ -2,7 +2,7 @@ - + diff --git a/client/src/components/Logs/Cells/getResponseCell.js b/client/src/components/Logs/Cells/getResponseCell.js index 73cd1d2b..6fd00aae 100644 --- a/client/src/components/Logs/Cells/getResponseCell.js +++ b/client/src/components/Logs/Cells/getResponseCell.js @@ -2,33 +2,12 @@ import React from 'react'; import classNames from 'classnames'; import { formatElapsedMs } from '../../../helpers/helpers'; import { - CUSTOM_FILTERING_RULES_ID, FILTERED_STATUS, FILTERED_STATUS_TO_META_MAP, } from '../../../helpers/constants'; import getHintElement from './getHintElement'; -const getFilterName = (filters, whitelistFilters, filterId, t) => { - if (filterId === CUSTOM_FILTERING_RULES_ID) { - return t('custom_filter_rules'); - } - - const filter = filters.find((filter) => filter.id === filterId) - || whitelistFilters.find((filter) => filter.id === filterId); - let filterName = ''; - - if (filter) { - filterName = filter.name; - } - - if (!filterName) { - filterName = t('unknown_filter', { filterId }); - } - - return filterName; -}; - -const getResponseCell = (row, filtering, t, isDetailed) => { +const getResponseCell = (row, filtering, t, isDetailed, getFilterName) => { const { reason, filterId, rule, status, upstream, elapsedMs, domain, response, } = row.original; @@ -98,6 +77,7 @@ const getResponseCell = (row, filtering, t, isDetailed) => { [FILTERED_STATUS.FILTERED_BLACK_LIST]: { domain, encryption_status: boldStatusLabel, + filter, install_settings_dns: upstream, elapsed: formattedElapsedMs, response_code: status, diff --git a/client/src/components/Logs/Table.js b/client/src/components/Logs/Table.js index 6e0649de..a6272b65 100644 --- a/client/src/components/Logs/Table.js +++ b/client/src/components/Logs/Table.js @@ -12,6 +12,7 @@ import { FILTERED_STATUS_TO_META_MAP, TABLE_DEFAULT_PAGE_SIZE, SCHEME_TO_PROTOCOL_MAP, + CUSTOM_FILTERING_RULES_ID, } from '../../helpers/constants'; import getDateCell from './Cells/getDateCell'; import getDomainCell from './Cells/getDomainCell'; @@ -85,6 +86,27 @@ const Table = (props) => { getFilteringStatus(); }; + const getFilterName = (filters, whitelistFilters, filterId, t) => { + if (filterId === CUSTOM_FILTERING_RULES_ID) { + return t('custom_filter_rules'); + } + + const filter = filters.find((filter) => filter.id === filterId) + || whitelistFilters.find((filter) => filter.id === filterId); + let filterName = ''; + + if (filter) { + filterName = filter.name; + } + + if (!filterName) { + filterName = t('unknown_filter', { filterId }); + } + + return filterName; + }; + + const columns = [ { Header: t('time_table_header'), @@ -125,6 +147,7 @@ const Table = (props) => { filtering, t, isDetailed, + getFilterName, ), minWidth: 150, maxHeight: 60, @@ -276,6 +299,7 @@ const Table = (props) => { upstream, type, client_proto, + filterId, } = rowInfo.original; const hasTracker = !!tracker; @@ -334,6 +358,10 @@ const Table = (props) => { className="title--border bg--danger text-center">{t(buttonType)}, }; + const { filters, whitelistFilters } = filtering; + + const filter = getFilterName(filters, whitelistFilters, filterId, t); + const detailedDataBlocked = { time_table_header: formatTime(time, LONG_TIME_FORMAT), date: formatDateTime(time, DEFAULT_SHORT_DATE_FORMAT_OPTIONS), @@ -346,10 +374,11 @@ const Table = (props) => { category_label: hasTracker && captitalizeWords(tracker.category), source_label: hasTracker && sourceData && {sourceData.name}, + className="link--green">{sourceData.name}, response_details: 'title', install_settings_dns: upstream, elapsed: formattedElapsedMs, + filter, response_table_header: response?.join('\n'), [buttonType]:
{t(buttonType)}
,