From d45c0374fc9c52f13f7f9e2725b0dcf318bf94e5 Mon Sep 17 00:00:00 2001 From: Tsu-ba-me Date: Mon, 13 Feb 2023 20:04:51 -0500 Subject: [PATCH] fix(striker-ui): populate gateway and DNS in NetworkInitForm --- striker-ui/components/NetworkInitForm.tsx | 9 ++++++++- striker-ui/types/APIHost.d.ts | 2 ++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/striker-ui/components/NetworkInitForm.tsx b/striker-ui/components/NetworkInitForm.tsx index 86d8e836..507454e1 100644 --- a/striker-ui/components/NetworkInitForm.tsx +++ b/striker-ui/components/NetworkInitForm.tsx @@ -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} diff --git a/striker-ui/types/APIHost.d.ts b/striker-ui/types/APIHost.d.ts index efe96f74..6dcfd14d 100644 --- a/striker-ui/types/APIHost.d.ts +++ b/striker-ui/types/APIHost.d.ts @@ -40,6 +40,8 @@ type APIHostOverviewList = { }; type APIHostDetail = APIHostOverview & { + dns: string; + gateway: string; installTarget: APIHostInstallTarget; };