all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Fiona Ebner <f.ebner@proxmox.com>
To: Arthur Bied-Charreton <a.bied-charreton@proxmox.com>,
	pve-devel@lists.proxmox.com
Subject: Re: [PATCH pve-manager 4/8] ui: Add basic custom CPU model editor
Date: Thu, 26 Mar 2026 16:10:34 +0100	[thread overview]
Message-ID: <b9274cb9-0ae1-46aa-a4b5-e10251c1a948@proxmox.com> (raw)
In-Reply-To: <20260312084021.124465-5-a.bied-charreton@proxmox.com>

Am 12.03.26 um 9:40 AM schrieb Arthur Bied-Charreton:
> diff --git a/www/manager6/dc/CPUTypeEdit.js b/www/manager6/dc/CPUTypeEdit.js
> new file mode 100644
> index 00000000..8cf508b4
> --- /dev/null
> +++ b/www/manager6/dc/CPUTypeEdit.js

Could also use an onlineHelp reference

---snip 8<---

> +                {
> +                    xtype: 'CPUModelSelector',
> +                    fieldLabel: gettext('Reported Model'),

What about 'Base Model' with a tooltip that it's reported to the guest
(if that is even necessary)? I feel like 'Reported Model' doesn't make
it clear that the rest of the configuration is applied based off that model.

> +                    allowCustom: false,
> +                    name: 'reported-model',
> +                },

---snip 8<---

> diff --git a/www/manager6/dc/CPUTypeView.js b/www/manager6/dc/CPUTypeView.js
> new file mode 100644
> index 00000000..c79ce690
> --- /dev/null
> +++ b/www/manager6/dc/CPUTypeView.js
> @@ -0,0 +1,139 @@
> +Ext.define('pve-custom-cpu-type', {
> +    extend: 'Ext.data.Model',
> +    fields: [
> +        'cputype',
> +        'reported-model',
> +        'hv-vendor-id',
> +        'flags',
> +        'phys-bits',
> +        { name: 'hidden', type: 'boolean' },
> +    ],
> +});
> +
> +Ext.define('PVE.dc.CPUTypeView', {
> +    extend: 'Ext.grid.GridPanel',
> +    alias: ['widget.pveCPUTypeView'],
> +
> +    onlineHelp: 'qm_cpu',

Maybe link directly to the CPU type section?

---snip 8<---

> +    columns: [
> +        {
> +            header: gettext('Name'),
> +            flex: 1,
> +            dataIndex: 'cputype',
> +            renderer: (val) => val.replace(/^custom-/, ''),
> +        },
> +        {
> +            header: gettext('Reported Model'),

Same as above, I'd prefer "Base Model".

> +            flex: 1,
> +            dataIndex: 'reported-model',
> +        },
> +        {
> +            header: gettext('Phys-Bits'),
> +            flex: 1,
> +            dataIndex: 'phys-bits',
> +        },
> +        {
> +            header: gettext('Hidden'),
> +            flex: 1,
> +            dataIndex: 'hidden',
> +        },
> +        {
> +            header: gettext('HyperV-Vendor'),
> +            flex: 1,
> +            dataIndex: 'hv-vendor-id',
> +        },
> +        {
> +            header: gettext('Flags'),
> +            flex: 2,
> +            dataIndex: 'flags',
> +        },
> +    ],
> +
> +    tbar: [
> +        {
> +            text: gettext('Add'),
> +            handler: 'onAdd',
> +        },
> +        '-',
> +        {
> +            xtype: 'proxmoxStdRemoveButton',
> +            baseurl: '/api2/extjs/nodes/localhost/capabilities/qemu/cpu/model/',
> +            getRecordName: (rec) => rec.data.cputype,
> +            getUrl: function (rec) {
> +                let me = this;
> +                return me.baseurl + rec.data.cputype;
> +            },
> +            callback: 'reload',

Currently, the confirm dialog shows:
"Are you sure you want to remove entry 'custom-nested-for-wsl'?"
Would be nicer along the lines of
"Are you sure you want to remove the custom CPU model 'nested-for-wsl'"
if that can be done without much effort. Otherwise, not too important.

> +        },
> +        {
> +            text: gettext('Edit'),
> +            handler: 'onEdit',
> +        },
> +    ],
> +
> +    selModel: {
> +        xtype: 'rowmodel',
> +    },
> +
> +    listeners: {
> +        itemdblclick: function (_, rec) {
> +            let me = this;
> +            me.getController().showEditor(rec.data.cputype);
> +        },
> +    },
> +
> +    initComponent: function () {
> +        let me = this;
> +        me.callParent();
> +        Proxmox.Utils.monStoreErrors(me, me.store);
> +    },
> +});
> diff --git a/www/manager6/dc/Config.js b/www/manager6/dc/Config.js
> index b5e27a21..629e4fc8 100644
> --- a/www/manager6/dc/Config.js
> +++ b/www/manager6/dc/Config.js
> @@ -146,6 +146,12 @@ Ext.define('PVE.dc.Config', {
>                      title: gettext('Replication'),
>                      itemId: 'replication',
>                  },
> +                {
> +                    xtype: 'pveCPUTypeView',
> +                    iconCls: 'fa fa-microchip',
> +                    title: gettext('Custom CPU models'),
> +                    itemId: 'cputypes',
> +                },

I feel like this might better fit further below, after the directory and
resource mappings items.

I wonder if we should collect the two mappings and this in a common
section, but I can't come up with a good name right now, something akin
to "Guest Resources/Hardware"? But that is something to be further
discussed so should be ordered at the end of the series or as a follow-up.




  reply	other threads:[~2026-03-26 15:10 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-12  8:40 [PATCH manager/qemu-server 0/8] Add API and UI for custom CPU models Arthur Bied-Charreton
2026-03-12  8:40 ` [PATCH pve-manager 1/8] ui: VMCPUFlagSelector: Fix unknownFlags behaviour Arthur Bied-Charreton
2026-03-25 15:57   ` Fiona Ebner
2026-03-26 13:47     ` Arthur Bied-Charreton
2026-03-12  8:40 ` [PATCH pve-manager 2/8] ui: CPUModelSelector: Fix dirty state on default Arthur Bied-Charreton
2026-03-26  9:53   ` Fiona Ebner
2026-03-26 14:14     ` Arthur Bied-Charreton
2026-03-12  8:40 ` [PATCH pve-manager 3/8] ui: CPUModelSelector: Allow filtering out custom models Arthur Bied-Charreton
2026-03-26  9:59   ` Fiona Ebner
2026-03-26 14:17     ` Arthur Bied-Charreton
2026-03-12  8:40 ` [PATCH pve-manager 4/8] ui: Add basic custom CPU model editor Arthur Bied-Charreton
2026-03-26 15:10   ` Fiona Ebner [this message]
2026-03-27  9:23     ` Arthur Bied-Charreton
2026-03-27  9:32       ` Fiona Ebner
2026-03-27  9:34         ` Arthur Bied-Charreton
2026-03-12  8:40 ` [PATCH pve-manager 5/8] ui: Add CPU flag editor for custom models Arthur Bied-Charreton
2026-03-26 15:22   ` Fiona Ebner
2026-03-27  9:34     ` Arthur Bied-Charreton
2026-03-26 15:40   ` Maximiliano Sandoval
2026-03-27  7:48     ` Arthur Bied-Charreton
2026-03-12  8:40 ` [PATCH qemu-server 6/8] qemu: Add helpers for new custom models endpoints Arthur Bied-Charreton
2026-03-20 17:20   ` Fiona Ebner
2026-03-23  6:56     ` Arthur Bied-Charreton
2026-03-12  8:40 ` [PATCH qemu-server 7/8] api: qemu: Extend cpu-flags endpoint to return actually supported flags Arthur Bied-Charreton
2026-03-20 17:20   ` Fiona Ebner
2026-03-23  7:25     ` Arthur Bied-Charreton
2026-03-12  8:40 ` [PATCH qemu-server 8/8] api: qemu: Add CRUD handlers for custom CPU models Arthur Bied-Charreton
2026-03-23 14:46   ` Fiona Ebner
2026-03-23 16:04     ` Arthur Bied-Charreton
2026-03-23 16:10       ` Arthur Bied-Charreton
2026-03-24  9:27         ` Fiona Ebner
2026-03-26 14:54 ` [PATCH manager/qemu-server 0/8] Add API and UI " Fiona Ebner
2026-03-27 13:07   ` Arthur Bied-Charreton
2026-03-27 13:28     ` 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=b9274cb9-0ae1-46aa-a4b5-e10251c1a948@proxmox.com \
    --to=f.ebner@proxmox.com \
    --cc=a.bied-charreton@proxmox.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal