public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Alexandre Derumier <aderumier@odiso.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH v2 pve-manager 1/1] qemu: processor : set x86-64-v2-AES as default cputype for create wizard
Date: Fri,  2 Jun 2023 12:05:51 +0200	[thread overview]
Message-ID: <20230602100551.2224246-3-aderumier@odiso.com> (raw)
In-Reply-To: <20230602100551.2224246-1-aderumier@odiso.com>

---
 www/manager6/qemu/OSDefaults.js    |  1 +
 www/manager6/qemu/ProcessorEdit.js | 13 +++++++++++++
 2 files changed, 14 insertions(+)

diff --git a/www/manager6/qemu/OSDefaults.js b/www/manager6/qemu/OSDefaults.js
index 5e588a58..58bc76ff 100644
--- a/www/manager6/qemu/OSDefaults.js
+++ b/www/manager6/qemu/OSDefaults.js
@@ -43,6 +43,7 @@ Ext.define('PVE.qemu.OSDefaults', {
 		    virtio: 1,
 	    },
 	    scsihw: 'virtio-scsi-single',
+	    cputype: 'x86-64-v2-AES',
 	};
 
        // virtio-net is in kernel since 2.6.25
diff --git a/www/manager6/qemu/ProcessorEdit.js b/www/manager6/qemu/ProcessorEdit.js
index b845ff66..727d1679 100644
--- a/www/manager6/qemu/ProcessorEdit.js
+++ b/www/manager6/qemu/ProcessorEdit.js
@@ -29,6 +29,19 @@ Ext.define('PVE.qemu.ProcessorInputPanel', {
 
 	    viewModel.set('userIsRoot', Proxmox.UserName === 'root@pam');
 	},
+	control: {
+	    '#': {
+		afterrender: 'setCputype',
+	    },
+	},
+	setCputype: function() {
+	    let me = this;
+	    let view = me.getView();
+	    let cputype = view.down('CPUModelSelector[name=cputype]');
+	    if (view.insideWizard) {
+		cputype.setValue(PVE.qemu.OSDefaults.generic.cputype);
+	    }
+        },
     },
 
     onGetValues: function(values) {
-- 
2.30.2




  parent reply	other threads:[~2023-06-02 10:07 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-02 10:05 [pve-devel] [PATCH-SERIES v4 qemu-server/manager] add and set x86-64-v2-AES as default model for new vms Alexandre Derumier
2023-06-02 10:05 ` [pve-devel] [PATCH v4 qemu-server 1/1] cpuconfig: add new x86-64-vX models Alexandre Derumier
2023-06-06 12:09   ` Fiona Ebner
2023-06-06 13:36     ` DERUMIER, Alexandre
2023-06-07  8:31       ` Fiona Ebner
2023-06-07 10:57         ` DERUMIER, Alexandre
2023-06-07 11:25           ` DERUMIER, Alexandre
2023-06-07 11:48           ` Fiona Ebner
2023-06-07 14:11             ` DERUMIER, Alexandre
2023-06-07 15:29               ` DERUMIER, Alexandre
2023-06-02 10:05 ` Alexandre Derumier [this message]
2023-06-06 12:47   ` [pve-devel] [PATCH v2 pve-manager 1/1] qemu: processor : set x86-64-v2-AES as default cputype for create wizard Fiona Ebner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230602100551.2224246-3-aderumier@odiso.com \
    --to=aderumier@odiso.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal