[pve-devel] [PATCH manager 4/4] ui: enable upload/download buttons for 'import' type storages

Fabian Grünbichler f.gruenbichler at proxmox.com
Wed Apr 17 14:37:16 CEST 2024


On April 16, 2024 3:19 pm, Dominik Csapak wrote:
> but only for non esxi ones, since that does not allow
> uploading/downloading there

what about a remove button? :)

> 
> Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
> ---
>  www/manager6/storage/Browser.js        | 7 ++++++-
>  www/manager6/window/UploadToStorage.js | 1 +
>  2 files changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/www/manager6/storage/Browser.js b/www/manager6/storage/Browser.js
> index 2123141d..77d106c1 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',
> @@ -144,6 +146,9 @@ Ext.define('PVE.storage.Browser', {
>  		    content: 'import',
>  		    useCustomRemoveButton: true, // hide default remove button
>  		    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..79a6e8a6 100644
> --- a/www/manager6/window/UploadToStorage.js
> +++ b/www/manager6/window/UploadToStorage.js
> @@ -11,6 +11,7 @@ Ext.define('PVE.window.UploadToStorage', {
>      acceptedExtensions: {
>  	iso: ['.img', '.iso'],
>  	vztmpl: ['.tar.gz', '.tar.xz', '.tar.zst'],
> +	'import': ['ova'],
>      },
>  
>      cbindData: function(initialConfig) {
> -- 
> 2.39.2
> 
> 
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel at lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
> 
> 
> 




More information about the pve-devel mailing list