From 0fd3e69c8ef7e495b679cc03f2069bac9634a238 Mon Sep 17 00:00:00 2001 From: catborise Date: Sat, 31 Oct 2026 17:44:20 +0300 Subject: [PATCH] feat(instances): the VM page's add dialogs in the panel's dialog look The Add disk, Add network device and bandwidth dialogs of the VM page set their labels in a narrow column beside the fields and closed with a grey Close: Add disk split "GB" over two lines and offered an unexplained Metadata box, its existing-volume pool was a dropdown of links that wrote a hidden field; the network list prefixed every choice with "Network" or "Interface"; the bandwidth fields asked for "kilobytes" where libvirt counts KiB/s and KiB. Now their labels sit above the fields, tied to them, in two columns. Add disk is one form whose source, New disk or Existing volume, is a radio card as in the new VM form, the chosen source's fields shown and sent and its action taken; the size has a GiB suffix and "Preallocate metadata (qcow2)", the existing volume's pool is a select that loads its volumes, the bus and the cache are shared. Add network device picks its source from Networks and Interfaces groups and says how its MAC is filled; the bandwidth limit names its units and when a running VM gets it. Move says when the host has no other pool and is disabled then. Every dialog closes with Cancel and its action; the posted fields are unchanged. --- .../templates/add_instance_network_block.html | 84 +++--- .../templates/add_instance_owner_block.html | 5 +- instances/templates/add_instance_volume.html | 250 ++++++++---------- instances/templates/instance.html | 25 +- instances/templates/instances/move_disk.html | 8 +- instances/tests/test_pending_edits.py | 32 +++ instances/tests/test_xss.py | 1 - networks/templates/add_network_qos.html | 63 ++--- 8 files changed, 220 insertions(+), 248 deletions(-) diff --git a/instances/templates/add_instance_network_block.html b/instances/templates/add_instance_network_block.html index 62028d35..7de7b351 100644 --- a/instances/templates/add_instance_network_block.html +++ b/instances/templates/add_instance_network_block.html @@ -3,63 +3,59 @@ {% if request.user.is_superuser %} - + {% endif %} diff --git a/instances/templates/add_instance_owner_block.html b/instances/templates/add_instance_owner_block.html index 58d91c0e..8c971b2f 100644 --- a/instances/templates/add_instance_owner_block.html +++ b/instances/templates/add_instance_owner_block.html @@ -3,13 +3,12 @@ {% if request.user.is_superuser %} -