From 7c25c0febe64c05f8586b14c5d529e969044c68f Mon Sep 17 00:00:00 2001 From: Ildar Kamalov Date: Mon, 28 Jan 2019 14:19:31 +0300 Subject: [PATCH] Added DHCP warning --- client/src/__locales/en.json | 1 + client/src/components/Settings/Dhcp/index.js | 14 ++++++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/client/src/__locales/en.json b/client/src/__locales/en.json index 196645cd..aa4e7072 100644 --- a/client/src/__locales/en.json +++ b/client/src/__locales/en.json @@ -28,6 +28,7 @@ "dhcp_ip_addresses": "IP addresses", "dhcp_table_hostname": "Hostname", "dhcp_table_expires": "Expires", + "dhcp_warning": "If you want to enable the built-in DHCP server, make sure that there is no other active DHCP server. Otherwise, it can break the internet for connected devices!", "back": "Back", "dashboard": "Dashboard", "settings": "Settings", diff --git a/client/src/components/Settings/Dhcp/index.js b/client/src/components/Settings/Dhcp/index.js index 68412a82..5335586b 100644 --- a/client/src/components/Settings/Dhcp/index.js +++ b/client/src/components/Settings/Dhcp/index.js @@ -66,14 +66,14 @@ class Dhcp extends Component { if (active) { if (active.error) { return ( -
+
{active.error}
); } return ( - +
{active.found ? (
dhcp_found @@ -83,7 +83,7 @@ class Dhcp extends Component { dhcp_not_found
)} - +
); } @@ -130,12 +130,18 @@ class Dhcp extends Component { onClick={() => this.props.findActiveDhcp(dhcp.config.interface_name) } - disabled={!dhcp.config.interface_name || dhcp.processingConfig} + disabled={ + !dhcp.config.interface_name + || dhcp.processingConfig + } > check_dhcp_servers
{this.getActiveDhcpMessage()} +
+ dhcp_warning +
}