-
Notifications
You must be signed in to change notification settings - Fork 22
Add Fleet Access page #3095
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
Merged
Add Fleet Access page #3095
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
3752493
Add System Access page
charliepark ec6f242
a few small refactors
charliepark 376b153
Remove some casts; change import
charliepark fb0e217
List system roles with least permissions first, like silo/project
charliepark 2c912ab
Fix a few small inconsistencies between System / Silo / Project acces…
charliepark cb3680b
Add warning about deleting own access
charliepark 0f0f6b4
copy adjustment
charliepark d8715ef
Clean up a few bits of legacy logic
charliepark fb50d25
use getEffectiveRole to handle edge case in role assignments
charliepark 7a9ebbc
Add test for limited permission user
charliepark 518b6e6
tweak test for error message
charliepark 9423ea7
simplify test
charliepark 636b90e
R -> Role for generic, to cut down on R[emeda] confusion/collisions
charliepark 83c12c4
R -> Role for generic, to cut down on R[emeda] confusion/collisions
charliepark 99d0009
type predicate to specify fleetRoles as FleetRole[] instead of RoleKey[]
charliepark c3d6755
Use more precise FleetRole type; add warning on Silo Access removal
charliepark 8ec9546
tweaks
david-crespo 5260d0c
convert locators in e2e test to getByRole
david-crespo 4fd561b
fleet access
charliepark 56ec1fd
merge main and resolve conflict
charliepark 2f4bf12
fix TS issue
charliepark 09b03d6
Added placeholder copy about fleet role mapping to silos
charliepark 74246ea
Better copy on fleet role mappings
charliepark 4e4c42a
Refactor to eliminate `IpPoolSelector` (#3113)
david-crespo a0c5c41
tools: fix deploy-dogfood for pilot -r flag (#3114)
david-crespo f57ec49
SystemAccess -> FleetAccess, remove message for now
david-crespo 2cba589
merge mapped fleet roles into fleet access table
david-crespo 2bc8e49
refactor useMemo and use ts-pattern, say "any"
david-crespo 9429b8a
fall back to ID when we can't resolve user or group name
david-crespo 58fb35e
fix ancient bug (intro'd #1595) in fleet roles page, they were flipped!
david-crespo d2de1e1
comment on ID fallback and other stuff
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| /* | ||
| * 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 { SiloIpPool } from '@oxide/api' | ||
| import { Badge } from '@oxide/design-system/ui' | ||
|
|
||
| import { IpVersionBadge } from '~/components/IpVersionBadge' | ||
| import type { ListboxItem } from '~/ui/lib/Listbox' | ||
|
|
||
| /** Format a SiloIpPool for use as a ListboxField item */ | ||
| export function toIpPoolItem(p: SiloIpPool): ListboxItem { | ||
| const value = p.name | ||
| const selectedLabel = p.name | ||
| const label = ( | ||
| <div className="flex flex-col gap-1"> | ||
| <div className="flex items-center gap-1.5"> | ||
| {p.name} | ||
| {p.isDefault && <Badge color="neutral">default</Badge>} | ||
| <IpVersionBadge ipVersion={p.ipVersion} /> | ||
| </div> | ||
| {!!p.description && ( | ||
| <div className="text-secondary selected:text-accent-secondary">{p.description}</div> | ||
| )} | ||
| </div> | ||
| ) | ||
| return { value, selectedLabel, label } | ||
| } |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
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.