Skip to content
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

Fixes 4743: add delete and bulk delete of snapshots #373

Merged
merged 4 commits into from
Nov 29, 2024

Conversation

dominikvagner
Copy link
Contributor

@dominikvagner dominikvagner commented Nov 5, 2024

Summary

This PR adds the UI changes needed for manual snapshot deletion. In the snapshot list modal a checkbox and a kebab menu has been added for each snapshot which can be used to bulk delete or single delete the chosen snapshots.
New "delete snapshots confirmation" modal has been added where the to be deleted snapshots are displayed together with any templates that use those snapshots, so that the users are warned this change will also affect those templates. A separate warning alert is displayed in that case.

Related ticket: [HMS-4743]

Testing steps

  • Workflow checks:

    • Create a repo with at least 3 snaphshots. (you can use the zoo fakerepos and just change numbers when editing the repo)
    • Create at least 2 templates using the custom repo, where one is use_latest and the other has a date in the past.
    • Verify that the snapshot(s) and the templates using them are present in the delete snapshots modal, or not present in the case of the "middle" snapshot.
    • Delete a single snapshot and verify the repo, template and snapshots content gets updated.
    • Reset the repo's snapshots, and bulk delete multiple snapshots and verify the same is true.
  • General checks:

    • Verify you can't delete all the snapshots for a repository.
    • Verify you can't delete snapshots without repoWrite permissions.
    • Verify you can't delete snapshots of RH repositories.

@jlsherrill
Copy link
Member

@swadeley
Copy link
Member

Hi @dominikvagner, please rebase

@dominikvagner dominikvagner marked this pull request as ready for review November 26, 2024 12:42
@Andrewgdewar
Copy link
Contributor

/retest

@Andrewgdewar
Copy link
Contributor

this should likely be moved to inclose the FlexItem to prevent the following:

Screenshot 2024-11-28 at 1 58 48 PM Screenshot 2024-11-28 at 1 58 59 PM

Copy link
Contributor

@Andrewgdewar Andrewgdewar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack, pending the conclusion of the above comments.

@dominikvagner
Copy link
Contributor Author

this should likely be moved to inclose the FlexItem to prevent the following:

Screenshot 2024-11-28 at 1 58 48 PM Screenshot 2024-11-28 at 1 58 59 PM

fixed! 🫡

Copy link
Contributor

@Andrewgdewar Andrewgdewar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@mayurilahane
Copy link
Contributor

/retest

@mayurilahane
Copy link
Contributor

testing these changes after merging the PR

@mayurilahane mayurilahane merged commit 186335f into content-services:main Nov 29, 2024
5 of 6 checks passed
@mayurilahane
Copy link
Contributor

UI has checkbox and kebab
image
image

New modal name "delete snapshot confirmation" with templates associated with it
image

Verify you can't delete all the snapshots for a repository.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants