Commit Graph

215 Commits

Author SHA1 Message Date
Conghui 73f0d2795d config-tools: clean launch scripts before saving
Clean all launch scripts before click "Save" button, the new launch
scripts will be created after that.

Add a blank line to the warning dialog box.

Tracked-On: #7532
Signed-off-by: Conghui <conghui.chen@intel.com>
2022-05-23 15:37:58 +08:00
Conghui 38905c663f config-tools: change dialog box message
Change dialog box message when click "Use a Different Board" button.

Tracked-On: #7532
Signed-off-by: Conghui <conghui.chen@intel.com>
2022-05-23 15:37:58 +08:00
Weiyi Feng 84550004dd config_tools: add custom CAT widget
add custom CAT widget

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-05-22 20:10:24 +08:00
Weiyi Feng b288ae9ce7 config_tools: ignore cache in develop env
ignore cache in develop env

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-05-22 20:10:24 +08:00
Conghui 6a0ada0a91 config-tools: change name for board XML
Use file name as the board xml name instead of using the name in
'board' field in board XML.

e.g.

1. Initial filename is "my_potato.xml"
2. User imports my_potato.xml into the Configurator
3. Resulting file is my_potato.board.xml

Tracked-On: #7521
Signed-off-by: Conghui <conghui.chen@intel.com>
2022-05-21 23:23:02 +08:00
Conghui 777cfae536 config-tools: change warning message
Change warning message for deleting pre-launched VM and post-launched VM.

Tracked-On: #7524
Signed-off-by: Conghui <conghui.chen@intel.com>
2022-05-21 20:03:01 +08:00
Conghui b4306fa1ee config-tools: correct the confirm log
When clicking the Save button in UI, the log message is incorrect for
pre-launched VM.
Do not show 'launch script' related message when there is only pre-launched
VMs.

Tracked-On: #7524
Signed-off-by: Conghui <conghui.chen@intel.com>
2022-05-21 20:03:01 +08:00
Calvin Zhang 8a6445d949 misc: configurator: Remove acrn config files when selecting a working folder
Instead of removing all .xml and .sh files, just remove:
*.board.xml
scenario.xml
launch*.sh

Tracked-On: #7495
Signed-off-by: Calvin Zhang <calvinzhang.cool@gmail.com>
2022-05-20 17:22:53 +08:00
Ziheng Li 72054f57fa [config_tool] Duplicate VM name
refine error messages.

Tracked-On: projectacrn#7519
Signed-off-by: Ziheng Li <ziheng.li@intel.com>
2022-05-20 16:53:48 +08:00
hangliu1 82232f7f75 misc: configurator:Fix delete vm button apearance
update activeVMID to make the delete vm button disappear
when all VMs are deleted.

Tracked-On: #7516
Signed-off-by: hangliu1 <hang1.liu@linux.intel.com>
2022-05-20 13:37:46 +08:00
Calvin Zhang 12b81d83ca misc: configurator: validate user settings before writing down
After clicking save button, validate settings before writing down
scenario.xml, otherwise broken scenario.xml will be generated.

Tracked-On: #7470
Signed-off-by: Calvin Zhang <calvinzhang.cool@gmail.com>
2022-05-19 16:50:15 +08:00
Wu Zhou eac0e335a8 config-tools: add validation to vuart widget
vuart widget don't have empty line check for required fields.
Added in this patch.

Tracked-On: #7506
Signed-off-by: Wu Zhou <wu.zhou@intel.com>
2022-05-19 13:15:23 +08:00
Wu Zhou c4216a3817 config-tools: vuart widget's vm_name changes when edited
When vm_name is edited in in the vm tab, the vuart connection widget's
vm_name field should change to the new name. Add name replacing in form
change event.

Tracked-On: #7506
Signed-off-by: Wu Zhou <wu.zhou@intel.com>
2022-05-19 13:15:23 +08:00
Calvin Zhang e4f11ca4c8 misc: configurator: report the errors on clicking save button
On clicking save button, current scenario configuration is validated and
errors should be prompted out if any.

BTW, fix unrecognized value in cpu affinity object.

Fixes: 5a3b38f778 ("config-tools: add confirm message")
Tracked-On: #7469
Signed-off-by: Calvin Zhang <calvinzhang.cool@gmail.com>
2022-05-19 10:21:17 +08:00
Wu Zhou 7750a6c25b config-tools: add property check before IVSHMEM
If IVSHMEM is not presented, reading its property could lead to
failure in js. Add property check before it.

Tracked-On: #7500

Signed-off-by: Wu Zhou <wu.zhou@intel.com>
2022-05-19 09:54:40 +08:00
Junjie Mao c4f46d9c28 config_tools: gracefully process board XMLs with non-standard info
Occasionally the regular expressions searching for manufacturer and product
name of the target board fail to find a matching line in a given board XML,
possibly because the board XML does not contain such info. This causes an
alert to be raised while it does not impact the functionality of the
configurator.

This patch adds a check to suppress such alerts.

Tracked-On: #6691
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-05-19 09:31:46 +08:00
Junjie Mao 22a47fe795 config_tools: check XML file structures on load
This patch validates the structure of the XML files given before they are
further used by the rest of the configurator. With this validation process,
the configurator confirms the XML files are well-structured and can thus
access certain nodes and contents without checking their existence or data
types.

Upon validation failure, an alert will pop up informing the user that the
given XML file is ill-formed. No further details are given as of now
because we assume users should not care about the internal structure of
those files.

Tracked-On: #6691
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-05-19 09:31:46 +08:00
Calvin Zhang a8a9b2f40a misc: configurator: remove config files when choosing a working folder
Instead of deleting all files, just remove xml and launch scripts.

Tracked-On: #7495
Signed-off-by: Calvin Zhang <calvinzhang.cool@gmail.com>
2022-05-18 15:09:25 +08:00
Kunhui-Li 5c72036a67 config_tools: using XPATH expression to handle input data
XPATH 2.0 already supports functions like for-expressions,
so we use XPATH expression instead of the python code to format
virtio input data.

Tracked-On: #6691
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-05-18 14:40:26 +08:00
Ziheng Li 859f6b803c [config_tool] Duplicate VM name
Added check and error prompt for duplicate names of VM
before save scenario.
Tracked-On: projectacrn#7486
Signed-off-by: Ziheng Li <ziheng.li@intel.com>
2022-05-18 13:22:34 +08:00
Wu Zhou 398184f3a6 config-tools: fix configurator build issue
Fix configurator build issue introduced by #7483

Tracked-On: #7492
2022-05-18 12:46:06 +08:00
Calvin Zhang c7a797ac51 misc: configurator: Use more precise acrn version identifier
Display acrn version string from `git describe --dirty` at UI footer to
help testing. Append the same version to deb package name as well.

Tracked-On: #7488
Signed-off-by: Calvin Zhang <calvinzhang.cool@gmail.com>
2022-05-17 13:25:50 +08:00
Wu Zhou 14ab083cc8 config-tools: add validation trigger to get instant result
The validation triggers 'change' happens only when data input completed.
Added 'blur', 'input', 'focus' to get instant result.

Tracked-On: #7481

Signed-off-by: Zhou, Wu <wu.zhou@intel.com>
2022-05-17 11:26:10 +08:00
Wu Zhou 39490c72b1 config-tools: add validation to IVSHMEM widget
Add validation to IVSHMEM widget, displaying error msg below the
input line. Currently only check for empty line.

Tracked-On: #7481

Signed-off-by: Zhou, Wu <wu.zhou@intel.com>
2022-05-17 11:26:10 +08:00
Yifan Liu 0adfe7a439 misc: configurator: Fix user-input working directory not working
User-input working directory will not work if there's no path split at
the end. This patch checks and adds if no path split at the end of
working directory path.

Tracked-On: #7484
Signed-off-by: Yifan Liu <yifan1.liu@intel.com>
2022-05-17 11:00:59 +08:00
Kunhui-Li c1528cd479 config_tools: add virtio devices widget
This patch adds virtio devices widget according to the new design.

Tracked-On: #6690
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
2022-05-16 14:28:46 +08:00
Kunhui-Li 3653b268ed config_tools: format vitio input in configurator
This patch formats virtio input entry as "Device name: xxx, Device physical path: xxx".

Tracked-On: #6691
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
2022-05-16 14:28:46 +08:00
David B. Kinder 3a133d3138 Fix make configurator not picking up schema changes
Artificates left over from a previous make configurator build prevented
changes to a schema (.xsd) file from getting incorporated into a
subsequent make configurator build.

Tracked-on: #7461

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-05-16 09:43:26 +08:00
Junjie Mao 72445d01b4 config_tools: add placeholders in input widgets
The configurator today shows "Please Input" as the placeholder of input
widgets, which is far from informative.

This patch specifies element or type specific placeholders in the XML
schema by reusing the `acrn:widget-options` annotation mechanism. For
manually-designed widgets such as ivshmem or vUART the placeholders are
added in the corresponding vue directly.

Tracked-On: #6691
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-05-13 15:50:20 +08:00
Yifan Liu 1651863584 misc: configurator: Fix minor bug of vUART label error
The connection label should be consistent with vUART name

Tracked-On: #7455
Signed-off-by: Yifan Liu <yifan1.liu@intel.com>
2022-05-13 11:38:45 +08:00
Yuanyuan Zhao 27222e1583 config_tools: change JSON Schema source file
Use the JSON Schema convered while building.
The file will be updated in time.

Tracked-On: #7459
Signed-off-by: Yuanyuan Zhao <yuanyuan.zhao@linux.intel.com>
2022-05-13 11:13:42 +08:00
Yuanyuan Zhao 38c73cc6e2 config_tools: remove JSON Schema in repo
The JSON Schema converted from schema while building.
Remove the JSON Schema in repo.

Tracke-On: #7459
Signed-off-by: Yuanyuan Zhao <yuanyuan.zhao@linux.intel.com>
2022-05-13 11:13:42 +08:00
Weiyi Feng 856ef44bd7 config_tools: fix can't save cpu affinity config issue
fix can't save cpu affinity config issue

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-05-12 09:51:34 +08:00
Yuanyuan Zhao 9f08eeb999 config-tools: modify scenario.json in build directory
Copy scenrio.json to build directory, and modify the temporary file
to avoid pollution of hypervisor repo.

Tracked-On: #7459
Signed-off-by: Yuanyuan Zhao <yuanyuan.zhao@linux.intel.com>
2022-05-12 09:29:27 +08:00
Yifan Liu 130266442e misc: configurator: Add vUART widget
Tracked-On: #7455
Signed-off-by: Yifan Liu <yifan1.liu@intel.com>
2022-05-11 22:05:43 +08:00
Conghui f172502044 config-tools: bugfix for file related issue in UI
1. when using existing configuration, UI show the existing information.
2. remove launch script when removing post-launched VM.
3. new working folder created with no existing files.
4. automatically minimized.

Tracked-On: #7450
Signed-off-by: Conghui <conghui.chen@intel.com>
2022-05-11 11:38:26 +08:00
Weiyi Feng 631de1d6fd config_tools: add default value for new vm cpu_affinity setting
add default value for new vm cpu_affinity setting

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-05-11 10:16:38 +08:00
Weiyi Feng b8d9e288bf config_tools: add custom cpu_affinity component
add custom cpu_affinity component

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-05-11 10:16:38 +08:00
Wu Zhou c12f3adee0 config-tools: ivshmem.vm_name changes with name edit
This patch is to fix the issue that when user edits VM name, the VM_NAME
field in IVSHMEM data doesn't sync.

To fix this, configForm emits a 'vmNameChange' when VM name is edited.
Then old name is replaced with new name. And when deleting VM, the old
name is replaced with null.

Tracked-On: #7445

Signed-off-by: Zhou, Wu <wu.zhou@intel.com>
2022-05-11 09:47:29 +08:00
Wu Zhou c4f9146746 config-tools: limit the tooltip box max-width
The tooltip box's default width is inconsistent with the screen width.
It could run off the configurator window when the tooltip text is long.
Limit it to 50%.

Tracked-On: #7442

Signed-off-by: Zhou, Wu <wu.zhou@intel.com>
2022-05-10 17:55:32 +08:00
Weiyi Feng d6a69970c6 config_tools: update node-fetch version lock to 2.6.7
update node-fetch version lock to 2.6.7

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-05-10 13:21:50 +08:00
Yifan Liu a12edaaab2 misc: configurator: Disable steps until prior step completed
Step 2 should be available after board is imported/created, and step
3 should follow step 2.

Tracked-On: #7435
Signed-off-by: Yifan Liu <yifan1.liu@intel.com>
2022-05-09 11:25:11 +08:00
Weiyi-Feng 06b942f5eb config_tools: Add vue-json-schema-form and advanced custom component for IVSHMEM field
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>
2022-05-08 15:52:28 +08:00
Conghui 2d66ba4d40 config-tools: add warning message
Add warning message when users select a new board for an existing
configuration.

Tracked-On: #7413
Signed-off-by: Conghui <conghui.chen@intel.com>
2022-05-07 15:31:35 +08:00
Conghui 292978aff1 config-tools: bugfix for deleting Service VM
When deleting Service VM, Post-launched VMs also need to be deleted.

Tracked-On: #7413
Signed-off-by: Conghui <conghui.chen@intel.com>
2022-05-07 15:31:35 +08:00
Conghui ab51dcdab4 config-tools: show confirm info for deleting VMs
Show different confirm windows for Service_VM and other VMs.

Tracked-On: #7413
Signed-off-by: Conghui <conghui.chen@intel.com>
2022-05-07 15:31:35 +08:00
Conghui 02c8043ff9 config-tools: change tab color
change tab color

Tracked-On: #7413
Signed-off-by: Conghui <conghui.chen@intel.com>
2022-05-07 15:31:35 +08:00
Conghui 5a3b38f778 config-tools: add confirm message
Add confirm message when saveing scenario and launch scripts.

Tracked-On: #7413

Signed-off-by: Conghui <conghui.chen@intel.com>
2022-05-07 15:31:35 +08:00
Yifan Liu bf656a1141 misc: configurator: Bugfix: Incorrect DynamicEnum type
Currently dynamicEnum hook returns all available options (enums) as a
list of strings. However in some cases strings need to be converted to
target types.

One example is CPU affinity. The dynamicEnum should produce a list of
all available pCPUIDs (a list of integers), instead of a list of
strings.

This patch adds a converter in get_enum to do the type conversion.

Tracked-On: #7420
Signed-off-by: Yifan Liu <yifan1.liu@intel.com>
2022-05-07 13:12:40 +08:00
Yifan Liu 35dc60192f misc: configurator: Re-assign VMID based on load order
Previously if user creates a shared scenario and adds a pre-launched VM,
the pre-launched VM will be assigned a VMID that's greater than service
VM, which will be blocked by scenario validation.

This patch re-assigns the VMID before saving as scenario XMLs based on
their load order. The UI-only VM name will have no impact on VMID that's
actually written to scenario XML.

Tracked-On: #7419
Signed-off-by: Yifan Liu <yifan1.liu@intel.com>
2022-05-07 13:12:40 +08:00
Yifan Liu ee3a527464 misc: configurator: Open folder callback bugfix
Open folder callback should append a path split after selecting working
folder, same way as it did with default one.

Tracked-On: #7418
Signed-off-by: Yifan Liu <yifan1.liu@intel.com>
2022-05-07 13:12:40 +08:00
Conghui 9669cc1c58 config-tools: add alert for non-exist file
Add alert when importing an non-exist scenario file

Tracked-On: #7413
Signed-off-by: Conghui <conghui.chen@intel.com>
2022-05-06 13:39:27 +08:00
Weiyi-Feng c544ac98bc config_tools: fix document typo
fix document typo

Tracked-On: #6691
Signed-off-by: Weiyi Feng weiyix.feng@intel.com

Co-authored-by: David Kinder <david.b.kinder@intel.com>
2022-04-27 12:54:47 +08:00
Weiyi Feng f9cb5edc7e config_tools: update configurator document and build script
1. update configurator document.
2. fix build script doesn't generate allchecks.xsd issue.
3. add open_devtools command, now we can get detail debug info in prod.
4. remove vconsole component, which will cause some strange js runtime issue in Linux.

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-04-27 12:54:47 +08:00
Weiyi Feng 38f79d986b config_tools: fix build issue
fix build issue

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-04-26 09:22:57 +08:00
Weiyi Feng 696ba31be8 config_tools: refactor configurator for web page cache issue
refactor configurator for web page cache issue

Tracked-On: #7356
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-04-25 18:13:12 +08:00
Conghui 8e61d417db configurator: bugfix for removing Service VM
When removing Service VM from UI, the post-launched VMs should also be
removed.
Besides, add a warning window when removing Service VM.

Tracked-On: #7349
Signed-off-by: Conghui <conghui.chen@intel.com>
Reviewed-by:  Weiyi Feng <weiyix.feng@intel.com>
2022-04-25 13:16:46 +08:00
Weiyi Feng ac9824cd54 configurator: fix can't load scenario without pci_devs issue
fix can't load scenario without pci_devs issue

Tracked-On: #7246
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-04-06 11:17:18 +08:00
Weiyi Feng 3d8fa80949 configurator: update configurator version to 0.3.0
update configurator version to 0.3.0

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-04-01 12:19:40 +08:00
Weiyi Feng ce71921011 configurator: fix some schema field does not provide display name issue
fix some schema field does not provide display name issue

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-04-01 12:19:40 +08:00
Weiyi Feng 3f1057b747 configurator: fix single vm scenario load issue
fix single vm scenario load issue

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-04-01 12:19:40 +08:00
Weiyi Feng 578a482626 configurator: fix displayed scenario path
fix displayed scenario path

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-04-01 12:19:40 +08:00
Weiyi Feng a79d2ded7e configurator: update configurator dependencies to latest version
update configurator dependencies to latest version

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-04-01 09:14:43 +08:00
Weiyi-Feng 260718d544 configurator: autoload board and scenario xml when exist
autoload board and scenario xml when exist

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-03-31 19:26:33 +08:00
Weiyi Feng 3c4f14ede7 configurator: add new configurator
add new configurator

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
(cherry picked from commit 1232a7229af7ed60706cc725acf955ccbd8ca035)
2022-03-31 19:26:33 +08:00