1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-11-11 12:46:49 +00:00

fix(instances): VM list columns, hosts for viewers, flavor units

- On a narrow screen the grouped list hid the User, VCPU and Memory
  headings but not the VMs' cells, so values sat under the wrong headings;
  the cells now hide with their headings. Memory says MiB.
- A user with the view_instances permission sees each VM's host in the
  list, as the host alerts already name them; the host page link stays a
  superuser's.
- A flavor's memory and disk are labelled MiB and GiB, and each value is at
  least 1, so "4" is no longer saved as a 4 MiB preset by mistake.
This commit is contained in:
catborise 2026-10-26 15:50:54 +03:00
parent 52d00e818b
commit b89f280076
6 changed files with 31 additions and 9 deletions

View file

@ -10,6 +10,11 @@ from .utils import nic_macs
class FlavorForm(forms.ModelForm):
# the units the create form fills in from a flavor
memory = forms.IntegerField(label=_("Memory (MiB)"), min_value=1)
vcpu = forms.IntegerField(label=_("vCPUs"), min_value=1)
disk = forms.IntegerField(label=_("Disk (GiB)"), min_value=1)
class Meta:
model = Flavor
fields = "__all__"