2018-08-30 14:25:33 +00:00
|
|
|
import { connect } from 'react-redux';
|
2018-12-12 15:12:51 +00:00
|
|
|
import {
|
|
|
|
initSettings,
|
|
|
|
toggleSetting,
|
|
|
|
handleUpstreamChange,
|
|
|
|
setUpstream,
|
|
|
|
testUpstream,
|
|
|
|
addErrorToast,
|
|
|
|
toggleDhcp,
|
|
|
|
getDhcpStatus,
|
2018-12-24 08:48:23 +00:00
|
|
|
getDhcpInterfaces,
|
2018-12-12 15:12:51 +00:00
|
|
|
setDhcpConfig,
|
|
|
|
findActiveDhcp,
|
2019-02-18 13:06:27 +00:00
|
|
|
} from '../actions';
|
|
|
|
import {
|
2019-01-24 15:51:50 +00:00
|
|
|
getTlsStatus,
|
|
|
|
setTlsConfig,
|
2019-02-18 13:06:27 +00:00
|
|
|
validateTlsConfig,
|
|
|
|
} from '../actions/encryption';
|
2019-05-22 14:59:57 +00:00
|
|
|
import {
|
|
|
|
addClient,
|
|
|
|
updateClient,
|
|
|
|
deleteClient,
|
|
|
|
toggleClientModal,
|
|
|
|
} from '../actions/clients';
|
2018-08-30 14:25:33 +00:00
|
|
|
import Settings from '../components/Settings';
|
|
|
|
|
|
|
|
const mapStateToProps = (state) => {
|
2019-01-24 15:51:50 +00:00
|
|
|
const {
|
|
|
|
settings,
|
|
|
|
dashboard,
|
|
|
|
dhcp,
|
|
|
|
encryption,
|
2019-05-22 14:59:57 +00:00
|
|
|
clients,
|
2019-01-24 15:51:50 +00:00
|
|
|
} = state;
|
|
|
|
const props = {
|
|
|
|
settings,
|
|
|
|
dashboard,
|
|
|
|
dhcp,
|
|
|
|
encryption,
|
2019-05-22 14:59:57 +00:00
|
|
|
clients,
|
2019-01-24 15:51:50 +00:00
|
|
|
};
|
2018-08-30 14:25:33 +00:00
|
|
|
return props;
|
|
|
|
};
|
|
|
|
|
|
|
|
const mapDispatchToProps = {
|
|
|
|
initSettings,
|
|
|
|
toggleSetting,
|
|
|
|
handleUpstreamChange,
|
|
|
|
setUpstream,
|
2018-09-21 15:08:39 +00:00
|
|
|
testUpstream,
|
2018-09-21 15:50:06 +00:00
|
|
|
addErrorToast,
|
2018-12-12 15:12:51 +00:00
|
|
|
toggleDhcp,
|
|
|
|
getDhcpStatus,
|
2018-12-24 08:48:23 +00:00
|
|
|
getDhcpInterfaces,
|
2018-12-12 15:12:51 +00:00
|
|
|
setDhcpConfig,
|
|
|
|
findActiveDhcp,
|
2019-01-24 15:51:50 +00:00
|
|
|
getTlsStatus,
|
|
|
|
setTlsConfig,
|
2019-02-18 13:06:27 +00:00
|
|
|
validateTlsConfig,
|
2019-05-22 14:59:57 +00:00
|
|
|
addClient,
|
|
|
|
updateClient,
|
|
|
|
deleteClient,
|
|
|
|
toggleClientModal,
|
2018-08-30 14:25:33 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
export default connect(
|
|
|
|
mapStateToProps,
|
|
|
|
mapDispatchToProps,
|
|
|
|
)(Settings);
|