acrn-config: add UI to add or remove Kata VM for sdc scenario

add UI to add or remove Kata VM for sdc scenario, the added Kata VM
is based on the generic config xml.

Tracked-On: 4145
Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
Reviewed-by: Victor Sun <victor.sun@intel.com>
This commit is contained in:
Shuang Zheng
2019-11-25 16:09:46 +08:00
committed by wenlingz
parent 31d023e8f9
commit bb2218effc
4 changed files with 78 additions and 3 deletions

View File

@@ -323,6 +323,17 @@ $().ready(function(){
config_item.remove();
});
$('#remove_vm_kata').on('click', function() {
if(confirm("Do you want to remove the VM?")) {
save_scenario("remove_vm_kata");
}
});
$('#add_vm_kata').on('click', function() {
if(confirm("Do you want to add the Kata VM based on generic config?")) {
save_scenario("add_vm_kata");
}
});
})
@@ -362,7 +373,8 @@ function save_scenario(generator=null){
scenario_config = {
old_scenario_name: $("#old_scenario_name").text(),
new_scenario_name: $("#new_scenario_name").val()
new_scenario_name: $("#new_scenario_name").val(),
generator: generator
}
$("input").each(function(){
@@ -425,7 +437,7 @@ function save_scenario(generator=null){
validate_message = 'Scenario setting existed, saved successfully with a new name: '
+file_name+'\ninto acrn-hypervisor/misc/acrn-config/xmls/config-xmls/'+board_info+'/user_defined/.';
}
if(generator != null) {
if(generator=="generate_board_src" || generator=="generate_scenario_src") {
commit_confirm_message = validate_message+'\n\nGenerate source codes from scenario setting.'
+'\n\nDo you want to commit changes to local tree?'
commit_confirm = 'no'