1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-12-02 08:56:07 +00:00

fix(instances): an empty panel says what to do next

- The VM list with no VMs no longer also says that no VM matches the
  search and the state.
- The New VM dialog with no compute yet says to add the first host, with a
  link to the Computes page (and links there when none is reachable).
- The new VM page on a host without a running storage pool or a network
  says what to add or start and where, instead of "You haven't defined any
  storage pools" (also when pools exist but are stopped) and "network
  pools".
This commit is contained in:
catborise 2026-11-07 16:46:03 +03:00
parent 0b4a601ecb
commit 129327358d
10 changed files with 278 additions and 225 deletions

View file

@ -2581,9 +2581,9 @@ def create_instance(request, compute_id, arch, machine):
tpm_support = bool(conn.get_tpm_model(arch, machine))
if not storages:
raise util.OperationError(_("You haven't defined any storage pools"))
raise util.OperationError(_("This host has no running storage pool for the VM's disks: add or start one on its Storage page."))
if not networks:
raise util.OperationError(_("You haven't defined any network pools"))
raise util.OperationError(_("This host has no network for the VM: add one on its Networks page."))
vm_form = NewVMForm(initial={
# a default this host does not offer is no choice: the select asks for one