fix(striker-ui): auto-suggest last octet of not IFN on striker based on host sequence

main
Tsu-ba-me 1 year ago
parent 6b1c2491d0
commit 86ecd3537c
  1. 1345
      striker-ui/components/GeneralInitForm.tsx
  2. 1813
      striker-ui/components/NetworkInitForm.tsx
  3. 5
      striker-ui/components/StrikerInitForm.tsx

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -48,6 +48,7 @@ const StrikerInitForm: FC = () => {
const [isNetworkInitFormValid, setIsNetworkInitFormValid] = const [isNetworkInitFormValid, setIsNetworkInitFormValid] =
useState<boolean>(false); useState<boolean>(false);
const [isSubmittingForm, setIsSubmittingForm] = useState<boolean>(false); const [isSubmittingForm, setIsSubmittingForm] = useState<boolean>(false);
const [hostNumber, setHostNumber] = useState<string | undefined>();
const [hostDetail, setHostDetail] = useProtectedState< const [hostDetail, setHostDetail] = useProtectedState<
APIHostDetail | undefined APIHostDetail | undefined
@ -147,6 +148,9 @@ const StrikerInitForm: FC = () => {
<GeneralInitForm <GeneralInitForm
expectHostDetail={reconfig} expectHostDetail={reconfig}
hostDetail={hostDetail} hostDetail={hostDetail}
onHostNumberBlurAppend={({ target: { value } }) => {
setHostNumber(value);
}}
ref={generalInitFormRef} ref={generalInitFormRef}
toggleSubmitDisabled={(testResult) => { toggleSubmitDisabled={(testResult) => {
if (testResult !== isGeneralInitFormValid) { if (testResult !== isGeneralInitFormValid) {
@ -158,6 +162,7 @@ const StrikerInitForm: FC = () => {
<NetworkInitForm <NetworkInitForm
expectHostDetail={reconfig} expectHostDetail={reconfig}
hostDetail={hostDetail} hostDetail={hostDetail}
hostSequence={hostNumber}
ref={networkInitFormRef} ref={networkInitFormRef}
toggleSubmitDisabled={(testResult) => { toggleSubmitDisabled={(testResult) => {
if (testResult !== isNetworkInitFormValid) { if (testResult !== isNetworkInitFormValid) {

Loading…
Cancel
Save