Skip to content

Commit 8652167

Browse files
committed
Simplify the capability names logic in webUI
- Update the names in `Capabilities` interface - Conversion is done in backend, so the frontend doesn't need to map the old names to new ones
1 parent 0e2dc1d commit 8652167

File tree

2 files changed

+6
-14
lines changed

2 files changed

+6
-14
lines changed

web_ui/frontend/components/CapabilitiesDisplay.tsx

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export const CapabilitiesChip = ({
5555
}}
5656
>
5757
<Typography variant={'body2'}>
58-
{CAPABILITY_LABEL_MAP[name] || name}
58+
{name}
5959
</Typography>
6060
<Box display={'flex'}>
6161
{value ? <Check fontSize='small' /> : <Clear fontSize='small' />}
@@ -74,11 +74,3 @@ export const CapabilityChipStyle = {
7474
border: '1px 1px solid black',
7575
backgroundColor: green[300],
7676
};
77-
78-
const CAPABILITY_LABEL_MAP: Record<string, string> = {
79-
PublicRead: 'PublicReads',
80-
Read: 'Reads',
81-
Write: 'Writes',
82-
Listing: 'Listings',
83-
FallBackRead: 'DirectReads',
84-
};

web_ui/frontend/types.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
export interface Capabilities {
2-
PublicRead: boolean;
3-
Read: boolean;
4-
Write: boolean;
5-
Listing: boolean;
6-
FallBackRead: boolean;
2+
PublicReads: boolean;
3+
Reads: boolean;
4+
Writes: boolean;
5+
Listings: boolean;
6+
DirectReads: boolean;
77
}
88

99
export interface TokenGeneration {

0 commit comments

Comments
 (0)