-
Notifications
You must be signed in to change notification settings - Fork 22
Add IP pool sidebar #3158
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
Merged
+113
−24
Merged
Add IP pool sidebar #3158
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
7ee480b
Add IP pool sidebar
charliepark e33b245
Add relevant docs section
charliepark 765d250
linter fix
charliepark 408e3bf
Merge branch 'main' into ip_pool_sidebar
charliepark 349fe40
Update label: Pool type -> Type
charliepark 02a4bdf
Merge branch 'main' into ip_pool_sidebar
charliepark 7a43bb3
Merge branch 'main' into ip_pool_sidebar
charliepark e271bcb
Use context to determine IP linking
charliepark fd9b3cc
Slight tweak to e2e locator
charliepark 2ecc03b
Merge branch 'main' into ip_pool_sidebar
charliepark 58b7ca4
keep tooltip in sidebar to see IP Pool description
charliepark 6bc1ac2
cleanup with a ternary
charliepark d914c00
Merge branch 'main' into ip_pool_sidebar
charliepark 39d1132
add a tiny test assert for the non-button side modal cell
david-crespo 0c181ce
fix pre-existing RQ cache bug: seed errors allowed IP pool query
david-crespo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| /* | ||
| * This Source Code Form is subject to the terms of the Mozilla Public | ||
| * License, v. 2.0. If a copy of the MPL was not distributed with this | ||
| * file, you can obtain one at https://mozilla.org/MPL/2.0/. | ||
| * | ||
| * Copyright Oxide Computer Company | ||
| */ | ||
| import { type IpPool } from '@oxide/api' | ||
| import { IpGlobal16Icon } from '@oxide/design-system/icons/react' | ||
| import { Badge } from '@oxide/design-system/ui' | ||
|
|
||
| import { ReadOnlySideModalForm } from '~/components/form/ReadOnlySideModalForm' | ||
| import { IpVersionBadge } from '~/components/IpVersionBadge' | ||
| import { SideModalFormDocs } from '~/ui/lib/ModalLinks' | ||
| import { PropertiesTable } from '~/ui/lib/PropertiesTable' | ||
| import { ResourceLabel } from '~/ui/lib/SideModal' | ||
| import { docLinks } from '~/util/links' | ||
|
|
||
| type IpPoolDetailSideModalProps = { | ||
| pool: IpPool | ||
| onDismiss: () => void | ||
| } | ||
|
|
||
| export function IpPoolDetailSideModal({ pool, onDismiss }: IpPoolDetailSideModalProps) { | ||
| return ( | ||
| <ReadOnlySideModalForm | ||
| title="IP pool details" | ||
| onDismiss={onDismiss} | ||
| animate | ||
| subtitle={ | ||
| <ResourceLabel> | ||
| <IpGlobal16Icon /> {pool.name} | ||
| </ResourceLabel> | ||
| } | ||
| > | ||
| <PropertiesTable> | ||
| <PropertiesTable.IdRow id={pool.id} /> | ||
| <PropertiesTable.DescriptionRow description={pool.description} sideModal /> | ||
| <PropertiesTable.Row label="IP version"> | ||
| <IpVersionBadge ipVersion={pool.ipVersion} /> | ||
| </PropertiesTable.Row> | ||
| <PropertiesTable.Row label="Type"> | ||
| <Badge color="neutral">{pool.poolType}</Badge> | ||
| </PropertiesTable.Row> | ||
| <PropertiesTable.DateRow label="Created" date={pool.timeCreated} /> | ||
| <PropertiesTable.DateRow label="Last Modified" date={pool.timeModified} /> | ||
| </PropertiesTable> | ||
| <SideModalFormDocs docs={[docLinks.systemIpPools]} /> | ||
| </ReadOnlySideModalForm> | ||
| ) | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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.
The robot noticed this pre-existing bug: the point of this is to pre-cache the data for the IP pool cells, but it doesn't work because the IP pool cells use the errors-allowed query, which has a different query key. I confirmed that fixing this eliminates the loading state from the cells.