Merge: + client: handle client block and unblock from the top clients table
Closes #896 Squashed commit of the following: commit 776de2ae0a62823b8968cff79a9fa7ba350d7f1c Author: Ildar Kamalov <i.kamalov@adguard.com> Date: Thu Jan 30 11:13:41 2020 +0300 - client: fix normalizeTextarea and blocking button commit 399e6bc3893093632b09247eaf6493521a668c84 Author: Ildar Kamalov <i.kamalov@adguard.com> Date: Wed Jan 29 17:19:50 2020 +0300 + client: handle client block and unblock from the top clients table
This commit is contained in:
@@ -289,12 +289,8 @@ export const setUpstream = config => async (dispatch) => {
|
||||
dispatch(setUpstreamRequest());
|
||||
try {
|
||||
const values = { ...config };
|
||||
values.bootstrap_dns = (
|
||||
values.bootstrap_dns && normalizeTextarea(values.bootstrap_dns)
|
||||
) || [];
|
||||
values.upstream_dns = (
|
||||
values.upstream_dns && normalizeTextarea(values.upstream_dns)
|
||||
) || [];
|
||||
values.bootstrap_dns = normalizeTextarea(values.bootstrap_dns);
|
||||
values.upstream_dns = normalizeTextarea(values.upstream_dns);
|
||||
|
||||
await apiClient.setUpstream(values);
|
||||
dispatch(addSuccessToast('updated_upstream_dns_toast'));
|
||||
@@ -313,12 +309,8 @@ export const testUpstream = config => async (dispatch) => {
|
||||
dispatch(testUpstreamRequest());
|
||||
try {
|
||||
const values = { ...config };
|
||||
values.bootstrap_dns = (
|
||||
values.bootstrap_dns && normalizeTextarea(values.bootstrap_dns)
|
||||
) || [];
|
||||
values.upstream_dns = (
|
||||
values.upstream_dns && normalizeTextarea(values.upstream_dns)
|
||||
) || [];
|
||||
values.bootstrap_dns = normalizeTextarea(values.bootstrap_dns);
|
||||
values.upstream_dns = normalizeTextarea(values.upstream_dns);
|
||||
|
||||
const upstreamResponse = await apiClient.testUpstream(values);
|
||||
const testMessages = Object.keys(upstreamResponse).map((key) => {
|
||||
|
||||
Reference in New Issue
Block a user