mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-09 20:59:03 +00:00
acrn-config: assign VM IDs for dynamic scenario and launch setting
When dynamically creating or adding or deleting VMs, acrn config app will assign VM IDs for the VMs with the orders of prelaunched VMs and SOS VM and postlaunched VMs to be consistent with the VM order of vm_configs in vm configuration. When dynamically creating launch scripts, acrn config app will let users to specify the VM ID before launch setting. Tracked-On: #4641 Signed-off-by: Shuang Zheng <shuang.zheng@intel.com> Acked-by: Terry Zou <terry.zou@intel.com>
This commit is contained in:
@@ -348,7 +348,7 @@ $().ready(function(){
|
||||
|
||||
$(document).on('click', "#add_launch_submit", function() {
|
||||
var curr_vm_id = $(this).data('id');
|
||||
save_launch('add_vm:'+curr_vm_id)
|
||||
save_launch('add_vm:'+curr_vm_id);
|
||||
});
|
||||
|
||||
$('#add_launch_script').on('click', function() {
|
||||
@@ -364,6 +364,31 @@ $().ready(function(){
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('change', "select#scenario_name", function() {
|
||||
data = {scenario_name: $(this).val(),
|
||||
launch_name: $('text#old_launch_name').text()};
|
||||
$.ajax({
|
||||
type : "POST",
|
||||
contentType: "application/json;charset=UTF-8",
|
||||
url : "../get_post_launch_vms",
|
||||
data : JSON.stringify(data),
|
||||
success : function(result) {
|
||||
console.log(result);
|
||||
vm_list = result.vm_list
|
||||
$('select#add_launch_type').empty().selectpicker('refresh');
|
||||
for(i in vm_list) {
|
||||
var option = vm_list[i][1]+' ( ID : '+vm_list[i][0]+' )'
|
||||
$('select#add_launch_type').append(
|
||||
'<option value="'+option+'">'+option+'</option>').selectpicker('refresh');
|
||||
}
|
||||
},
|
||||
error : function(e){
|
||||
console.log(e.status);
|
||||
console.log(e.responseText);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$("select[ID$='vuart:id=1,base']").change(function(){
|
||||
var id = $(this).attr('id');
|
||||
var value = $(this).val();
|
||||
@@ -416,6 +441,11 @@ $().ready(function(){
|
||||
})
|
||||
|
||||
|
||||
$(window).load(function () {
|
||||
$("select#scenario_name").change();
|
||||
});
|
||||
|
||||
|
||||
function show_com_target(id, value) {
|
||||
|
||||
if(id==null || id=='undefined') {
|
||||
|
Reference in New Issue
Block a user