Add a warning

This commit is contained in:
Pierre HUBERT 2024-01-11 20:00:44 +01:00
parent 96d264d15f
commit 39ff53f2ba

View File

@ -1,5 +1,6 @@
import DeleteIcon from "@mui/icons-material/Delete"; import DeleteIcon from "@mui/icons-material/Delete";
import { import {
Alert,
Button, Button,
Card, Card,
CardActions, CardActions,
@ -156,21 +157,31 @@ function NatEntryForm(p: {
)} )}
{p.entry.host_ip.type === "interface" && ( {p.entry.host_ip.type === "interface" && (
<SelectInput <>
{...p} {p.editable && (
label="Network interface" <Alert severity="warning" style={{ margin: "10px 0px" }}>
value={p.entry.host_ip.name} Warning! All IP addresses may not be inferred on reboot due
options={p.nicsList.map((n) => { to the fact that the network hook might be executed before
return { the network interfaces are fully configured. This might lead
value: n, to incomplete ports exposition!
}; </Alert>
})} )}
onValueChange={(v) => { <SelectInput
if (p.entry.host_ip.type === "interface") {...p}
p.entry.host_ip.name = v!; label="Network interface"
p.onChange?.(); value={p.entry.host_ip.name}
}} options={p.nicsList.map((n) => {
/> return {
value: n,
};
})}
onValueChange={(v) => {
if (p.entry.host_ip.type === "interface")
p.entry.host_ip.name = v!;
p.onChange?.();
}}
/>
</>
)} )}
</NATEntryProp> </NATEntryProp>