Skip to content

Commit 2c43089

Browse files
committed
Updates
1 parent 4fb8f8a commit 2c43089

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

src/App.jsx

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export default function HcpCliAssistant() {
4242
const isStepValid = () => {
4343
switch (step) {
4444
case 0:
45-
return form.name.trim() !== "" && form.baseDomain.trim() !== "" && form.nodePoolReplicas.trim() !== "";
45+
return form.name.trim() !== "" && form.baseDomain.trim() !== "" && form.nodePoolReplicas.trim() !== "" && form.pullSecret.trim() !== "" && form.sshKey.trim() !== "";
4646
case 1:
4747
return form.osCloudSet || form.openstackCredentialsFile.trim() !== "";
4848
case 2:
@@ -150,7 +150,7 @@ export default function HcpCliAssistant() {
150150

151151
return (
152152
<div className="p-6 max-w-2xl mx-auto">
153-
<h1 className="text-2xl font-bold mb-4">HCP CLI Assistant</h1>
153+
<h1 className="text-2xl font-bold mb-4">Hypershift on OpenStack CLI assistant</h1>
154154
<h2 className="text-lg font-semibold">Step {step + 1}: {steps[step]}</h2>
155155

156156
{step === 4 ? (
@@ -166,14 +166,20 @@ export default function HcpCliAssistant() {
166166
</div>
167167
) : (
168168
<div className="space-y-4">
169-
{step === 0 && <><input type="text" name="name" placeholder="Cluster Name (required). Example: test" value={form.name} onChange={handleChange} className="w-full p-2 border rounded" required /><input type="text" name="baseDomain" placeholder="Base Domain (required). Example: mydomain.com" value={form.baseDomain} onChange={handleChange} className="w-full p-2 border rounded" required /><input type="number" name="nodePoolReplicas" placeholder="Node Pool Replicas (required)" value={form.nodePoolReplicas} onChange={handleChange} className="w-full p-2 border rounded" required /></>}
169+
{step === 0 && <>
170+
<input type="text" name="name" placeholder="Cluster Name (required). Example: test" value={form.name} onChange={handleChange} className="w-full p-2 border rounded" required />
171+
<input type="text" name="baseDomain" placeholder="Base Domain (required). Example: mydomain.com" value={form.baseDomain} onChange={handleChange} className="w-full p-2 border rounded" required />
172+
<input type="number" name="nodePoolReplicas" placeholder="Node Pool Replicas (required)" value={form.nodePoolReplicas} onChange={handleChange} className="w-full p-2 border rounded" required />
173+
<input type="text" name="pullSecret" placeholder="Pull Secret path (required). Example: /path/to/pull-secret" value={form.pullSecret} onChange={handleChange} className="w-full p-2 border rounded" required />
174+
<input type="text" name="sshKey" placeholder="SSH Key path (required). Example: /path/to/id_rsa.pub" value={form.sshKey} onChange={handleChange} className="w-full p-2 border rounded" required />
175+
</>}
170176
{step === 1 && <><label className="block"><input type="checkbox" name="osCloudSet" checked={form.osCloudSet} onChange={handleChange} className="mr-2" />OS_CLOUD is set in the environment</label>{!form.osCloudSet && (
171177
<>
172-
<input type="text" name="openstackCredentialsFile" placeholder="OpenStack Credentials File (optional). Example: /tmp/clouds.yaml" value={form.openstackCredentialsFile} onChange={handleChange} className="w-full p-2 border rounded" />
178+
<input type="text" name="openstackCredentialsFile" placeholder="OpenStack Credentials File (optional). Example: /path/to/clouds.yaml" value={form.openstackCredentialsFile} onChange={handleChange} className="w-full p-2 border rounded" />
173179
</>
174180
)}
175181
<input type="text" name="openstackCloud" placeholder="OpenStack Cloud (optional). Default: openstack" value={form.openstackCloud} onChange={handleChange} className="w-full p-2 border rounded" />
176-
<input type="text" name="openstackCaCertFile" placeholder="OpenStack CA Certificate File (optional). Example: /tmp/ca.cert" value={form.openstackCaCertFile} onChange={handleChange} className="w-full p-2 border rounded" /></>}
182+
<input type="text" name="openstackCaCertFile" placeholder="OpenStack CA Certificate File (optional). Example: /path/to/ca.cert" value={form.openstackCaCertFile} onChange={handleChange} className="w-full p-2 border rounded" /></>}
177183
{step === 2 && (
178184
<>
179185
<input type="text" name="externalNetworkId" placeholder="External Network ID (optional). Example: 64f629fd-f75b-4e66-96ad-94f6f2125ba4" value={form.externalNetworkId} onChange={handleChange} className="w-full p-2 border rounded" />

0 commit comments

Comments
 (0)