mirror of
https://github.com/retspen/webvirtcloud
synced 2026-12-03 17:36:05 +00:00
fix: the user list, a user's VMs and the SSH keys come in name order
The user list counts API tokens, and a query with a count has no order of its own: PostgreSQL lists the users in any order. A user's page listed the VMs and the SSH keys as stored, so did the profile and the VM page's key choice.
This commit is contained in:
parent
94181cfc14
commit
72a2e448d4
5 changed files with 26 additions and 5 deletions
|
|
@ -307,7 +307,7 @@ def _instance_page(request, pk, instance, compute):
|
|||
computes_count = computes.count()
|
||||
# the add-owner choices: users who are not owners yet; a superuser can use every VM
|
||||
users = User.objects.filter(is_superuser=False).exclude(userinstance__instance=instance).order_by("username")
|
||||
publickeys = UserSSHKey.objects.filter(user_id=request.user.id)
|
||||
publickeys = UserSSHKey.objects.filter(user_id=request.user.id).order_by("keyname")
|
||||
# The console form renders the VNC password, so only users who may manage
|
||||
# console settings get the form (and the password) at all.
|
||||
can_manage_console = utils.can_manage_console(request.user, instance)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue