badguardhome/client/src/components/Settings/Dns/Upstream/Form.js

165 lines
5.8 KiB
JavaScript
Raw Normal View History

2019-03-06 11:45:21 +00:00
import React from 'react';
- client: Add default mode in the DNS settings: Merge pull request #650 in DNS/adguard-home from fix/1770 to master Close #1770 Squashed commit of the following: commit c1f75ea643623af78de020bd1bc49aa5b66e25c4 Merge: a5df78ad a869ec4c Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jun 10 18:56:24 2020 +0300 Merge branch 'master' into fix/1770 commit a5df78ad303305efcafcfa2a170ff567a3a06db5 Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jun 10 12:50:50 2020 +0300 Revert "Update locales" This reverts commit 4b2b4499dea12949c53bce4ceeed595c17df84c6. commit 4b2b4499dea12949c53bce4ceeed595c17df84c6 Author: ArtemBaskal <a.baskal@adguard.com> Date: Tue Jun 9 19:56:34 2020 +0300 Update locales commit 790cff0db84b5905362d2e2702b2cbca5c3c90b0 Author: ArtemBaskal <a.baskal@adguard.com> Date: Fri Jun 5 17:56:01 2020 +0300 Update Upstream component with new api, extract reduxForm HOC names in constant commit 72de3d5a92cc33d5b234c837879fc6990291e07b Merge: 92a4a6ae 501a4e06 Author: ArtemBaskal <a.baskal@adguard.com> Date: Fri Jun 5 15:55:39 2020 +0300 Merge remote-tracking branch 'origin/update-dnsproxy' into fix/1770 commit 501a4e06ab350e46ff78656141d925de9f2e4996 Author: Simon Zolin <s.zolin@adguard.com> Date: Fri Jun 5 12:47:13 2020 +0300 openapi commit 3930bd196572924f164ed011629356a0ac0ec631 Author: Simon Zolin <s.zolin@adguard.com> Date: Fri Jun 5 12:21:32 2020 +0300 * DNS API: new setting "upstream_mode"; remove "fastest_addr", "parallel_requests" * use dnsproxy v0.29.0 commit 92a4a6ae24793a2a9ca05ad3ef2078573fd4d059 Author: ArtemBaskal <a.baskal@adguard.com> Date: Thu Jun 4 18:53:42 2020 +0300 - client: Add default mode in the DNS settings
2020-06-10 16:04:19 +00:00
import { useDispatch, useSelector } from 'react-redux';
2019-03-06 11:45:21 +00:00
import PropTypes from 'prop-types';
- client: Add default mode in the DNS settings: Merge pull request #650 in DNS/adguard-home from fix/1770 to master Close #1770 Squashed commit of the following: commit c1f75ea643623af78de020bd1bc49aa5b66e25c4 Merge: a5df78ad a869ec4c Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jun 10 18:56:24 2020 +0300 Merge branch 'master' into fix/1770 commit a5df78ad303305efcafcfa2a170ff567a3a06db5 Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jun 10 12:50:50 2020 +0300 Revert "Update locales" This reverts commit 4b2b4499dea12949c53bce4ceeed595c17df84c6. commit 4b2b4499dea12949c53bce4ceeed595c17df84c6 Author: ArtemBaskal <a.baskal@adguard.com> Date: Tue Jun 9 19:56:34 2020 +0300 Update locales commit 790cff0db84b5905362d2e2702b2cbca5c3c90b0 Author: ArtemBaskal <a.baskal@adguard.com> Date: Fri Jun 5 17:56:01 2020 +0300 Update Upstream component with new api, extract reduxForm HOC names in constant commit 72de3d5a92cc33d5b234c837879fc6990291e07b Merge: 92a4a6ae 501a4e06 Author: ArtemBaskal <a.baskal@adguard.com> Date: Fri Jun 5 15:55:39 2020 +0300 Merge remote-tracking branch 'origin/update-dnsproxy' into fix/1770 commit 501a4e06ab350e46ff78656141d925de9f2e4996 Author: Simon Zolin <s.zolin@adguard.com> Date: Fri Jun 5 12:47:13 2020 +0300 openapi commit 3930bd196572924f164ed011629356a0ac0ec631 Author: Simon Zolin <s.zolin@adguard.com> Date: Fri Jun 5 12:21:32 2020 +0300 * DNS API: new setting "upstream_mode"; remove "fastest_addr", "parallel_requests" * use dnsproxy v0.29.0 commit 92a4a6ae24793a2a9ca05ad3ef2078573fd4d059 Author: ArtemBaskal <a.baskal@adguard.com> Date: Thu Jun 4 18:53:42 2020 +0300 - client: Add default mode in the DNS settings
2020-06-10 16:04:19 +00:00
import { Field, reduxForm } from 'redux-form';
import { Trans, useTranslation } from 'react-i18next';
2019-03-06 11:45:21 +00:00
import classnames from 'classnames';
import i18next from 'i18next';
import Examples from './Examples';
import { renderRadioField, renderTextareaField } from '../../../../helpers/form';
import { DNS_REQUEST_OPTIONS, FORM_NAME, UPSTREAM_CONFIGURATION_WIKI_LINK } from '../../../../helpers/constants';
- client: Add default mode in the DNS settings: Merge pull request #650 in DNS/adguard-home from fix/1770 to master Close #1770 Squashed commit of the following: commit c1f75ea643623af78de020bd1bc49aa5b66e25c4 Merge: a5df78ad a869ec4c Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jun 10 18:56:24 2020 +0300 Merge branch 'master' into fix/1770 commit a5df78ad303305efcafcfa2a170ff567a3a06db5 Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jun 10 12:50:50 2020 +0300 Revert "Update locales" This reverts commit 4b2b4499dea12949c53bce4ceeed595c17df84c6. commit 4b2b4499dea12949c53bce4ceeed595c17df84c6 Author: ArtemBaskal <a.baskal@adguard.com> Date: Tue Jun 9 19:56:34 2020 +0300 Update locales commit 790cff0db84b5905362d2e2702b2cbca5c3c90b0 Author: ArtemBaskal <a.baskal@adguard.com> Date: Fri Jun 5 17:56:01 2020 +0300 Update Upstream component with new api, extract reduxForm HOC names in constant commit 72de3d5a92cc33d5b234c837879fc6990291e07b Merge: 92a4a6ae 501a4e06 Author: ArtemBaskal <a.baskal@adguard.com> Date: Fri Jun 5 15:55:39 2020 +0300 Merge remote-tracking branch 'origin/update-dnsproxy' into fix/1770 commit 501a4e06ab350e46ff78656141d925de9f2e4996 Author: Simon Zolin <s.zolin@adguard.com> Date: Fri Jun 5 12:47:13 2020 +0300 openapi commit 3930bd196572924f164ed011629356a0ac0ec631 Author: Simon Zolin <s.zolin@adguard.com> Date: Fri Jun 5 12:21:32 2020 +0300 * DNS API: new setting "upstream_mode"; remove "fastest_addr", "parallel_requests" * use dnsproxy v0.29.0 commit 92a4a6ae24793a2a9ca05ad3ef2078573fd4d059 Author: ArtemBaskal <a.baskal@adguard.com> Date: Thu Jun 4 18:53:42 2020 +0300 - client: Add default mode in the DNS settings
2020-06-10 16:04:19 +00:00
import { testUpstream } from '../../../../actions';
import { removeEmptyLines } from '../../../../helpers/helpers';
+ client: add fastest_addr setting Squashed commit of the following: commit e47fae25f7bac950bfb452fc8f18b9c0865b08ba Merge: a23285ec e2ddc82d Author: Simon Zolin <s.zolin@adguard.com> Date: Wed Apr 22 19:16:01 2020 +0300 Merge remote-tracking branch 'origin/master' into 715 commit a23285ec3ace78fe4ce19122a51ecf3e6cdd942c Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Apr 22 18:30:30 2020 +0300 Review changes commit f80d62a0d2038ff9d070ae9e9c77c33b92232d9c Author: ArtemBaskal <a.baskal@adguard.com> Date: Tue Apr 21 16:37:42 2020 +0300 + client: Add fastest addr option commit 9e713df80c5bf113c98794c0a20915c756a76938 Merge: e3bf4037 9b7c1181 Author: Simon Zolin <s.zolin@adguard.com> Date: Tue Apr 21 16:02:03 2020 +0300 Merge remote-tracking branch 'origin/master' into 715-fastest-addr commit e3bf4037f49198e42bde55305d6f9077341b556a Author: Simon Zolin <s.zolin@adguard.com> Date: Tue Apr 21 15:40:49 2020 +0300 minor commit d6e6a823c5e51acc061b2850d362772efcb827e1 Author: Simon Zolin <s.zolin@adguard.com> Date: Fri Apr 17 17:56:24 2020 +0300 * API changes . removed POST /set_upstreams_config . removed fields from GET /status: bootstrap_dns, upstream_dns, all_servers . added new fields to /dns_config and /dns_info commit 237a452d09cc48ff8f00e81c7fd35e7828bea835 Author: Simon Zolin <s.zolin@adguard.com> Date: Fri Apr 17 16:43:13 2020 +0300 * API: /dns_info, /dns_config: add "parallel_requests" instead of "all_servers" from /set_upstreams_config commit 9976723b9725ed19e0cce152d1d1198b13c4acc1 Author: Simon Zolin <s.zolin@adguard.com> Date: Mon Mar 23 10:28:25 2020 +0300 openapi commit 6f8ea16c6332606f29095b0094d71e8a91798f82 Merge: 36e4d4e8 c8285c41 Author: Simon Zolin <s.zolin@adguard.com> Date: Fri Mar 20 19:18:48 2020 +0300 Merge remote-tracking branch 'origin/master' into 715-fastest-addr commit 36e4d4e82cadeaba5a11313f0d69d66a0924c342 Author: Simon Zolin <s.zolin@adguard.com> Date: Fri Mar 20 18:13:43 2020 +0300 + DNS: add fastest_addr setting
2020-04-22 16:32:07 +00:00
const Title = () => <label className="form__label" htmlFor="upstream_dns">
{i18next.t('upstream_dns')}
<div>
<a href={UPSTREAM_CONFIGURATION_WIKI_LINK} target="_blank"
rel="noopener noreferrer">{i18next.t('please_read_wiki')}</a>
</div>
</label>;
const getInputFields = (upstream_dns_file) => [
{
getTitle: Title,
name: 'upstream_dns',
type: 'text',
value: 'test',
component: renderTextareaField,
className: 'form-control form-control--textarea font-monospace',
placeholder: 'upstream_dns',
normalizeOnBlur: removeEmptyLines,
disabled: !!upstream_dns_file,
},
{
name: 'upstream_mode',
type: 'radio',
value: DNS_REQUEST_OPTIONS.LOAD_BALANCING,
component: renderRadioField,
subtitle: 'load_balancing_desc',
placeholder: 'load_balancing',
},
{
name: 'upstream_mode',
type: 'radio',
value: DNS_REQUEST_OPTIONS.PARALLEL,
component: renderRadioField,
subtitle: 'upstream_parallel',
placeholder: 'parallel_requests',
},
{
name: 'upstream_mode',
type: 'radio',
value: DNS_REQUEST_OPTIONS.FASTEST_ADDR,
component: renderRadioField,
subtitle: 'fastest_addr_desc',
placeholder: 'fastest_addr',
},
];
2019-03-06 11:45:21 +00:00
- client: Add default mode in the DNS settings: Merge pull request #650 in DNS/adguard-home from fix/1770 to master Close #1770 Squashed commit of the following: commit c1f75ea643623af78de020bd1bc49aa5b66e25c4 Merge: a5df78ad a869ec4c Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jun 10 18:56:24 2020 +0300 Merge branch 'master' into fix/1770 commit a5df78ad303305efcafcfa2a170ff567a3a06db5 Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jun 10 12:50:50 2020 +0300 Revert "Update locales" This reverts commit 4b2b4499dea12949c53bce4ceeed595c17df84c6. commit 4b2b4499dea12949c53bce4ceeed595c17df84c6 Author: ArtemBaskal <a.baskal@adguard.com> Date: Tue Jun 9 19:56:34 2020 +0300 Update locales commit 790cff0db84b5905362d2e2702b2cbca5c3c90b0 Author: ArtemBaskal <a.baskal@adguard.com> Date: Fri Jun 5 17:56:01 2020 +0300 Update Upstream component with new api, extract reduxForm HOC names in constant commit 72de3d5a92cc33d5b234c837879fc6990291e07b Merge: 92a4a6ae 501a4e06 Author: ArtemBaskal <a.baskal@adguard.com> Date: Fri Jun 5 15:55:39 2020 +0300 Merge remote-tracking branch 'origin/update-dnsproxy' into fix/1770 commit 501a4e06ab350e46ff78656141d925de9f2e4996 Author: Simon Zolin <s.zolin@adguard.com> Date: Fri Jun 5 12:47:13 2020 +0300 openapi commit 3930bd196572924f164ed011629356a0ac0ec631 Author: Simon Zolin <s.zolin@adguard.com> Date: Fri Jun 5 12:21:32 2020 +0300 * DNS API: new setting "upstream_mode"; remove "fastest_addr", "parallel_requests" * use dnsproxy v0.29.0 commit 92a4a6ae24793a2a9ca05ad3ef2078573fd4d059 Author: ArtemBaskal <a.baskal@adguard.com> Date: Thu Jun 4 18:53:42 2020 +0300 - client: Add default mode in the DNS settings
2020-06-10 16:04:19 +00:00
const Form = ({
submitting, invalid, handleSubmit,
- client: Add default mode in the DNS settings: Merge pull request #650 in DNS/adguard-home from fix/1770 to master Close #1770 Squashed commit of the following: commit c1f75ea643623af78de020bd1bc49aa5b66e25c4 Merge: a5df78ad a869ec4c Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jun 10 18:56:24 2020 +0300 Merge branch 'master' into fix/1770 commit a5df78ad303305efcafcfa2a170ff567a3a06db5 Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jun 10 12:50:50 2020 +0300 Revert "Update locales" This reverts commit 4b2b4499dea12949c53bce4ceeed595c17df84c6. commit 4b2b4499dea12949c53bce4ceeed595c17df84c6 Author: ArtemBaskal <a.baskal@adguard.com> Date: Tue Jun 9 19:56:34 2020 +0300 Update locales commit 790cff0db84b5905362d2e2702b2cbca5c3c90b0 Author: ArtemBaskal <a.baskal@adguard.com> Date: Fri Jun 5 17:56:01 2020 +0300 Update Upstream component with new api, extract reduxForm HOC names in constant commit 72de3d5a92cc33d5b234c837879fc6990291e07b Merge: 92a4a6ae 501a4e06 Author: ArtemBaskal <a.baskal@adguard.com> Date: Fri Jun 5 15:55:39 2020 +0300 Merge remote-tracking branch 'origin/update-dnsproxy' into fix/1770 commit 501a4e06ab350e46ff78656141d925de9f2e4996 Author: Simon Zolin <s.zolin@adguard.com> Date: Fri Jun 5 12:47:13 2020 +0300 openapi commit 3930bd196572924f164ed011629356a0ac0ec631 Author: Simon Zolin <s.zolin@adguard.com> Date: Fri Jun 5 12:21:32 2020 +0300 * DNS API: new setting "upstream_mode"; remove "fastest_addr", "parallel_requests" * use dnsproxy v0.29.0 commit 92a4a6ae24793a2a9ca05ad3ef2078573fd4d059 Author: ArtemBaskal <a.baskal@adguard.com> Date: Thu Jun 4 18:53:42 2020 +0300 - client: Add default mode in the DNS settings
2020-06-10 16:04:19 +00:00
}) => {
const dispatch = useDispatch();
2020-08-13 15:12:27 +00:00
const { t } = useTranslation();
- client: Add default mode in the DNS settings: Merge pull request #650 in DNS/adguard-home from fix/1770 to master Close #1770 Squashed commit of the following: commit c1f75ea643623af78de020bd1bc49aa5b66e25c4 Merge: a5df78ad a869ec4c Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jun 10 18:56:24 2020 +0300 Merge branch 'master' into fix/1770 commit a5df78ad303305efcafcfa2a170ff567a3a06db5 Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jun 10 12:50:50 2020 +0300 Revert "Update locales" This reverts commit 4b2b4499dea12949c53bce4ceeed595c17df84c6. commit 4b2b4499dea12949c53bce4ceeed595c17df84c6 Author: ArtemBaskal <a.baskal@adguard.com> Date: Tue Jun 9 19:56:34 2020 +0300 Update locales commit 790cff0db84b5905362d2e2702b2cbca5c3c90b0 Author: ArtemBaskal <a.baskal@adguard.com> Date: Fri Jun 5 17:56:01 2020 +0300 Update Upstream component with new api, extract reduxForm HOC names in constant commit 72de3d5a92cc33d5b234c837879fc6990291e07b Merge: 92a4a6ae 501a4e06 Author: ArtemBaskal <a.baskal@adguard.com> Date: Fri Jun 5 15:55:39 2020 +0300 Merge remote-tracking branch 'origin/update-dnsproxy' into fix/1770 commit 501a4e06ab350e46ff78656141d925de9f2e4996 Author: Simon Zolin <s.zolin@adguard.com> Date: Fri Jun 5 12:47:13 2020 +0300 openapi commit 3930bd196572924f164ed011629356a0ac0ec631 Author: Simon Zolin <s.zolin@adguard.com> Date: Fri Jun 5 12:21:32 2020 +0300 * DNS API: new setting "upstream_mode"; remove "fastest_addr", "parallel_requests" * use dnsproxy v0.29.0 commit 92a4a6ae24793a2a9ca05ad3ef2078573fd4d059 Author: ArtemBaskal <a.baskal@adguard.com> Date: Thu Jun 4 18:53:42 2020 +0300 - client: Add default mode in the DNS settings
2020-06-10 16:04:19 +00:00
const upstream_dns = useSelector((store) => store.form[FORM_NAME.UPSTREAM].values.upstream_dns);
2020-08-13 15:12:27 +00:00
const bootstrap_dns = useSelector(
(store) => store.form[FORM_NAME.UPSTREAM].values.bootstrap_dns,
);
const upstream_dns_file = useSelector((state) => state.dnsConfig.upstream_dns_file);
const processingTestUpstream = useSelector((state) => state.settings.processingTestUpstream);
const processingSetConfig = useSelector((state) => state.dnsConfig.processingSetConfig);
- client: Add default mode in the DNS settings: Merge pull request #650 in DNS/adguard-home from fix/1770 to master Close #1770 Squashed commit of the following: commit c1f75ea643623af78de020bd1bc49aa5b66e25c4 Merge: a5df78ad a869ec4c Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jun 10 18:56:24 2020 +0300 Merge branch 'master' into fix/1770 commit a5df78ad303305efcafcfa2a170ff567a3a06db5 Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jun 10 12:50:50 2020 +0300 Revert "Update locales" This reverts commit 4b2b4499dea12949c53bce4ceeed595c17df84c6. commit 4b2b4499dea12949c53bce4ceeed595c17df84c6 Author: ArtemBaskal <a.baskal@adguard.com> Date: Tue Jun 9 19:56:34 2020 +0300 Update locales commit 790cff0db84b5905362d2e2702b2cbca5c3c90b0 Author: ArtemBaskal <a.baskal@adguard.com> Date: Fri Jun 5 17:56:01 2020 +0300 Update Upstream component with new api, extract reduxForm HOC names in constant commit 72de3d5a92cc33d5b234c837879fc6990291e07b Merge: 92a4a6ae 501a4e06 Author: ArtemBaskal <a.baskal@adguard.com> Date: Fri Jun 5 15:55:39 2020 +0300 Merge remote-tracking branch 'origin/update-dnsproxy' into fix/1770 commit 501a4e06ab350e46ff78656141d925de9f2e4996 Author: Simon Zolin <s.zolin@adguard.com> Date: Fri Jun 5 12:47:13 2020 +0300 openapi commit 3930bd196572924f164ed011629356a0ac0ec631 Author: Simon Zolin <s.zolin@adguard.com> Date: Fri Jun 5 12:21:32 2020 +0300 * DNS API: new setting "upstream_mode"; remove "fastest_addr", "parallel_requests" * use dnsproxy v0.29.0 commit 92a4a6ae24793a2a9ca05ad3ef2078573fd4d059 Author: ArtemBaskal <a.baskal@adguard.com> Date: Thu Jun 4 18:53:42 2020 +0300 - client: Add default mode in the DNS settings
2020-06-10 16:04:19 +00:00
const handleUpstreamTest = () => dispatch(testUpstream({
+ client: add fastest_addr setting Squashed commit of the following: commit e47fae25f7bac950bfb452fc8f18b9c0865b08ba Merge: a23285ec e2ddc82d Author: Simon Zolin <s.zolin@adguard.com> Date: Wed Apr 22 19:16:01 2020 +0300 Merge remote-tracking branch 'origin/master' into 715 commit a23285ec3ace78fe4ce19122a51ecf3e6cdd942c Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Apr 22 18:30:30 2020 +0300 Review changes commit f80d62a0d2038ff9d070ae9e9c77c33b92232d9c Author: ArtemBaskal <a.baskal@adguard.com> Date: Tue Apr 21 16:37:42 2020 +0300 + client: Add fastest addr option commit 9e713df80c5bf113c98794c0a20915c756a76938 Merge: e3bf4037 9b7c1181 Author: Simon Zolin <s.zolin@adguard.com> Date: Tue Apr 21 16:02:03 2020 +0300 Merge remote-tracking branch 'origin/master' into 715-fastest-addr commit e3bf4037f49198e42bde55305d6f9077341b556a Author: Simon Zolin <s.zolin@adguard.com> Date: Tue Apr 21 15:40:49 2020 +0300 minor commit d6e6a823c5e51acc061b2850d362772efcb827e1 Author: Simon Zolin <s.zolin@adguard.com> Date: Fri Apr 17 17:56:24 2020 +0300 * API changes . removed POST /set_upstreams_config . removed fields from GET /status: bootstrap_dns, upstream_dns, all_servers . added new fields to /dns_config and /dns_info commit 237a452d09cc48ff8f00e81c7fd35e7828bea835 Author: Simon Zolin <s.zolin@adguard.com> Date: Fri Apr 17 16:43:13 2020 +0300 * API: /dns_info, /dns_config: add "parallel_requests" instead of "all_servers" from /set_upstreams_config commit 9976723b9725ed19e0cce152d1d1198b13c4acc1 Author: Simon Zolin <s.zolin@adguard.com> Date: Mon Mar 23 10:28:25 2020 +0300 openapi commit 6f8ea16c6332606f29095b0094d71e8a91798f82 Merge: 36e4d4e8 c8285c41 Author: Simon Zolin <s.zolin@adguard.com> Date: Fri Mar 20 19:18:48 2020 +0300 Merge remote-tracking branch 'origin/master' into 715-fastest-addr commit 36e4d4e82cadeaba5a11313f0d69d66a0924c342 Author: Simon Zolin <s.zolin@adguard.com> Date: Fri Mar 20 18:13:43 2020 +0300 + DNS: add fastest_addr setting
2020-04-22 16:32:07 +00:00
upstream_dns,
bootstrap_dns,
- client: Add default mode in the DNS settings: Merge pull request #650 in DNS/adguard-home from fix/1770 to master Close #1770 Squashed commit of the following: commit c1f75ea643623af78de020bd1bc49aa5b66e25c4 Merge: a5df78ad a869ec4c Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jun 10 18:56:24 2020 +0300 Merge branch 'master' into fix/1770 commit a5df78ad303305efcafcfa2a170ff567a3a06db5 Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jun 10 12:50:50 2020 +0300 Revert "Update locales" This reverts commit 4b2b4499dea12949c53bce4ceeed595c17df84c6. commit 4b2b4499dea12949c53bce4ceeed595c17df84c6 Author: ArtemBaskal <a.baskal@adguard.com> Date: Tue Jun 9 19:56:34 2020 +0300 Update locales commit 790cff0db84b5905362d2e2702b2cbca5c3c90b0 Author: ArtemBaskal <a.baskal@adguard.com> Date: Fri Jun 5 17:56:01 2020 +0300 Update Upstream component with new api, extract reduxForm HOC names in constant commit 72de3d5a92cc33d5b234c837879fc6990291e07b Merge: 92a4a6ae 501a4e06 Author: ArtemBaskal <a.baskal@adguard.com> Date: Fri Jun 5 15:55:39 2020 +0300 Merge remote-tracking branch 'origin/update-dnsproxy' into fix/1770 commit 501a4e06ab350e46ff78656141d925de9f2e4996 Author: Simon Zolin <s.zolin@adguard.com> Date: Fri Jun 5 12:47:13 2020 +0300 openapi commit 3930bd196572924f164ed011629356a0ac0ec631 Author: Simon Zolin <s.zolin@adguard.com> Date: Fri Jun 5 12:21:32 2020 +0300 * DNS API: new setting "upstream_mode"; remove "fastest_addr", "parallel_requests" * use dnsproxy v0.29.0 commit 92a4a6ae24793a2a9ca05ad3ef2078573fd4d059 Author: ArtemBaskal <a.baskal@adguard.com> Date: Thu Jun 4 18:53:42 2020 +0300 - client: Add default mode in the DNS settings
2020-06-10 16:04:19 +00:00
}));
2019-03-06 11:45:21 +00:00
- client: Add default mode in the DNS settings: Merge pull request #650 in DNS/adguard-home from fix/1770 to master Close #1770 Squashed commit of the following: commit c1f75ea643623af78de020bd1bc49aa5b66e25c4 Merge: a5df78ad a869ec4c Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jun 10 18:56:24 2020 +0300 Merge branch 'master' into fix/1770 commit a5df78ad303305efcafcfa2a170ff567a3a06db5 Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jun 10 12:50:50 2020 +0300 Revert "Update locales" This reverts commit 4b2b4499dea12949c53bce4ceeed595c17df84c6. commit 4b2b4499dea12949c53bce4ceeed595c17df84c6 Author: ArtemBaskal <a.baskal@adguard.com> Date: Tue Jun 9 19:56:34 2020 +0300 Update locales commit 790cff0db84b5905362d2e2702b2cbca5c3c90b0 Author: ArtemBaskal <a.baskal@adguard.com> Date: Fri Jun 5 17:56:01 2020 +0300 Update Upstream component with new api, extract reduxForm HOC names in constant commit 72de3d5a92cc33d5b234c837879fc6990291e07b Merge: 92a4a6ae 501a4e06 Author: ArtemBaskal <a.baskal@adguard.com> Date: Fri Jun 5 15:55:39 2020 +0300 Merge remote-tracking branch 'origin/update-dnsproxy' into fix/1770 commit 501a4e06ab350e46ff78656141d925de9f2e4996 Author: Simon Zolin <s.zolin@adguard.com> Date: Fri Jun 5 12:47:13 2020 +0300 openapi commit 3930bd196572924f164ed011629356a0ac0ec631 Author: Simon Zolin <s.zolin@adguard.com> Date: Fri Jun 5 12:21:32 2020 +0300 * DNS API: new setting "upstream_mode"; remove "fastest_addr", "parallel_requests" * use dnsproxy v0.29.0 commit 92a4a6ae24793a2a9ca05ad3ef2078573fd4d059 Author: ArtemBaskal <a.baskal@adguard.com> Date: Thu Jun 4 18:53:42 2020 +0300 - client: Add default mode in the DNS settings
2020-06-10 16:04:19 +00:00
const testButtonClass = classnames('btn btn-primary btn-standard mr-2', {
'btn-loading': processingTestUpstream,
2019-03-06 11:45:21 +00:00
});
const INPUT_FIELDS = getInputFields(upstream_dns_file);
+ client: add fastest_addr setting Squashed commit of the following: commit e47fae25f7bac950bfb452fc8f18b9c0865b08ba Merge: a23285ec e2ddc82d Author: Simon Zolin <s.zolin@adguard.com> Date: Wed Apr 22 19:16:01 2020 +0300 Merge remote-tracking branch 'origin/master' into 715 commit a23285ec3ace78fe4ce19122a51ecf3e6cdd942c Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Apr 22 18:30:30 2020 +0300 Review changes commit f80d62a0d2038ff9d070ae9e9c77c33b92232d9c Author: ArtemBaskal <a.baskal@adguard.com> Date: Tue Apr 21 16:37:42 2020 +0300 + client: Add fastest addr option commit 9e713df80c5bf113c98794c0a20915c756a76938 Merge: e3bf4037 9b7c1181 Author: Simon Zolin <s.zolin@adguard.com> Date: Tue Apr 21 16:02:03 2020 +0300 Merge remote-tracking branch 'origin/master' into 715-fastest-addr commit e3bf4037f49198e42bde55305d6f9077341b556a Author: Simon Zolin <s.zolin@adguard.com> Date: Tue Apr 21 15:40:49 2020 +0300 minor commit d6e6a823c5e51acc061b2850d362772efcb827e1 Author: Simon Zolin <s.zolin@adguard.com> Date: Fri Apr 17 17:56:24 2020 +0300 * API changes . removed POST /set_upstreams_config . removed fields from GET /status: bootstrap_dns, upstream_dns, all_servers . added new fields to /dns_config and /dns_info commit 237a452d09cc48ff8f00e81c7fd35e7828bea835 Author: Simon Zolin <s.zolin@adguard.com> Date: Fri Apr 17 16:43:13 2020 +0300 * API: /dns_info, /dns_config: add "parallel_requests" instead of "all_servers" from /set_upstreams_config commit 9976723b9725ed19e0cce152d1d1198b13c4acc1 Author: Simon Zolin <s.zolin@adguard.com> Date: Mon Mar 23 10:28:25 2020 +0300 openapi commit 6f8ea16c6332606f29095b0094d71e8a91798f82 Merge: 36e4d4e8 c8285c41 Author: Simon Zolin <s.zolin@adguard.com> Date: Fri Mar 20 19:18:48 2020 +0300 Merge remote-tracking branch 'origin/master' into 715-fastest-addr commit 36e4d4e82cadeaba5a11313f0d69d66a0924c342 Author: Simon Zolin <s.zolin@adguard.com> Date: Fri Mar 20 18:13:43 2020 +0300 + DNS: add fastest_addr setting
2020-04-22 16:32:07 +00:00
return <form onSubmit={handleSubmit}>
<div className="row">
{INPUT_FIELDS.map(({
name, component, type, className, placeholder,
getTitle, subtitle, disabled, value, normalizeOnBlur,
}) => <div className="col-12 mb-4" key={placeholder}>
{typeof getTitle === 'function' && getTitle()}
<Field
id={name}
value={value}
name={name}
component={component}
type={type}
className={className}
placeholder={t(placeholder)}
subtitle={t(subtitle)}
disabled={processingSetConfig || processingTestUpstream || disabled}
normalizeOnBlur={normalizeOnBlur}
/>
</div>)}
<div className="col-12">
<Examples />
<hr />
2019-03-06 11:45:21 +00:00
</div>
<div className="col-12 mb-4">
<label
className="form__label form__label--with-desc"
htmlFor="bootstrap_dns"
>
<Trans>bootstrap_dns</Trans>
</label>
<div className="form__desc form__desc--top">
<Trans>bootstrap_dns_desc</Trans>
2019-03-06 11:45:21 +00:00
</div>
<Field
id="bootstrap_dns"
name="bootstrap_dns"
component={renderTextareaField}
type="text"
className="form-control form-control--textarea form-control--textarea-small font-monospace"
placeholder={t('bootstrap_dns')}
disabled={processingSetConfig}
normalizeOnBlur={removeEmptyLines}
/>
</div>
</div>
<div className="card-actions">
<div className="btn-list">
<button
type="button"
className={testButtonClass}
- client: Add default mode in the DNS settings: Merge pull request #650 in DNS/adguard-home from fix/1770 to master Close #1770 Squashed commit of the following: commit c1f75ea643623af78de020bd1bc49aa5b66e25c4 Merge: a5df78ad a869ec4c Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jun 10 18:56:24 2020 +0300 Merge branch 'master' into fix/1770 commit a5df78ad303305efcafcfa2a170ff567a3a06db5 Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jun 10 12:50:50 2020 +0300 Revert "Update locales" This reverts commit 4b2b4499dea12949c53bce4ceeed595c17df84c6. commit 4b2b4499dea12949c53bce4ceeed595c17df84c6 Author: ArtemBaskal <a.baskal@adguard.com> Date: Tue Jun 9 19:56:34 2020 +0300 Update locales commit 790cff0db84b5905362d2e2702b2cbca5c3c90b0 Author: ArtemBaskal <a.baskal@adguard.com> Date: Fri Jun 5 17:56:01 2020 +0300 Update Upstream component with new api, extract reduxForm HOC names in constant commit 72de3d5a92cc33d5b234c837879fc6990291e07b Merge: 92a4a6ae 501a4e06 Author: ArtemBaskal <a.baskal@adguard.com> Date: Fri Jun 5 15:55:39 2020 +0300 Merge remote-tracking branch 'origin/update-dnsproxy' into fix/1770 commit 501a4e06ab350e46ff78656141d925de9f2e4996 Author: Simon Zolin <s.zolin@adguard.com> Date: Fri Jun 5 12:47:13 2020 +0300 openapi commit 3930bd196572924f164ed011629356a0ac0ec631 Author: Simon Zolin <s.zolin@adguard.com> Date: Fri Jun 5 12:21:32 2020 +0300 * DNS API: new setting "upstream_mode"; remove "fastest_addr", "parallel_requests" * use dnsproxy v0.29.0 commit 92a4a6ae24793a2a9ca05ad3ef2078573fd4d059 Author: ArtemBaskal <a.baskal@adguard.com> Date: Thu Jun 4 18:53:42 2020 +0300 - client: Add default mode in the DNS settings
2020-06-10 16:04:19 +00:00
onClick={handleUpstreamTest}
disabled={!upstream_dns || processingTestUpstream}
>
<Trans>test_upstream_btn</Trans>
</button>
<button
type="submit"
className="btn btn-success btn-standard"
disabled={
submitting || invalid || processingSetConfig || processingTestUpstream
}
>
<Trans>apply_btn</Trans>
</button>
2019-03-06 11:45:21 +00:00
</div>
</div>
</form>;
2019-03-06 11:45:21 +00:00
};
Form.propTypes = {
handleSubmit: PropTypes.func,
submitting: PropTypes.bool,
invalid: PropTypes.bool,
initialValues: PropTypes.object,
+ client: add fastest_addr setting Squashed commit of the following: commit e47fae25f7bac950bfb452fc8f18b9c0865b08ba Merge: a23285ec e2ddc82d Author: Simon Zolin <s.zolin@adguard.com> Date: Wed Apr 22 19:16:01 2020 +0300 Merge remote-tracking branch 'origin/master' into 715 commit a23285ec3ace78fe4ce19122a51ecf3e6cdd942c Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Apr 22 18:30:30 2020 +0300 Review changes commit f80d62a0d2038ff9d070ae9e9c77c33b92232d9c Author: ArtemBaskal <a.baskal@adguard.com> Date: Tue Apr 21 16:37:42 2020 +0300 + client: Add fastest addr option commit 9e713df80c5bf113c98794c0a20915c756a76938 Merge: e3bf4037 9b7c1181 Author: Simon Zolin <s.zolin@adguard.com> Date: Tue Apr 21 16:02:03 2020 +0300 Merge remote-tracking branch 'origin/master' into 715-fastest-addr commit e3bf4037f49198e42bde55305d6f9077341b556a Author: Simon Zolin <s.zolin@adguard.com> Date: Tue Apr 21 15:40:49 2020 +0300 minor commit d6e6a823c5e51acc061b2850d362772efcb827e1 Author: Simon Zolin <s.zolin@adguard.com> Date: Fri Apr 17 17:56:24 2020 +0300 * API changes . removed POST /set_upstreams_config . removed fields from GET /status: bootstrap_dns, upstream_dns, all_servers . added new fields to /dns_config and /dns_info commit 237a452d09cc48ff8f00e81c7fd35e7828bea835 Author: Simon Zolin <s.zolin@adguard.com> Date: Fri Apr 17 16:43:13 2020 +0300 * API: /dns_info, /dns_config: add "parallel_requests" instead of "all_servers" from /set_upstreams_config commit 9976723b9725ed19e0cce152d1d1198b13c4acc1 Author: Simon Zolin <s.zolin@adguard.com> Date: Mon Mar 23 10:28:25 2020 +0300 openapi commit 6f8ea16c6332606f29095b0094d71e8a91798f82 Merge: 36e4d4e8 c8285c41 Author: Simon Zolin <s.zolin@adguard.com> Date: Fri Mar 20 19:18:48 2020 +0300 Merge remote-tracking branch 'origin/master' into 715-fastest-addr commit 36e4d4e82cadeaba5a11313f0d69d66a0924c342 Author: Simon Zolin <s.zolin@adguard.com> Date: Fri Mar 20 18:13:43 2020 +0300 + DNS: add fastest_addr setting
2020-04-22 16:32:07 +00:00
upstream_dns: PropTypes.string,
bootstrap_dns: PropTypes.string,
2019-03-06 11:45:21 +00:00
};
- client: Add default mode in the DNS settings: Merge pull request #650 in DNS/adguard-home from fix/1770 to master Close #1770 Squashed commit of the following: commit c1f75ea643623af78de020bd1bc49aa5b66e25c4 Merge: a5df78ad a869ec4c Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jun 10 18:56:24 2020 +0300 Merge branch 'master' into fix/1770 commit a5df78ad303305efcafcfa2a170ff567a3a06db5 Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Jun 10 12:50:50 2020 +0300 Revert "Update locales" This reverts commit 4b2b4499dea12949c53bce4ceeed595c17df84c6. commit 4b2b4499dea12949c53bce4ceeed595c17df84c6 Author: ArtemBaskal <a.baskal@adguard.com> Date: Tue Jun 9 19:56:34 2020 +0300 Update locales commit 790cff0db84b5905362d2e2702b2cbca5c3c90b0 Author: ArtemBaskal <a.baskal@adguard.com> Date: Fri Jun 5 17:56:01 2020 +0300 Update Upstream component with new api, extract reduxForm HOC names in constant commit 72de3d5a92cc33d5b234c837879fc6990291e07b Merge: 92a4a6ae 501a4e06 Author: ArtemBaskal <a.baskal@adguard.com> Date: Fri Jun 5 15:55:39 2020 +0300 Merge remote-tracking branch 'origin/update-dnsproxy' into fix/1770 commit 501a4e06ab350e46ff78656141d925de9f2e4996 Author: Simon Zolin <s.zolin@adguard.com> Date: Fri Jun 5 12:47:13 2020 +0300 openapi commit 3930bd196572924f164ed011629356a0ac0ec631 Author: Simon Zolin <s.zolin@adguard.com> Date: Fri Jun 5 12:21:32 2020 +0300 * DNS API: new setting "upstream_mode"; remove "fastest_addr", "parallel_requests" * use dnsproxy v0.29.0 commit 92a4a6ae24793a2a9ca05ad3ef2078573fd4d059 Author: ArtemBaskal <a.baskal@adguard.com> Date: Thu Jun 4 18:53:42 2020 +0300 - client: Add default mode in the DNS settings
2020-06-10 16:04:19 +00:00
export default reduxForm({ form: FORM_NAME.UPSTREAM })(Form);