diff --git a/misc/acrn-config/config_app/static/main.js b/misc/acrn-config/config_app/static/main.js index 704fa8e75..338d22df7 100644 --- a/misc/acrn-config/config_app/static/main.js +++ b/misc/acrn-config/config_app/static/main.js @@ -728,7 +728,7 @@ function save_scenario(generator=null){ $("input").each(function(){ var id = $(this).attr('id'); var value = $(this).val(); - if(id.indexOf('CLOS_MASK')>=0 || id.indexOf('MBA_DELAY')>=0) { + if(id.indexOf('CLOS_MASK')>=0 || id.indexOf('MBA_DELAY')>=0 || id.indexOf('IVSHMEM_REGION')>=0) { if(id in scenario_config) { scenario_config[id].push(value); } else { @@ -795,7 +795,7 @@ function save_scenario(generator=null){ index = index.replace(new RegExp(jquerySpecialChars[i], "g"), "\\" + jquerySpecialChars[i]); } - $("#"+index).parents(".form-group").addClass("has-error"); + $("#"+index+"_err").parents(".form-group").addClass("has-error"); $("#"+index+"_err").text(item); }) if(no_err == true && status == 'success') { diff --git a/misc/acrn-config/config_app/templates/scenario.html b/misc/acrn-config/config_app/templates/scenario.html index f846526e5..009a0487d 100644 --- a/misc/acrn-config/config_app/templates/scenario.html +++ b/misc/acrn-config/config_app/templates/scenario.html @@ -209,32 +209,13 @@ the source files will be generated into default path and overwirte the previous != '0')%} {% if 'multiselect' not in elem.attrib or elem.attrib['multiselect'] != 'true' %} {% set first_child = [] %} + {% set first_multi_child = {'IVSHMEM_REGION': 0} %} {% for sub_elem in elem.getchildren() %} {% set sub_elem_text = sub_elem.text if sub_elem.text != None else '' %} - {% if sub_elem.tag == 'RDT' %} + {% if sub_elem.tag in ['RDT', 'IVSHMEM'] %} {% for sub_elem_2 in sub_elem.getchildren() %} - {% if ','.join([vm.tag, elem.tag, sub_elem.tag, sub_elem_2.tag]) not in scenario_item_values %} -
- - -
- {% if 'readonly' in sub_elem_2.attrib and sub_elem_2.attrib['readonly'] == 'true' %} - - {% else %} - - {% endif %} -
-

-
- {% elif sub_elem_2.tag not in ['CLOS_MASK', 'MBA_DELAY'] %} + {% if ','.join([vm.tag, elem.tag, sub_elem.tag, sub_elem_2.tag]) in scenario_item_values %}

- {% else %} + {% else %}
+ title="{{sub_elem_2.attrib['desc'] if 'desc' in sub_elem_2.attrib else sub_elem.attrib['desc']}}"> + {{sub_elem.tag}}        {{sub_elem_2.tag}} + {% if sub_elem_2.tag in ['IVSHMEM_REGION'] %} +
+ {% else %}
- + {% endif %} + {% if 'readonly' in sub_elem_2.attrib and sub_elem_2.attrib['readonly'] == 'true' %} + + {% else %} + + {% endif %}
+ {% if sub_elem_2.tag in ['IVSHMEM_REGION'] %} +
+ + {% if first_multi_child[sub_elem_2.tag] == 0 %} + + {% else %} + + {% endif %} +
+ {% do first_multi_child.update({sub_elem_2.tag: first_multi_child[sub_elem_2.tag]+1}) %} + {% endif%} + {% if sub_elem_2.tag in ['IVSHMEM_REGION'] %} +

+ {% else %}

+ {% endif %}
{% endif %} {% endfor %} @@ -323,6 +329,7 @@ the source files will be generated into default path and overwirte the previous value="{{sub_elem_text}}"> {% endif %}
+ {% endif %} {% else %} {% set item_key = ','.join([vm.tag, elem.tag, sub_elem.tag]) if elem.tag != 'cpu_affinity'