-
Notifications
You must be signed in to change notification settings - Fork 33
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
feat(storage) crud for custom volume snapshots [WD-7576] #563
Conversation
Demo starting at https://lxd-ui-563.demos.haus |
53b12b0
to
afe4c3f
Compare
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.
This already works nicely on all the happy paths. I did a bit of QA and found some rough edges, see below comments for details.
afe4c3f
to
f48af90
Compare
945e540
to
40f4529
Compare
src/pages/storage/actions/snapshots/VolumeSnapshotBulkDelete.tsx
Outdated
Show resolved
Hide resolved
src/pages/instances/actions/snapshots/InstanceAddSnapshotBtn.tsx
Outdated
Show resolved
Hide resolved
Everything looks good to me, great work! |
be67cc5
to
660ded8
Compare
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.
Thanks for all the changes, this is looking better and better.
Now, I finished the review with some new discoveries, when those are settled this should be ready to merge.
660ded8
to
d916a44
Compare
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.
Thanks for the changes.
Some suggestions for the captions, trying to tailor the copy closer to the setting the user has to flip to enable it.
src/pages/instances/actions/snapshots/InstanceAddSnapshotBtn.tsx
Outdated
Show resolved
Hide resolved
- removed snapshot volume type from volumes list filter. - clicking on volume name will redirect to instance detail page if it's a container or vm volume, redirect to image list page if it's a image volume and redirect to volume details if it's a custom volume. - added the snapshots column to the volumes list table. Number of snapshots per volume is calculated based on number of snapshot volumes that matches each volume name. - CTA for storage volume list table. For custom storage volumes, user can add snapshots or delete volume. For instance volumes, link to instance detail and for image volumes link to images list. Show CTA only on hover volume row. - Generalised snapshot form modal - Snapshot form modal will now be rendered using portal - Added storage volume snapshot api - Create instance and custom volume snapshots using the generalised snapshot form modal - Fixed issue with snapshot form modal retaining stale states after snapshot created, this was an issue with instance snapshot as well - Implemented snapshots tab for storage volume detail page (heavy reference to the snapshots tab for instnace detail page) - Code cleanup - Fixed issue with not able to sort by the snapshots column on the storage volume list table - Fixed issue with disabling snapshot creation if project is restricted - Fixed tooltip wording for add snapshot CTA button on volume list table - Fixes based on David's comments: - Error handling for instance and volume snapshot creation when project is restricted - Moved VolumeSnapshotsForm out of the generic component folder - Added tests for custom volume snapshot crud - More changes for David's review: - unique naming for instance and volume snapshot api methods - removed PortalModalBtn and created addition button components for readability - each file should contain one component - moved request to get volume snapshots from StorageVolumeDetail to StorageVolumeSnapshots component - removed loadCustomVolumeAndSnapshots.tsx as it is not needed - removed unecessary refetchOnMount - removed description input for custom storage volume snapshots - improved logic for determining if snapshot is disabled for the project - split snapshots utils into generic, instance and volume specific files - updated LxdSyncResponse interface with generic type - handle undefined case for isSnapshotDisabled in utils/snapshots.tsx - consistent props destructuring for components throughout - removed useInstanceSnapshot and useVolumeSnapshot hooks - moved NotificationRow below TabLinks in StorageVolumeDetail.tsx - improve small screen viewing for storage volumes table with collapsed columns - added disable snapshot creation tooltips for instance and volume snapshots - minor styling fixes - spelling fix - moved generateLinkForVolumeDetail from utils file to StorageVolumeNameLink component Signed-off-by: Mason Hu <mason.hu@canonical.com>
d916a44
to
8b05fb3
Compare
Done
Review Changes
QA