From 631de1d6fd41ed82c00228dd6dcb31b7446ac802 Mon Sep 17 00:00:00 2001 From: Weiyi Feng Date: Wed, 11 May 2022 10:09:46 +0800 Subject: [PATCH] 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 --- .../packages/configurator/src/lib/acrn.ts | 10 ++- .../ConfigForm/CustomWidget/cpu_affinity.vue | 71 +++++++++++-------- 2 files changed, 51 insertions(+), 30 deletions(-) diff --git a/misc/config_tools/configurator/packages/configurator/src/lib/acrn.ts b/misc/config_tools/configurator/packages/configurator/src/lib/acrn.ts index ebbd63878..7fd74aaf4 100644 --- a/misc/config_tools/configurator/packages/configurator/src/lib/acrn.ts +++ b/misc/config_tools/configurator/packages/configurator/src/lib/acrn.ts @@ -110,7 +110,15 @@ class Configurator { return { '@id': vmid, load_order: load_order, - name: `VM${vmid}` + name: `VM${vmid}`, + cpu_affinity: { + pcpu: [ + { + pcpu_id: null, + real_time_vcpu: false + } + ] + } } } diff --git a/misc/config_tools/configurator/packages/configurator/src/pages/Config/ConfigForm/CustomWidget/cpu_affinity.vue b/misc/config_tools/configurator/packages/configurator/src/pages/Config/ConfigForm/CustomWidget/cpu_affinity.vue index a79d7b010..76d05c04c 100644 --- a/misc/config_tools/configurator/packages/configurator/src/pages/Config/ConfigForm/CustomWidget/cpu_affinity.vue +++ b/misc/config_tools/configurator/packages/configurator/src/pages/Config/ConfigForm/CustomWidget/cpu_affinity.vue @@ -2,39 +2,52 @@
{{ uiOptions.title }}
- - - - Virtual CPU ID - Real-time vCPU: - - - - pCPU ID - - - - -
- {{ vCPUName(index) }} -
-
- - - +
+ + + + Virtual CPU ID + Real-time vCPU: + + + + pCPU ID + + + + +
+ {{ vCPUName(index) }} +
+
+ + + + +
+
+ + + +
+
+ + + +
+
+
+
+
+
-
+
-
- - - -
@@ -52,11 +65,11 @@ import { import _ from 'lodash' import {Icon} from "@vicons/utils"; import {Plus, Minus} from '@vicons/fa' -import {BFormInput} from "bootstrap-vue-3"; +import {BFormInput, BRow} from "bootstrap-vue-3"; export default { name: "cpu_affinity", - components: {BFormInput, Icon, Plus, Minus}, + components: {BRow, BFormInput, Icon, Plus, Minus}, props: { ...fieldProps, },