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 956221FF16F for ; Fri, 15 Nov 2024 16:26:11 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id E67CB189FA; Fri, 15 Nov 2024 16:26:11 +0100 (CET) From: Dominik Csapak To: pve-devel@lists.proxmox.com Date: Fri, 15 Nov 2024 16:17:47 +0100 Message-Id: <20241115151749.633407-26-d.csapak@proxmox.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241115151749.633407-1-d.csapak@proxmox.com> References: <20241115151749.633407-1-d.csapak@proxmox.com> MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.016 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pve-devel] [PATCH manager v6 7/9] ui: guest import: add storage selector for ova extraction storage X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" but only when we detect the 'ova-needs-extraction' warning. This can be used to select the storage where the disks contained in an OVA will be extracted to temporarily. Signed-off-by: Dominik Csapak --- www/manager6/window/GuestImport.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/www/manager6/window/GuestImport.js b/www/manager6/window/GuestImport.js index 1483d97f..56417f27 100644 --- a/www/manager6/window/GuestImport.js +++ b/www/manager6/window/GuestImport.js @@ -303,6 +303,7 @@ Ext.define('PVE.window.GuestImport', { os: 'l26', maxCdDrives: false, uniqueMACAdresses: false, + isOva: false, warnings: [], }, @@ -432,6 +433,10 @@ Ext.define('PVE.window.GuestImport', { } } + if (config['import-extraction-storage'] === '') { + delete config['import-extraction-storage']; + } + return config; }, @@ -553,6 +558,22 @@ Ext.define('PVE.window.GuestImport', { allowBlank: false, fieldLabel: gettext('Default Bridge'), }, + { + xtype: 'pveStorageSelector', + reference: 'extractionStorage', + fieldLabel: gettext('Extraction Storage'), + storageContent: 'images', + emptyText: gettext('Import Storage'), + autoSelect: false, + name: 'import-extraction-storage', + disabled: true, + hidden: true, + allowBlank: true, + bind: { + disabled: '{!isOva}', + hidden: '{!isOva}', + }, + }, ], columnB: [ @@ -925,6 +946,7 @@ Ext.define('PVE.window.GuestImport', { me.lookup('defaultStorage').setNodename(me.nodename); me.lookup('defaultBridge').setNodename(me.nodename); + me.lookup('extractionStorage').setNodename(me.nodename); let renderWarning = w => { const warningsCatalogue = { @@ -1006,6 +1028,7 @@ Ext.define('PVE.window.GuestImport', { } me.getViewModel().set('warnings', data.warnings.map(w => renderWarning(w))); + me.getViewModel().set('isOva', data.warnings.map(w => w.type).indexOf('ova-needs-extracting') !== -1); let osinfo = PVE.Utils.get_kvm_osinfo(me.vmConfig.ostype ?? ''); let prepareForVirtIO = (me.vmConfig.ostype ?? '').startsWith('w') && (me.vmConfig.bios ?? '').indexOf('ovmf') !== -1; -- 2.39.5 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel