-
Notifications
You must be signed in to change notification settings - Fork 402
upcoming: [UIE-10729] β Parity between image options in Rebuild Linode dialog with privateImageSharing flag on & off #13568
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
Changes from all commits
c61bace
e798a7d
04f8760
7baf3e9
07c2b06
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "@linode/manager": Upcoming Features | ||
| --- | ||
|
|
||
| Private Image Sharing: include public images in images table in Linode Rebuild dialog ([#13568](https://github.com/linode/manager/pull/13568)) |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -56,6 +56,10 @@ interface Props { | |||||||||||||||||||||||
| * Error message to display above the table, e.g. from form validation. | ||||||||||||||||||||||||
| */ | ||||||||||||||||||||||||
| errorText?: string; | ||||||||||||||||||||||||
| /** | ||||||||||||||||||||||||
| * Determines whether additional filtering of images should be applied, typically if there is a StackScript selected. | ||||||||||||||||||||||||
| */ | ||||||||||||||||||||||||
| filter?: (image: Image) => boolean; | ||||||||||||||||||||||||
| /** | ||||||||||||||||||||||||
| * Callback fired when the user selects an image row. | ||||||||||||||||||||||||
| */ | ||||||||||||||||||||||||
|
|
@@ -79,6 +83,7 @@ export const ImageSelectTable = (props: Props) => { | |||||||||||||||||||||||
| const { | ||||||||||||||||||||||||
| currentRoute, | ||||||||||||||||||||||||
| errorText, | ||||||||||||||||||||||||
| filter, | ||||||||||||||||||||||||
| onSelect, | ||||||||||||||||||||||||
| pendoIDs, | ||||||||||||||||||||||||
| queryParamsPrefix, | ||||||||||||||||||||||||
|
|
@@ -121,19 +126,19 @@ export const ImageSelectTable = (props: Props) => { | |||||||||||||||||||||||
| }); | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| const { | ||||||||||||||||||||||||
| data: imagesData, | ||||||||||||||||||||||||
| data: _imagesData, | ||||||||||||||||||||||||
| error: imagesError, | ||||||||||||||||||||||||
| isFetching, | ||||||||||||||||||||||||
| isLoading, | ||||||||||||||||||||||||
| } = useAllImagesQuery( | ||||||||||||||||||||||||
| {}, | ||||||||||||||||||||||||
| { | ||||||||||||||||||||||||
| ...combinedFilter, | ||||||||||||||||||||||||
| is_public: false, | ||||||||||||||||||||||||
| type: 'manual', | ||||||||||||||||||||||||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this is sufficient to achieve parity because looking at its manager/packages/manager/src/features/Linodes/LinodesDetail/LinodeRebuild/Image.tsx Lines 57 to 67 in 56cab84
and the StackScript-based filtering is applied a few lines down. |
||||||||||||||||||||||||
| } | ||||||||||||||||||||||||
| ); | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| const imagesData = filter ? _imagesData?.filter(filter) : _imagesData; | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| const pagination = usePaginationV2({ | ||||||||||||||||||||||||
| clientSidePaginationData: imagesData, | ||||||||||||||||||||||||
| currentRoute, | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
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.
As follow up work, could we make this new table use proper API pagination?
The API supports X-Filtering the Images endpoint on label, tags, and region so I think it would be possible. It could pay dividends in the future for accounts with tons of images.
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.
I created UIE-10836