I would prefer a new column, because I don't like these string extensions which 
probably aren't visible anyway if the column is to small.

Regarding the code, maybe you could use template-strings e.g. `Ceph 
osd.${data.osdid} ${tagtext}`?

> 
>  
> Signed-off-by: Dominik Csapak <d.csa...@proxmox.com>
> ---
> we could also add a new 'encrypted' column, but this would currently
> only show anything for osd, in the future maybe for zfs?
> 
>  www/manager6/node/Disks.js | 13 ++++++++++---
>  1 file changed, 10 insertions(+), 3 deletions(-)
> 
> diff --git a/www/manager6/node/Disks.js b/www/manager6/node/Disks.js
> index 555956f6..aeb079a4 100644
> --- a/www/manager6/node/Disks.js
> +++ b/www/manager6/node/Disks.js
> @@ -38,11 +38,18 @@ Ext.define('PVE.node.DiskList', {
>           renderer: function(v, metaData, rec) {
>               if (rec) {
>                   if (rec.data.osdid >= 0) {
> -                     var bluestore = '';
> +                     var tags = [];
> +                     var tagtext = "";
>                       if (rec.data.bluestore === 1) {
> -                         bluestore = ' (Bluestore)';
> +                         tags.push('Bluestore');
>                       }
> -                     return "Ceph osd." + rec.data.osdid.toString() + 
> bluestore;
> +                     if (rec.data.osdencrypted === 1) {
> +                         tags.push('Encrypted');
> +                     }
> +                     if (tags.length) {
> +                         tagtext = ' (' + tags.join(', ') + ')';
> +                     }
> +                     return "Ceph osd." + rec.data.osdid.toString() + 
> tagtext;
>                   }
>  
>                   var types = [];
> -- 
> 2.20.1
> 
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel@pve.proxmox.com
> https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to