config_tools: add tooltips for cpu affinity

add tooltips for cpu affinity and tiny fix for virtio console device.

Tracked-On: #7933
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
This commit is contained in:
Kunhui-Li 2022-07-28 14:48:23 +08:00 committed by acrnsi-robot
parent e83bea0882
commit 9a5f42e187
2 changed files with 17 additions and 4 deletions

View File

@ -131,7 +131,7 @@ export default {
}, },
data() { data() {
return { return {
ConsoleConfiguration: this.rootSchema.definitions['BasicVirtioConsoleBackendType'], ConsoleConfiguration: this.rootSchema.definitions['VirtioConsoleConfiguration'],
enumNames: this.rootSchema.definitions['VirtioConsoleUseType']['enumNames'], enumNames: this.rootSchema.definitions['VirtioConsoleUseType']['enumNames'],
enum: this.rootSchema.definitions['VirtioConsoleUseType']['enum'], enum: this.rootSchema.definitions['VirtioConsoleUseType']['enum'],
ConsoleBackendType: this.rootSchema.definitions['BasicVirtioConsoleBackendType']['enum'], ConsoleBackendType: this.rootSchema.definitions['BasicVirtioConsoleBackendType']['enum'],

View File

@ -13,8 +13,15 @@
<b-row class="align-items-center" <b-row class="align-items-center"
v-for="(cpu,index) in defaultVal.pcpu"> v-for="(cpu,index) in defaultVal.pcpu">
<b-col> <b-col>
<span v-if="index===0" style="color: red; margin-left: -10px;margin-right: 4px">*</span> <label class="requiredField" v-if="index===0"></label>
pCPU ID <label>
<n-popover trigger="hover" placement="top-start">
<template #trigger>
<IconInfo/>
</template>
<span v-html="this.CPUAffinityConfiguration.properties.pcpu_id.description"></span>
</n-popover>pCPU ID
</label>
</b-col> </b-col>
<b-col> <b-col>
<b-form-select :state="validateCPUAffinity(cpu.pcpu_id)" v-model="cpu.pcpu_id" <b-form-select :state="validateCPUAffinity(cpu.pcpu_id)" v-model="cpu.pcpu_id"
@ -73,10 +80,11 @@ import _ from 'lodash'
import {Icon} from "@vicons/utils"; import {Icon} from "@vicons/utils";
import {Plus, Minus} from '@vicons/fa' import {Plus, Minus} from '@vicons/fa'
import {BFormInput, BRow} from "bootstrap-vue-3"; import {BFormInput, BRow} from "bootstrap-vue-3";
import IconInfo from '@lljj/vjsf-utils/icons/IconInfo.vue';
export default { export default {
name: "cpu_affinity", name: "cpu_affinity",
components: {BRow, BFormInput, Icon, Plus, Minus}, components: {BRow, BFormInput, Icon, Plus, Minus, IconInfo},
props: { props: {
...fieldProps, ...fieldProps,
}, },
@ -110,6 +118,7 @@ export default {
}, },
data() { data() {
return { return {
CPUAffinityConfiguration: this.rootSchema.definitions['CPUAffinityConfiguration'],
defaultVal: vueUtils.getPathVal(this.rootFormData, this.curNodePath) defaultVal: vueUtils.getPathVal(this.rootFormData, this.curNodePath)
} }
}, },
@ -141,6 +150,10 @@ export default {
</script> </script>
<style scoped> <style scoped>
.requiredField:before {
content: '*';
color: red;
}
.ToolSet { .ToolSet {
display: flex; display: flex;