packagedrone
packagedrone copied to clipboard
Implement multi delete
It should be possible to delete multiple artifacts with a single UI operation.
I implemented this feature in a past project. I would suggest the following change:
- Add extra column with checkboxes

- If any checkbox is selected, then, the DELETE would show up (like GMail).
- If the user press DELETE, a confirmation dialog would show up listing the selected keys to be deleted.
- If confirmed, it would be just a matter of looping over an array of ids to delete, calling the
/pgp.sign.managed/ID_TO_DELETE/delete"URL with some JS
I think you did have a look at the wrong page. True, this view could also have multi delete :wink:
However, this functionality would be more important to the "artifacts" view:

As you can see, not all entries can be deleted. Some are "virtual" and only their parents can be deleted. This is not true for all children, but there is a method to find that out.
Also deleting them one by one from the UI using JavaScript is ok for the PGP keys, but for the artifacts this could cause serious performance issues. After modifying operations, channels may get "aggregated", meaning repository indexes being rebuilt. Doing this one by one would cause a lot of aggregation runs. Therefore the server should receive a full set IDs to delete. It can to this in one operation and so there should only be one aggregation run necessary.
Jesus Christ, sorry about the confusion... I totally mixed this issue with #22 (a warning signal that I should be sleeping instead of writing by that time haha)