+ client: split settings page into several pages
This commit is contained in:
26
client/src/containers/Clients.js
Normal file
26
client/src/containers/Clients.js
Normal file
@@ -0,0 +1,26 @@
|
||||
import { connect } from 'react-redux';
|
||||
import { addErrorToast } from '../actions';
|
||||
import { addClient, updateClient, deleteClient, toggleClientModal } from '../actions/clients';
|
||||
import Clients from '../components/Settings/Clients';
|
||||
|
||||
const mapStateToProps = (state) => {
|
||||
const { dashboard, clients } = state;
|
||||
const props = {
|
||||
dashboard,
|
||||
clients,
|
||||
};
|
||||
return props;
|
||||
};
|
||||
|
||||
const mapDispatchToProps = {
|
||||
addErrorToast,
|
||||
addClient,
|
||||
updateClient,
|
||||
deleteClient,
|
||||
toggleClientModal,
|
||||
};
|
||||
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps,
|
||||
)(Clients);
|
||||
38
client/src/containers/Dhcp.js
Normal file
38
client/src/containers/Dhcp.js
Normal file
@@ -0,0 +1,38 @@
|
||||
import { connect } from 'react-redux';
|
||||
import {
|
||||
addErrorToast,
|
||||
toggleDhcp,
|
||||
getDhcpStatus,
|
||||
getDhcpInterfaces,
|
||||
setDhcpConfig,
|
||||
findActiveDhcp,
|
||||
toggleLeaseModal,
|
||||
addStaticLease,
|
||||
removeStaticLease,
|
||||
} from '../actions';
|
||||
import Dhcp from '../components/Settings/Dhcp';
|
||||
|
||||
const mapStateToProps = (state) => {
|
||||
const { dhcp } = state;
|
||||
const props = {
|
||||
dhcp,
|
||||
};
|
||||
return props;
|
||||
};
|
||||
|
||||
const mapDispatchToProps = {
|
||||
addErrorToast,
|
||||
toggleDhcp,
|
||||
getDhcpStatus,
|
||||
getDhcpInterfaces,
|
||||
setDhcpConfig,
|
||||
findActiveDhcp,
|
||||
toggleLeaseModal,
|
||||
addStaticLease,
|
||||
removeStaticLease,
|
||||
};
|
||||
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps,
|
||||
)(Dhcp);
|
||||
24
client/src/containers/Dns.js
Normal file
24
client/src/containers/Dns.js
Normal file
@@ -0,0 +1,24 @@
|
||||
import { connect } from 'react-redux';
|
||||
import { handleUpstreamChange, setUpstream, testUpstream, addErrorToast } from '../actions';
|
||||
import Dns from '../components/Settings/Dns';
|
||||
|
||||
const mapStateToProps = (state) => {
|
||||
const { dashboard, settings } = state;
|
||||
const props = {
|
||||
dashboard,
|
||||
settings,
|
||||
};
|
||||
return props;
|
||||
};
|
||||
|
||||
const mapDispatchToProps = {
|
||||
handleUpstreamChange,
|
||||
setUpstream,
|
||||
testUpstream,
|
||||
addErrorToast,
|
||||
};
|
||||
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps,
|
||||
)(Dns);
|
||||
24
client/src/containers/Encryption.js
Normal file
24
client/src/containers/Encryption.js
Normal file
@@ -0,0 +1,24 @@
|
||||
import { connect } from 'react-redux';
|
||||
import { addErrorToast } from '../actions';
|
||||
import { getTlsStatus, setTlsConfig, validateTlsConfig } from '../actions/encryption';
|
||||
import Encryption from '../components/Settings/Encryption';
|
||||
|
||||
const mapStateToProps = (state) => {
|
||||
const { encryption } = state;
|
||||
const props = {
|
||||
encryption,
|
||||
};
|
||||
return props;
|
||||
};
|
||||
|
||||
const mapDispatchToProps = {
|
||||
addErrorToast,
|
||||
getTlsStatus,
|
||||
setTlsConfig,
|
||||
validateTlsConfig,
|
||||
};
|
||||
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps,
|
||||
)(Encryption);
|
||||
Reference in New Issue
Block a user