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

49 lines
1.4 KiB
JavaScript
Raw Normal View History

- 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 React from 'react';
import { useTranslation } from 'react-i18next';
Pull request #730: + client: Add Hot Module Replacement Merge in DNS/adguard-home from feature/hmr to master Squashed commit of the following: commit 952ed1955c2a7a32446d99489f137f02eb47c99e Merge: 83484931 de92c852 Author: ArtemBaskal <a.baskal@adguard.com> Date: Thu Aug 13 11:02:10 2020 +0300 Merge branch 'master' into feature/hmr commit 8348493105d7d63d8b0836a5c272df2b17a6b142 Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Aug 5 15:07:31 2020 +0300 Remove empty prop types, remove Services empty container commit b2fe4a30b79d91e482318ee5deea8e49c7038f7e Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Aug 5 13:56:35 2020 +0300 Move constants commit f8be4c18c35193ad77bf5e25f311ad834c1d6870 Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Aug 5 13:19:02 2020 +0300 Fix Setup bug, update webpack.dev commit 1d9cc4ddf8af2c979eb707a7f0fc06744eec186c Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Aug 5 12:10:38 2020 +0300 Review changes commit a1edb21358def21ed1808b081ffc2f0b6755e3da Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Aug 5 11:46:58 2020 +0300 Remove lazy loading, fix updated components commit 0aa2cf55f8d4206ac9e2f99fc1b990ed8a9c7825 Author: ArtemBaskal <a.baskal@adguard.com> Date: Tue Aug 4 20:32:19 2020 +0300 Refactor App component, add lazy loading commit 3c2ba4772a91ff7b06641dba6c6bf3fdcd2fdf7f Author: ArtemBaskal <a.baskal@adguard.com> Date: Tue Aug 4 17:12:41 2020 +0300 Simplify App hot loading boilerplate, setup lazy loading, update Header commit 8df3221f315372b066f2ac0c9a1687f1677b8415 Author: ArtemBaskal <a.baskal@adguard.com> Date: Tue Aug 4 15:16:06 2020 +0300 + client: Add Hot Module Replacement
2020-08-13 08:15:45 +00:00
import { shallowEqual, useDispatch } from 'react-redux';
2019-03-06 11:45:21 +00:00
import Form from './Form';
import Card from '../../../ui/Card';
- 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 { setDnsConfig } from '../../../../actions/dnsConfig';
Pull request #730: + client: Add Hot Module Replacement Merge in DNS/adguard-home from feature/hmr to master Squashed commit of the following: commit 952ed1955c2a7a32446d99489f137f02eb47c99e Merge: 83484931 de92c852 Author: ArtemBaskal <a.baskal@adguard.com> Date: Thu Aug 13 11:02:10 2020 +0300 Merge branch 'master' into feature/hmr commit 8348493105d7d63d8b0836a5c272df2b17a6b142 Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Aug 5 15:07:31 2020 +0300 Remove empty prop types, remove Services empty container commit b2fe4a30b79d91e482318ee5deea8e49c7038f7e Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Aug 5 13:56:35 2020 +0300 Move constants commit f8be4c18c35193ad77bf5e25f311ad834c1d6870 Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Aug 5 13:19:02 2020 +0300 Fix Setup bug, update webpack.dev commit 1d9cc4ddf8af2c979eb707a7f0fc06744eec186c Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Aug 5 12:10:38 2020 +0300 Review changes commit a1edb21358def21ed1808b081ffc2f0b6755e3da Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Aug 5 11:46:58 2020 +0300 Remove lazy loading, fix updated components commit 0aa2cf55f8d4206ac9e2f99fc1b990ed8a9c7825 Author: ArtemBaskal <a.baskal@adguard.com> Date: Tue Aug 4 20:32:19 2020 +0300 Refactor App component, add lazy loading commit 3c2ba4772a91ff7b06641dba6c6bf3fdcd2fdf7f Author: ArtemBaskal <a.baskal@adguard.com> Date: Tue Aug 4 17:12:41 2020 +0300 Simplify App hot loading boilerplate, setup lazy loading, update Header commit 8df3221f315372b066f2ac0c9a1687f1677b8415 Author: ArtemBaskal <a.baskal@adguard.com> Date: Tue Aug 4 15:16:06 2020 +0300 + client: Add Hot Module Replacement
2020-08-13 08:15:45 +00:00
const Upstream = () => {
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 dispatch = useDispatch();
Pull request #730: + client: Add Hot Module Replacement Merge in DNS/adguard-home from feature/hmr to master Squashed commit of the following: commit 952ed1955c2a7a32446d99489f137f02eb47c99e Merge: 83484931 de92c852 Author: ArtemBaskal <a.baskal@adguard.com> Date: Thu Aug 13 11:02:10 2020 +0300 Merge branch 'master' into feature/hmr commit 8348493105d7d63d8b0836a5c272df2b17a6b142 Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Aug 5 15:07:31 2020 +0300 Remove empty prop types, remove Services empty container commit b2fe4a30b79d91e482318ee5deea8e49c7038f7e Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Aug 5 13:56:35 2020 +0300 Move constants commit f8be4c18c35193ad77bf5e25f311ad834c1d6870 Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Aug 5 13:19:02 2020 +0300 Fix Setup bug, update webpack.dev commit 1d9cc4ddf8af2c979eb707a7f0fc06744eec186c Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Aug 5 12:10:38 2020 +0300 Review changes commit a1edb21358def21ed1808b081ffc2f0b6755e3da Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Aug 5 11:46:58 2020 +0300 Remove lazy loading, fix updated components commit 0aa2cf55f8d4206ac9e2f99fc1b990ed8a9c7825 Author: ArtemBaskal <a.baskal@adguard.com> Date: Tue Aug 4 20:32:19 2020 +0300 Refactor App component, add lazy loading commit 3c2ba4772a91ff7b06641dba6c6bf3fdcd2fdf7f Author: ArtemBaskal <a.baskal@adguard.com> Date: Tue Aug 4 17:12:41 2020 +0300 Simplify App hot loading boilerplate, setup lazy loading, update Header commit 8df3221f315372b066f2ac0c9a1687f1677b8415 Author: ArtemBaskal <a.baskal@adguard.com> Date: Tue Aug 4 15:16:06 2020 +0300 + client: Add Hot Module Replacement
2020-08-13 08:15:45 +00:00
const {
upstream_dns,
bootstrap_dns,
upstream_mode,
processingSetConfig,
} = ((state) => state.dnsConfig, shallowEqual);
const { processingTestUpstream } = ((state) => state.settings, shallowEqual);
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 handleSubmit = (values) => {
dispatch(setDnsConfig(values));
};
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
return (
<Card
title={t('upstream_dns')}
subtitle={t('upstream_dns_hint')}
bodyType="card-body box-body--settings"
>
<div className="row">
<div className="col">
<Form
initialValues={{
upstream_dns,
bootstrap_dns,
upstream_mode,
}}
onSubmit={handleSubmit}
processingTestUpstream={processingTestUpstream}
processingSetConfig={processingSetConfig}
/>
2019-03-06 11:45:21 +00:00
</div>
- 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
</div>
</Card>
);
};
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 Upstream;