mirror of
https://github.com/retspen/webvirtcloud
synced 2026-12-03 17:36:05 +00:00
fix(instances): the VM list's bulk actions show in a bar while VMs are chosen
The actions on the chosen VMs stood above the table at all times, as two rows of disabled buttons and empty text boxes. They are now a bar at the foot of the window that appears once a VM is chosen and names how many are. The snapshot name and the tag are asked in small menus of the bar, and the table's head has the box that chooses the VMs shown.
This commit is contained in:
parent
85c727d397
commit
3167cf12fe
9 changed files with 92 additions and 41 deletions
|
|
@ -198,6 +198,9 @@ class BulkPowerTestCase(TransactionTestCase):
|
|||
(form,) = page.xpath("//form[@id='bulk-power']")
|
||||
self.assertEqual(form.get("action"), reverse("instances:bulk_power"))
|
||||
self.assertEqual(form.xpath(".//button[@name='action'][not(@formaction)]/@value"), ["start", "shutdown", "force_off"])
|
||||
# a bar shown while VMs are chosen; the table's head chooses those shown
|
||||
self.assertIsNotNone(form.get("hidden"))
|
||||
self.assertTrue(page.xpath("//thead//input[@id='bulk-power-shown']"))
|
||||
# an owner: a box on their own VM only
|
||||
owner = get_user_model().objects.create_user("bp-lister", password="pw")
|
||||
UserInstance.objects.create(instance=self.vms[1], user=owner)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue