diff --git a/striker-ui/components/NetworkInitForm.tsx b/striker-ui/components/NetworkInitForm.tsx index 73c2017d..f4fe3da2 100644 --- a/striker-ui/components/NetworkInitForm.tsx +++ b/striker-ui/components/NetworkInitForm.tsx @@ -585,6 +585,7 @@ const NetworkInitForm = forwardRef< const { dns: previousDns, gateway: previousGateway, + gatewayInterface: previousGatewayInterface, hostType, hostUUID = 'local', networks: previousNetworks, @@ -1189,10 +1190,11 @@ const NetworkInitForm = forwardRef< const applied: string[] = []; const inputs = Object.values(previousNetworks).reduce( (previous, { ip, link1Uuid, link2Uuid = '', subnetMask, type }) => { - const name = NETWORK_TYPES[type]; const typeCount = getNetworkTypeCount(type, { inputs: previous }) + 1; const isRequired = requiredNetworks[type] === typeCount; + const name = `${NETWORK_TYPES[type]} ${typeCount}`; + applied.push(link1Uuid, link2Uuid); previous.push({ @@ -1214,6 +1216,8 @@ const NetworkInitForm = forwardRef< [], ); + setGatewayInterface(previousGatewayInterface); + setNetworkInterfaceInputMap((previous) => { const result = { ...previous }; @@ -1235,6 +1239,7 @@ const NetworkInitForm = forwardRef< hostDetail, networkInputs, networkInterfaceInputMap, + previousGatewayInterface, previousNetworks, requiredNetworks, ]);