On Thu, Mar 26, 2026 at 10:59:24AM +0100, Fiona Ebner wrote:
> Am 12.03.26 um 9:40 AM schrieb Arthur Bied-Charreton:
> > Add 'allowCustom' configuration parameter. When set to false, only
> > default CPU models will be shown.
> >
> > Original patch:
> > https://lore.proxmox.com/pve-devel/[email protected]/
> >
> > Originally-by: Stefan Reiter <[email protected]>
> > Signed-off-by: Arthur Bied-Charreton <[email protected]>
> > ---
> > www/manager6/form/CPUModelSelector.js | 11 ++++++++++-
> > 1 file changed, 10 insertions(+), 1 deletion(-)
> >
> > diff --git a/www/manager6/form/CPUModelSelector.js
> > b/www/manager6/form/CPUModelSelector.js
> > index 737b6ff4..2154ff46 100644
> > --- a/www/manager6/form/CPUModelSelector.js
> > +++ b/www/manager6/form/CPUModelSelector.js
> > @@ -19,7 +19,9 @@ Ext.define('PVE.form.CPUModelSelector', {
> > autoSelect: false,
> >
> > deleteEmpty: true,
> > -
> > + config: {
> > + allowCustom: true,
>
> Tiny nit: I' slightly prefer showCustom or even slightly more
> showCustomModels
>
ACK, will update the variable name in the next iteration of the series
> > + },
> > listConfig: {
> > columns: [
> > {
> > @@ -100,4 +102,11 @@ Ext.define('PVE.form.CPUModelSelector', {
> > },
> > },
> > },
> > + initComponent: function () {
> > + let me = this;
> > + me.callParent();
> > + if (!me.allowCustom) {
> > + me.getStore().addFilter({ filterFn: (rec) => !rec.data.custom
> > });
> > + }
> > + },
> > });
>