* [pve-devel] [PATCH manager 1/2] fix #6304 ui: qemu: fix validator in DisplayEdit to match serial displays
@ 2025-04-15 15:30 Aaron Lauterer
2025-04-15 15:30 ` [pve-devel] [PATCH manager 2/2] ui: qemu: make validator warning for serial displays more concrete Aaron Lauterer
0 siblings, 1 reply; 2+ messages in thread
From: Aaron Lauterer @ 2025-04-15 15:30 UTC (permalink / raw)
To: pve-devel
because the value we get is not the config key, but the displayed text.
Therefore we fetch the config key from the PVE.Utils.kvm_vga_drivers object.
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
---
We have some options here, we could also match and extract the serial ID
from the displayed text, but that will fail once we change the displayed
text in the kvm_vga_drivers.
This is also the quickest way regarding #6304 as it will just get the
old validator working again.
Adding a hint or making it possible to add the matching serial port
device (semi) automatically will most likely be a bigger change.
www/manager6/qemu/DisplayEdit.js | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/www/manager6/qemu/DisplayEdit.js b/www/manager6/qemu/DisplayEdit.js
index c8a67017..7a9a5160 100644
--- a/www/manager6/qemu/DisplayEdit.js
+++ b/www/manager6/qemu/DisplayEdit.js
@@ -51,7 +51,10 @@ Ext.define('PVE.qemu.DisplayInputPanel', {
validator: function(v) {
let cfg = this.up('proxmoxWindowEdit').vmconfig || {};
- if (v.match(/^serial\d+$/) && (!cfg[v] || cfg[v] !== 'socket')) {
+ let vgaKey = Object.keys(PVE.Utils.kvm_vga_drivers).find(
+ (key) => PVE.Utils.kvm_vga_drivers[key] === v
+ );
+ if (vgaKey.match(/^serial\d+$/) && (!cfg[vgaKey] || cfg[vgaKey] !== 'socket')) {
let fmt = gettext("Serial interface '{0}' is not correctly configured.");
return Ext.String.format(fmt, v);
}
--
2.39.5
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
* [pve-devel] [PATCH manager 2/2] ui: qemu: make validator warning for serial displays more concrete
2025-04-15 15:30 [pve-devel] [PATCH manager 1/2] fix #6304 ui: qemu: fix validator in DisplayEdit to match serial displays Aaron Lauterer
@ 2025-04-15 15:30 ` Aaron Lauterer
0 siblings, 0 replies; 2+ messages in thread
From: Aaron Lauterer @ 2025-04-15 15:30 UTC (permalink / raw)
To: pve-devel
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
---
feel free to squash this into the first patch if you prefer.
www/manager6/qemu/DisplayEdit.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/www/manager6/qemu/DisplayEdit.js b/www/manager6/qemu/DisplayEdit.js
index 7a9a5160..7482ca55 100644
--- a/www/manager6/qemu/DisplayEdit.js
+++ b/www/manager6/qemu/DisplayEdit.js
@@ -55,7 +55,7 @@ Ext.define('PVE.qemu.DisplayInputPanel', {
(key) => PVE.Utils.kvm_vga_drivers[key] === v
);
if (vgaKey.match(/^serial\d+$/) && (!cfg[vgaKey] || cfg[vgaKey] !== 'socket')) {
- let fmt = gettext("Serial interface '{0}' is not correctly configured.");
+ let fmt = gettext("Serial interface '{0}' needs a matching serial port device configured.");
return Ext.String.format(fmt, v);
}
return true;
--
2.39.5
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-04-15 15:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-15 15:30 [pve-devel] [PATCH manager 1/2] fix #6304 ui: qemu: fix validator in DisplayEdit to match serial displays Aaron Lauterer
2025-04-15 15:30 ` [pve-devel] [PATCH manager 2/2] ui: qemu: make validator warning for serial displays more concrete Aaron Lauterer
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.