diff --git a/client/src/__locales/en.json b/client/src/__locales/en.json index ca423562..e059c9f4 100644 --- a/client/src/__locales/en.json +++ b/client/src/__locales/en.json @@ -635,5 +635,6 @@ "parental_control": "Parental Control", "safe_browsing": "Safe Browsing", "served_from_cache": "{{value}} (served from cache)", - "form_error_password_length": "Password must be at least {{value}} characters long" + "form_error_password_length": "Password must be at least {{value}} characters long", + "anonymizer_notification": "<0>Note: IP anonymization is enabled. You can disable it in <1>General settings." } diff --git a/client/src/components/Logs/AnonymizerNotification.js b/client/src/components/Logs/AnonymizerNotification.js new file mode 100644 index 00000000..aca86dc7 --- /dev/null +++ b/client/src/components/Logs/AnonymizerNotification.js @@ -0,0 +1,16 @@ +import React from 'react'; +import { Trans } from 'react-i18next'; +import { HashLink as Link } from 'react-router-hash-link'; + +const AnonymizerNotification = () => ( +
+ text, + link, + ]}> + anonymizer_notification + +
+); + +export default AnonymizerNotification; diff --git a/client/src/components/Logs/index.js b/client/src/components/Logs/index.js index 2531c55c..3658b5ba 100644 --- a/client/src/components/Logs/index.js +++ b/client/src/components/Logs/index.js @@ -25,6 +25,7 @@ import { import InfiniteTable from './InfiniteTable'; import './Logs.css'; import { BUTTON_PREFIX } from './Cells/helpers'; +import AnonymizerNotification from './AnonymizerNotification'; const processContent = (data) => Object.entries(data) .map(([key, value]) => { @@ -73,6 +74,7 @@ const Logs = () => { processingGetConfig, processingAdditionalLogs, processingGetLogs, + anonymize_client_ip: anonymizeClientIp, } = useSelector((state) => state.queryLogs, shallowEqual); const filter = useSelector((state) => state.queryLogs.filter, shallowEqual); const logs = useSelector((state) => state.queryLogs.logs, shallowEqual); @@ -206,11 +208,18 @@ const Logs = () => { ; - return <> - {enabled && processingGetConfig && } - {enabled && !processingGetConfig && renderPage()} - {!enabled && !processingGetConfig && } - ; + return ( + <> + {enabled && ( + <> + {processingGetConfig && } + {anonymizeClientIp && } + {!processingGetConfig && renderPage()} + + )} + {!enabled && !processingGetConfig && } + + ); }; export default Logs;