-
Notifications
You must be signed in to change notification settings - Fork 19
Add detach button for ephemeral ip #2285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
Looks good! I don’t think it should say the IP twice. Agree about doing attach in a separate PR. It should be really simple — all you can do is pick the pool. |
|
Let's make sure the title and button text match. We have two options:
|
| // Detach the ephemeral IP | ||
| await clickRowAction(page, 'ephemeral', 'Detach') | ||
| await page.getByRole('button', { name: 'Confirm' }).click() | ||
| await expect(externalIpTable.getByRole('cell', { name: 'ephemeral' })).toBeHidden() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add an assert before clicking the row action that this same selector is visible. The clickRowAction implicitly tests for that, but I like to use the same selector for before-and-after checks.
mock-api/msw/handlers.ts
Outdated
| // https://github.com/oxidecomputer/omicron/blob/d52aad0/nexus/src/app/sagas/instance_ip_detach.rs#L79-L82 | ||
| const ip = db.ephemeralIps.find((eip) => eip.instance_id === instance.id) | ||
| if (!ip) throw notFoundErr('ephemeral IP') | ||
| if (!ip) throw notFoundErr('Could not find an ephemeral IP') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You had it right the first time. See this line:
Line 25 in c0f9f5e
| const message = msg ? `not found: ${msg}` : 'not found' |
I think if you wanted to be really fancy you could put the instance name or ID in there: "ephemeral IP for instance ${path.instance}"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, womp; ty
david-crespo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great!
oxidecomputer/console@a06d852...34c648b * [34c648b5](oxidecomputer/console@34c648b5) bump omicron to latest main (vpc router endpoints) * [44ea9cbe](oxidecomputer/console@44ea9cbe) fix casing in floating IP create toast * [b4b1103e](oxidecomputer/console@b4b1103e) oxidecomputer/console#2249 * [dcec501d](oxidecomputer/console@dcec501d) oxidecomputer/console#2286 * [ed4d92ec](oxidecomputer/console@ed4d92ec) oxidecomputer/console#2285
oxidecomputer/console@a06d852...34c648b * [34c648b5](oxidecomputer/console@34c648b5) bump omicron to latest main (vpc router endpoints) * [44ea9cbe](oxidecomputer/console@44ea9cbe) fix casing in floating IP create toast * [b4b1103e](oxidecomputer/console@b4b1103e) oxidecomputer/console#2249 * [dcec501d](oxidecomputer/console@dcec501d) oxidecomputer/console#2286 * [ed4d92ec](oxidecomputer/console@ed4d92ec) oxidecomputer/console#2285





Fixes #2205
This adds a

Detachbutton for ephemeral IPs, with a confirmation:Now that we can detach ephemeral IPs, we also need an empty state for that table, so this PR also adds that:

I believe we don't currently have a way to attach an ephemeral IP to an instance in the UI, but I suspect that's something we'll tackle separately.