mirror of
https://github.com/retspen/webvirtcloud
synced 2026-11-09 19:56:48 +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:
parent
0b4a601ecb
commit
129327358d
10 changed files with 278 additions and 225 deletions
|
|
@ -162,6 +162,11 @@ class CreateInstanceViewTests(TestCase):
|
|||
|
||||
self.assertEqual(response.status_code, 200)
|
||||
conn.get_firmwares.assert_called_once_with("x86_64", "q35")
|
||||
# a fresh host: what to do, not that the user defined nothing
|
||||
self.assertContains(response, "This host has no running storage pool for the VM's disks: add or start one on its Storage page.")
|
||||
conn.get_storages.return_value = ["default"]
|
||||
response = self.client.get(reverse("instances:create_instance", args=[compute.id, "x86_64", "q35"]))
|
||||
self.assertContains(response, "This host has no network for the VM: add one on its Networks page.")
|
||||
|
||||
|
||||
class NicMacsTestCase(SimpleTestCase):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue