Skip to content
Permalink
Browse files

+ client: Update packages - Merge pull request #613 in DNS/adguard-ho…

…me from fix/1597 to master

Close #1597

Squashed commit of the following:

commit 1eb89586dd71260e561420fe669abc8b56a506a1
Author: ArtemBaskal <a.baskal@adguard.com>
Date:   Wed May 20 14:54:10 2020 +0300

    Fix translation in install options

commit 1ebdc9ebfe12a609f978e47db6505c7095b10f7e
Author: ArtemBaskal <a.baskal@adguard.com>
Date:   Wed May 20 13:11:34 2020 +0300

    Remove commented code

commit 2a8302c65a2a3cf7b6b1596115d1153dac32a794
Author: ArtemBaskal <a.baskal@adguard.com>
Date:   Tue May 19 19:02:49 2020 +0300

    Update i18n packages, add development browserlist, downgrade eslint to match peerDepencancies version

commit 3fcf73fb14cd9da508522d1a300b66af24da95e5
Author: ArtemBaskal <a.baskal@adguard.com>
Date:   Tue May 19 17:30:37 2020 +0300

    Remove all unused dependencies

commit e761810e3e54e188ada41245bdce7414cd0f03e8
Author: ArtemBaskal <a.baskal@adguard.com>
Date:   Tue May 19 16:35:24 2020 +0300

    Remove unused dependencies

commit d89d27da6befcaabcdc12bf5e7e94cbb24140010
Author: ArtemBaskal <a.baskal@adguard.com>
Date:   Tue May 19 16:14:09 2020 +0300

    Update regular dependencies

commit d2dfd01233d059870d5173ffd748cf61a477936f
Author: ArtemBaskal <a.baskal@adguard.com>
Date:   Tue May 19 15:34:10 2020 +0300

    Update all dev dependancies

commit 02b6fb480e9d310039fbe9b7aae062a41128f070
Author: ArtemBaskal <a.baskal@adguard.com>
Date:   Tue May 19 14:14:44 2020 +0300

    Update all postcss packages

commit 5e1fa5f99ad75f77e5e429b28ee1ca0b5e65a9a0
Author: ArtemBaskal <a.baskal@adguard.com>
Date:   Tue May 19 12:45:02 2020 +0300

    Prevent git from converting linebreaks in .js files

commit 0b9b3b0dccd47cfa50c9531fb61729e6b5a04523
Author: ArtemBaskal <a.baskal@adguard.com>
Date:   Tue May 19 12:43:01 2020 +0300

    Prevent git from converting linebreaks in .js files

commit 18b7495e9ef7130b1ac4dbba84c54127d16c6350
Author: ArtemBaskal <a.baskal@adguard.com>
Date:   Tue May 19 12:24:47 2020 +0300

    Remove linebreak-style eslint rule

commit df893dec53adebb1d662fe805fab508fd4ed5e06
Author: ArtemBaskal <a.baskal@adguard.com>
Date:   Mon May 18 20:55:47 2020 +0300

    Add prop types

commit 36178ecfc5c7fa11a6ee08d7705ca8560941af40
Author: ArtemBaskal <a.baskal@adguard.com>
Date:   Mon May 18 18:52:07 2020 +0300

    Update eslint and babel, fix eslint warnings

commit f045b4a2e6b9b78f7e88e3b5d1419c29966a8230
Author: ArtemBaskal <a.baskal@adguard.com>
Date:   Mon May 18 16:45:49 2020 +0300

    Update css loading webpack rules

commit 247fa1ed548ef0706a03fdada8309c1454d191f8
Author: ArtemBaskal <a.baskal@adguard.com>
Date:   Sat May 16 16:13:49 2020 +0300

    Suppress linebreak-style eslint error for Windows

commit d6499aac507100d6918c849c06d739d80f2229f0
Author: ArtemBaskal <a.baskal@adguard.com>
Date:   Sat May 16 14:55:07 2020 +0300

    Suppress eslint exit code

commit ae2d6c614ea23a90d515168f8752e959298894ef
Author: ArtemBaskal <a.baskal@adguard.com>
Date:   Sat May 16 14:05:18 2020 +0300

    Edit css file warnings

commit 60675050f2a5baebc679fc05da7e033e5c740d90
Author: ArtemBaskal <a.baskal@adguard.com>
Date:   Sat May 16 13:10:26 2020 +0300

    Remove uglifyjs plugin

commit a27806434dd8672e71a26c7a2e810d77e5e229fa
Author: ArtemBaskal <a.baskal@adguard.com>
Date:   Sat May 16 01:29:17 2020 +0300

    Fix DefinePlugin value

commit 8f2966ca59195c2f70bca5072d20515d536f42a6
Author: ArtemBaskal <a.baskal@adguard.com>
Date:   Sat May 16 01:05:03 2020 +0300

    Update webpack
  • Loading branch information
ArtemBaskal committed May 22, 2020
1 parent 8b25a48 commit 6f3cd4e7eb1f9c790208d8f42ead6af04f2138e4
Showing with 9,361 additions and 10,814 deletions.
  1. +16 −0 client/.babelrc
  2. 0 client/{.eslintrc → .eslintrc.json}
  3. +1 −0 client/.gitattributes
  4. +8,282 −9,887 client/package-lock.json
  5. +87 −79 client/package.json
  6. +6 −6 client/src/actions/access.js
  7. +8 −7 client/src/actions/clients.js
  8. +2 −2 client/src/actions/dnsConfig.js
  9. +3 −3 client/src/actions/encryption.js
  10. +7 −7 client/src/actions/filtering.js
  11. +20 −22 client/src/actions/index.js
  12. +3 −3 client/src/actions/install.js
  13. +2 −2 client/src/actions/login.js
  14. +7 −7 client/src/actions/queryLogs.js
  15. +6 −6 client/src/actions/rewrites.js
  16. +2 −2 client/src/actions/services.js
  17. +5 −3 client/src/actions/stats.js
  18. +5 −0 client/src/actions/toasts.js
  19. +42 −0 client/src/api/Api.js
  20. +2 −2 client/src/components/App/index.css
  21. +2 −2 client/src/components/App/index.js
  22. +7 −8 client/src/components/Dashboard/BlockedDomains.js
  23. +16 −19 client/src/components/Dashboard/Clients.js
  24. +5 −6 client/src/components/Dashboard/Counters.js
  25. +9 −10 client/src/components/Dashboard/QueriedDomains.js
  26. +2 −2 client/src/components/Dashboard/Statistics.js
  27. +5 −6 client/src/components/Dashboard/index.js
  28. +2 −3 client/src/components/Filters/Actions.js
  29. +6 −6 client/src/components/Filters/Check/Info.js
  30. +3 −3 client/src/components/Filters/Check/index.js
  31. +2 −2 client/src/components/Filters/CustomRules.js
  32. +2 −2 client/src/components/Filters/DnsAllowlist.js
  33. +2 −2 client/src/components/Filters/DnsBlocklist.js
  34. +2 −2 client/src/components/Filters/Examples.js
  35. +6 −9 client/src/components/Filters/Form.js
  36. +2 −2 client/src/components/Filters/Modal.js
  37. +5 −3 client/src/components/Filters/Rewrites/Form.js
  38. +2 −2 client/src/components/Filters/Rewrites/Modal.js
  39. +7 −8 client/src/components/Filters/Rewrites/Table.js
  40. +2 −2 client/src/components/Filters/Rewrites/index.js
  41. +10 −11 client/src/components/Filters/Table.js
  42. +7 −8 client/src/components/Header/Menu.js
  43. +5 −5 client/src/components/Header/index.js
  44. +36 −23 client/src/components/Logs/Filters/Form.js
  45. +14 −12 client/src/components/Logs/index.js
  46. +3 −3 client/src/components/Settings/Clients/AutoClients.js
  47. +15 −16 client/src/components/Settings/Clients/ClientsTable.js
  48. +55 −47 client/src/components/Settings/Clients/Form.js
  49. +2 −2 client/src/components/Settings/Clients/Modal.js
  50. +2 −2 client/src/components/Settings/Clients/index.js
  51. +5 −6 client/src/components/Settings/Clients/whoisCell.js
  52. +16 −14 client/src/components/Settings/Dhcp/Form.js
  53. +2 −2 client/src/components/Settings/Dhcp/Leases.js
  54. +5 −3 client/src/components/Settings/Dhcp/StaticLeases/Form.js
  55. +2 −2 client/src/components/Settings/Dhcp/StaticLeases/Modal.js
  56. +3 −4 client/src/components/Settings/Dhcp/StaticLeases/index.js
  57. +8 −8 client/src/components/Settings/Dhcp/index.js
  58. +2 −2 client/src/components/Settings/Dns/Access/Form.js
  59. +2 −2 client/src/components/Settings/Dns/Access/index.js
  60. +6 −8 client/src/components/Settings/Dns/Config/Form.js
  61. +2 −2 client/src/components/Settings/Dns/Config/index.js
  62. +3 −3 client/src/components/Settings/Dns/Upstream/Examples.js
  63. +6 −7 client/src/components/Settings/Dns/Upstream/Form.js
  64. +2 −2 client/src/components/Settings/Dns/Upstream/index.js
  65. +5 −5 client/src/components/Settings/Dns/index.js
  66. +2 −2 client/src/components/Settings/Encryption/CertificateStatus.js
  67. +10 −11 client/src/components/Settings/Encryption/Form.js
  68. +2 −2 client/src/components/Settings/Encryption/KeyStatus.js
  69. +2 −2 client/src/components/Settings/Encryption/index.js
  70. +4 −4 client/src/components/Settings/FiltersConfig/Form.js
  71. +2 −2 client/src/components/Settings/FiltersConfig/index.js
  72. +7 −9 client/src/components/Settings/LogsConfig/Form.js
  73. +2 −2 client/src/components/Settings/LogsConfig/index.js
  74. +3 −3 client/src/components/Settings/Services/Form.js
  75. +3 −3 client/src/components/Settings/Services/index.js
  76. +7 −9 client/src/components/Settings/StatsConfig/Form.js
  77. +2 −2 client/src/components/Settings/StatsConfig/index.js
  78. +33 −7 client/src/components/Settings/index.js
  79. +3 −3 client/src/components/SetupGuide/index.js
  80. +2 −2 client/src/components/Toasts/Toast.js
  81. +15 −16 client/src/components/Toasts/index.js
  82. +2 −2 client/src/components/ui/Accordion.js
  83. +2 −2 client/src/components/ui/Checkbox.js
  84. +3 −3 client/src/components/ui/Dropdown.js
  85. +3 −3 client/src/components/ui/EncryptionTopline.js
  86. +3 −3 client/src/components/ui/Footer.js
  87. +6 −7 client/src/components/ui/Guide.js
  88. +38 −40 client/src/components/ui/Line.js
  89. +1 −1 client/src/components/ui/PageTitle.js
  90. +2 −2 client/src/components/ui/Popover.js
  91. +2 −2 client/src/components/ui/PopoverFilter.js
  92. +5 −5 client/src/components/ui/Status.js
  93. +4 −4 client/src/components/ui/Tabler.css
  94. +1 −1 client/src/components/ui/Tooltip.js
  95. +1 −1 client/src/components/ui/Topline.js
  96. +2 −2 client/src/components/ui/UpdateOverlay.js
  97. +5 −5 client/src/components/ui/UpdateTopline.js
  98. +2 −2 client/src/components/ui/Version.js
  99. +1 −1 client/src/configureStore.js
  100. +3 −1 client/src/containers/Clients.js
  101. +5 −2 client/src/containers/Logs.js
  102. +108 −59 client/src/helpers/form.js
  103. +42 −38 client/src/helpers/helpers.js
  104. +1 −1 client/src/helpers/trackers/trackers.js
  105. +1 −1 client/src/helpers/versionCompare.js
  106. +2 −4 client/src/i18n.js
  107. +2 −2 client/src/install/Setup/Auth.js
  108. +1 −2 client/src/install/Setup/Controls.js
  109. +3 −3 client/src/install/Setup/Devices.js
  110. +2 −2 client/src/install/Setup/Greeting.js
  111. +4 −4 client/src/install/Setup/Progress.js
  112. +19 −16 client/src/install/Setup/Settings.js
  113. +3 −3 client/src/install/Setup/Submit.js
  114. +2 −2 client/src/install/Setup/index.js
  115. +2 −2 client/src/login/Login/Form.js
  116. +3 −3 client/src/login/Login/index.js
  117. +6 −6 client/src/reducers/access.js
  118. +6 −6 client/src/reducers/clients.js
  119. +4 −6 client/src/reducers/dnsConfig.js
  120. +6 −6 client/src/reducers/encryption.js
  121. +24 −24 client/src/reducers/filtering.js
  122. +38 −37 client/src/reducers/index.js
  123. +9 −9 client/src/reducers/install.js
  124. +2 −2 client/src/reducers/login.js
  125. +15 −15 client/src/reducers/queryLogs.js
  126. +7 −7 client/src/reducers/rewrites.js
  127. +5 −5 client/src/reducers/services.js
  128. +9 −9 client/src/reducers/stats.js
  129. +6 −3 client/src/reducers/toasts.js
  130. +26 −31 client/webpack.common.js
  131. +0 −2 client/webpack.prod.js
@@ -0,0 +1,16 @@
{
"presets": [
[
"@babel/preset-env",
{
"modules": false
}
],
"@babel/preset-react"
],
"plugins": [
"@babel/plugin-proposal-class-properties",
"@babel/plugin-transform-runtime",
"@babel/plugin-proposal-object-rest-spread"
]
}
File renamed without changes.
@@ -0,0 +1 @@
*.js text eol=lf

Large diffs are not rendered by default.

@@ -1,81 +1,89 @@
{
"name": "dashboard",
"version": "0.1.0",
"private": true,
"scripts": {
"build-dev": "cross-env NODE_ENV=development webpack --config webpack.dev.js",
"watch": "cross-env NODE_ENV=development webpack --config webpack.dev.js --watch",
"build-prod": "cross-env NODE_ENV=production webpack --config webpack.prod.js",
"lint": "eslint client/"
},
"dependencies": {
"@nivo/line": "^0.49.1",
"axios": "^0.19.0",
"classnames": "^2.2.6",
"date-fns": "^1.29.0",
"i18next": "^12.0.0",
"i18next-browser-languagedetector": "^2.2.3",
"lodash": "^4.17.15",
"nanoid": "^1.2.3",
"prop-types": "^15.7.2",
"react": "^16.4.0",
"react-click-outside": "^3.0.1",
"react-dom": "^16.4.0",
"react-i18next": "^8.2.0",
"react-modal": "^3.4.5",
"react-redux": "^5.0.7",
"react-redux-loading-bar": "^4.0.7",
"react-router-dom": "^4.2.2",
"react-router-hash-link": "^1.2.2",
"react-select": "^3.0.8",
"react-table": "^6.10.3",
"react-transition-group": "^2.4.0",
"redux": "^4.0.0",
"redux-actions": "^2.4.0",
"redux-form": "^7.4.2",
"redux-thunk": "^2.3.0",
"url-polyfill": "^1.1.7"
},
"devDependencies": {
"autoprefixer": "^8.6.3",
"babel-core": "6.26.0",
"babel-eslint": "^8.2.3",
"babel-loader": "7.1.2",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-env": "^1.7.0",
"babel-preset-react": "^6.24.1",
"babel-preset-stage-2": "^6.24.1",
"babel-runtime": "6.26.0",
"clean-webpack-plugin": "^0.1.19",
"compression-webpack-plugin": "^1.1.11",
"copy-webpack-plugin": "^4.6.0",
"cross-env": "^7.0.2",
"css-loader": "^2.1.1",
"eslint": "^4.19.1",
"eslint-config-airbnb-base": "^12.1.0",
"eslint-config-react-app": "^2.1.0",
"eslint-import-resolver-webpack": "^0.12.1",
"eslint-loader": "1.9.0",
"eslint-plugin-import": "^2.12.0",
"eslint-plugin-jsx-a11y": "5.1.1",
"eslint-plugin-react": "^7.9.1",
"extract-text-webpack-plugin": "^3.0.2",
"file-loader": "1.1.5",
"html-webpack-plugin": "^3.2.0",
"postcss-flexbugs-fixes": "3.2.0",
"postcss-import": "^11.1.0",
"postcss-loader": "^2.1.5",
"postcss-mixins": "^6.2.0",
"postcss-preset-env": "^5.1.0",
"postcss-svg": "^2.4.0",
"style-loader": "^0.21.0",
"stylelint": "^9.10.1",
"stylelint-webpack-plugin": "0.10.4",
"svg-url-loader": "^2.3.2",
"uglifyjs-webpack-plugin": "^1.2.7",
"url-loader": "^1.0.1",
"webpack": "3.8.1",
"webpack-dev-server": "^3.1.14",
"webpack-merge": "^4.1.3"
}
"name": "dashboard",
"version": "0.1.0",
"private": true,
"scripts": {
"build-dev": "cross-env BUILD_ENV=dev webpack --config webpack.dev.js",
"watch": "cross-env BUILD_ENV=dev webpack --config webpack.dev.js --watch",
"build-prod": "cross-env BUILD_ENV=prod webpack --config webpack.prod.js",
"lint": "eslint src"
},
"dependencies": {
"@nivo/line": "^0.49.1",
"axios": "^0.19.2",
"classnames": "^2.2.6",
"date-fns": "^1.29.0",
"i18next": "^19.4.4",
"i18next-browser-languagedetector": "^4.2.0",
"lodash": "^4.17.15",
"nanoid": "^3.1.9",
"prop-types": "^15.7.2",
"react": "^16.13.1",
"react-click-outside": "^3.0.1",
"react-dom": "^16.13.1",
"react-i18next": "^11.4.0",
"react-modal": "^3.11.2",
"react-redux": "^7.2.0",
"react-redux-loading-bar": "^4.6.0",
"react-router-dom": "^5.2.0",
"react-router-hash-link": "^1.2.2",
"react-select": "^3.1.0",
"react-table": "^6.11.4",
"react-transition-group": "^4.4.1",
"redux": "^4.0.5",
"redux-actions": "^2.6.5",
"redux-form": "^8.3.5",
"redux-thunk": "^2.3.0",
"url-polyfill": "^1.1.9"
},
"devDependencies": {
"@babel/core": "^7.9.6",
"@babel/plugin-proposal-class-properties": "^7.8.3",
"@babel/plugin-proposal-object-rest-spread": "^7.9.6",
"@babel/plugin-transform-runtime": "^7.9.6",
"@babel/preset-env": "^7.9.6",
"@babel/preset-react": "^7.9.4",
"autoprefixer": "^9.8.0",
"babel-eslint": "^10.1.0",
"babel-loader": "^8.1.0",
"clean-webpack-plugin": "^3.0.0",
"copy-webpack-plugin": "^6.0.1",
"cross-env": "^7.0.2",
"css-loader": "^3.5.3",
"eslint": "^6.8.0",
"eslint-config-airbnb": "^18.1.0",
"eslint-import-resolver-webpack": "^0.12.1",
"eslint-loader": "^4.0.2",
"eslint-plugin-import": "^2.20.2",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-react": "^7.20.0",
"eslint-plugin-react-hooks": "^2.5.0",
"file-loader": "6.0.0",
"html-webpack-plugin": "^4.3.0",
"mini-css-extract-plugin": "^0.9.0",
"path": "^0.12.7",
"postcss-flexbugs-fixes": "4.2.1",
"postcss-loader": "^3.0.0",
"style-loader": "^1.2.1",
"stylelint": "^13.5.0",
"stylelint-webpack-plugin": "2.0.0",
"url-loader": "^4.1.0",
"webpack": "^4.43.0",
"webpack-cli": "^3.3.11",
"webpack-dev-server": "^3.11.0",
"webpack-merge": "^4.2.2"
},
"browserslist": {
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
],
"production": [
">1%",
"last 4 versions",
"Firefox ESR",
"not ie < 9"
]
}
}
@@ -1,10 +1,10 @@
import { createAction } from 'redux-actions';
import { t } from 'i18next';
import i18next from 'i18next';

import apiClient from '../api/Api';
import { addErrorToast, addSuccessToast } from './index';
import { normalizeTextarea } from '../helpers/helpers';
import { ACTION } from '../helpers/constants';
import { addErrorToast, addSuccessToast } from './toasts';

export const getAccessListRequest = createAction('GET_ACCESS_LIST_REQUEST');
export const getAccessListFailure = createAction('GET_ACCESS_LIST_FAILURE');
@@ -25,7 +25,7 @@ export const setAccessListRequest = createAction('SET_ACCESS_LIST_REQUEST');
export const setAccessListFailure = createAction('SET_ACCESS_LIST_FAILURE');
export const setAccessListSuccess = createAction('SET_ACCESS_LIST_SUCCESS');

export const setAccessList = config => async (dispatch) => {
export const setAccessList = (config) => async (dispatch) => {
dispatch(setAccessListRequest());
try {
const { allowed_clients, disallowed_clients, blocked_hosts } = config;
@@ -58,7 +58,7 @@ export const toggleClientBlock = (type, ip) => async (dispatch) => {
let updatedDisallowedClients = disallowed_clients || [];

if (type === ACTION.unblock && updatedDisallowedClients.includes(ip)) {
updatedDisallowedClients = updatedDisallowedClients.filter(client => client !== ip);
updatedDisallowedClients = updatedDisallowedClients.filter((client) => client !== ip);
} else if (type === ACTION.block && !updatedDisallowedClients.includes(ip)) {
updatedDisallowedClients.push(ip);
}
@@ -73,9 +73,9 @@ export const toggleClientBlock = (type, ip) => async (dispatch) => {
dispatch(toggleClientBlockSuccess(values));

if (type === ACTION.unblock) {
dispatch(addSuccessToast(t('client_unblocked', { ip })));
dispatch(addSuccessToast(i18next.t('client_unblocked', { ip })));
} else if (type === ACTION.block) {
dispatch(addSuccessToast(t('client_blocked', { ip })));
dispatch(addSuccessToast(i18next.t('client_blocked', { ip })));
}
} catch (error) {
dispatch(addErrorToast({ error }));
@@ -1,21 +1,22 @@
import { createAction } from 'redux-actions';
import { t } from 'i18next';
import i18next from 'i18next';
import apiClient from '../api/Api';
import { addErrorToast, addSuccessToast, getClients } from './index';
import { getClients } from './index';
import { addErrorToast, addSuccessToast } from './toasts';

export const toggleClientModal = createAction('TOGGLE_CLIENT_MODAL');

export const addClientRequest = createAction('ADD_CLIENT_REQUEST');
export const addClientFailure = createAction('ADD_CLIENT_FAILURE');
export const addClientSuccess = createAction('ADD_CLIENT_SUCCESS');

export const addClient = config => async (dispatch) => {
export const addClient = (config) => async (dispatch) => {
dispatch(addClientRequest());
try {
await apiClient.addClient(config);
dispatch(addClientSuccess());
dispatch(toggleClientModal());
dispatch(addSuccessToast(t('client_added', { key: config.name })));
dispatch(addSuccessToast(i18next.t('client_added', { key: config.name })));
dispatch(getClients());
} catch (error) {
dispatch(addErrorToast({ error }));
@@ -27,12 +28,12 @@ export const deleteClientRequest = createAction('DELETE_CLIENT_REQUEST');
export const deleteClientFailure = createAction('DELETE_CLIENT_FAILURE');
export const deleteClientSuccess = createAction('DELETE_CLIENT_SUCCESS');

export const deleteClient = config => async (dispatch) => {
export const deleteClient = (config) => async (dispatch) => {
dispatch(deleteClientRequest());
try {
await apiClient.deleteClient(config);
dispatch(deleteClientSuccess());
dispatch(addSuccessToast(t('client_deleted', { key: config.name })));
dispatch(addSuccessToast(i18next.t('client_deleted', { key: config.name })));
dispatch(getClients());
} catch (error) {
dispatch(addErrorToast({ error }));
@@ -52,7 +53,7 @@ export const updateClient = (config, name) => async (dispatch) => {
await apiClient.updateClient(data);
dispatch(updateClientSuccess());
dispatch(toggleClientModal());
dispatch(addSuccessToast(t('client_updated', { key: name })));
dispatch(addSuccessToast(i18next.t('client_updated', { key: name })));
dispatch(getClients());
} catch (error) {
dispatch(addErrorToast({ error }));
@@ -1,8 +1,8 @@
import { createAction } from 'redux-actions';

import apiClient from '../api/Api';
import { addErrorToast, addSuccessToast } from './index';
import { normalizeTextarea } from '../helpers/helpers';
import { addErrorToast, addSuccessToast } from './toasts';

export const getDnsConfigRequest = createAction('GET_DNS_CONFIG_REQUEST');
export const getDnsConfigFailure = createAction('GET_DNS_CONFIG_FAILURE');
@@ -23,7 +23,7 @@ export const setDnsConfigRequest = createAction('SET_DNS_CONFIG_REQUEST');
export const setDnsConfigFailure = createAction('SET_DNS_CONFIG_FAILURE');
export const setDnsConfigSuccess = createAction('SET_DNS_CONFIG_SUCCESS');

export const setDnsConfig = config => async (dispatch) => {
export const setDnsConfig = (config) => async (dispatch) => {
dispatch(setDnsConfigRequest());
try {
const data = { ...config };
@@ -1,7 +1,7 @@
import { createAction } from 'redux-actions';
import apiClient from '../api/Api';
import { addErrorToast, addSuccessToast } from './index';
import { redirectToCurrentProtocol } from '../helpers/helpers';
import { addErrorToast, addSuccessToast } from './toasts';

export const getTlsStatusRequest = createAction('GET_TLS_STATUS_REQUEST');
export const getTlsStatusFailure = createAction('GET_TLS_STATUS_FAILURE');
@@ -25,7 +25,7 @@ export const setTlsConfigRequest = createAction('SET_TLS_CONFIG_REQUEST');
export const setTlsConfigFailure = createAction('SET_TLS_CONFIG_FAILURE');
export const setTlsConfigSuccess = createAction('SET_TLS_CONFIG_SUCCESS');

export const setTlsConfig = config => async (dispatch, getState) => {
export const setTlsConfig = (config) => async (dispatch, getState) => {
dispatch(setTlsConfigRequest());
try {
const { httpPort } = getState().dashboard;
@@ -51,7 +51,7 @@ export const validateTlsConfigRequest = createAction('VALIDATE_TLS_CONFIG_REQUES
export const validateTlsConfigFailure = createAction('VALIDATE_TLS_CONFIG_FAILURE');
export const validateTlsConfigSuccess = createAction('VALIDATE_TLS_CONFIG_SUCCESS');

export const validateTlsConfig = config => async (dispatch) => {
export const validateTlsConfig = (config) => async (dispatch) => {
dispatch(validateTlsConfigRequest());
try {
const values = { ...config };
@@ -1,10 +1,10 @@
import { createAction } from 'redux-actions';
import { showLoading, hideLoading } from 'react-redux-loading-bar';
import { t } from 'i18next';
import i18next from 'i18next';

import { normalizeFilteringStatus, normalizeRulesTextarea } from '../helpers/helpers';
import { addErrorToast, addSuccessToast } from './index';
import apiClient from '../api/Api';
import { addErrorToast, addSuccessToast } from './toasts';

export const toggleFilteringModal = createAction('FILTERING_MODAL_TOGGLE');
export const handleRulesChange = createAction('HANDLE_RULES_CHANGE');
@@ -28,7 +28,7 @@ export const setRulesRequest = createAction('SET_RULES_REQUEST');
export const setRulesFailure = createAction('SET_RULES_FAILURE');
export const setRulesSuccess = createAction('SET_RULES_SUCCESS');

export const setRules = rules => async (dispatch) => {
export const setRules = (rules) => async (dispatch) => {
dispatch(setRulesRequest());
try {
const normalizedRules = normalizeRulesTextarea(rules);
@@ -113,7 +113,7 @@ export const refreshFiltersRequest = createAction('FILTERING_REFRESH_REQUEST');
export const refreshFiltersFailure = createAction('FILTERING_REFRESH_FAILURE');
export const refreshFiltersSuccess = createAction('FILTERING_REFRESH_SUCCESS');

export const refreshFilters = config => async (dispatch) => {
export const refreshFilters = (config) => async (dispatch) => {
dispatch(refreshFiltersRequest());
dispatch(showLoading());
try {
@@ -122,7 +122,7 @@ export const refreshFilters = config => async (dispatch) => {
dispatch(refreshFiltersSuccess());

if (updated > 0) {
dispatch(addSuccessToast(t('list_updated', { count: updated })));
dispatch(addSuccessToast(i18next.t('list_updated', { count: updated })));
} else {
dispatch(addSuccessToast('all_lists_up_to_date_toast'));
}
@@ -140,7 +140,7 @@ export const setFiltersConfigRequest = createAction('SET_FILTERS_CONFIG_REQUEST'
export const setFiltersConfigFailure = createAction('SET_FILTERS_CONFIG_FAILURE');
export const setFiltersConfigSuccess = createAction('SET_FILTERS_CONFIG_SUCCESS');

export const setFiltersConfig = config => async (dispatch, getState) => {
export const setFiltersConfig = (config) => async (dispatch, getState) => {
dispatch(setFiltersConfigRequest());
try {
const { enabled } = config;
@@ -170,7 +170,7 @@ export const checkHostSuccess = createAction('CHECK_HOST_SUCCESS');
* @param {string} host.name
* @returns {undefined}
*/
export const checkHost = host => async (dispatch) => {
export const checkHost = (host) => async (dispatch) => {
dispatch(checkHostRequest());
try {
const data = await apiClient.checkHost(host);

0 comments on commit 6f3cd4e

Please sign in to comment.
You can’t perform that action at this time.