Skip to content

Conversation

@charliepark
Copy link
Contributor

@charliepark charliepark commented Feb 14, 2024

This PR adds the ability in the web console to create / attach / detach / delete Floating IPs. As the API doesn't currently have an update endpoint for Floating IPs, that's outside the scope of this PR.

Kapture 2024-02-21 at 16 54 08

@vercel
Copy link

vercel bot commented Feb 14, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
console ✅ Ready (Inspect) Visit Preview Feb 23, 2024 1:05am

@david-crespo
Copy link
Collaborator

This is looking great. A few things remaining for me. Some could be done in followups so we can get this merged and work more incrementally:

  • Floating IPs should be returned by mock instanceExternalIpList #1966

  • List floating IPs more clearly on single instance page #1965 (more of a separate thing, not really fixing anything here, but worth mentioning)

  • I personally prefer having only detach or attach in a given set of actions at a time. I think it's clear enough what they means (and we explain, or should explain, the action in the modal that pops up) and it saves us from having to write out this disabled copy. I think only having one or the other helps the user see them (correctly) as a sort of toggle on and toggle off rather than two parallel actions.

    image
  • Info box in the attach modal explaining what this action does

    image
  • @benjaminleonard and @paryhin taking a look at what we did with the advanced accordion on floating IP create. Copy could also use a second look

    image

address={floatingIpToModify.ip}
instances={instances.items}
project={project}
onDismiss={() => setAttachModalOpen(false)}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The whole attachModalOpen state variable is unnecessary as you can use whether floatingIpToModify is present to mean the same thing. So here you could just do setFloatingIpToModify(null) instead, and get rid of all the other references to attachModalOpen. Here's another spot where we do this:

const [editing, setEditing] = useState<VpcSubnet | null>(null)

Copy link
Collaborator

@david-crespo david-crespo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One more small thing but it's ready to go!

@charliepark charliepark merged commit 80f1167 into main Feb 23, 2024
@charliepark charliepark deleted the floating-ips branch February 23, 2024 01:17
david-crespo added a commit to oxidecomputer/omicron that referenced this pull request Feb 23, 2024
oxidecomputer/console@e5a1f80...80f1167

* [80f11673](oxidecomputer/console@80f11673) oxidecomputer/console#1957
* [5d989a70](oxidecomputer/console@5d989a70) oxidecomputer/console#1959
* [d4ec1927](oxidecomputer/console@d4ec1927) turn off license-eye comments, I hate them. CI failure is sufficient
* [f8d2f36e](oxidecomputer/console@f8d2f36e) oxidecomputer/console#1960
* [e0b676dc](oxidecomputer/console@e0b676dc) upgrade husky commands for v9 https://github.com/typicode/husky/releases/tag/v9.0.1
* [f31d5331](oxidecomputer/console@f31d5331) oxidecomputer/console#1944
* [b4552eea](oxidecomputer/console@b4552eea) Revert "Revert all app changes since v6 except two small fixes (oxidecomputer/console#1958)"
* [1f8ebf28](oxidecomputer/console@1f8ebf28) oxidecomputer/console#1958
* [b454cefd](oxidecomputer/console@b454cefd) oxidecomputer/console#1955
* [1ce32d32](oxidecomputer/console@1ce32d32) oxidecomputer/console#1956
* [794ae11d](oxidecomputer/console@794ae11d) oxidecomputer/console#1952
* [903b8f6a](oxidecomputer/console@903b8f6a) tweak api-diff: fix type error on first arg, use dax's new built-in pipe
* [a4e15cdd](oxidecomputer/console@a4e15cdd) oxidecomputer/console#1950
* [32037d40](oxidecomputer/console@32037d40) oxidecomputer/console#1949
* [f02678b0](oxidecomputer/console@f02678b0) vite 5.1
* [1936e0d8](oxidecomputer/console@1936e0d8) oxidecomputer/console#1948
* [cfda1636](oxidecomputer/console@cfda1636) forgot to bump mockServiceWorker.js (no actual changes)
* [4792105e](oxidecomputer/console@4792105e) oxidecomputer/console#1943
* [a26db9ea](oxidecomputer/console@a26db9ea) upgrade date-fns thru major version, update calls accordingly
* [3dd635a6](oxidecomputer/console@3dd635a6) oxidecomputer/console#1933
* [6c8f7a9c](oxidecomputer/console@6c8f7a9c) upgrade filesize through a major version
* [8f641b97](oxidecomputer/console@8f641b97) remove blathering in readme about node 16, which is EOL
* [e9d157a1](oxidecomputer/console@e9d157a1) do ladle too—oh my god why does it have 3000 lines in the lockfile
* [e1cdcc13](oxidecomputer/console@e1cdcc13) oxidecomputer/console#1941
* [76877ffb](oxidecomputer/console@76877ffb) oxidecomputer/console#1938
david-crespo added a commit to oxidecomputer/omicron that referenced this pull request Feb 26, 2024
### User-facing changes

* [80f11673](oxidecomputer/console@80f11673)
oxidecomputer/console#1957
* [f31d5331](oxidecomputer/console@f31d5331)
oxidecomputer/console#1944
* [b454cefd](oxidecomputer/console@b454cefd)
oxidecomputer/console#1955
* [1936e0d8](oxidecomputer/console@1936e0d8)
oxidecomputer/console#1948

---

### All changes

oxidecomputer/console@e5a1f80...80f1167

* [80f11673](oxidecomputer/console@80f11673)
oxidecomputer/console#1957
* [5d989a70](oxidecomputer/console@5d989a70)
oxidecomputer/console#1959
* [d4ec1927](oxidecomputer/console@d4ec1927)
turn off license-eye comments, I hate them. CI failure is sufficient
* [f8d2f36e](oxidecomputer/console@f8d2f36e)
oxidecomputer/console#1960
* [e0b676dc](oxidecomputer/console@e0b676dc)
upgrade husky commands for v9
https://github.com/typicode/husky/releases/tag/v9.0.1
* [f31d5331](oxidecomputer/console@f31d5331)
oxidecomputer/console#1944
* [b4552eea](oxidecomputer/console@b4552eea)
Revert "Revert all app changes since v6 except two small fixes
(oxidecomputer/console#1958)"
* [1f8ebf28](oxidecomputer/console@1f8ebf28)
oxidecomputer/console#1958
* [b454cefd](oxidecomputer/console@b454cefd)
oxidecomputer/console#1955
* [1ce32d32](oxidecomputer/console@1ce32d32)
oxidecomputer/console#1956
* [794ae11d](oxidecomputer/console@794ae11d)
oxidecomputer/console#1952
* [903b8f6a](oxidecomputer/console@903b8f6a)
tweak api-diff: fix type error on first arg, use dax's new built-in pipe
* [a4e15cdd](oxidecomputer/console@a4e15cdd)
oxidecomputer/console#1950
* [32037d40](oxidecomputer/console@32037d40)
oxidecomputer/console#1949
* [f02678b0](oxidecomputer/console@f02678b0)
vite 5.1
* [1936e0d8](oxidecomputer/console@1936e0d8)
oxidecomputer/console#1948
* [cfda1636](oxidecomputer/console@cfda1636)
forgot to bump mockServiceWorker.js (no actual changes)
* [4792105e](oxidecomputer/console@4792105e)
oxidecomputer/console#1943
* [a26db9ea](oxidecomputer/console@a26db9ea)
upgrade date-fns thru major version, update calls accordingly
* [3dd635a6](oxidecomputer/console@3dd635a6)
oxidecomputer/console#1933
* [6c8f7a9c](oxidecomputer/console@6c8f7a9c)
upgrade filesize through a major version
* [8f641b97](oxidecomputer/console@8f641b97)
remove blathering in readme about node 16, which is EOL
* [e9d157a1](oxidecomputer/console@e9d157a1)
do ladle too—oh my god why does it have 3000 lines in the lockfile
* [e1cdcc13](oxidecomputer/console@e1cdcc13)
oxidecomputer/console#1941
* [76877ffb](oxidecomputer/console@76877ffb)
oxidecomputer/console#1938
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants