1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-11-10 12:16:49 +00:00
webvirtcloud/instances/templates
catborise 96141c3ef7 fix(instances): a refused custom VM form comes back with its disks and networks
A refused custom create form came back with its image pool unselected
and its disk and network lists empty: every disk's device and bus and
every MAC had to be chosen again. Adding a disk or a network also reset
the rows already there: each addition rebuilt all rows from an HTML
string, so the earlier disks fell back to the default device and bus
and every NIC got a new random MAC, a typed one included.

The view sends the submitted pool, disks (volume, device, bus) and
networks (name, MAC) back with json_script, built field by field from
the POST (submitted_custom_lists). The rows are cloned from two
<template> elements and filled with textContent and listeners; one
function, sync_custom_lists, derives the images, networks and mac
fields and the device<i>/bus<i> names from the rows in order. Adding or
removing a row leaves the others as they are, and a random MAC that
arrives after one was typed is dropped. On load the page selects the
pool, waits for its volumes, rebuilds each disk with its device, waits
for that device's bus list and selects its bus, rebuilds the networks
with their MACs, and then focuses the first error. A submitted value the
loaded lists no longer have stays selected. The bus and volume loaders
return their requests so that the page can wait on them.
2026-10-20 21:24:36 +03:00
..
instances fix(instances): a refused VM create form comes back with what was entered 2026-10-20 08:12:25 +03:00
add_instance_network_block.html fix(templates): pages parse without markup errors, element IDs are unique 2026-10-19 07:49:25 +03:00
add_instance_owner_block.html logger updates (#31) 2023-08-09 09:20:18 +03:00
add_instance_volume.html fix(templates): pages parse without markup errors, element IDs are unique 2026-10-19 07:49:25 +03:00
allinstances.html refactor(instances): the instance page drops scripts for console fields it no longer has 2026-10-19 20:12:26 +03:00
allinstances_index_grouped.html fix(templates): icon-only buttons, selects and delete pages have accessible names 2026-10-19 16:15:06 +03:00
allinstances_index_nongrouped.html fix(instances): every VM state has a label and the actions it allows 2026-10-05 19:34:30 +03:00
bottom_bar.html fix(instances): the VM page opens the tab a redirect points to, and host links are for administrators 2026-10-08 08:50:21 +03:00
create_flav_block.html fix(templates): icon-only buttons, selects and delete pages have accessible names 2026-10-19 16:15:06 +03:00
create_inst_block.html fix(templates): the fields of the create modals are named by their labels 2026-10-19 20:01:36 +03:00
create_instance_w1.html fix(templates): icon-only buttons, selects and delete pages have accessible names 2026-10-19 16:15:06 +03:00
create_instance_w2.html fix(instances): a refused custom VM form comes back with its disks and networks 2026-10-20 21:24:36 +03:00
instance.html refactor(instances): the instance page drops scripts for console fields it no longer has 2026-10-19 20:12:26 +03:00
instance_actions.html fix(instances): every VM state has a label and the actions it allows 2026-10-05 19:34:30 +03:00
instance_state.html fix(instances): every VM state has a label and the actions it allows 2026-10-05 19:34:30 +03:00