diff --git a/misc/acrn-config/config_app/controller.py b/misc/acrn-config/config_app/controller.py index b49ba97c5..2d482b3f2 100644 --- a/misc/acrn-config/config_app/controller.py +++ b/misc/acrn-config/config_app/controller.py @@ -163,11 +163,17 @@ class XmlConfig: tag = args[-1] args = args[:-1] dest_node = self._get_dest_node(*args) + new_node_desc = None for node in dest_node.getchildren(): - dest_node.remove(node) + if node.tag == tag: + if 'desc' in node.attrib: + new_node_desc = node.attrib['desc'] + dest_node.remove(node) for value in values: new_node = ElementTree.SubElement(dest_node, tag) new_node.text = value + if new_node_desc is not None: + new_node.attrib['desc'] = new_node_desc def set_curr_attr(self, attr_name, attr_value, *args): """ diff --git a/misc/acrn-config/config_app/static/main.js b/misc/acrn-config/config_app/static/main.js index f5b89623d..63ee85031 100644 --- a/misc/acrn-config/config_app/static/main.js +++ b/misc/acrn-config/config_app/static/main.js @@ -510,7 +510,14 @@ function save_launch(generator=null) { $("input").each(function(){ var id = $(this).attr('id'); var value = $(this).val(); - if(id!='new_launch_name' && id!='board_info_file' + + if(id.indexOf('virtio_devices,network')>=0 || id.indexOf('virtio_devices,block')>=0) { + if(id in launch_config) { + launch_config[id].push(value); + } else { + launch_config[id] = [value]; + } + } else if(id!='new_launch_name' && id!='board_info_file' && id!='board_info_upload' && id!='scenario_name' && id!="launch_file") { launch_config[id] = value; diff --git a/misc/acrn-config/config_app/templates/launch.html b/misc/acrn-config/config_app/templates/launch.html index 93618983b..18ff2146a 100644 --- a/misc/acrn-config/config_app/templates/launch.html +++ b/misc/acrn-config/config_app/templates/launch.html @@ -157,6 +157,7 @@ {% elif elem.getchildren() != [] %} {% if 'multiselect' not in elem.attrib or elem.attrib['multiselect'] != 'true' %} {% set first_child = [] %} + {% set first_multi_child = {'block': 0, 'network': 0} %} {% for sub_elem in elem.getchildren() %} {% set sub_elem_text = '' if sub_elem.text == None else sub_elem.text %} {% if 'configurable' not in sub_elem.attrib or sub_elem.attrib['configurable'] != '0' %} @@ -178,7 +179,7 @@ {{sub_elem.tag}} {% if ','.join(['uos', elem.tag, sub_elem.tag]) not in launch_item_values %} -