mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-20 04:33:55 +00:00
'psram' and 'PSRAM' are legacy names and replaced with 'ssram' and 'SSRAM' respectively. Tracked-On: #6012 Signed-off-by: Yonghua Huang <yonghua.huang@intel.com> Reviewed-by: Shuang Zheng <shuang.zheng@intel.com>
498 lines
34 KiB
HTML
498 lines
34 KiB
HTML
{% extends 'base.html' %}
|
|
|
|
{% block body_content %}
|
|
|
|
<div class="modal fade" id="save_modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
|
<h4 class="modal-title" id="myModalLabel">Save as</h4>
|
|
</div>
|
|
<div class="modal-body">
|
|
<div class="form-group row">
|
|
<label for="new_scenario_name" class="col-sm-3 control-label">Scenario Name: </label>
|
|
<div class="col-sm-6">
|
|
<input type="text" class="form-control" id="new_scenario_name"
|
|
value={{ scenario }}>
|
|
</div>
|
|
</div>
|
|
<div class="form-group row hidden" id="src_path_row">
|
|
<label for="src_path" class="col-sm-3 control-label"
|
|
title="the relative path of acrn-hypervisor; if no path is specified,
|
|
the source files will be generated into default path and overwirte the previous files.">
|
|
Source Path: </label>
|
|
<div class="col-sm-9">
|
|
<input type="text" class="form-control" id="src_path" value=""
|
|
placeholder="input the path to generate source files">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
|
|
<button type="button" id="remove_scenario" class="btn btn-default" data-dismiss="modal">Remove</button>
|
|
<button type="button" id="save_scenario" data-id="" class="btn btn-primary">Submit
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="modal fade" id="add_vm_modal" tabindex="-1" role="dialog" aria-labelledby="addVMModalLabel" aria-hidden="true">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
|
<h4 class="modal-title" id="addVMModalLabel">Add a new VM</h4>
|
|
</div>
|
|
<div class="modal-body">
|
|
<div class="form-group row">
|
|
<label for="add_vm_type" class="col-sm-3 control-label">VM type: </label>
|
|
<div class="dropdown col-sm-6">
|
|
<select class="selectpicker" data-width="auto" id="add_vm_type">
|
|
<option value="PRE_STD_VM">PRE_STD_VM</option>
|
|
<option value="PRE_RT_VM">PRE_RT_VM</option>
|
|
<option value="SAFETY_VM">SAFETY_VM</option>
|
|
<option value="SOS_VM">SOS_VM</option>
|
|
<option value="POST_STD_VM">POST_STD_VM</option>
|
|
<option value="POST_RT_VM">POST_RT_VM</option>
|
|
<option value="KATA_VM">KATA_VM</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="form-group row">
|
|
<label for="new_scenario_name2" class="col-sm-3 control-label">Scenario Name: </label>
|
|
<div class="col-sm-6">
|
|
<input type="text" class="form-control" id="new_scenario_name2"
|
|
value={{ scenario }}>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
|
|
<button type="button" id="add_vm_submit" data-id="" class="btn btn-primary" data-dismiss="modal">Submit
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<form class="form-horizontal" role="form" method="post">
|
|
<div class="form-group">
|
|
<label for="old_scenario_name" class="col-sm-2 control-label" style="text-align: left;"> Scenario
|
|
Setting:</label>
|
|
<div class="col-sm-3">
|
|
<text class="form-control" id="old_scenario_name" readonly>{{scenario}}</text>
|
|
</div>
|
|
<div class="col-sm-1 col-sm-offset-1">
|
|
{% if board_info != None %}
|
|
<label for="scenario_file" class="btn btn-primary" id="scenario_file2"
|
|
style="border: 1px solid #ccc; display: inline-block; padding: 6px 12px;
|
|
cursor: pointer; border-radius:5px; ">
|
|
Import XML</label>
|
|
<input type="file" name="file" id="scenario_file" class="col-sm-1 btn btn-primary" style="display: none;">
|
|
{% else %}
|
|
<label for="scenario_file" class="btn"
|
|
style="border: 1px solid #ccc; display: inline-block; padding: 6px 12px;
|
|
cursor: pointer; border-radius:5px; ">
|
|
Import XML</label>
|
|
<input type="file" name="file" class="col-sm-1" style="display: none;" disabled>
|
|
{% endif %}
|
|
</div>
|
|
{% if board_info != None and root != None and scenario_item_values %}
|
|
<div class="col-sm-1">
|
|
<button type="button" data-id="" class="btn btn-primary" data-toggle="modal" data-target="#save_modal"
|
|
id="export_scenario_xml">Export XML
|
|
</button>
|
|
</div>
|
|
{% else %}
|
|
<div class="col-sm-1">
|
|
<button type="button" disabled class="btn btn-primary" data-toggle="modal" data-target="#save_modal">Export XML
|
|
</button>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
|
|
{% 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|list %}
|
|
{% if 'desc' in vm.attrib and vm.attrib['desc'] == 'specific for Kata' %}
|
|
{% do vm_kata.append(1) %}
|
|
{% endif %}
|
|
{% set first_multi_child = {'IVSHMEM_REGION': 0, 'communication_vuart': 1} %}
|
|
{% if xpath_dict['/'.join(['/acrn-config', vm.tag])]['configurable'] == 'y' or
|
|
vm.xpath(xpath_dict['/'.join(['/acrn-config', vm.tag])]['configurable'])%}
|
|
<tr>
|
|
<td>
|
|
{% if vm.tag != 'vm' %}
|
|
{% set vm_type = 'hv' %}
|
|
<div class="form-group">
|
|
<label class="col-sm-1 control-label">HV </label>
|
|
</div>
|
|
<div class="form-group">
|
|
<button type="button" class="btn" id="add_vm" data-id="-1" data-toggle="modal"
|
|
data-target="#add_vm_modal">Add a VM below</button>
|
|
</div>
|
|
{% else %}
|
|
{% set vm_type = 'vm:id='+vm.attrib['id'] %}
|
|
<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>
|
|
<div class="form-group">
|
|
<button type="button" class="btn" id="add_vm" data-id="{{vm.attrib['id']}}" data-toggle="modal"
|
|
data-target="#add_vm_modal">Add a VM below</button>
|
|
</div>
|
|
<div class="form-group">
|
|
<button type="button" class="btn" id="remove_vm" data-id="{{vm.attrib['id']}}">
|
|
Remove this VM</button>
|
|
</div>
|
|
{% endif %}
|
|
{% 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|list %}
|
|
{% set elem_text = elem.text if elem.text != None else '' %}
|
|
{% if elem|list == [] and (xpath_dict['/'.join(['/acrn-config', vm.tag, elem.tag])]['configurable']
|
|
== 'y' or elem.xpath(xpath_dict['/'.join(['/acrn-config', vm.tag, elem.tag])]['configurable']))%}
|
|
<div class="form-group">
|
|
<label class="col-sm-1 control-label" data-toggle="tooltip"
|
|
title="{{xpath_dict['/'.join(['/acrn-config', vm.tag, elem.tag])]['doc']}}">{{elem.tag}}</label>
|
|
<label class="col-sm-2 control-label"></label>
|
|
|
|
{% if ','.join([vm.tag, elem.tag]) not in scenario_item_values %}
|
|
<div class="col-sm-6">
|
|
{% if xpath_dict['/'.join(['/acrn-config', vm.tag, elem.tag])]['readonly'] == 'y' %}
|
|
<input type="text" class="form-control" id="{{vm_type+','+elem.tag}}"
|
|
value="{{elem_text}}" readonly>
|
|
{% else %}
|
|
<input type="text" class="form-control" id="{{vm_type+','+elem.tag}}"
|
|
value="{{elem_text}}">
|
|
{% endif %}
|
|
</div>
|
|
{% else %}
|
|
<div class="dropdown col-sm-6">
|
|
{% if xpath_dict['/'.join(['/acrn-config', vm.tag, elem.tag])]['readonly'] == 'y' %}
|
|
<select class="selectpicker" data-width="auto"
|
|
id="{{vm_type+','+elem.tag}}" disabled>
|
|
{% else %}
|
|
<select class="selectpicker" data-width="auto"
|
|
id="{{vm_type+','+elem.tag}}">
|
|
{% endif %}
|
|
<option disabled selected value> -- Select an option -- </option>
|
|
{% for item_value in scenario_item_values[','.join([vm.tag, elem.tag])] %}
|
|
{% if item_value == elem_text %}
|
|
<option value="{{item_value}}" selected="selected">{{item_value}}</option>
|
|
{% else %}
|
|
<option value="{{item_value}}">{{item_value}}</option>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
{% endif %}
|
|
<p id="{{vm_type+','+elem.tag}}_err" class="col-sm-3"></p>
|
|
</div>
|
|
{% elif elem|list != [] and (xpath_dict['/'.join(['/acrn-config', vm.tag, elem.tag])]['configurable']
|
|
== 'y' or elem.xpath(xpath_dict['/'.join(['/acrn-config', vm.tag, elem.tag])]['configurable']))%}
|
|
{% if xpath_dict['/'.join(['/acrn-config', vm.tag, elem.tag])]['multiselect'] != 'y' %}
|
|
{% set first_child = [] %}
|
|
{% for sub_elem in elem|list %}
|
|
{% set sub_elem_text = sub_elem.text if sub_elem.text != None else '' %}
|
|
|
|
{% if sub_elem.tag in ['RDT', 'IVSHMEM', 'SSRAM'] %}
|
|
{% for sub_elem_2 in sub_elem|list %}
|
|
{% set sub_elem_2_text = sub_elem_2.text if sub_elem_2.text != None else '' %}
|
|
{% if ','.join([vm.tag, elem.tag, sub_elem.tag, sub_elem_2.tag]) in scenario_item_values %}
|
|
<div class="form-group">
|
|
<label class="col-sm-1 control-label" data-toggle="tooltip"
|
|
title="{{xpath_dict['/'.join(['/acrn-config', vm.tag, elem.tag])]['doc']}}">
|
|
</label>
|
|
<label class="col-sm-2 control-label" data-toggle="tooltip"
|
|
title="{{xpath_dict['/'.join(['/acrn-config', vm.tag, elem.tag, sub_elem.tag, sub_elem_2.tag])]['doc']}}">
|
|
{{sub_elem.tag}} {{sub_elem_2.tag}}</label>
|
|
<div class="dropdown col-sm-6">
|
|
{% if xpath_dict['/'.join(['/acrn-config', vm.tag, elem.tag, sub_elem.tag, sub_elem_2.tag])]['readonly'] == 'y' %}
|
|
<select class="selectpicker" data-width="auto"
|
|
id="{{vm_type+','+elem.tag+','+sub_elem.tag+','+sub_elem_2.tag}}" disabled>
|
|
{% else %}
|
|
<select class="selectpicker" data-width="auto"
|
|
id="{{vm_type+','+elem.tag+','+sub_elem.tag+','+sub_elem_2.tag}}">
|
|
{% endif %}
|
|
<option disabled selected value> -- Select an option -- </option>
|
|
{% for item_value in scenario_item_values[vm_type+','+elem.tag+','+sub_elem.tag+','+sub_elem_2.tag] %}
|
|
{% if item_value == sub_elem_2.text %}
|
|
<option value="{{item_value}}" selected="selected">{{item_value}}</option>
|
|
{% else %}
|
|
<option value="{{item_value}}">{{item_value}}</option>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
<p id="{{vm_type+','+elem.tag+','+sub_elem.tag+','+sub_elem_2.tag}}_err" class="col-sm-3"></p>
|
|
</div>
|
|
{% else %}
|
|
<div class="form-group">
|
|
<label class="col-sm-1 control-label" data-toggle="tooltip"
|
|
title="{{xpath_dict['/'.join(['/acrn-config', vm.tag, elem.tag])]['doc']}}">
|
|
</label>
|
|
<label class="col-sm-2 control-label" data-toggle="tooltip"
|
|
title="{{xpath_dict['/'.join(['/acrn-config', vm.tag, elem.tag, sub_elem.tag, sub_elem_2.tag])]['doc']}}">
|
|
{{sub_elem.tag}} {{sub_elem_2.tag}}</label>
|
|
{% if sub_elem_2.tag in ['IVSHMEM_REGION'] %}
|
|
<div class="col-sm-5">
|
|
{% else %}
|
|
<div class="col-sm-6">
|
|
{% endif %}
|
|
{% if xpath_dict['/'.join(['/acrn-config', vm.tag, elem.tag, sub_elem.tag, sub_elem_2.tag])]['readonly'] == 'y' %}
|
|
<input type="text" class="form-control"
|
|
id="{{vm_type+','+elem.tag+','+sub_elem.tag+','+sub_elem_2.tag}}"
|
|
readonly vaule="{{sub_elem_2_text}}"></input>
|
|
{% else %}
|
|
<input type="text" class="form-control"
|
|
id="{{vm_type+','+elem.tag+','+sub_elem.tag+','+sub_elem_2.tag}}" value="{{sub_elem_2_text}}"></input>
|
|
{% endif %}
|
|
</div>
|
|
{% if sub_elem_2.tag in ['IVSHMEM_REGION'] %}
|
|
<div class="col-sm-1">
|
|
<button type="button" class="btn" id="add_ivshmem_{{sub_elem.tag}}_{{first_multi_child[sub_elem_2.tag]}}">+</button>
|
|
{% if first_multi_child[sub_elem_2.tag] == 0 %}
|
|
<button type="button" disabled class="btn" id="remove_ivshmem_{{sub_elem.tag}}_{{first_multi_child[sub_elem_2.tag]}}">-</button>
|
|
{% else %}
|
|
<button type="button" class="btn" id="remove_ivshmem_{{sub_elem.tag}}_{{first_multi_child[sub_elem_2.tag]}}">-</button>
|
|
{% endif %}
|
|
</div>
|
|
{% 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'] %}
|
|
<p id="{{vm_type+','+elem.tag+','+sub_elem.tag+','+sub_elem_2.tag+','+(first_multi_child[sub_elem_2.tag]-1)|string()}}_err" class="col-sm-3"></p>
|
|
{% else %}
|
|
<p id="{{vm_type+','+elem.tag+','+sub_elem.tag+','+sub_elem_2.tag}}_err" class="col-sm-3"></p>
|
|
{% endif %}
|
|
</div>
|
|
{% endif %}
|
|
{% endfor %}
|
|
|
|
{% else %}
|
|
|
|
{% if xpath_dict['/'.join(['/acrn-config', vm.tag, elem.tag, sub_elem.tag])]['configurable'] == 'y' or
|
|
sub_elem.xpath(xpath_dict['/'.join(['/acrn-config', vm.tag, elem.tag, sub_elem.tag])]['configurable'])%}
|
|
<div class="form-group">
|
|
{% if 'id' not in elem.attrib %}
|
|
{% if not first_child %}
|
|
<label class="col-sm-1 control-label" data-toggle="tooltip"
|
|
title="{{xpath_dict['/'.join(['/acrn-config', vm.tag, elem.tag])]['doc']}}">
|
|
{{elem.tag}}</label>
|
|
{% else %}
|
|
<label class="col-sm-1 control-label" data-toggle="tooltip">
|
|
</label>
|
|
{% endif %}
|
|
|
|
<label class="col-sm-2 control-label" data-toggle="tooltip"
|
|
title="{{xpath_dict['/'.join(['/acrn-config', vm.tag, elem.tag, sub_elem.tag])]['doc']}}">
|
|
{{sub_elem.tag}}</label>
|
|
|
|
{% if ','.join([vm.tag, elem.tag, sub_elem.tag]) not in scenario_item_values
|
|
and elem.tag != 'cpu_affinity' and elem.tag != 'pci_devs' %}
|
|
{% if sub_elem.tag in ['bootargs', 'kern_args'] %}
|
|
<div class="col-sm-6">
|
|
{% if xpath_dict['/'.join(['/acrn-config', vm.tag, elem.tag, sub_elem.tag])]['readonly'] == 'y' %}
|
|
<textarea type="text" class="form-control" style="height:120px"
|
|
id="{{vm_type+','+elem.tag+','+sub_elem.tag}}"
|
|
readonly>{{sub_elem_text}}</textarea>
|
|
{% else %}
|
|
<textarea type="text" class="form-control" style="height:120px"
|
|
id="{{vm_type+','+elem.tag+','+sub_elem.tag}}">{{sub_elem_text}}</textarea>
|
|
{% endif %}
|
|
</div>
|
|
{% else %}
|
|
<div class="col-sm-6">
|
|
{% if xpath_dict['/'.join(['/acrn-config', vm.tag, elem.tag, sub_elem.tag])]['readonly'] == 'y' %}
|
|
<input type="text" class="form-control"
|
|
id="{{vm_type+','+elem.tag+','+sub_elem.tag}}"
|
|
value="{{sub_elem_text}}" readonly>
|
|
{% else %}
|
|
<input type="text" class="form-control"
|
|
id="{{vm_type+','+elem.tag+','+sub_elem.tag}}"
|
|
value="{{sub_elem_text}}">
|
|
{% endif %}
|
|
</div>
|
|
|
|
{% endif %}
|
|
{% else %}
|
|
{% set item_key = ','.join([vm.tag, elem.tag, sub_elem.tag]) if elem.tag != 'cpu_affinity'
|
|
and elem.tag != 'pci_devs' else ','.join([vm.tag, elem.tag]) %}
|
|
<div class="dropdown col-sm-6">
|
|
{% if xpath_dict['/'.join(['/acrn-config', vm.tag, elem.tag, sub_elem.tag])]['readonly'] == 'y' %}
|
|
<select class="selectpicker" data-width="auto"
|
|
id="{{vm_type+','+elem.tag+','+sub_elem.tag}}" disabled>
|
|
{% else %}
|
|
<select class="selectpicker" data-width="auto"
|
|
id="{{vm_type+','+elem.tag+','+sub_elem.tag}}">
|
|
{% endif %}
|
|
<option disabled selected value> -- Select an option -- </option>
|
|
{% for item_value in scenario_item_values[item_key] %}
|
|
{% if item_value == sub_elem_text %}
|
|
<option value="{{item_value}}" selected="selected">{{item_value}}</option>
|
|
{% else %}
|
|
<option value="{{item_value}}">{{item_value}}</option>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</select>
|
|
|
|
{% if elem.tag == 'cpu_affinity' %}
|
|
<button type="button" class="btn" id="add_vcpu_{{first_child|length}}">+</button>
|
|
{% if not first_child %}
|
|
<button type="button" disabled class="btn" id="remove_vcpu_{{first_child|length}}">-</button>
|
|
{% else %}
|
|
<button type="button" class="btn" id="remove_vcpu_{{first_child|length}}">-</button>
|
|
{% endif %}
|
|
{% elif elem.tag == 'pci_devs' %}
|
|
<button type="button" class="btn" id="add_pci_dev_{{first_child|length}}">+</button>
|
|
{% if not first_child %}
|
|
<button type="button" disabled class="btn" id="remove_pci_dev_{{first_child|length}}">-</button>
|
|
{% else %}
|
|
<button type="button" class="btn" id="remove_pci_dev_{{first_child|length}}">-</button>
|
|
{% endif %}
|
|
{% else %}
|
|
{% endif%}
|
|
</div>
|
|
{% endif %}
|
|
{% do first_child.append(1) %}
|
|
<p id="{{vm_type+','+elem.tag+','+sub_elem.tag}}_err" class="col-sm-3"></p>
|
|
{% else %}
|
|
{% if not first_child %}
|
|
{% do first_child.append(1) %}
|
|
<label class="col-sm-1 control-label" data-toggle="tooltip"
|
|
id="{{vm_type+','+elem.tag+':id='+elem.attrib['id']+','+sub_elem.tag}}_label1"
|
|
title="{{xpath_dict['/'.join(['/acrn-config', vm.tag, elem.tag])]['doc']}}">
|
|
{{elem.tag+' '+elem.attrib['id']}}</label>
|
|
{% else %}
|
|
<label class="col-sm-1 control-label" data-toggle="tooltip"
|
|
id="{{vm_type+','+elem.tag+':id='+elem.attrib['id']+','+sub_elem.tag}}_label1">
|
|
</label>
|
|
{% endif %}
|
|
|
|
<label class="col-sm-2 control-label" data-toggle="tooltip"
|
|
id="{{vm_type+','+elem.tag+':id='+elem.attrib['id']+','+sub_elem.tag}}_label2"
|
|
title="{{xpath_dict['/'.join(['/acrn-config', vm.tag, elem.tag, sub_elem.tag])]['doc']}}">
|
|
{{sub_elem.tag}}</label>
|
|
{% if (','.join([vm.tag, elem.tag, sub_elem.tag]) not in scenario_item_values) and
|
|
((elem.tag!='vuart' and elem.tag!='legacy_vuart') or sub_elem.tag!='base') %}
|
|
<div class="col-sm-6"
|
|
id="{{vm_type+','+elem.tag+':id='+elem.attrib['id']+','+sub_elem.tag}}_config">
|
|
{% if xpath_dict['/'.join(['/acrn-config', vm.tag, elem.tag, sub_elem.tag])]['readonly'] == 'y' %}
|
|
<input type="text" class="form-control"
|
|
id="{{vm_type+','+elem.tag+':id='+elem.attrib['id']+','+sub_elem.tag}}"
|
|
value="{{sub_elem_text}}" readonly>
|
|
{% else %}
|
|
<input type="text" class="form-control"
|
|
id="{{vm_type+','+elem.tag+':id='+elem.attrib['id']+','+sub_elem.tag}}"
|
|
value="{{sub_elem_text}}">
|
|
{% endif %}
|
|
</div>
|
|
{% else %}
|
|
|
|
<div class="dropdown col-sm-6">
|
|
|
|
{% if xpath_dict['/'.join(['/acrn-config', vm.tag, elem.tag, sub_elem.tag])]['readonly'] == 'y' %}
|
|
<select class="selectpicker" data-width="auto" disabled
|
|
id="{{vm_type+','+elem.tag+':id='+elem.attrib['id']+','+sub_elem.tag}}">
|
|
{% else %}
|
|
<select class="selectpicker" data-width="auto"
|
|
id="{{vm_type+','+elem.tag+':id='+elem.attrib['id']+','+sub_elem.tag}}">
|
|
{% endif %}
|
|
{% set key = ('vm='+vm.attrib['id']+','+elem.tag+'='+elem.attrib['id']+','+sub_elem.tag)
|
|
if (elem.tag in ['vuart', 'legacy_vuart'] and sub_elem.tag=='base')
|
|
else ','.join([vm.tag, elem.tag, sub_elem.tag]) %}
|
|
<option disabled selected value> -- Select an option -- </option>
|
|
{% for item_value in scenario_item_values[key] %}
|
|
{% if item_value == sub_elem_text %}
|
|
<option value="{{item_value}}" selected="selected">{{item_value}}</option>
|
|
{% else %}
|
|
<option value="{{item_value}}">{{item_value}}</option>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</select>
|
|
{% if elem.tag in ['communication_vuart'] and sub_elem.tag in ['base'] %}
|
|
<button type="button" class="btn" id="add_{{elem.tag}}_{{first_multi_child[elem.tag]}}">+</button>
|
|
{% if first_multi_child[elem.tag] == 1 %}
|
|
<button type="button" disabled class="btn" id="remove_{{elem.tag}}_{{first_multi_child[elem.tag]}}">-</button>
|
|
{% else %}
|
|
<button type="button" class="btn" id="remove_{{elem.tag}}_{{first_multi_child[elem.tag]}}">-</button>
|
|
{% endif %}
|
|
{% do first_multi_child.update({elem.tag: first_multi_child[elem.tag]+1}) %}
|
|
{% endif%}
|
|
</div>
|
|
{% endif %}
|
|
<p id="{{vm_type+','+elem.tag+':id='+elem.attrib['id']+','+sub_elem.tag}}_err"
|
|
class="col-sm-3"></p>
|
|
{% endif %}
|
|
</div>
|
|
{% endif %}
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% elif xpath_dict['/'.join(['/acrn-config', vm.tag, elem.tag])]['configurable'] == 'y' or
|
|
elem.xpath(xpath_dict['/'.join(['/acrn-config', vm.tag, elem.tag])]['configurable'])%}
|
|
<div class="form-group">
|
|
<label class="col-sm-1 control-label" data-toggle="tooltip"
|
|
title="{{xpath_dict['/'.join(['/acrn-config', vm.tag, elem.tag])]['doc']}}">{{elem.tag}}</label>
|
|
<label class="col-sm-2 control-label" data-toggle="tooltip"></label>
|
|
<div class="dropdown col-sm-6">
|
|
{% if xpath_dict['/'.join(['/acrn-config', vm.tag, elem.tag])]['readonly'] == 'y' %}
|
|
<select class="selectpicker" data-width="auto" disabled
|
|
id="{{vm_type+','+elem.tag+','+elem.tag[:-1]}}"
|
|
multiple>
|
|
{% else %}
|
|
<select class="selectpicker" data-width="auto"
|
|
id="{{vm_type+','+elem.tag+','+elem.tag[:-1]}}"
|
|
multiple>
|
|
{% endif %}
|
|
{% if ','.join([vm.tag, elem.tag]) not in scenario_item_values %}
|
|
{% set x=1 %}
|
|
{% for sub_elem in elem|list %}
|
|
<option value="{{sub_elem.text}}" selected="selected">{{sub_elem.text}}</option>
|
|
{% endfor %}
|
|
{% else %}
|
|
{% set selected_list = [] %}
|
|
{% for sub_elem in elem|list %}
|
|
{% do selected_list.append(sub_elem.text) %}
|
|
{% endfor %}
|
|
{% for item_value in scenario_item_values[','.join([vm.tag, elem.tag])] %}
|
|
{% if item_value in selected_list %}
|
|
<option value="{{item_value}}" selected="selected">{{item_value}}</option>
|
|
{% else %}
|
|
<option value="{{item_value}}">{{item_value}}</option>
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% endif %}
|
|
</select>
|
|
</div>
|
|
<p id="{{vm_type+','+elem.tag+','+elem.tag[:-1]}}_err" class="col-sm-3"></p>
|
|
</div>
|
|
{% endif %}
|
|
{% endif %}
|
|
{% endfor %}
|
|
</td>
|
|
</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
|
|
exists.
|
|
</text>
|
|
{% endif %}
|
|
</form>
|
|
|
|
{% endblock %}
|