Added DHCP warning

This commit is contained in:
Ildar Kamalov 2019-01-28 14:19:31 +03:00 committed by Eugene Bujak
parent 5f7fc0f041
commit 7c25c0febe
2 changed files with 11 additions and 4 deletions

View File

@ -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",

View File

@ -66,14 +66,14 @@ class Dhcp extends Component {
if (active) {
if (active.error) {
return (
<div className="text-danger">
<div className="text-danger mb-2">
{active.error}
</div>
);
}
return (
<Fragment>
<div className="mb-2">
{active.found ? (
<div className="text-danger">
<Trans>dhcp_found</Trans>
@ -83,7 +83,7 @@ class Dhcp extends Component {
<Trans>dhcp_not_found</Trans>
</div>
)}
</Fragment>
</div>
);
}
@ -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
}
>
<Trans>check_dhcp_servers</Trans>
</button>
</div>
{this.getActiveDhcpMessage()}
<div className="text-danger">
<Trans>dhcp_warning</Trans>
</div>
</Fragment>
}
</div>