@@ -123,7 +141,7 @@ class Dhcp extends Component {
onClick={() =>
this.props.findActiveDhcp(dhcp.config.interface_name)
}
- disabled={!dhcp.config.interface_name}
+ disabled={!dhcp.config.interface_name || dhcp.processingConfig}
>
check_dhcp_servers
diff --git a/client/src/reducers/index.js b/client/src/reducers/index.js
index 1b770adc..f2e450ba 100644
--- a/client/src/reducers/index.js
+++ b/client/src/reducers/index.js
@@ -308,11 +308,21 @@ const dhcp = handleActions({
const newState = { ...state, config: newConfig, processingDhcp: false };
return newState;
},
+
+ [actions.setDhcpConfigRequest]: state => ({ ...state, processingConfig: true }),
+ [actions.setDhcpConfigFailure]: state => ({ ...state, processingConfig: false }),
+ [actions.setDhcpConfigSuccess]: (state, { payload }) => {
+ const { config } = state;
+ const newConfig = { ...config, ...payload };
+ const newState = { ...state, config: newConfig, processingConfig: false };
+ return newState;
+ },
}, {
processing: true,
processingStatus: false,
processingInterfaces: false,
processingDhcp: false,
+ processingConfig: false,
config: {
enabled: false,
},