[pve-devel] [PATCH manager] add information about bluestore in the gui disklist

Fabian Grünbichler f.gruenbichler at proxmox.com
Fri Aug 4 12:08:34 CEST 2017


On Tue, Aug 01, 2017 at 03:34:45PM +0200, Dominik Csapak wrote:
> this adds if an osd uses bluestore in the disklist,
> and shows if a disk is used for osd journal/db/wal
> 
> Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
> ---
>  www/manager6/node/Disks.js | 28 ++++++++++++++++++++++++++--
>  1 file changed, 26 insertions(+), 2 deletions(-)
> 
> diff --git a/www/manager6/node/Disks.js b/www/manager6/node/Disks.js
> index a1a8d366..e2b24ae5 100644
> --- a/www/manager6/node/Disks.js
> +++ b/www/manager6/node/Disks.js
> @@ -33,9 +33,33 @@ Ext.define('PVE.node.DiskList', {
>  	    width: 80,
>  	    sortable: false,
>  	    renderer: function(v, metaData, rec) {
> -		if (rec && (rec.data.osdid >= 0)) {
> -		    return "osd." + rec.data.osdid.toString();
> +		if (rec) {
> +		    if (rec.data.osdid >= 0) {
> +			var bluestore = '';
> +			if (rec.data.bluestore === 1) {
> +			    bluestore = ' (Bluestore)';
> +			}
> +			return "osd." + rec.data.osdid.toString() + bluestore;
> +		    }
> +
> +		    var types = [];
> +		    if (rec.data.journals > 0) {
> +			types.push('Journal');
> +		    }
> +
> +		    if (rec.data.db > 0) {
> +			types.push('DB');
> +		    }
> +
> +		    if (rec.data.wal > 0) {
> +			types.push('WAL');
> +		    }

I suggest prefixing those with something like "Ceph OSD " - especially
when thinking about future integration of other storage technologies
(which also potentially have things like journals and WALs ;))

> +
> +		    if (types.length > 0) {
> +			return types.join(', ');
> +		    }
>  		}
> +
>  		return v || PVE.Utils.noText;
>  	    },
>  	    dataIndex: 'used'
> -- 
> 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