config_tools: rename "Virtio console" to "virtio serial port (as console)"

virtio serial port and virtio console are all based on virito serial port.
but virtio serial port functionally can not be used as console,
which may lead to user confusion, so explicitly specify the point by
changing the item name as follows:
Virtio console -> virtio serial port (as console)

Tracked-On: #7540
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
This commit is contained in:
Kunhui-Li 2022-05-24 14:57:24 +08:00 committed by acrnsi-robot
parent f98840c023
commit 5cfc7aa381
2 changed files with 20 additions and 5 deletions

View File

@ -8,7 +8,7 @@
<label>Use type: </label>
</b-col>
<b-col md="4">
<b-form-select v-model="console.use_type" :options="ConsoleUseType"/>
<b-form-select v-model="console.use_type" :options="getUseTypes"/>
</b-col>
</b-row>
@ -95,7 +95,8 @@ export default {
},
data() {
return {
ConsoleUseType: this.rootSchema.definitions['VirtioConsoleUseType']['enum'],
enumNames: this.rootSchema.definitions['VirtioConsoleUseType']['enumNames'],
enum: this.rootSchema.definitions['VirtioConsoleUseType']['enum'],
ConsoleBackendType: this.rootSchema.definitions['BasicVirtioConsoleBackendType']['enum'],
defaultVal: vueUtils.getPathVal(this.rootFormData, this.curNodePath)
};
@ -117,6 +118,16 @@ export default {
deep: true
}
},
computed: {
getUseTypes() {
let enumOptions = []
for (let i = 0; i < this.enumNames.length; i++) {
let enumOption = {text: this.enumNames[i], value: this.enum[i]}
enumOptions.push(enumOption)
}
return enumOptions
},
},
methods: {
removeVirtioConsole(index) {
this.defaultVal.splice(index, 1);
@ -165,4 +176,4 @@ export default {
border-radius: 5px;
margin-bottom: 1rem;
}
</style>
</style>

View File

@ -339,8 +339,12 @@ The size is a subset of the VM's total memory size specified on the Basic tab.</
<xs:documentation>A string with value: ``Virtio console`` or ``Virtio serial port``</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:enumeration value="Virtio console" />
<xs:enumeration value="Virtio serial port" />
<xs:enumeration value="Virtio console" >
<xs:annotation acrn:title="virtio serial port (as console)" />
</xs:enumeration>
<xs:enumeration value="Virtio serial port" >
<xs:annotation acrn:title="virtio serial port" />
</xs:enumeration>
</xs:restriction>
</xs:simpleType>