From 5b7631bbd7cbdf66cf40793747d8de9041f4cb52 Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Fri, 21 Mar 2025 20:04:08 -0400 Subject: [PATCH 1/2] Fix port validation --- src/App.jsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/App.jsx b/src/App.jsx index 0ad603a..dd218af 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -179,10 +179,11 @@ export default function HcpCliAssistant() { if (form.additionalPorts) { try { const ports = JSON.parse(form.additionalPorts); - // Only validate ports that have a networkId entered - const portsWithNetworkId = ports.filter(port => port.networkId && port.networkId.trim() !== ""); - return portsWithNetworkId.length === 0 || - portsWithNetworkId.every(port => port.networkId && port.networkId.trim() !== ""); + if (ports.length === 0) { + return true; + } + // Every port must have a networkId + return ports.every(port => port.networkId && port.networkId.trim() !== ""); } catch (e) { console.error("Error parsing additionalPorts:", e); return false; From d7a5f0420788c00f1f3682ab765ee00955c9fb9b Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Fri, 21 Mar 2025 20:15:54 -0400 Subject: [PATCH 2/2] Improve help --- src/App.jsx | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/App.jsx b/src/App.jsx index dd218af..5cf46e1 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -393,18 +393,6 @@ export default function HcpCliAssistant() { className="mr-2" /> OS_CLOUD is set in the environment - e.target.querySelector('div').style.display = 'block'} - onMouseLeave={(e) => e.target.querySelector('div').style.display = 'none'} - > - - - -
- Check this if you have the OS_CLOUD environment variable set. Otherwise, you'll need to provide a credentials file. -
-
{!form.osCloudSet && ( @@ -475,7 +463,7 @@ export default function HcpCliAssistant() {
- Configure additional network ports for the nodes in your cluster. Useful for multi-network setups or SR-IOV configurations. + Attach additional ports to nodes. Params: Neutron Network ID, VNIC type, Port Security and Allowed Address Pairs.