From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id D1BC21FF15F for ; Mon, 18 Nov 2024 16:31:02 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id D5EEF1389F; Mon, 18 Nov 2024 16:29:44 +0100 (CET) From: Dominik Csapak To: pve-devel@lists.proxmox.com Date: Mon, 18 Nov 2024 16:29:22 +0100 Message-Id: <20241118152928.858590-20-d.csapak@proxmox.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241118152928.858590-1-d.csapak@proxmox.com> References: <20241118152928.858590-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 v7 3/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.5 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel