* client: move access settings to DNS settings page

This commit is contained in:
Ildar Kamalov
2019-06-03 16:08:50 +03:00
parent cf53653cfa
commit 757bb7285a
7 changed files with 68 additions and 98 deletions

View File

@@ -1,12 +1,14 @@
import { connect } from 'react-redux';
import { handleUpstreamChange, setUpstream, testUpstream, addErrorToast } from '../actions';
import { getAccessList, setAccessList } from '../actions/access';
import Dns from '../components/Settings/Dns';
const mapStateToProps = (state) => {
const { dashboard, settings } = state;
const { dashboard, settings, access } = state;
const props = {
dashboard,
settings,
access,
};
return props;
};
@@ -16,6 +18,8 @@ const mapDispatchToProps = {
setUpstream,
testUpstream,
addErrorToast,
getAccessList,
setAccessList,
};
export default connect(

View File

@@ -1,53 +1,11 @@
import { connect } from 'react-redux';
import {
initSettings,
toggleSetting,
handleUpstreamChange,
setUpstream,
testUpstream,
addErrorToast,
toggleDhcp,
getDhcpStatus,
getDhcpInterfaces,
setDhcpConfig,
findActiveDhcp,
addStaticLease,
removeStaticLease,
toggleLeaseModal,
} from '../actions';
import {
getTlsStatus,
setTlsConfig,
validateTlsConfig,
} from '../actions/encryption';
import {
addClient,
updateClient,
deleteClient,
toggleClientModal,
} from '../actions/clients';
import {
getAccessList,
setAccessList,
} from '../actions/access';
import { initSettings, toggleSetting, addErrorToast } from '../actions';
import Settings from '../components/Settings';
const mapStateToProps = (state) => {
const {
settings,
dashboard,
dhcp,
encryption,
clients,
access,
} = state;
const { settings } = state;
const props = {
settings,
dashboard,
dhcp,
encryption,
clients,
access,
};
return props;
};
@@ -55,27 +13,7 @@ const mapStateToProps = (state) => {
const mapDispatchToProps = {
initSettings,
toggleSetting,
handleUpstreamChange,
setUpstream,
testUpstream,
addErrorToast,
toggleDhcp,
getDhcpStatus,
getDhcpInterfaces,
setDhcpConfig,
findActiveDhcp,
getTlsStatus,
setTlsConfig,
validateTlsConfig,
addClient,
updateClient,
deleteClient,
toggleClientModal,
addStaticLease,
removeStaticLease,
toggleLeaseModal,
getAccessList,
setAccessList,
};
export default connect(