acrn-config: UI supports to edit multiple virtio input devices.

This is to make acrn config UI supports to edit more than one virtio
input devices in multi-lines.

Tracked-On: #4163
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-12-09 17:03:43 +08:00
committed by wenlingz
parent 557e7f19f7
commit 1115c0c6af
2 changed files with 4 additions and 3 deletions

View File

@@ -157,7 +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} %}
{% set first_multi_child = {'block': 0, 'network': 0, 'input': 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' %}
@@ -191,7 +191,7 @@
{% endif %}
</div>
{% if elem.tag in ['virtio_devices'] and sub_elem.tag in ['block', 'network'] %}
{% if elem.tag in ['virtio_devices'] and sub_elem.tag in ['block', 'network', 'input'] %}
<div class="col-sm-1">
<button type="button" class="btn" id="add_virtio_{{sub_elem.tag}}_{{first_multi_child[sub_elem.tag]}}">+</button>
{% if first_multi_child[sub_elem.tag] == 0 %}