From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 0A9291FF168 for ; Tue, 26 Nov 2024 11:37:09 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id D746B2C93E; Tue, 26 Nov 2024 11:36:58 +0100 (CET) To: pve-devel@lists.proxmox.com Date: Tue, 26 Nov 2024 01:51:56 +0000 X-Mailman-Approved-At: Tue, 26 Nov 2024 11:36:57 +0100 MIME-Version: 1.0 Message-ID: List-Id: Proxmox VE development discussion List-Post: From: moddingfox via pve-devel Precedence: list Cc: moddingfox , Tyst Marin X-Mailman-Version: 2.1.29 X-BeenThere: pve-devel@lists.proxmox.com List-Subscribe: , List-Unsubscribe: , List-Archive: Reply-To: Proxmox VE development discussion List-Help: Subject: [pve-devel] [PATCH] Add UI option for boot optional mapped usb device Content-Type: multipart/mixed; boundary="===============3509914773385414520==" Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" --===============3509914773385414520== Content-Type: message/rfc822 Content-Disposition: inline Return-Path: X-Original-To: pve-devel@lists.proxmox.com Delivered-To: pve-devel@lists.proxmox.com Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 7144AC9DA4 for ; Tue, 26 Nov 2024 02:52:59 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 4A34B1E0FF for ; Tue, 26 Nov 2024 02:52:29 +0100 (CET) Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Tue, 26 Nov 2024 02:52:27 +0100 (CET) Received: by mail-pf1-x42a.google.com with SMTP id d2e1a72fcca58-724d23df764so4016497b3a.1 for ; Mon, 25 Nov 2024 17:52:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732585940; x=1733190740; darn=lists.proxmox.com; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=Gf9EzjcalroGRTq4XzzClHRUhtGlb+UZfQQe7S32hxg=; b=elN+nuIegSNLhgsOmhSzWiaiq9HR6yOGJ9ik/4Eci0uSu5WANhSNUOiVa+nlxLoAST tLwNSDWX88D+Pm49BJU3czznJdQhu6c5n68w1pyAnJVcscuKVDwhOFoV7ATyhsr2ItHw 9qbjOg4BG2Ky1P70HmwY6J//huLkK4YE1XeuFolxUySa9WyPZujEVkb6/por10uUWkJ6 9kBWvf6Wi5obxle1yupLf9aUdw0d6r12FypWcAtVF83iomfdbYopZLTvZExeTDP5qgxz VOT7SysjTOwo6oXsJ1lpkzCo1UbdM4X9+XSHCXz8OoyhchN6FbPDBmJiWfV885NXtp6Z YJnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732585940; x=1733190740; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Gf9EzjcalroGRTq4XzzClHRUhtGlb+UZfQQe7S32hxg=; b=Nn2Zv928W36EsseObflilG3nzsaS2WWer3iq0TiYb1RKdpEJ10qNZ+VEgaVpYqMfbW z0Stas63CUAotSK8wR6n66030QiWkZ96iLkcavNKDycnadEr0xQX+cztEU77sPcMltjb CERrV3yaapejJDyPlchJc/F8x/z6G2r8OVw3VqkN9F5XDXBkdnKiWE2Sgx1XX/VIOd7t hQ1vavJbNVAjoY6vT/LUMYe4vAnT23SWDiOz0hDwS/uulPpBiwtUJZrOekGBBBDNxsrr 6LeXoyPtjAJdsQVwqoa/aPLrI8tDngUEWJzI6a9me8+K0zyi8JR6ZLIm7n0uin+kYvKx qSCw== X-Gm-Message-State: AOJu0YzK/hsHC/YWE8RSz4Ki0CEaq8dwX0QXxo2tKHidAE3fVuHON4cg lUXii0ZBwUdOZSciU9H4hIvXrFUDvSdsk0+4fTuuiYaENOslMPIo3QJp9A== X-Gm-Gg: ASbGnctdyedg7vrwfcKOeQ6y/7kNVLDuWU4GutANe9gzO69/B68njh57hihxmxf4e/F yDNVtQD5mV58wQ0JBUNf4NXAXJQ9UQA6HqUCExvEY1sNvzH+irv/rTTyQdI8ee/mCxt6Jj4QuNh ZZkJO+fhMiHqIPZai2uS5UnYfgJdnAMqt2h1r8bcWthmEEENacM5QDURYqjK42moQQcRGEBiZEa uXXQ4R39MhkMBPxMeIwGHZIndCXRbfm36nwk0zYFlqDxoVzLB4+SXJB/ppCeLI829ZmdOpMGUsn oPfCribuBT+UMvSO+f2LaWS+EzAgbbP2dtbWwwWu/niftGNyGCX3 X-Google-Smtp-Source: AGHT+IHsA1Blf3NKeVLfMElAaVJLp9Kdpbl1PpsUB7F8n9APfX79QSqp04vmA2dHCDO30kbKb655Zw== X-Received: by 2002:a05:6a21:3389:b0:1dc:154c:365 with SMTP id adf61e73a8af0-1e09e3f52f4mr22076564637.4.1732585939786; Mon, 25 Nov 2024 17:52:19 -0800 (PST) Received: from Tyst-Proxmox-00.foxtek.us (c-24-18-146-249.hsd1.wa.comcast.net. [24.18.146.249]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2ead02ea3f4sm11063615a91.5.2024.11.25.17.52.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Nov 2024 17:52:19 -0800 (PST) From: moddingfox X-Google-Original-From: moddingfox Received: by Tyst-Proxmox-00.foxtek.us (Postfix, from userid 1000) id F08241B9; Tue, 26 Nov 2024 01:52:18 +0000 (UTC) To: pve-devel@lists.proxmox.com Cc: Tyst Marin 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> X-Mailer: git-send-email 2.39.5 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain DMARC_PASS -0.1 DMARC pass policy FREEMAIL_FROM 0.001 Sender email is commonly abused enduser mail provider RCVD_IN_DNSWL_NONE -0.0001 Sender listed at https://www.dnswl.org/, no trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [result.data] X-Mailman-Approved-At: Tue, 26 Nov 2024 11:36:57 +0100 From: Tyst Marin This is intended to work with a seprately submitted patch to qemu-server which enables the behavior Signed-off-by: Tyst Marin --- 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 --===============3509914773385414520== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel --===============3509914773385414520==--