public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH] Add UI option for boot optional mapped usb device
@ 2024-11-26  1:51 moddingfox via pve-devel
  0 siblings, 0 replies; only message in thread
From: moddingfox via pve-devel @ 2024-11-26  1:51 UTC (permalink / raw)
  To: pve-devel; +Cc: moddingfox, Tyst Marin

[-- Attachment #1: Type: message/rfc822, Size: 7213 bytes --]

From: moddingfox <moddingfox@gmail.com>
To: pve-devel@lists.proxmox.com
Cc: Tyst Marin <moddingfox@foxtek.us>
Subject: [PATCH] Add UI option for boot optional mapped usb device
Date: Tue, 26 Nov 2024 01:51:56 +0000
Message-ID: <20241126015157.1107116-1-moddingfox@foxtek.us>

From: Tyst Marin <moddingfox@foxtek.us>

This is intended to work with a seprately submitted patch to qemu-server which enables the behavior

Signed-off-by: Tyst Marin <moddingfox@foxtek.us>
---
 www/manager6/qemu/USBEdit.js | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/www/manager6/qemu/USBEdit.js b/www/manager6/qemu/USBEdit.js
index b372d53d..f3606ef0 100644
--- a/www/manager6/qemu/USBEdit.js
+++ b/www/manager6/qemu/USBEdit.js
@@ -62,6 +62,10 @@ Ext.define('PVE.qemu.USBInputPanel', {
 	    delete values.usb3;
 	    val += ',usb3=1';
 	}
+	if (values.bootwhenmissing) {
+	    delete values.bootwhenmissing;
+	    val += ',bootwhenmissing=1';
+	}
 	values[me.confid] = val;
 	return values;
     },
@@ -142,6 +146,15 @@ Ext.define('PVE.qemu.USBInputPanel', {
 		    reference: 'usb3',
 		    fieldLabel: gettext('Use USB3'),
 		},
+		{
+		    xtype: 'checkbox',
+		    name: 'bootwhenmissing',
+		    bind: { disabled: '{!mapped.checked}' },
+		    inputValue: true,
+		    checked: true,
+		    reference: 'bootwhenmissing',
+		    fieldLabel: gettext('Boot Missing'),
+		},
 	    ],
 	},
     ],
@@ -180,7 +193,7 @@ Ext.define('PVE.qemu.USBEdit', {
 		}
 
 		let data = PVE.Parser.parsePropertyString(response.result.data[me.confid], 'host');
-		let port, hostdevice, mapped, usb3 = false;
+		let port, hostdevice, mapped, usb3, bootwhenmissing = false;
 		let usb;
 
 		if (data.host) {
@@ -199,6 +212,7 @@ Ext.define('PVE.qemu.USBEdit', {
 		}
 
 		usb3 = data.usb3 ?? false;
+		bootwhenmissing = data.bootwhenmissing ?? false;
 
 		var values = {
 		    usb,
@@ -206,6 +220,7 @@ Ext.define('PVE.qemu.USBEdit', {
 		    port,
 		    usb3,
 		    mapped,
+		    bootwhenmissing,
 		};
 
 		ipanel.setValues(values);
-- 
2.39.5



[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-11-26 10:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-26  1:51 [pve-devel] [PATCH] Add UI option for boot optional mapped usb device moddingfox via pve-devel

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