align CPU pinning checkbox position in cloud template

(cherry picked from commit 59bf735f8b)
This commit is contained in:
andy.lee
2025-02-06 14:24:51 +08:00
parent 5c96e90d58
commit 50bdd53186
2 changed files with 5 additions and 1 deletions
@@ -434,7 +434,7 @@ export default {
<div class="spacer"></div> <div class="spacer"></div>
<Checkbox <Checkbox
v-if="value.cpuPinningFeatureEnabled" v-if="value.cpuPinningFeatureEnabled"
v-model="cpuPinning" v-model:value="cpuPinning"
class="check" class="check"
type="checkbox" type="checkbox"
tooltip-key="harvester.virtualMachine.cpuPinning.tooltip" tooltip-key="harvester.virtualMachine.cpuPinning.tooltip"
@@ -210,6 +210,10 @@ export default class HciVmTemplateVersion extends HarvesterResource {
await templateResource.save(); await templateResource.save();
} }
get cpuPinningFeatureEnabled() {
return this.$rootGetters['harvester-common/getFeatureEnabled']('cpuPinning');
}
get defaultVersion() { get defaultVersion() {
const templates = this.$rootGetters['harvester/all'](HCI.VM_TEMPLATE); const templates = this.$rootGetters['harvester/all'](HCI.VM_TEMPLATE);
const template = templates.find((T) => this.templateId === T.id); const template = templates.find((T) => this.templateId === T.id);