fix(striker-ui): populate gateway and DNS in NetworkInitForm

main
Tsu-ba-me 2 years ago
parent 126b9b33e3
commit d45c0374fc
  1. 9
      striker-ui/components/NetworkInitForm.tsx
  2. 2
      striker-ui/types/APIHost.d.ts

@ -586,7 +586,12 @@ const NetworkInitForm = forwardRef<
toggleSubmitDisabled?: (testResult: boolean) => void;
}
>(({ hostDetail, toggleSubmitDisabled }, ref) => {
const { hostType, hostUUID = 'local' } = hostDetail ?? ({} as APIHostDetail);
const {
dns: xDns,
gateway: xGateway,
hostType,
hostUUID = 'local',
}: APIHostDetail = hostDetail ?? ({} as APIHostDetail);
const [dragMousePosition, setDragMousePosition] = useState<{
x: number;
@ -1339,6 +1344,7 @@ const NetworkInitForm = forwardRef<
setGatewayInputMessage();
}}
label="Gateway"
value={xGateway}
/>
}
ref={gatewayInputRef}
@ -1360,6 +1366,7 @@ const NetworkInitForm = forwardRef<
setDomainNameServerCSVInputMessage();
}}
label="Domain name server(s)"
value={xDns}
/>
}
ref={dnsCSVInputRef}

@ -40,6 +40,8 @@ type APIHostOverviewList = {
};
type APIHostDetail = APIHostOverview & {
dns: string;
gateway: string;
installTarget: APIHostInstallTarget;
};

Loading…
Cancel
Save