diff --git a/client/src/components/Settings/Dhcp/StaticLeases/Form.js b/client/src/components/Settings/Dhcp/StaticLeases/Form.js
index 625e87e2..0525f6a3 100644
--- a/client/src/components/Settings/Dhcp/StaticLeases/Form.js
+++ b/client/src/components/Settings/Dhcp/StaticLeases/Form.js
@@ -10,6 +10,7 @@ import {
validateMac,
validateRequiredValue,
validateIpv4InCidr,
+ validateIpGateway,
} from '../../../../helpers/validators';
import { FORM_NAME } from '../../../../helpers/constants';
import { toggleLeaseModal } from '../../../../actions';
@@ -57,6 +58,7 @@ const Form = ({
validateRequiredValue,
validateIpv4,
validateIpv4InCidr,
+ validateIpGateway,
]}
/>
@@ -101,6 +103,7 @@ Form.propTypes = {
ip: PropTypes.string.isRequired,
hostname: PropTypes.string.isRequired,
cidr: PropTypes.string.isRequired,
+ gatewayIp: PropTypes.string,
}),
pristine: PropTypes.bool.isRequired,
handleSubmit: PropTypes.func.isRequired,
diff --git a/client/src/components/Settings/Dhcp/StaticLeases/Modal.js b/client/src/components/Settings/Dhcp/StaticLeases/Modal.js
index 8ad0f009..0baf487e 100644
--- a/client/src/components/Settings/Dhcp/StaticLeases/Modal.js
+++ b/client/src/components/Settings/Dhcp/StaticLeases/Modal.js
@@ -13,6 +13,7 @@ const Modal = ({
cidr,
rangeStart,
rangeEnd,
+ gatewayIp,
}) => {
const dispatch = useDispatch();
@@ -42,6 +43,7 @@ const Modal = ({
cidr,
rangeStart,
rangeEnd,
+ gatewayIp,
}}
onSubmit={handleSubmit}
processingAdding={processingAdding}
@@ -61,6 +63,7 @@ Modal.propTypes = {
cidr: PropTypes.string.isRequired,
rangeStart: PropTypes.string,
rangeEnd: PropTypes.string,
+ gatewayIp: PropTypes.string,
};
export default withTranslation()(Modal);
diff --git a/client/src/components/Settings/Dhcp/StaticLeases/index.js b/client/src/components/Settings/Dhcp/StaticLeases/index.js
index a63f78cd..2374f044 100644
--- a/client/src/components/Settings/Dhcp/StaticLeases/index.js
+++ b/client/src/components/Settings/Dhcp/StaticLeases/index.js
@@ -24,6 +24,7 @@ const StaticLeases = ({
cidr,
rangeStart,
rangeEnd,
+ gatewayIp,
}) => {
const [t] = useTranslation();
const dispatch = useDispatch();
@@ -106,6 +107,7 @@ const StaticLeases = ({
cidr={cidr}
rangeStart={rangeStart}
rangeEnd={rangeEnd}
+ gatewayIp={gatewayIp}
/>
>
);
@@ -119,6 +121,7 @@ StaticLeases.propTypes = {
cidr: PropTypes.string.isRequired,
rangeStart: PropTypes.string,
rangeEnd: PropTypes.string,
+ gatewayIp: PropTypes.string,
};
cellWrap.propTypes = {
diff --git a/client/src/components/Settings/Dhcp/index.js b/client/src/components/Settings/Dhcp/index.js
index a84e0a93..bd3a45e3 100644
--- a/client/src/components/Settings/Dhcp/index.js
+++ b/client/src/components/Settings/Dhcp/index.js
@@ -278,6 +278,7 @@ const Dhcp = () => {
cidr={cidr}
rangeStart={dhcp?.values?.v4?.range_start}
rangeEnd={dhcp?.values?.v4?.range_end}
+ gatewayIp={dhcp?.values?.v4?.gateway_ip}
/>