mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2024-11-22 13:05:36 +03:00
+ client: handle hide_client_ip
This commit is contained in:
parent
2e845e4f4d
commit
a0be7f5566
5 changed files with 17 additions and 1 deletions
|
@ -199,6 +199,8 @@
|
||||||
"query_log_disabled": "The query log is disabled and can be configured in the <0>settings</0>",
|
"query_log_disabled": "The query log is disabled and can be configured in the <0>settings</0>",
|
||||||
"query_log_strict_search": "Use double quotes for strict search",
|
"query_log_strict_search": "Use double quotes for strict search",
|
||||||
"query_log_retention_confirm": "Are you sure you want to change query log retention? If you decrease the interval value, some data will be lost",
|
"query_log_retention_confirm": "Are you sure you want to change query log retention? If you decrease the interval value, some data will be lost",
|
||||||
|
"anonymize_client_ip": "Anonymize client IP",
|
||||||
|
"anonymize_client_ip_desc": "Don't save the full IP address of the client in logs and statistics",
|
||||||
"dns_config": "DNS server configuration",
|
"dns_config": "DNS server configuration",
|
||||||
"blocking_mode": "Blocking mode",
|
"blocking_mode": "Blocking mode",
|
||||||
"default": "Default",
|
"default": "Default",
|
||||||
|
|
|
@ -42,6 +42,16 @@ const Form = (props) => {
|
||||||
disabled={processing}
|
disabled={processing}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="form__group form__group--settings">
|
||||||
|
<Field
|
||||||
|
name="anonymize_client_ip"
|
||||||
|
type="checkbox"
|
||||||
|
component={renderSelectField}
|
||||||
|
placeholder={t('anonymize_client_ip')}
|
||||||
|
subtitle={t('anonymize_client_ip_desc')}
|
||||||
|
disabled={processing}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
<label className="form__label">
|
<label className="form__label">
|
||||||
<Trans>query_log_retention</Trans>
|
<Trans>query_log_retention</Trans>
|
||||||
</label>
|
</label>
|
||||||
|
|
|
@ -30,7 +30,7 @@ class LogsConfig extends Component {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {
|
const {
|
||||||
t, enabled, interval, processing, processingClear,
|
t, enabled, interval, processing, processingClear, anonymize_client_ip,
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -44,6 +44,7 @@ class LogsConfig extends Component {
|
||||||
initialValues={{
|
initialValues={{
|
||||||
enabled,
|
enabled,
|
||||||
interval,
|
interval,
|
||||||
|
anonymize_client_ip,
|
||||||
}}
|
}}
|
||||||
onSubmit={this.handleFormSubmit}
|
onSubmit={this.handleFormSubmit}
|
||||||
processing={processing}
|
processing={processing}
|
||||||
|
@ -59,6 +60,7 @@ class LogsConfig extends Component {
|
||||||
LogsConfig.propTypes = {
|
LogsConfig.propTypes = {
|
||||||
interval: PropTypes.number.isRequired,
|
interval: PropTypes.number.isRequired,
|
||||||
enabled: PropTypes.bool.isRequired,
|
enabled: PropTypes.bool.isRequired,
|
||||||
|
anonymize_client_ip: PropTypes.bool.isRequired,
|
||||||
processing: PropTypes.bool.isRequired,
|
processing: PropTypes.bool.isRequired,
|
||||||
processingClear: PropTypes.bool.isRequired,
|
processingClear: PropTypes.bool.isRequired,
|
||||||
setLogsConfig: PropTypes.func.isRequired,
|
setLogsConfig: PropTypes.func.isRequired,
|
||||||
|
|
|
@ -106,6 +106,7 @@ class Settings extends Component {
|
||||||
<LogsConfig
|
<LogsConfig
|
||||||
enabled={queryLogs.enabled}
|
enabled={queryLogs.enabled}
|
||||||
interval={queryLogs.interval}
|
interval={queryLogs.interval}
|
||||||
|
anonymize_client_ip={queryLogs.anonymize_client_ip}
|
||||||
processing={queryLogs.processingSetConfig}
|
processing={queryLogs.processingSetConfig}
|
||||||
processingClear={queryLogs.processingClear}
|
processingClear={queryLogs.processingClear}
|
||||||
setLogsConfig={setLogsConfig}
|
setLogsConfig={setLogsConfig}
|
||||||
|
|
|
@ -134,6 +134,7 @@ const queryLogs = handleActions(
|
||||||
oldest: '',
|
oldest: '',
|
||||||
filter: DEFAULT_LOGS_FILTER,
|
filter: DEFAULT_LOGS_FILTER,
|
||||||
isFiltered: false,
|
isFiltered: false,
|
||||||
|
anonymize_client_ip: false,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue