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 79C1E20EC95 for ; Mon, 29 Apr 2024 13:22:02 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 00390DC54; Mon, 29 Apr 2024 13:21:38 +0200 (CEST) From: Dominik Csapak To: pve-devel@lists.proxmox.com Date: Mon, 29 Apr 2024 13:21:19 +0200 Message-Id: <20240429112124.3819357-19-d.csapak@proxmox.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240429112124.3819357-1-d.csapak@proxmox.com> References: <20240429112124.3819357-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 v3 4/9] ui: enable upload/download/remove buttons for 'import' type storages 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 for non esxi ones, since that does not allow uploading/downloading there Signed-off-by: Dominik Csapak --- www/manager6/storage/Browser.js | 9 +++++++-- www/manager6/window/UploadToStorage.js | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/www/manager6/storage/Browser.js b/www/manager6/storage/Browser.js index 2123141d..934ce706 100644 --- a/www/manager6/storage/Browser.js +++ b/www/manager6/storage/Browser.js @@ -28,7 +28,9 @@ Ext.define('PVE.storage.Browser', { let res = storageInfo.data; let plugin = res.plugintype; - me.items = plugin !== 'esxi' ? [ + let isEsxi = plugin === 'esxi'; + + me.items = !isEsxi ? [ { title: gettext('Summary'), xtype: 'pveStorageSummary', @@ -142,8 +144,11 @@ Ext.define('PVE.storage.Browser', { iconCls: 'fa fa-desktop', itemId: 'contentImport', content: 'import', - useCustomRemoveButton: true, // hide default remove button + useCustomRemoveButton: isEsxi, // hide default remove button for esxi showColumns: ['name', 'format'], + enableUploadButton: enableUpload && !isEsxi, + enableDownloadUrlButton: enableDownloadUrl && !isEsxi, + useUploadButton: !isEsxi, itemdblclick: (view, record) => createGuestImportWindow(record), tbar: [ { diff --git a/www/manager6/window/UploadToStorage.js b/www/manager6/window/UploadToStorage.js index 3c5bba88..cdf548a8 100644 --- a/www/manager6/window/UploadToStorage.js +++ b/www/manager6/window/UploadToStorage.js @@ -9,6 +9,7 @@ Ext.define('PVE.window.UploadToStorage', { title: gettext('Upload'), acceptedExtensions: { + 'import': ['.ova'], iso: ['.img', '.iso'], vztmpl: ['.tar.gz', '.tar.xz', '.tar.zst'], }, -- 2.39.2 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel