[pve-devel] applied: [PATCH manager] show 'RBD' instead of 'RBD (external)' on storage summary

Fabian Grünbichler f.gruenbichler at proxmox.com
Thu Sep 7 13:16:58 CEST 2017


On Thu, Sep 07, 2017 at 12:48:28PM +0200, Dominik Csapak wrote:
> we cannot differentiate between external and pve-managed there,
> so we just want to show 'RBD'
> 
> Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
> ---
> this was the change from v1 to v2 in
> [PATCH manager v2 3/5] add new "RBD (PVE)" storage choice
> 
>  www/manager6/Utils.js          | 6 ++++--
>  www/manager6/dc/StorageView.js | 2 +-
>  2 files changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js
> index 3874db76..0d4217d4 100644
> --- a/www/manager6/Utils.js
> +++ b/www/manager6/Utils.js
> @@ -776,8 +776,8 @@ Ext.define('PVE.Utils', { utilities: {
>      },
>  
>      format_storage_type: function(value, md, record) {
> -	if (value === 'rbd' && record && !record.get('monhost')) {
> -	    value = 'pveceph';
> +	if (value === 'rbd' && record) {
> +	    value = (record.get('monhost')?'rbd_ext':'pveceph');
>  	}
>  	if (value === 'dir') {
>  	    return PVE.Utils.directoryText;
> @@ -792,6 +792,8 @@ Ext.define('PVE.Utils', { utilities: {
>  	} else if (value === 'iscsi') {
>  	    return 'iSCSI';
>  	} else if (value === 'rbd') {
> +	    return 'RBD';
> +	} else if (value === 'rbd_ext') {
>  	    return 'RBD (external)';
>  	} else if (value === 'pveceph') {
>  	    return 'RBD (PVE)';
> diff --git a/www/manager6/dc/StorageView.js b/www/manager6/dc/StorageView.js
> index b1334178..8f5a055c 100644
> --- a/www/manager6/dc/StorageView.js
> +++ b/www/manager6/dc/StorageView.js
> @@ -178,7 +178,7 @@ Ext.define('PVE.dc.StorageView', {
>  				}
>  			    },
>  			    {
> -				text: PVE.Utils.format_storage_type('rbd'),
> +				text: PVE.Utils.format_storage_type('rbd_ext'),
>  				iconCls: 'fa fa-fw fa-building',
>  				handler: function() {
>  				    var win = Ext.create('PVE.storage.RBDEdit', {});
> -- 
> 2.11.0
> 
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel




More information about the pve-devel mailing list