acrn-config: update config app with new xml folder

The folders for config xmls and scenario setting source code are moved
to misc/vm_configs/xmls and misc/vm_configs/board, misc/vm_configs/scenario,
so this patch is to update config path for these folders.

Tracked-On: #5077
Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
This commit is contained in:
Shuang Zheng 2020-07-22 10:08:58 +08:00 committed by wenlingz
parent d28520a70b
commit ba7680d2a3
2 changed files with 12 additions and 12 deletions

View File

@ -10,4 +10,4 @@ import os
BOARD_INFO = None
BOARD_TYPE = None
SCENARIO = None
CONFIG_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'xmls', 'config-xmls')
CONFIG_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', '..', 'vm_configs', 'xmls', 'config-xmls')

View File

@ -655,7 +655,7 @@ function create_setting(type, default_name, name, mode){
create_flag = true
if(exist == "yes") {
overwirte_confirm_message = 'Setting name: ' + create_config['create_name'] + ' existed in ' +
'acrn-hypervisor/misc/acrn-config/xmls/config-xmls/'+board_info+'/user_defined/.\n'+
'acrn-hypervisor/misc/vm_configs/xmls/config-xmls/'+board_info+'/user_defined/.\n'+
'Do you want to overwrite it?\nClick OK to overwrite it; click Cancel to rename it.'
if(!confirm(overwirte_confirm_message)) {
create_flag = false
@ -771,7 +771,7 @@ function save_scenario(generator=null){
create_flag = true
if(exist == "yes") {
overwirte_confirm_message = 'Setting name: ' + scenario_config['create_name'] + ' existed in ' +
'acrn-hypervisor/misc/acrn-config/xmls/config-xmls/'+board_info+'/user_defined/.\n'+
'acrn-hypervisor/misc/vm_configs/xmls/config-xmls/'+board_info+'/user_defined/.\n'+
'Do you want to overwrite it?\nClick OK to overwrite it; click Cancel to rename it.'
if(!confirm(overwirte_confirm_message)) {
create_flag = false
@ -801,17 +801,17 @@ function save_scenario(generator=null){
if(no_err == true && status == 'success') {
file_name = result.file_name;
validate_message = 'Scenario setting saved successfully with name: '
+file_name+'\ninto acrn-hypervisor/misc/acrn-config/xmls/config-xmls/'+board_info+'/user_defined/.'
+file_name+'\ninto acrn-hypervisor/misc/vm_configs/xmls/config-xmls/'+board_info+'/user_defined/.'
if(result.rename==true) {
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/.';
+file_name+'\ninto acrn-hypervisor/misc/vm_configs/xmls/config-xmls/'+board_info+'/user_defined/.';
}
if(generator=="generate_config_src") {
var src_path = $("input#src_path").val();
generate_flag = true;
if(src_path == null || src_path == '') {
overwirte_confirm_message = 'The Source Path for configuration files is not set.\n' +
'Do you want to generate them into the default path: hypervisor/arch/x86/configs/ and hypervisor/scenarios/,\n'+
'Do you want to generate them into the default path: acrn-hypervisor/misc/vm_configs/board/ and acrn-hypervisor/misc/vm_configs/scenarios/,\n'+
'and overwrite the old ones?\nClick OK to overwrite them; click Cancel to edit the Source Path.'
if(!confirm(overwirte_confirm_message)) {
generate_flag = false
@ -836,7 +836,7 @@ function save_scenario(generator=null){
error_list = result.error_list
if (status == 'success' && (JSON.stringify(error_list)=='{}' || JSON.stringify(error_list)=='null')) {
if(src_path==null || src_path=='') {
alert(generator+' successfully into hypervisor/arch/x86/configs/ and hypervisor/scenarios/ ');
alert(generator+' successfully into acrn-hypervisor/misc/vm_configs/board/ and acrn-hypervisor/misc/vm_configs/scenarios/ ');
} else {
alert(generator+' successfully into '+src_path);
}
@ -949,7 +949,7 @@ function save_launch(generator=null) {
create_flag = true
if(exist == "yes") {
overwirte_confirm_message = 'Setting name: ' + launch_config['create_name'] + ' existed in ' +
'acrn-hypervisor/misc/acrn-config/xmls/config-xmls/'+board_info+'/user_defined/.\n'+
'acrn-hypervisor/misc/vm_configs/xmls/config-xmls/'+board_info+'/user_defined/.\n'+
'Do you want to overwrite it?\nClick OK to overwrite it; click Cancel to rename it.'
if(!confirm(overwirte_confirm_message)) {
create_flag = false
@ -981,17 +981,17 @@ function save_launch(generator=null) {
if(no_err == true && status == 'success') {
file_name = result.file_name;
validate_message = 'Launch setting saved successfully with name: '
+file_name+'\nto acrn-hypervisor/misc/acrn-config/xmls/config-xmls/'+board_info+'/user_defined/.'
+file_name+'\nto acrn-hypervisor/misc/vm_configs/xmls/config-xmls/'+board_info+'/user_defined/.'
if(result.rename==true) {
validate_message = 'Launch setting existed, saved successfully with a new name: '
+file_name+'\nto acrn-hypervisor/misc/acrn-config/xmls/config-xmls/'+board_info+'/user_defined/.';
+file_name+'\nto acrn-hypervisor/misc/vm_configs/xmls/config-xmls/'+board_info+'/user_defined/.';
}
if(generator == 'generate_launch_script') {
var src_path = $("input#src_path").val();
generate_flag = true;
if(src_path == null || src_path == '') {
overwirte_confirm_message = 'The Source Path for launch scripts is not set.\n' +
'Do you want to generate them into the default path: misc/acrn-config/xmls/config-xmls/'+board_info+'/output/,\n'+
'Do you want to generate them into the default path: misc/vm_configs/xmls/config-xmls/'+board_info+'/output/,\n'+
'and overwrite the old ones?\nClick OK to overwrite them; click Cancel to edit the Source Path.'
if(!confirm(overwirte_confirm_message)) {
generate_flag = false
@ -1018,7 +1018,7 @@ function save_launch(generator=null) {
if (status == 'success' && (JSON.stringify(error_list)=='{}' || JSON.stringify(error_list)=='null')) {
if(src_path==null || src_path==='') {
alert(generator+' successfully into '+
'acrn-hypervisor/misc/acrn-config/xmls/config-xmls/'+board_info+'/output/.');
'acrn-hypervisor/misc/vm_configs/xmls/config-xmls/'+board_info+'/output/.');
} else {
alert(generator+' successfully into '+src_path);
}