acrn-config: add UI to add or remove Kata VM for sdc scenario

add UI to add or remove Kata VM for sdc scenario, the added Kata VM
is based on the generic config xml.

Tracked-On: 4145
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-11-25 16:09:46 +08:00
committed by wenlingz
parent 31d023e8f9
commit bb2218effc
4 changed files with 78 additions and 3 deletions

View File

@@ -87,14 +87,24 @@
{% if board_info != None and root != None and scenario_item_values %}
<table class="table table-hover" id="tab">
{% set vm_kata = [] %}
{% for vm in root.getchildren() %}
{% if 'desc' in vm.attrib and vm.attrib['desc'] == 'specific for Kata' %}
{% do vm_kata.append(1) %}
{% endif %}
{% if 'configurable' not in vm.attrib or vm.attrib['configurable'] != '0'%}
<tr>
<td>
<div class="form-group">
<label class="col-sm-1 control-label">VM: </label>
<label class="col-sm-1 control-label" id="vm">{{vm.attrib['id']}}</label>
</div>
{% if 'desc' in vm.attrib or vm.attrib['desc'] == 'specific for Kata' %}
<div class="form-group">
<button type="button" class="btn" id="remove_vm_kata">Remove Kata VM</button>
</div>
{% endif %}
</td>
<td>
{% for elem in vm.getchildren() %}
@@ -321,6 +331,11 @@
</tr>
{% endif %}
{% endfor %}
{% if not vm_kata and ('scenario' in root.attrib and root.attrib['scenario'] == 'sdc') %}
<tr><td>
<button type="button" class="btn" id="add_vm_kata">Add Kata VM</button>
</td></tr>
{% endif %}
</table>
{% else %}
<text class="form-control" id="err_msg">No setting available. Select one board info and make sure the scenario xml