all lists on 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
  2024-12-04  9:40 ` Dominik Csapak
  0 siblings, 1 reply; 7+ messages 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] 7+ messages in thread

end of thread, other threads:[~2025-01-27 13:35 UTC | newest]

Thread overview: 7+ messages (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
2024-12-04  9:40 ` Dominik Csapak
2024-12-04 21:50   ` Tyst Marin
2024-12-12  8:19     ` Dominik Csapak
2024-12-13  0:23       ` Tyst Marin
2024-12-13  8:34         ` Dominik Csapak
2025-01-27 13:35           ` Dominik Csapak

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