External IPs
- setAttachModalOpen(true)}
- disabled={!!disabledReason}
- disabledReason={disabledReason}
- >
- Attach floating IP
-
- {attachModalOpen && (
+
+ {/*
+ We normally wouldn't hide this button and would just have a disabled state on it,
+ but it is very rare for this button to be necessary, and it would be disabled
+ most of the time, for most users. To reduce clutter on the screen, we're hiding it.
+ */}
+ {enableEphemeralAttachButton && (
+ setAttachEphemeralModalOpen(true)}>
+ Attach ephemeral IP
+
+ )}
+ setAttachFloatingModalOpen(true)}
+ disabled={!!floatingDisabledReason}
+ disabledReason={floatingDisabledReason}
+ >
+ Attach floating IP
+
+
+ {attachEphemeralModalOpen && (
+ setAttachEphemeralModalOpen(false)} />
+ )}
+ {attachFloatingModalOpen && (
setAttachModalOpen(false)}
+ onDismiss={() => setAttachFloatingModalOpen(false)}
/>
)}
@@ -370,7 +396,7 @@ export function NetworkingTab() {