@@ -167,7 +167,7 @@ $().ready(function(){
167
167
168
168
$ ( '#save_scenario' ) . on ( 'click' , function ( ) {
169
169
var name = $ ( this ) . data ( 'id' ) ;
170
- if ( name == "generate_board_src" || name == "generate_scenario_src ") {
170
+ if ( name == "generate_config_src " ) {
171
171
save_scenario ( name ) ;
172
172
}
173
173
else {
@@ -271,12 +271,7 @@ $().ready(function(){
271
271
} ) ;
272
272
} ) ;
273
273
274
- $ ( '#generate_board_src' ) . on ( 'click' , function ( ) {
275
- var dataId = $ ( this ) . data ( 'id' ) ;
276
- $ ( "#save_scenario" ) . data ( 'id' , dataId ) ;
277
- } ) ;
278
-
279
- $ ( '#generate_scenario_src' ) . on ( 'click' , function ( ) {
274
+ $ ( '#generate_config_src' ) . on ( 'click' , function ( ) {
280
275
var dataId = $ ( this ) . data ( 'id' ) ;
281
276
$ ( "#save_scenario" ) . data ( 'id' , dataId ) ;
282
277
} ) ;
@@ -437,19 +432,12 @@ function save_scenario(generator=null){
437
432
validate_message = 'Scenario setting existed, saved successfully with a new name: '
438
433
+ file_name + '\ninto acrn-hypervisor/misc/acrn-config/xmls/config-xmls/' + board_info + '/user_defined/.' ;
439
434
}
440
- if ( generator == "generate_board_src" || generator == "generate_scenario_src" ) {
441
- commit_confirm_message = validate_message + '\n\nGenerate source codes from scenario setting.'
442
- + '\n\nDo you want to commit changes to local tree?'
443
- commit_confirm = 'no'
444
- if ( confirm ( commit_confirm_message ) ) {
445
- commit_confirm = 'yes'
446
- }
435
+ if ( generator == "generate_config_src" ) {
447
436
generator_config = {
448
437
type : generator ,
449
438
board_info : $ ( "select#board_info" ) . val ( ) ,
450
439
board_setting : "board_setting" ,
451
440
scenario_setting : file_name ,
452
- commit : commit_confirm
453
441
}
454
442
$ . ajax ( {
455
443
type : "POST" ,
@@ -461,10 +449,7 @@ function save_scenario(generator=null){
461
449
status = result . status
462
450
error_list = result . error_list
463
451
if ( status == 'success' && ( JSON . stringify ( error_list ) == '{}' || JSON . stringify ( error_list ) == 'null' ) ) {
464
- if ( commit_confirm == 'yes' )
465
- alert ( generator + ' with commit successfully.' ) ;
466
- else
467
- alert ( generator + ' successfully.' ) ;
452
+ alert ( generator + ' successfully.' ) ;
468
453
} else {
469
454
alert ( generator + ' failed. \nError list:\n' + JSON . stringify ( error_list ) ) ;
470
455
}
@@ -573,19 +558,12 @@ function save_launch(generator=null) {
573
558
+ file_name + '\nto acrn-hypervisor/misc/acrn-config/xmls/config-xmls/' + board_info + '/user_defined/.' ;
574
559
}
575
560
if ( generator != null ) {
576
- commit_confirm_message = validate_message + '\n\nGenerate launch scripts from launch setting.'
577
- + '\n\nDo you want to commit changes to local tree?'
578
- commit_confirm = 'no'
579
- if ( confirm ( commit_confirm_message ) ) {
580
- commit_confirm = 'yes'
581
- }
582
561
generator_config = {
583
562
type : generator ,
584
563
board_info : $ ( "select#board_info" ) . val ( ) ,
585
564
board_setting : "board_setting" ,
586
565
scenario_setting : $ ( "select#scenario_name" ) . val ( ) ,
587
566
launch_setting : file_name ,
588
- commit : commit_confirm
589
567
}
590
568
$ . ajax ( {
591
569
type : "POST" ,
@@ -597,11 +575,7 @@ function save_launch(generator=null) {
597
575
status = result . status
598
576
error_list = result . error_list
599
577
if ( status == 'success' && ( JSON . stringify ( error_list ) == '{}' || JSON . stringify ( error_list ) == 'null' ) ) {
600
- if ( commit_confirm == 'yes' )
601
- alert ( generator + ' successfully into ' +
602
- 'acrn-hypervisor/misc/acrn-config/xmls/config-xmls/' + board_info + '/output/ with changes committed.' ) ;
603
- else
604
- alert ( generator + ' successfully into ' +
578
+ alert ( generator + ' successfully into ' +
605
579
'acrn-hypervisor/misc/acrn-config/xmls/config-xmls/' + board_info + '/output/.' ) ;
606
580
} else {
607
581
alert ( generator + ' failed. \nError list:\n' + JSON . stringify ( error_list ) ) ;
0 commit comments