mirror of
https://github.com/retspen/webvirtcloud
synced 2026-12-03 17:36:05 +00:00
fix(ui): a block or a job's cancel asks first; every delete and save says it is done
- Block in the Users list asks first: the user is signed out and their API tokens are deleted, which unblocking does not bring back. Block and Unblock then say what they did. - Cancel on a job's page and in the job panel asks first, naming the job; the button says Cancel the job, apart from the dialog's Cancel. - Deleting a user or a group, removing a host from the panel or an owner from a VM, and deleting an interface, a network filter or a secret say so, as the other deletes do. - Renaming a tag and saving a VM's title and description say so.
This commit is contained in:
parent
00a44f7621
commit
e79817e7db
22 changed files with 247 additions and 39 deletions
|
|
@ -635,7 +635,9 @@ def compute_delete(request, compute_id):
|
|||
compute = get_object_or_404(Compute, pk=compute_id)
|
||||
if request.method == "POST":
|
||||
with audit(request, compute, f"Compute {compute.name} ({compute.hostname})", "delete"):
|
||||
compute.delete()
|
||||
deleted, _rows = compute.delete()
|
||||
if deleted: # not by another request just before
|
||||
messages.success(request, _("Host %(host)s removed from the panel") % {"host": compute.name})
|
||||
return redirect("computes")
|
||||
|
||||
return render(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue