all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Nicolas Frey <n.frey@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH pve-manager 4/4] partially fix #7801: ui: hardware view: warn about problematic virtio versions
Date: Tue, 25 Aug 2026 13:02:38 +0200	[thread overview]
Message-ID: <20260825110238.215790-5-n.frey@proxmox.com> (raw)
In-Reply-To: <20260825110238.215790-1-n.frey@proxmox.com>

based on whether the ostype is windows or not. extends the
`editorFactory` to allow extraOptions to be a callback to allow for lazy
evaluation. this is needed as 'ostype' is not yet instantiated when
eagerly evaluating.

Fixes: https://bugzilla.proxmox.com/show_bug.cgi?id=7801
Signed-off-by: Nicolas Frey <n.frey@proxmox.com>
---
 www/manager6/qemu/HardwareView.js | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/www/manager6/qemu/HardwareView.js b/www/manager6/qemu/HardwareView.js
index e6c02299..ae09094f 100644
--- a/www/manager6/qemu/HardwareView.js
+++ b/www/manager6/qemu/HardwareView.js
@@ -805,7 +805,7 @@ Ext.define('PVE.qemu.HardwareView', {
         };
 
         let editorFactory = (classPath, extraOptions) => {
-            extraOptions = extraOptions || {};
+            extraOptions = (Ext.isFunction(extraOptions) ? extraOptions() : extraOptions) || {};
             return () =>
                 Ext.create(`PVE.qemu.${classPath}`, {
                     autoShow: true,
@@ -847,7 +847,9 @@ Ext.define('PVE.qemu.HardwareView', {
                                 text: gettext('CD/DVD Drive'),
                                 iconCls: 'pve-itype-icon-cdrom',
                                 disabled: !caps.vms['VM.Config.CDROM'],
-                                handler: editorFactory('CDEdit'),
+                                handler: editorFactory('CDEdit', () => ({
+                                    warnVirtio: PVE.Utils.is_windows(me.getObjectValue('ostype')),
+                                })),
                             },
                             {
                                 text: gettext('Network Device'),
-- 
2.47.3




  parent reply	other threads:[~2026-08-25 11:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-25 11:02 [PATCH manager 0/4] fix #7801: ui: warn about problematic virtio versions on iso select Nicolas Frey
2026-08-25 11:02 ` [PATCH pve-manager 1/4] ui: iso selector: add option to warn about virtio versions with issues Nicolas Frey
2026-08-25 13:02   ` Maximiliano Sandoval
2026-08-25 11:02 ` [PATCH pve-manager 2/4] ui: cd edit: add `warnVirtio` option to pass to iso selector Nicolas Frey
2026-08-25 11:02 ` [PATCH pve-manager 3/4] partially fix #7801: ui: ospanel: warn about problematic virtio versions Nicolas Frey
2026-08-25 11:02 ` Nicolas Frey [this message]
2026-08-25 14:44 ` [PATCH manager 0/4] fix #7801: ui: warn about problematic virtio versions on iso select Maximiliano Sandoval
2026-08-25 14:52   ` Nicolas Frey

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=20260825110238.215790-5-n.frey@proxmox.com \
    --to=n.frey@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