1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-11-08 19:26:48 +00:00
webvirtcloud/instances/tests
catborise dba41f97f3 fix(instances): a refused VM create form comes back with what was entered
When the server refused a VM create submission (a field error, a busy
resource, a reused submission key, an existing VM name, a missing MAC
for a new disk), the page came back on its first tab with the flavor
dialog closed and every entered value gone: the hand-written fields
showed fixed defaults, and the errors sat in a block at the top of the
page, outside #messages and tied to no field.

The view builds one NewVMForm per create form on the page (custom,
template, one per flavor; create_forms), each with its own defaults; a
hidden form_id, which is also the prefix of the form's field ids, names
the submitted one, and it comes back bound. Every field renders from its
own form and is marked by two small template tags (form_fields:
error_attrs, field_error) when refused; a summary at the top of the
form lists all of its errors, also those of fields it keeps hidden. The
submitted tab or flavor dialog, marked data-form-id, reopens with any
"Advanced" section that holds an error; a reopened dialog shows the
messages too; the template form gets its pool, template and storage
back. base.html's error focus is a function that walks the places an
error can be, and a page can call it once it is set up, as the create
page does. form_id changes nothing in how a POST is processed; one of
an unknown form (a flavor deleted since) has its errors in the
messages. The default video now applies to every create form.

The custom form's disks and networks are not restored yet.
2026-10-20 08:12:25 +03:00
..
__init__.py test: each app keeps its tests in a tests package 2026-10-12 15:17:30 +03:00
create_page.py fix(instances): a refused VM create form comes back with what was entered 2026-10-20 08:12:25 +03:00
livetest.py docs: a running VM can be cloned 2026-10-16 16:52:38 +03:00
test_change_network.py test: each app keeps its tests in a tests package 2026-10-12 15:17:30 +03:00
test_change_xml.py test: each app keeps its tests in a tests package 2026-10-12 15:17:30 +03:00
test_clone_disks.py feat(instances): VM clone runs as a job 2026-10-15 09:28:43 +03:00
test_clone_job.py feat(instances): a running VM can be cloned 2026-10-16 16:52:38 +03:00
test_clone_permission.py feat(instances): VM clone runs as a job 2026-10-15 09:28:43 +03:00
test_console_listener.py test: each app keeps its tests in a tests package 2026-10-12 15:17:30 +03:00
test_console_rule.py test: each app keeps its tests in a tests package 2026-10-12 15:17:30 +03:00
test_console_settings_access.py test: each app keeps its tests in a tests package 2026-10-12 15:17:30 +03:00
test_create_dialog_cpu.py test: each app keeps its tests in a tests package 2026-10-12 15:17:30 +03:00
test_create_form_input.py fix(instances): a refused VM create form comes back with what was entered 2026-10-20 08:12:25 +03:00
test_create_instance.py fix(instances): a custom VM gets the MAC addresses its create form shows 2026-10-19 22:24:57 +03:00
test_create_job.py feat(instances): VM create runs as a job, also in the API 2026-10-15 09:28:43 +03:00
test_create_page_js.py fix(instances): a refused VM create form comes back with what was entered 2026-10-20 08:12:25 +03:00
test_create_rollback.py feat(instances): VM create runs as a job, also in the API 2026-10-15 09:28:43 +03:00
test_create_wizard_url.py test: each app keeps its tests in a tests package 2026-10-12 15:17:30 +03:00
test_destroy.py refactor(computes): the lock helpers take claims instead of file locks 2026-10-14 23:27:57 +03:00
test_detail_reads.py test: each app keeps its tests in a tests package 2026-10-12 15:17:30 +03:00
test_detail_unreachable.py feat(operations): jobs page 2026-10-14 23:27:57 +03:00
test_disk_isolation.py test: each app keeps its tests in a tests package 2026-10-12 15:17:30 +03:00
test_drbd_target.py test: each app keeps its tests in a tests package 2026-10-12 15:17:30 +03:00
test_error_handling.py feat(instances): migration runs as a job 2026-10-16 07:57:02 +03:00
test_gstfsd.py test: each app keeps its tests in a tests package 2026-10-12 15:17:30 +03:00
test_index.py fix(instances): the grouped instance list without computes has a table body 2026-10-19 15:57:09 +03:00
test_index_host_alerts.py test: each app keeps its tests in a tests package 2026-10-12 15:17:30 +03:00
test_list_rpc.py test: each app keeps its tests in a tests package 2026-10-12 15:17:30 +03:00
test_list_unreachable.py test: each app keeps its tests in a tests package 2026-10-12 15:17:30 +03:00
test_live_clone.py docs: a running VM can be cloned 2026-10-16 16:52:38 +03:00
test_live_create.py feat(instances): VM create runs as a job, also in the API 2026-10-15 09:28:43 +03:00
test_live_dataloss.py docs: snapshot create and revert run as jobs 2026-10-15 14:21:32 +03:00
test_live_disk_resize.py test: each app keeps its tests in a tests package 2026-10-12 15:17:30 +03:00
test_live_guest.py docs: snapshot create and revert run as jobs 2026-10-15 14:21:32 +03:00
test_live_iscsi.py test: a LUN of an iSCSI pool attaches live as a block disk 2026-10-18 21:32:52 +03:00
test_live_iso.py test: each app keeps its tests in a tests package 2026-10-12 15:17:30 +03:00
test_live_jobs.py feat(instances): a shut-off UEFI VM can be migrated 2026-10-16 21:05:23 +03:00
test_live_lvm.py fix(instances): a disk on an LVM pool is not resized, the page says so instead of failing 2026-10-18 21:10:06 +03:00
test_live_snapshots.py feat(instances): external snapshot delete runs as a job 2026-10-14 23:27:57 +03:00
test_live_xml.py test: each app keeps its tests in a tests package 2026-10-12 15:17:30 +03:00
test_live_xml_effects.py feat(instances): choose VNC or the serial console on the VM page 2026-10-17 19:48:58 +03:00
test_migrate_form.py feat(instances): migration runs as a job 2026-10-16 07:57:02 +03:00
test_migrate_job.py feat(instances): a running migration can be cancelled; its time limit goes 2026-10-16 07:57:02 +03:00
test_migration_bookkeeping.py feat(instances): a running migration can be cancelled; its time limit goes 2026-10-16 07:57:02 +03:00
test_migration_log.py feat(instances): migration runs as a job 2026-10-16 07:57:02 +03:00
test_missing_fields.py test: each app keeps its tests in a tests package 2026-10-12 15:17:30 +03:00
test_moved_while_waiting.py feat(instances): VM clone runs as a job 2026-10-15 09:28:43 +03:00
test_new_disk_name.py test: each app keeps its tests in a tests package 2026-10-12 15:17:30 +03:00
test_page_controls.py feat(instances): a running VM can be cloned 2026-10-16 16:52:38 +03:00
test_pending_edits.py feat(instances): external snapshots use libvirt's snapshot API 2026-10-12 15:25:44 +03:00
test_quota.py test: each app keeps its tests in a tests package 2026-10-12 15:17:30 +03:00
test_quota_lock.py test: each app keeps its tests in a tests package 2026-10-12 15:17:30 +03:00
test_root_pass.py test: each app keeps its tests in a tests package 2026-10-12 15:17:30 +03:00
test_security_mutations.py feat(instances): migration runs as a job 2026-10-16 07:57:02 +03:00
test_snapshot_delete_job.py feat(instances): external snapshot delete runs as a job 2026-10-14 23:27:57 +03:00
test_snapshot_jobs.py feat(instances): snapshot revert runs as a job 2026-10-15 14:21:32 +03:00
test_snapshot_views.py docs: snapshot create and revert run as jobs 2026-10-15 14:21:32 +03:00
test_states.py test: each app keeps its tests in a tests package 2026-10-12 15:17:30 +03:00
test_stats_sample.py build: Chart.js 4.5.1 2026-10-17 13:19:43 +03:00
test_template_flag.py test: each app keeps its tests in a tests package 2026-10-12 15:17:30 +03:00
test_template_quota.py test: each app keeps its tests in a tests package 2026-10-12 15:17:30 +03:00
test_template_rules.py test: each app keeps its tests in a tests package 2026-10-12 15:17:30 +03:00
test_update_console.py feat(instances): choose VNC or the serial console on the VM page 2026-10-17 19:48:58 +03:00
test_views.py docs: snapshot create and revert run as jobs 2026-10-15 14:21:32 +03:00
test_xss.py feat(console): a working serial console 2026-10-17 19:43:09 +03:00