mirror of
https://github.com/retspen/webvirtcloud
synced 2026-11-11 04:36:48 +00:00
fix(instances): a running VM's boot order, video and console forms show the pending settings
On an active VM the boot order editor, the video model select and the console form showed the running VM: a pending boot order, video model or console setting looked unset, and the boot order editor offered devices of the running VM only. Choosing one of those cleared the pending order, since the setter dropped the old order and skipped devices it could not find. They now read the persistent definition (get_bootmenu, get_bootorder, get_media_devices, get_video_model and the console getters take config=), and set_bootorder refuses a device that is not in it before it changes anything.
This commit is contained in:
parent
042530fbfd
commit
d0bd2ac32b
9 changed files with 152 additions and 35 deletions
|
|
@ -255,21 +255,21 @@
|
|||
});
|
||||
$(document).ready(function () {
|
||||
// set current console keymap or fall back to default
|
||||
var keymap = "{{ instance.console_keymap }}";
|
||||
var keymap = "{{ instance.config_console_keymap }}";
|
||||
if (keymap != '') {
|
||||
$("#console_select_keymap option[value='" + keymap + "']").prop('selected', true);
|
||||
}
|
||||
});
|
||||
$(document).ready(function () {
|
||||
// set current console listen address or fall back to default
|
||||
var console_listener_address = "{{ instance.console_listener_address }}";
|
||||
var console_listener_address = "{{ instance.config_console_listener_address }}";
|
||||
if (console_listener_address != '') {
|
||||
$("#console_select_listener_address option[value='" + console_listener_address + "']").prop('selected', true);
|
||||
}
|
||||
});
|
||||
$(document).ready(function () {
|
||||
// get video model or fall back to default
|
||||
let video_model = "{{ instance.video_model }}";
|
||||
let video_model = "{{ instance.config_video_model }}";
|
||||
if (video_model != '') {
|
||||
$("#video_model_select option[value='" + video_model + "']").prop('selected', true);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue