From 4b821d67f5af119f5e4ea06880e390261f2af7dc Mon Sep 17 00:00:00 2001 From: Ildar Kamalov Date: Thu, 28 Mar 2019 19:08:24 +0300 Subject: [PATCH] * client: disable DHCP check if server enabled and hide errors on disable --- client/src/components/Settings/Dhcp/index.js | 3 ++- client/src/reducers/index.js | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/client/src/components/Settings/Dhcp/index.js b/client/src/components/Settings/Dhcp/index.js index 4621011d..1de64f14 100644 --- a/client/src/components/Settings/Dhcp/index.js +++ b/client/src/components/Settings/Dhcp/index.js @@ -148,7 +148,8 @@ class Dhcp extends Component { this.props.findActiveDhcp(dhcp.config.interface_name) } disabled={ - !dhcp.config.interface_name + dhcp.config.enabled + || !dhcp.config.interface_name || dhcp.processingConfig } > diff --git a/client/src/reducers/index.js b/client/src/reducers/index.js index 404679eb..0b415702 100644 --- a/client/src/reducers/index.js +++ b/client/src/reducers/index.js @@ -303,7 +303,9 @@ const dhcp = handleActions({ [actions.toggleDhcpSuccess]: (state) => { const { config } = state; const newConfig = { ...config, enabled: !config.enabled }; - const newState = { ...state, config: newConfig, processingDhcp: false }; + const newState = { + ...state, config: newConfig, active: null, processingDhcp: false, + }; return newState; },