- {step === 0 && <>
-
-
-
-
-
- >}
- {step === 1 && <>
-
-
- {!form.osCloudSet && (
+
- )}
-
-
-
-
- >}
-
- {step === 2 && (
+ >
+ );
+ case 1: // OpenStack Networking
+ return (
<>
- {/* Additional ports section remains the same */}
+ {/* Additional ports section */}
Additional Nodepool Ports (optional)
@@ -345,12 +485,16 @@ export default function HcpCliAssistant() {
Port {index + 1}
>
- )}
-
- {step === 3 && <>
-
-
-
-
-
- >}
+ );
+ case 2: // OpenStack Node Configuration
+ return (
+ <>
+
+
+
+
+
+ >
+ );
+ case 3: // Review & Generate Command (final step for OpenStack)
+ return (
+
+
Generated Command:
+
{generateCommand()}
+
+ {copied ? "Copied!" : "Copy Command"}
+
+
+ );
+ default:
+ return (
+
+
Unknown step for the OpenStack platform. Please go back and try again.
+
+ );
+ }
+ } else if (form.platform) {
+ // For any platform that is selected but not implemented
+ return (
+
+
Support for the {form.platform} platform is coming soon!
- )}
+ );
+ }
+
+ return null;
+ };
+
+ // Determine if we're on the final review step
+ const isFinalStep = step === steps.length - 1;
+
+ return (
+
+
Hypershift CLI Assistant
+
+ {/* Progress bar */}
+
+
+ {steps.map((stepName, idx) => (
+
+ {stepName}
+
+ ))}
+
+
+
+
+
Step {step + 1}: {steps[step]}
+
+
+ {renderStepContent()}
+
{step > 0 && Previous}
- {step < steps.length - 1 && Next}
+ {!isFinalStep && (
+
+ Next
+
+ )}
);