+ client: Update packages - Merge pull request #613 in DNS/adguard-home 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
This commit is contained in:
@@ -4,8 +4,8 @@ import * as actions from '../actions/access';
|
||||
|
||||
const access = handleActions(
|
||||
{
|
||||
[actions.getAccessListRequest]: state => ({ ...state, processing: true }),
|
||||
[actions.getAccessListFailure]: state => ({ ...state, processing: false }),
|
||||
[actions.getAccessListRequest]: (state) => ({ ...state, processing: true }),
|
||||
[actions.getAccessListFailure]: (state) => ({ ...state, processing: false }),
|
||||
[actions.getAccessListSuccess]: (state, { payload }) => {
|
||||
const {
|
||||
allowed_clients,
|
||||
@@ -22,8 +22,8 @@ const access = handleActions(
|
||||
return newState;
|
||||
},
|
||||
|
||||
[actions.setAccessListRequest]: state => ({ ...state, processingSet: true }),
|
||||
[actions.setAccessListFailure]: state => ({ ...state, processingSet: false }),
|
||||
[actions.setAccessListRequest]: (state) => ({ ...state, processingSet: true }),
|
||||
[actions.setAccessListFailure]: (state) => ({ ...state, processingSet: false }),
|
||||
[actions.setAccessListSuccess]: (state) => {
|
||||
const newState = {
|
||||
...state,
|
||||
@@ -32,8 +32,8 @@ const access = handleActions(
|
||||
return newState;
|
||||
},
|
||||
|
||||
[actions.toggleClientBlockRequest]: state => ({ ...state, processingSet: true }),
|
||||
[actions.toggleClientBlockFailure]: state => ({ ...state, processingSet: false }),
|
||||
[actions.toggleClientBlockRequest]: (state) => ({ ...state, processingSet: true }),
|
||||
[actions.toggleClientBlockFailure]: (state) => ({ ...state, processingSet: false }),
|
||||
[actions.toggleClientBlockSuccess]: (state, { payload }) => {
|
||||
const {
|
||||
allowed_clients,
|
||||
|
||||
@@ -3,8 +3,8 @@ import { handleActions } from 'redux-actions';
|
||||
import * as actions from '../actions/clients';
|
||||
|
||||
const clients = handleActions({
|
||||
[actions.addClientRequest]: state => ({ ...state, processingAdding: true }),
|
||||
[actions.addClientFailure]: state => ({ ...state, processingAdding: false }),
|
||||
[actions.addClientRequest]: (state) => ({ ...state, processingAdding: true }),
|
||||
[actions.addClientFailure]: (state) => ({ ...state, processingAdding: false }),
|
||||
[actions.addClientSuccess]: (state) => {
|
||||
const newState = {
|
||||
...state,
|
||||
@@ -13,8 +13,8 @@ const clients = handleActions({
|
||||
return newState;
|
||||
},
|
||||
|
||||
[actions.deleteClientRequest]: state => ({ ...state, processingDeleting: true }),
|
||||
[actions.deleteClientFailure]: state => ({ ...state, processingDeleting: false }),
|
||||
[actions.deleteClientRequest]: (state) => ({ ...state, processingDeleting: true }),
|
||||
[actions.deleteClientFailure]: (state) => ({ ...state, processingDeleting: false }),
|
||||
[actions.deleteClientSuccess]: (state) => {
|
||||
const newState = {
|
||||
...state,
|
||||
@@ -23,8 +23,8 @@ const clients = handleActions({
|
||||
return newState;
|
||||
},
|
||||
|
||||
[actions.updateClientRequest]: state => ({ ...state, processingUpdating: true }),
|
||||
[actions.updateClientFailure]: state => ({ ...state, processingUpdating: false }),
|
||||
[actions.updateClientRequest]: (state) => ({ ...state, processingUpdating: true }),
|
||||
[actions.updateClientFailure]: (state) => ({ ...state, processingUpdating: false }),
|
||||
[actions.updateClientSuccess]: (state) => {
|
||||
const newState = {
|
||||
...state,
|
||||
|
||||
@@ -8,9 +8,8 @@ const DEFAULT_BLOCKING_IPV6 = '::';
|
||||
|
||||
const dnsConfig = handleActions(
|
||||
{
|
||||
[actions.getDnsConfigRequest]: state => ({ ...state, processingGetConfig: true }),
|
||||
[actions.getDnsConfigFailure]: state =>
|
||||
({ ...state, processingGetConfig: false }),
|
||||
[actions.getDnsConfigRequest]: (state) => ({ ...state, processingGetConfig: true }),
|
||||
[actions.getDnsConfigFailure]: (state) => ({ ...state, processingGetConfig: false }),
|
||||
[actions.getDnsConfigSuccess]: (state, { payload }) => {
|
||||
const {
|
||||
blocking_ipv4,
|
||||
@@ -31,9 +30,8 @@ const dnsConfig = handleActions(
|
||||
};
|
||||
},
|
||||
|
||||
[actions.setDnsConfigRequest]: state => ({ ...state, processingSetConfig: true }),
|
||||
[actions.setDnsConfigFailure]: state =>
|
||||
({ ...state, processingSetConfig: false }),
|
||||
[actions.setDnsConfigRequest]: (state) => ({ ...state, processingSetConfig: true }),
|
||||
[actions.setDnsConfigFailure]: (state) => ({ ...state, processingSetConfig: false }),
|
||||
[actions.setDnsConfigSuccess]: (state, { payload }) => ({
|
||||
...state,
|
||||
...payload,
|
||||
|
||||
@@ -3,8 +3,8 @@ import { handleActions } from 'redux-actions';
|
||||
import * as actions from '../actions/encryption';
|
||||
|
||||
const encryption = handleActions({
|
||||
[actions.getTlsStatusRequest]: state => ({ ...state, processing: true }),
|
||||
[actions.getTlsStatusFailure]: state => ({ ...state, processing: false }),
|
||||
[actions.getTlsStatusRequest]: (state) => ({ ...state, processing: true }),
|
||||
[actions.getTlsStatusFailure]: (state) => ({ ...state, processing: false }),
|
||||
[actions.getTlsStatusSuccess]: (state, { payload }) => {
|
||||
const newState = {
|
||||
...state,
|
||||
@@ -14,8 +14,8 @@ const encryption = handleActions({
|
||||
return newState;
|
||||
},
|
||||
|
||||
[actions.setTlsConfigRequest]: state => ({ ...state, processingConfig: true }),
|
||||
[actions.setTlsConfigFailure]: state => ({ ...state, processingConfig: false }),
|
||||
[actions.setTlsConfigRequest]: (state) => ({ ...state, processingConfig: true }),
|
||||
[actions.setTlsConfigFailure]: (state) => ({ ...state, processingConfig: false }),
|
||||
[actions.setTlsConfigSuccess]: (state, { payload }) => {
|
||||
const newState = {
|
||||
...state,
|
||||
@@ -25,8 +25,8 @@ const encryption = handleActions({
|
||||
return newState;
|
||||
},
|
||||
|
||||
[actions.validateTlsConfigRequest]: state => ({ ...state, processingValidate: true }),
|
||||
[actions.validateTlsConfigFailure]: state => ({ ...state, processingValidate: false }),
|
||||
[actions.validateTlsConfigRequest]: (state) => ({ ...state, processingValidate: true }),
|
||||
[actions.validateTlsConfigFailure]: (state) => ({ ...state, processingValidate: false }),
|
||||
[actions.validateTlsConfigSuccess]: (state, { payload }) => {
|
||||
const {
|
||||
issuer = '',
|
||||
|
||||
@@ -4,38 +4,38 @@ import * as actions from '../actions/filtering';
|
||||
|
||||
const filtering = handleActions(
|
||||
{
|
||||
[actions.setRulesRequest]: state => ({ ...state, processingRules: true }),
|
||||
[actions.setRulesFailure]: state => ({ ...state, processingRules: false }),
|
||||
[actions.setRulesSuccess]: state => ({ ...state, processingRules: false }),
|
||||
[actions.setRulesRequest]: (state) => ({ ...state, processingRules: true }),
|
||||
[actions.setRulesFailure]: (state) => ({ ...state, processingRules: false }),
|
||||
[actions.setRulesSuccess]: (state) => ({ ...state, processingRules: false }),
|
||||
|
||||
[actions.handleRulesChange]: (state, { payload }) => {
|
||||
const { userRules } = payload;
|
||||
return { ...state, userRules };
|
||||
},
|
||||
|
||||
[actions.getFilteringStatusRequest]: state => ({
|
||||
[actions.getFilteringStatusRequest]: (state) => ({
|
||||
...state,
|
||||
processingFilters: true,
|
||||
check: {},
|
||||
}),
|
||||
[actions.getFilteringStatusFailure]: state => ({ ...state, processingFilters: false }),
|
||||
[actions.getFilteringStatusFailure]: (state) => ({ ...state, processingFilters: false }),
|
||||
[actions.getFilteringStatusSuccess]: (state, { payload }) => ({
|
||||
...state,
|
||||
...payload,
|
||||
processingFilters: false,
|
||||
}),
|
||||
|
||||
[actions.addFilterRequest]: state => ({
|
||||
[actions.addFilterRequest]: (state) => ({
|
||||
...state,
|
||||
processingAddFilter: true,
|
||||
isFilterAdded: false,
|
||||
}),
|
||||
[actions.addFilterFailure]: state => ({
|
||||
[actions.addFilterFailure]: (state) => ({
|
||||
...state,
|
||||
processingAddFilter: false,
|
||||
isFilterAdded: false,
|
||||
}),
|
||||
[actions.addFilterSuccess]: state => ({
|
||||
[actions.addFilterSuccess]: (state) => ({
|
||||
...state,
|
||||
processingAddFilter: false,
|
||||
isFilterAdded: true,
|
||||
@@ -60,32 +60,32 @@ const filtering = handleActions(
|
||||
return newState;
|
||||
},
|
||||
|
||||
[actions.toggleFilterRequest]: state => ({ ...state, processingConfigFilter: true }),
|
||||
[actions.toggleFilterFailure]: state => ({ ...state, processingConfigFilter: false }),
|
||||
[actions.toggleFilterSuccess]: state => ({ ...state, processingConfigFilter: false }),
|
||||
[actions.toggleFilterRequest]: (state) => ({ ...state, processingConfigFilter: true }),
|
||||
[actions.toggleFilterFailure]: (state) => ({ ...state, processingConfigFilter: false }),
|
||||
[actions.toggleFilterSuccess]: (state) => ({ ...state, processingConfigFilter: false }),
|
||||
|
||||
[actions.editFilterRequest]: state => ({ ...state, processingConfigFilter: true }),
|
||||
[actions.editFilterFailure]: state => ({ ...state, processingConfigFilter: false }),
|
||||
[actions.editFilterSuccess]: state => ({ ...state, processingConfigFilter: false }),
|
||||
[actions.editFilterRequest]: (state) => ({ ...state, processingConfigFilter: true }),
|
||||
[actions.editFilterFailure]: (state) => ({ ...state, processingConfigFilter: false }),
|
||||
[actions.editFilterSuccess]: (state) => ({ ...state, processingConfigFilter: false }),
|
||||
|
||||
[actions.refreshFiltersRequest]: state => ({ ...state, processingRefreshFilters: true }),
|
||||
[actions.refreshFiltersFailure]: state => ({ ...state, processingRefreshFilters: false }),
|
||||
[actions.refreshFiltersSuccess]: state => ({ ...state, processingRefreshFilters: false }),
|
||||
[actions.refreshFiltersRequest]: (state) => ({ ...state, processingRefreshFilters: true }),
|
||||
[actions.refreshFiltersFailure]: (state) => ({ ...state, processingRefreshFilters: false }),
|
||||
[actions.refreshFiltersSuccess]: (state) => ({ ...state, processingRefreshFilters: false }),
|
||||
|
||||
[actions.removeFilterRequest]: state => ({ ...state, processingRemoveFilter: true }),
|
||||
[actions.removeFilterFailure]: state => ({ ...state, processingRemoveFilter: false }),
|
||||
[actions.removeFilterSuccess]: state => ({ ...state, processingRemoveFilter: false }),
|
||||
[actions.removeFilterRequest]: (state) => ({ ...state, processingRemoveFilter: true }),
|
||||
[actions.removeFilterFailure]: (state) => ({ ...state, processingRemoveFilter: false }),
|
||||
[actions.removeFilterSuccess]: (state) => ({ ...state, processingRemoveFilter: false }),
|
||||
|
||||
[actions.setFiltersConfigRequest]: state => ({ ...state, processingSetConfig: true }),
|
||||
[actions.setFiltersConfigFailure]: state => ({ ...state, processingSetConfig: false }),
|
||||
[actions.setFiltersConfigRequest]: (state) => ({ ...state, processingSetConfig: true }),
|
||||
[actions.setFiltersConfigFailure]: (state) => ({ ...state, processingSetConfig: false }),
|
||||
[actions.setFiltersConfigSuccess]: (state, { payload }) => ({
|
||||
...state,
|
||||
...payload,
|
||||
processingSetConfig: false,
|
||||
}),
|
||||
|
||||
[actions.checkHostRequest]: state => ({ ...state, processingCheck: true }),
|
||||
[actions.checkHostFailure]: state => ({ ...state, processingCheck: false }),
|
||||
[actions.checkHostRequest]: (state) => ({ ...state, processingCheck: true }),
|
||||
[actions.checkHostFailure]: (state) => ({ ...state, processingCheck: false }),
|
||||
[actions.checkHostSuccess]: (state, { payload }) => ({
|
||||
...state,
|
||||
check: payload,
|
||||
|
||||
@@ -18,8 +18,8 @@ import filtering from './filtering';
|
||||
|
||||
const settings = handleActions(
|
||||
{
|
||||
[actions.initSettingsRequest]: state => ({ ...state, processing: true }),
|
||||
[actions.initSettingsFailure]: state => ({ ...state, processing: false }),
|
||||
[actions.initSettingsRequest]: (state) => ({ ...state, processing: true }),
|
||||
[actions.initSettingsFailure]: (state) => ({ ...state, processing: false }),
|
||||
[actions.initSettingsSuccess]: (state, { payload }) => {
|
||||
const { settingsList } = payload;
|
||||
const newState = { ...state, settingsList, processing: false };
|
||||
@@ -35,9 +35,9 @@ const settings = handleActions(
|
||||
const newSettingsList = { ...settingsList, [settingKey]: newSetting };
|
||||
return { ...state, settingsList: newSettingsList };
|
||||
},
|
||||
[actions.testUpstreamRequest]: state => ({ ...state, processingTestUpstream: true }),
|
||||
[actions.testUpstreamFailure]: state => ({ ...state, processingTestUpstream: false }),
|
||||
[actions.testUpstreamSuccess]: state => ({ ...state, processingTestUpstream: false }),
|
||||
[actions.testUpstreamRequest]: (state) => ({ ...state, processingTestUpstream: true }),
|
||||
[actions.testUpstreamFailure]: (state) => ({ ...state, processingTestUpstream: false }),
|
||||
[actions.testUpstreamSuccess]: (state) => ({ ...state, processingTestUpstream: false }),
|
||||
},
|
||||
{
|
||||
processing: true,
|
||||
@@ -49,10 +49,11 @@ const settings = handleActions(
|
||||
|
||||
const dashboard = handleActions(
|
||||
{
|
||||
[actions.setDnsRunningStatus]: (state, { payload }) =>
|
||||
({ ...state, isCoreRunning: payload }),
|
||||
[actions.dnsStatusRequest]: state => ({ ...state, processing: true }),
|
||||
[actions.dnsStatusFailure]: state => ({ ...state, processing: false }),
|
||||
[actions.setDnsRunningStatus]: (state, { payload }) => (
|
||||
{ ...state, isCoreRunning: payload }
|
||||
),
|
||||
[actions.dnsStatusRequest]: (state) => ({ ...state, processing: true }),
|
||||
[actions.dnsStatusFailure]: (state) => ({ ...state, processing: false }),
|
||||
[actions.dnsStatusSuccess]: (state, { payload }) => {
|
||||
const {
|
||||
version,
|
||||
@@ -76,8 +77,8 @@ const dashboard = handleActions(
|
||||
return newState;
|
||||
},
|
||||
|
||||
[actions.getVersionRequest]: state => ({ ...state, processingVersion: true }),
|
||||
[actions.getVersionFailure]: state => ({ ...state, processingVersion: false }),
|
||||
[actions.getVersionRequest]: (state) => ({ ...state, processingVersion: true }),
|
||||
[actions.getVersionFailure]: (state) => ({ ...state, processingVersion: false }),
|
||||
[actions.getVersionSuccess]: (state, { payload }) => {
|
||||
const currentVersion = state.dnsVersion === 'undefined' ? 0 : state.dnsVersion;
|
||||
|
||||
@@ -105,15 +106,15 @@ const dashboard = handleActions(
|
||||
};
|
||||
},
|
||||
|
||||
[actions.getUpdateRequest]: state => ({ ...state, processingUpdate: true }),
|
||||
[actions.getUpdateFailure]: state => ({ ...state, processingUpdate: false }),
|
||||
[actions.getUpdateRequest]: (state) => ({ ...state, processingUpdate: true }),
|
||||
[actions.getUpdateFailure]: (state) => ({ ...state, processingUpdate: false }),
|
||||
[actions.getUpdateSuccess]: (state) => {
|
||||
const newState = { ...state, processingUpdate: false };
|
||||
return newState;
|
||||
},
|
||||
|
||||
[actions.toggleProtectionRequest]: state => ({ ...state, processingProtection: true }),
|
||||
[actions.toggleProtectionFailure]: state => ({ ...state, processingProtection: false }),
|
||||
[actions.toggleProtectionRequest]: (state) => ({ ...state, processingProtection: true }),
|
||||
[actions.toggleProtectionFailure]: (state) => ({ ...state, processingProtection: false }),
|
||||
[actions.toggleProtectionSuccess]: (state) => {
|
||||
const newState = {
|
||||
...state,
|
||||
@@ -128,8 +129,8 @@ const dashboard = handleActions(
|
||||
return newState;
|
||||
},
|
||||
|
||||
[actions.getClientsRequest]: state => ({ ...state, processingClients: true }),
|
||||
[actions.getClientsFailure]: state => ({ ...state, processingClients: false }),
|
||||
[actions.getClientsRequest]: (state) => ({ ...state, processingClients: true }),
|
||||
[actions.getClientsFailure]: (state) => ({ ...state, processingClients: false }),
|
||||
[actions.getClientsSuccess]: (state, { payload }) => {
|
||||
const newState = {
|
||||
...state,
|
||||
@@ -139,8 +140,8 @@ const dashboard = handleActions(
|
||||
return newState;
|
||||
},
|
||||
|
||||
[actions.getProfileRequest]: state => ({ ...state, processingProfile: true }),
|
||||
[actions.getProfileFailure]: state => ({ ...state, processingProfile: false }),
|
||||
[actions.getProfileRequest]: (state) => ({ ...state, processingProfile: true }),
|
||||
[actions.getProfileFailure]: (state) => ({ ...state, processingProfile: false }),
|
||||
[actions.getProfileSuccess]: (state, { payload }) => ({
|
||||
...state,
|
||||
name: payload.name,
|
||||
@@ -169,8 +170,8 @@ const dashboard = handleActions(
|
||||
|
||||
const dhcp = handleActions(
|
||||
{
|
||||
[actions.getDhcpStatusRequest]: state => ({ ...state, processing: true }),
|
||||
[actions.getDhcpStatusFailure]: state => ({ ...state, processing: false }),
|
||||
[actions.getDhcpStatusRequest]: (state) => ({ ...state, processing: true }),
|
||||
[actions.getDhcpStatusFailure]: (state) => ({ ...state, processing: false }),
|
||||
[actions.getDhcpStatusSuccess]: (state, { payload }) => {
|
||||
const { static_leases: staticLeases, ...values } = payload;
|
||||
|
||||
@@ -184,8 +185,8 @@ const dhcp = handleActions(
|
||||
return newState;
|
||||
},
|
||||
|
||||
[actions.getDhcpInterfacesRequest]: state => ({ ...state, processingInterfaces: true }),
|
||||
[actions.getDhcpInterfacesFailure]: state => ({ ...state, processingInterfaces: false }),
|
||||
[actions.getDhcpInterfacesRequest]: (state) => ({ ...state, processingInterfaces: true }),
|
||||
[actions.getDhcpInterfacesFailure]: (state) => ({ ...state, processingInterfaces: false }),
|
||||
[actions.getDhcpInterfacesSuccess]: (state, { payload }) => {
|
||||
const newState = {
|
||||
...state,
|
||||
@@ -195,8 +196,8 @@ const dhcp = handleActions(
|
||||
return newState;
|
||||
},
|
||||
|
||||
[actions.findActiveDhcpRequest]: state => ({ ...state, processingStatus: true }),
|
||||
[actions.findActiveDhcpFailure]: state => ({ ...state, processingStatus: false }),
|
||||
[actions.findActiveDhcpRequest]: (state) => ({ ...state, processingStatus: true }),
|
||||
[actions.findActiveDhcpFailure]: (state) => ({ ...state, processingStatus: false }),
|
||||
[actions.findActiveDhcpSuccess]: (state, { payload }) => {
|
||||
const { other_server: otherServer, static_ip: staticIP } = payload;
|
||||
|
||||
@@ -211,8 +212,8 @@ const dhcp = handleActions(
|
||||
return newState;
|
||||
},
|
||||
|
||||
[actions.toggleDhcpRequest]: state => ({ ...state, processingDhcp: true }),
|
||||
[actions.toggleDhcpFailure]: state => ({ ...state, processingDhcp: false }),
|
||||
[actions.toggleDhcpRequest]: (state) => ({ ...state, processingDhcp: true }),
|
||||
[actions.toggleDhcpFailure]: (state) => ({ ...state, processingDhcp: false }),
|
||||
[actions.toggleDhcpSuccess]: (state) => {
|
||||
const { config } = state;
|
||||
const newConfig = { ...config, enabled: !config.enabled };
|
||||
@@ -225,8 +226,8 @@ const dhcp = handleActions(
|
||||
return newState;
|
||||
},
|
||||
|
||||
[actions.setDhcpConfigRequest]: state => ({ ...state, processingConfig: true }),
|
||||
[actions.setDhcpConfigFailure]: state => ({ ...state, processingConfig: false }),
|
||||
[actions.setDhcpConfigRequest]: (state) => ({ ...state, processingConfig: true }),
|
||||
[actions.setDhcpConfigFailure]: (state) => ({ ...state, processingConfig: false }),
|
||||
[actions.setDhcpConfigSuccess]: (state, { payload }) => {
|
||||
const { config } = state;
|
||||
const newConfig = { ...config, ...payload };
|
||||
@@ -234,9 +235,9 @@ const dhcp = handleActions(
|
||||
return newState;
|
||||
},
|
||||
|
||||
[actions.resetDhcpRequest]: state => ({ ...state, processingReset: true }),
|
||||
[actions.resetDhcpFailure]: state => ({ ...state, processingReset: false }),
|
||||
[actions.resetDhcpSuccess]: state => ({
|
||||
[actions.resetDhcpRequest]: (state) => ({ ...state, processingReset: true }),
|
||||
[actions.resetDhcpFailure]: (state) => ({ ...state, processingReset: false }),
|
||||
[actions.resetDhcpSuccess]: (state) => ({
|
||||
...state,
|
||||
processingReset: false,
|
||||
config: {
|
||||
@@ -252,8 +253,8 @@ const dhcp = handleActions(
|
||||
return newState;
|
||||
},
|
||||
|
||||
[actions.addStaticLeaseRequest]: state => ({ ...state, processingAdding: true }),
|
||||
[actions.addStaticLeaseFailure]: state => ({ ...state, processingAdding: false }),
|
||||
[actions.addStaticLeaseRequest]: (state) => ({ ...state, processingAdding: true }),
|
||||
[actions.addStaticLeaseFailure]: (state) => ({ ...state, processingAdding: false }),
|
||||
[actions.addStaticLeaseSuccess]: (state, { payload }) => {
|
||||
const { ip, mac, hostname } = payload;
|
||||
const newLease = {
|
||||
@@ -270,11 +271,11 @@ const dhcp = handleActions(
|
||||
return newState;
|
||||
},
|
||||
|
||||
[actions.removeStaticLeaseRequest]: state => ({ ...state, processingDeleting: true }),
|
||||
[actions.removeStaticLeaseFailure]: state => ({ ...state, processingDeleting: false }),
|
||||
[actions.removeStaticLeaseRequest]: (state) => ({ ...state, processingDeleting: true }),
|
||||
[actions.removeStaticLeaseFailure]: (state) => ({ ...state, processingDeleting: false }),
|
||||
[actions.removeStaticLeaseSuccess]: (state, { payload }) => {
|
||||
const leaseToRemove = payload.ip;
|
||||
const leases = state.staticLeases.filter(item => item.ip !== leaseToRemove);
|
||||
const leases = state.staticLeases.filter((item) => item.ip !== leaseToRemove);
|
||||
const newState = {
|
||||
...state,
|
||||
staticLeases: leases,
|
||||
|
||||
@@ -7,8 +7,8 @@ import toasts from './toasts';
|
||||
import { INSTALL_FIRST_STEP } from '../helpers/constants';
|
||||
|
||||
const install = handleActions({
|
||||
[actions.getDefaultAddressesRequest]: state => ({ ...state, processingDefault: true }),
|
||||
[actions.getDefaultAddressesFailure]: state => ({ ...state, processingDefault: false }),
|
||||
[actions.getDefaultAddressesRequest]: (state) => ({ ...state, processingDefault: true }),
|
||||
[actions.getDefaultAddressesFailure]: (state) => ({ ...state, processingDefault: false }),
|
||||
[actions.getDefaultAddressesSuccess]: (state, { payload }) => {
|
||||
const { interfaces } = payload;
|
||||
const web = { ...state.web, port: payload.web_port };
|
||||
@@ -20,15 +20,15 @@ const install = handleActions({
|
||||
return newState;
|
||||
},
|
||||
|
||||
[actions.nextStep]: state => ({ ...state, step: state.step + 1 }),
|
||||
[actions.prevStep]: state => ({ ...state, step: state.step - 1 }),
|
||||
[actions.nextStep]: (state) => ({ ...state, step: state.step + 1 }),
|
||||
[actions.prevStep]: (state) => ({ ...state, step: state.step - 1 }),
|
||||
|
||||
[actions.setAllSettingsRequest]: state => ({ ...state, processingSubmit: true }),
|
||||
[actions.setAllSettingsFailure]: state => ({ ...state, processingSubmit: false }),
|
||||
[actions.setAllSettingsSuccess]: state => ({ ...state, processingSubmit: false }),
|
||||
[actions.setAllSettingsRequest]: (state) => ({ ...state, processingSubmit: true }),
|
||||
[actions.setAllSettingsFailure]: (state) => ({ ...state, processingSubmit: false }),
|
||||
[actions.setAllSettingsSuccess]: (state) => ({ ...state, processingSubmit: false }),
|
||||
|
||||
[actions.checkConfigRequest]: state => ({ ...state, processingCheck: true }),
|
||||
[actions.checkConfigFailure]: state => ({ ...state, processingCheck: false }),
|
||||
[actions.checkConfigRequest]: (state) => ({ ...state, processingCheck: true }),
|
||||
[actions.checkConfigFailure]: (state) => ({ ...state, processingCheck: false }),
|
||||
[actions.checkConfigSuccess]: (state, { payload }) => {
|
||||
const web = { ...state.web, ...payload.web };
|
||||
const dns = { ...state.dns, ...payload.dns };
|
||||
|
||||
@@ -6,8 +6,8 @@ import * as actions from '../actions/login';
|
||||
import toasts from './toasts';
|
||||
|
||||
const login = handleActions({
|
||||
[actions.processLoginRequest]: state => ({ ...state, processingLogin: true }),
|
||||
[actions.processLoginFailure]: state => ({ ...state, processingLogin: false }),
|
||||
[actions.processLoginRequest]: (state) => ({ ...state, processingLogin: true }),
|
||||
[actions.processLoginFailure]: (state) => ({ ...state, processingLogin: false }),
|
||||
[actions.processLoginSuccess]: (state, { payload }) => ({
|
||||
...state, ...payload, processingLogin: false,
|
||||
}),
|
||||
|
||||
@@ -25,8 +25,8 @@ const queryLogs = handleActions(
|
||||
page: payload,
|
||||
}),
|
||||
|
||||
[actions.setLogsFilterRequest]: state => ({ ...state, processingGetLogs: true }),
|
||||
[actions.setLogsFilterFailure]: state => ({ ...state, processingGetLogs: false }),
|
||||
[actions.setLogsFilterRequest]: (state) => ({ ...state, processingGetLogs: true }),
|
||||
[actions.setLogsFilterFailure]: (state) => ({ ...state, processingGetLogs: false }),
|
||||
[actions.setLogsFilterSuccess]: (state, { payload }) => {
|
||||
const { logs, oldest, filter } = payload;
|
||||
const pageSize = 100;
|
||||
@@ -37,7 +37,7 @@ const queryLogs = handleActions(
|
||||
const rowsStart = pageSize * page;
|
||||
const rowsEnd = (pageSize * page) + pageSize;
|
||||
const logsSlice = logs.slice(rowsStart, rowsEnd);
|
||||
const isFiltered = Object.keys(filter).some(key => filter[key]);
|
||||
const isFiltered = Object.keys(filter).some((key) => filter[key]);
|
||||
|
||||
return {
|
||||
...state,
|
||||
@@ -52,8 +52,8 @@ const queryLogs = handleActions(
|
||||
};
|
||||
},
|
||||
|
||||
[actions.getLogsRequest]: state => ({ ...state, processingGetLogs: true }),
|
||||
[actions.getLogsFailure]: state => ({ ...state, processingGetLogs: false }),
|
||||
[actions.getLogsRequest]: (state) => ({ ...state, processingGetLogs: true }),
|
||||
[actions.getLogsFailure]: (state) => ({ ...state, processingGetLogs: false }),
|
||||
[actions.getLogsSuccess]: (state, { payload }) => {
|
||||
const {
|
||||
logs, oldest, older_than, page, pageSize, initial,
|
||||
@@ -84,37 +84,37 @@ const queryLogs = handleActions(
|
||||
};
|
||||
},
|
||||
|
||||
[actions.clearLogsRequest]: state => ({ ...state, processingClear: true }),
|
||||
[actions.clearLogsFailure]: state => ({ ...state, processingClear: false }),
|
||||
[actions.clearLogsSuccess]: state => ({
|
||||
[actions.clearLogsRequest]: (state) => ({ ...state, processingClear: true }),
|
||||
[actions.clearLogsFailure]: (state) => ({ ...state, processingClear: false }),
|
||||
[actions.clearLogsSuccess]: (state) => ({
|
||||
...state,
|
||||
logs: [],
|
||||
processingClear: false,
|
||||
}),
|
||||
|
||||
[actions.getLogsConfigRequest]: state => ({ ...state, processingGetConfig: true }),
|
||||
[actions.getLogsConfigFailure]: state => ({ ...state, processingGetConfig: false }),
|
||||
[actions.getLogsConfigRequest]: (state) => ({ ...state, processingGetConfig: true }),
|
||||
[actions.getLogsConfigFailure]: (state) => ({ ...state, processingGetConfig: false }),
|
||||
[actions.getLogsConfigSuccess]: (state, { payload }) => ({
|
||||
...state,
|
||||
...payload,
|
||||
processingGetConfig: false,
|
||||
}),
|
||||
|
||||
[actions.setLogsConfigRequest]: state => ({ ...state, processingSetConfig: true }),
|
||||
[actions.setLogsConfigFailure]: state => ({ ...state, processingSetConfig: false }),
|
||||
[actions.setLogsConfigRequest]: (state) => ({ ...state, processingSetConfig: true }),
|
||||
[actions.setLogsConfigFailure]: (state) => ({ ...state, processingSetConfig: false }),
|
||||
[actions.setLogsConfigSuccess]: (state, { payload }) => ({
|
||||
...state,
|
||||
...payload,
|
||||
processingSetConfig: false,
|
||||
}),
|
||||
|
||||
[actions.getAdditionalLogsRequest]: state => ({
|
||||
[actions.getAdditionalLogsRequest]: (state) => ({
|
||||
...state, processingAdditionalLogs: true, processingGetLogs: true,
|
||||
}),
|
||||
[actions.getAdditionalLogsFailure]: state => ({
|
||||
[actions.getAdditionalLogsFailure]: (state) => ({
|
||||
...state, processingAdditionalLogs: false, processingGetLogs: false,
|
||||
}),
|
||||
[actions.getAdditionalLogsSuccess]: state => ({
|
||||
[actions.getAdditionalLogsSuccess]: (state) => ({
|
||||
...state, processingAdditionalLogs: false, processingGetLogs: false,
|
||||
}),
|
||||
},
|
||||
|
||||
@@ -4,8 +4,8 @@ import * as actions from '../actions/rewrites';
|
||||
|
||||
const rewrites = handleActions(
|
||||
{
|
||||
[actions.getRewritesListRequest]: state => ({ ...state, processing: true }),
|
||||
[actions.getRewritesListFailure]: state => ({ ...state, processing: false }),
|
||||
[actions.getRewritesListRequest]: (state) => ({ ...state, processing: true }),
|
||||
[actions.getRewritesListFailure]: (state) => ({ ...state, processing: false }),
|
||||
[actions.getRewritesListSuccess]: (state, { payload }) => {
|
||||
const newState = {
|
||||
...state,
|
||||
@@ -15,8 +15,8 @@ const rewrites = handleActions(
|
||||
return newState;
|
||||
},
|
||||
|
||||
[actions.addRewriteRequest]: state => ({ ...state, processingAdd: true }),
|
||||
[actions.addRewriteFailure]: state => ({ ...state, processingAdd: false }),
|
||||
[actions.addRewriteRequest]: (state) => ({ ...state, processingAdd: true }),
|
||||
[actions.addRewriteFailure]: (state) => ({ ...state, processingAdd: false }),
|
||||
[actions.addRewriteSuccess]: (state, { payload }) => {
|
||||
const newState = {
|
||||
...state,
|
||||
@@ -26,9 +26,9 @@ const rewrites = handleActions(
|
||||
return newState;
|
||||
},
|
||||
|
||||
[actions.deleteRewriteRequest]: state => ({ ...state, processingDelete: true }),
|
||||
[actions.deleteRewriteFailure]: state => ({ ...state, processingDelete: false }),
|
||||
[actions.deleteRewriteSuccess]: state => ({ ...state, processingDelete: false }),
|
||||
[actions.deleteRewriteRequest]: (state) => ({ ...state, processingDelete: true }),
|
||||
[actions.deleteRewriteFailure]: (state) => ({ ...state, processingDelete: false }),
|
||||
[actions.deleteRewriteSuccess]: (state) => ({ ...state, processingDelete: false }),
|
||||
|
||||
[actions.toggleRewritesModal]: (state) => {
|
||||
const newState = {
|
||||
|
||||
@@ -4,17 +4,17 @@ import * as actions from '../actions/services';
|
||||
|
||||
const services = handleActions(
|
||||
{
|
||||
[actions.getBlockedServicesRequest]: state => ({ ...state, processing: true }),
|
||||
[actions.getBlockedServicesFailure]: state => ({ ...state, processing: false }),
|
||||
[actions.getBlockedServicesRequest]: (state) => ({ ...state, processing: true }),
|
||||
[actions.getBlockedServicesFailure]: (state) => ({ ...state, processing: false }),
|
||||
[actions.getBlockedServicesSuccess]: (state, { payload }) => ({
|
||||
...state,
|
||||
list: payload,
|
||||
processing: false,
|
||||
}),
|
||||
|
||||
[actions.setBlockedServicesRequest]: state => ({ ...state, processingSet: true }),
|
||||
[actions.setBlockedServicesFailure]: state => ({ ...state, processingSet: false }),
|
||||
[actions.setBlockedServicesSuccess]: state => ({
|
||||
[actions.setBlockedServicesRequest]: (state) => ({ ...state, processingSet: true }),
|
||||
[actions.setBlockedServicesFailure]: (state) => ({ ...state, processingSet: false }),
|
||||
[actions.setBlockedServicesSuccess]: (state) => ({
|
||||
...state,
|
||||
processingSet: false,
|
||||
}),
|
||||
|
||||
@@ -21,24 +21,24 @@ const defaultStats = {
|
||||
|
||||
const stats = handleActions(
|
||||
{
|
||||
[actions.getStatsConfigRequest]: state => ({ ...state, processingGetConfig: true }),
|
||||
[actions.getStatsConfigFailure]: state => ({ ...state, processingGetConfig: false }),
|
||||
[actions.getStatsConfigRequest]: (state) => ({ ...state, processingGetConfig: true }),
|
||||
[actions.getStatsConfigFailure]: (state) => ({ ...state, processingGetConfig: false }),
|
||||
[actions.getStatsConfigSuccess]: (state, { payload }) => ({
|
||||
...state,
|
||||
interval: payload.interval,
|
||||
processingGetConfig: false,
|
||||
}),
|
||||
|
||||
[actions.setStatsConfigRequest]: state => ({ ...state, processingSetConfig: true }),
|
||||
[actions.setStatsConfigFailure]: state => ({ ...state, processingSetConfig: false }),
|
||||
[actions.setStatsConfigRequest]: (state) => ({ ...state, processingSetConfig: true }),
|
||||
[actions.setStatsConfigFailure]: (state) => ({ ...state, processingSetConfig: false }),
|
||||
[actions.setStatsConfigSuccess]: (state, { payload }) => ({
|
||||
...state,
|
||||
interval: payload.interval,
|
||||
processingSetConfig: false,
|
||||
}),
|
||||
|
||||
[actions.getStatsRequest]: state => ({ ...state, processingStats: true }),
|
||||
[actions.getStatsFailure]: state => ({ ...state, processingStats: false }),
|
||||
[actions.getStatsRequest]: (state) => ({ ...state, processingStats: true }),
|
||||
[actions.getStatsFailure]: (state) => ({ ...state, processingStats: false }),
|
||||
[actions.getStatsSuccess]: (state, { payload }) => {
|
||||
const {
|
||||
dns_queries: dnsQueries,
|
||||
@@ -78,9 +78,9 @@ const stats = handleActions(
|
||||
return newState;
|
||||
},
|
||||
|
||||
[actions.resetStatsRequest]: state => ({ ...state, processingReset: true }),
|
||||
[actions.resetStatsFailure]: state => ({ ...state, processingReset: false }),
|
||||
[actions.resetStatsSuccess]: state => ({
|
||||
[actions.resetStatsRequest]: (state) => ({ ...state, processingReset: true }),
|
||||
[actions.resetStatsFailure]: (state) => ({ ...state, processingReset: false }),
|
||||
[actions.resetStatsSuccess]: (state) => ({
|
||||
...state,
|
||||
...defaultStats,
|
||||
processingReset: false,
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
import { handleActions } from 'redux-actions';
|
||||
import nanoid from 'nanoid';
|
||||
import { nanoid } from 'nanoid';
|
||||
|
||||
import { addErrorToast, addSuccessToast, addNoticeToast, removeToast } from '../actions';
|
||||
import {
|
||||
addErrorToast, addNoticeToast, addSuccessToast,
|
||||
} from '../actions/toasts';
|
||||
import { removeToast } from '../actions';
|
||||
|
||||
const toasts = handleActions({
|
||||
[addErrorToast]: (state, { payload }) => {
|
||||
@@ -35,7 +38,7 @@ const toasts = handleActions({
|
||||
return newState;
|
||||
},
|
||||
[removeToast]: (state, { payload }) => {
|
||||
const filtered = state.notices.filter(notice => notice.id !== payload);
|
||||
const filtered = state.notices.filter((notice) => notice.id !== payload);
|
||||
const newState = { ...state, notices: filtered };
|
||||
return newState;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user