mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-08-09 12:08:30 +00:00
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>
This commit is contained in:
parent
b8d9e288bf
commit
631de1d6fd
@ -110,7 +110,15 @@ class Configurator {
|
|||||||
return {
|
return {
|
||||||
'@id': vmid,
|
'@id': vmid,
|
||||||
load_order: load_order,
|
load_order: load_order,
|
||||||
name: `VM${vmid}`
|
name: `VM${vmid}`,
|
||||||
|
cpu_affinity: {
|
||||||
|
pcpu: [
|
||||||
|
{
|
||||||
|
pcpu_id: null,
|
||||||
|
real_time_vcpu: false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,39 +2,52 @@
|
|||||||
<div style="border:1px solid gray;background: #F5F5F5;padding: 1rem">
|
<div style="border:1px solid gray;background: #F5F5F5;padding: 1rem">
|
||||||
<b>{{ uiOptions.title }}</b>
|
<b>{{ uiOptions.title }}</b>
|
||||||
<div class="p-4">
|
<div class="p-4">
|
||||||
<b-row>
|
<div v-if="defaultVal.pcpu && defaultVal.pcpu.length>0">
|
||||||
<b-col></b-col>
|
<b-row>
|
||||||
<b-col></b-col>
|
<b-col></b-col>
|
||||||
<b-col>Virtual CPU ID</b-col>
|
<b-col></b-col>
|
||||||
<b-col class="ps-5">Real-time vCPU:</b-col>
|
<b-col>Virtual CPU ID</b-col>
|
||||||
<b-col></b-col>
|
<b-col class="ps-5">Real-time vCPU:</b-col>
|
||||||
</b-row>
|
<b-col></b-col>
|
||||||
<b-row class="align-items-center"
|
</b-row>
|
||||||
v-for="(cpu,index) in defaultVal.pcpu">
|
<b-row class="align-items-center"
|
||||||
<b-col>pCPU ID</b-col>
|
v-for="(cpu,index) in defaultVal.pcpu">
|
||||||
<b-col>
|
<b-col>pCPU ID</b-col>
|
||||||
<b-form-select v-model="cpu.pcpu_id" :options="pcpuid_enum"></b-form-select>
|
<b-col>
|
||||||
</b-col>
|
<b-form-select v-model="cpu.pcpu_id" :options="pcpuid_enum"></b-form-select>
|
||||||
<b-col class="p-3 col-3">
|
</b-col>
|
||||||
<div style="padding:9px;border-radius: 9px;width: 100%;border: 1px solid dimgray;background: lightgray;">
|
<b-col class="p-3 col-3">
|
||||||
{{ vCPUName(index) }}
|
<div style="padding:9px;border-radius: 9px;width: 100%;border: 1px solid dimgray;background: lightgray;">
|
||||||
</div>
|
{{ vCPUName(index) }}
|
||||||
</b-col>
|
</div>
|
||||||
<b-col class="p-3">
|
</b-col>
|
||||||
<b-form-checkbox v-model="cpu.real_time_vcpu"/>
|
<b-col class="p-3">
|
||||||
</b-col>
|
<b-form-checkbox v-model="cpu.real_time_vcpu"/>
|
||||||
|
</b-col>
|
||||||
|
<b-col>
|
||||||
|
<div class="ToolSet">
|
||||||
|
<div @click="addPCPU(index)" :class="{'d-none': (this.defaultVal.pcpu.length-1)!==index}">
|
||||||
|
<Icon size="18px">
|
||||||
|
<Plus/>
|
||||||
|
</Icon>
|
||||||
|
</div>
|
||||||
|
<div @click="removePCPU(index)">
|
||||||
|
<Icon size="18px">
|
||||||
|
<Minus/>
|
||||||
|
</Icon>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</b-col>
|
||||||
|
</b-row>
|
||||||
|
</div>
|
||||||
|
<b-row v-else>
|
||||||
<b-col>
|
<b-col>
|
||||||
<div class="ToolSet">
|
<div class="ToolSet">
|
||||||
<div @click="addPCPU(index)" :class="{'d-none': (this.defaultVal.pcpu.length-1)!==index}">
|
<div @click="addPCPU(-1)">
|
||||||
<Icon size="18px">
|
<Icon size="18px">
|
||||||
<Plus/>
|
<Plus/>
|
||||||
</Icon>
|
</Icon>
|
||||||
</div>
|
</div>
|
||||||
<div @click="removePCPU(index)">
|
|
||||||
<Icon size="18px">
|
|
||||||
<Minus/>
|
|
||||||
</Icon>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</b-col>
|
</b-col>
|
||||||
</b-row>
|
</b-row>
|
||||||
@ -52,11 +65,11 @@ import {
|
|||||||
import _ from 'lodash'
|
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} from "bootstrap-vue-3";
|
import {BFormInput, BRow} from "bootstrap-vue-3";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "cpu_affinity",
|
name: "cpu_affinity",
|
||||||
components: {BFormInput, Icon, Plus, Minus},
|
components: {BRow, BFormInput, Icon, Plus, Minus},
|
||||||
props: {
|
props: {
|
||||||
...fieldProps,
|
...fieldProps,
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user