mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-05-12 18:34:24 +00:00
1. add Vue devtools support
2. update project dependencies
3. refactor configurator source code tree for private library hook
4. fix build issue
5. dynamic load scenario JSON schema(fix cache issue)
6. add vjsf 1.12.2 (latest) for private package dependencies
7. remove vjsf unnecessary files
8. use private vjsf as configurator dependencies
9. Add custom IVSHMEM_REGION widget
10. add a script to populate default values
11. get default values before export scenario xml
12. specify widgets in XML schema
13. add missing vjsf license file
14. populate default values to empty nodes
15. when user clicks save button, update formData with each field default value
16. fix when the user clicks the save button will collapse configFom
17. add success message for saving scenario XML
vue-json-schema-form 1.12.2 (latest)link: b30ea7c2d6/packages/lib
Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
55 lines
1.4 KiB
Python
55 lines
1.4 KiB
Python
#!/usr/bin/env python3
|
|
#
|
|
# Copyright (C) 2022 Intel Corporation.
|
|
#
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
|
#
|
|
|
|
__package__ = 'configurator.pyodide'
|
|
|
|
from pathlib import Path
|
|
from tempfile import TemporaryDirectory
|
|
from xml.etree.ElementTree import tostring
|
|
|
|
from scenario_config.pipeline import PipelineObject, PipelineEngine
|
|
from scenario_config.xml_loader import XMLLoadStage
|
|
from scenario_config.default_populator import DefaultValuePopulatingStage
|
|
|
|
from .pyodide import write_temp_file, nuc11_scenario, scenario_xml_schema_path, convert_result
|
|
from .loadScenario import load_scenario_xml
|
|
|
|
|
|
def main(scenario):
|
|
pipeline = PipelineEngine(["schema_path", "scenario_path"])
|
|
pipeline.add_stages([
|
|
XMLLoadStage("schema"),
|
|
XMLLoadStage("scenario"),
|
|
DefaultValuePopulatingStage(),
|
|
])
|
|
with TemporaryDirectory() as tmpdir:
|
|
write_temp_file(tmpdir, {
|
|
'scenario.xml': scenario
|
|
})
|
|
scenario_file_path = Path(tmpdir) / 'scenario.xml'
|
|
|
|
obj = PipelineObject(
|
|
scenario_path=scenario_file_path,
|
|
schema_path=scenario_xml_schema_path,
|
|
)
|
|
pipeline.run(obj)
|
|
result = tostring(obj.get("scenario_etree").getroot())
|
|
result = result.decode()
|
|
result = convert_result({
|
|
'xml': result,
|
|
'json': load_scenario_xml(result)
|
|
})
|
|
return result
|
|
|
|
|
|
def test():
|
|
main(nuc11_scenario)
|
|
|
|
|
|
if __name__ == '__main__':
|
|
test()
|