public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH manager] ui: ceph: osd: set default icon for other crush types
@ 2022-11-17  9:29 Aaron Lauterer
  2022-12-01 12:23 ` Aaron Lauterer
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Aaron Lauterer @ 2022-11-17  9:29 UTC (permalink / raw)
  To: pve-devel

Some users have a more complicated CRUSH hierarchy, for example with a
stretched cluster. The additional hierarchy steps (datacenter, rack,
room, ...) are shown in the OSD panel. Showing a generic icon for any
CRUSH types that have not a specific icon configured will make it easier
to navigate the tree as it will not look somewhat broken and empty.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
---
 www/manager6/ceph/OSD.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/www/manager6/ceph/OSD.js b/www/manager6/ceph/OSD.js
index 78f226ff..1255e396 100644
--- a/www/manager6/ceph/OSD.js
+++ b/www/manager6/ceph/OSD.js
@@ -847,7 +847,8 @@ Ext.define('PVE.node.CephOsdTree', {
 		osd: 'fa-hdd-o',
 		root: 'fa-server',
 	    };
-	    return 'fa x-fa-tree ' + iconMap[data.type];
+	    let icon = iconMap[data.type] ?? 'fa-folder-o';
+	    return `fa x-fa-tree ${icon}`;
 	},
 },
 	{ type: 'number', name: 'crush_weight' },
-- 
2.30.2





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [pve-devel] [PATCH manager] ui: ceph: osd: set default icon for other crush types
  2022-11-17  9:29 [pve-devel] [PATCH manager] ui: ceph: osd: set default icon for other crush types Aaron Lauterer
@ 2022-12-01 12:23 ` Aaron Lauterer
  2023-02-08  9:56 ` Aaron Lauterer
  2023-02-15 14:08 ` [pve-devel] applied: " Dominik Csapak
  2 siblings, 0 replies; 5+ messages in thread
From: Aaron Lauterer @ 2022-12-01 12:23 UTC (permalink / raw)
  To: pve-devel

I should have added this right away, but better late than never.
To test this, you need to create additional CRUSH buckets, for example for a 
bucket of the type room:

# ceph osd crush add-bucket room1 room


It should already show up in the OSD panel and if you run

# ceph osd df tree


To move another bucket, e.g. a host, into it:

# ceph osd crush move <nodename> room=room1


To move it back to the default bucket, so you can clean up the room1 bucket:

# ceph osd crush move <nodename> root=default


Remove the room1 bucket:

# ceph osd crush rm room1



On 11/17/22 10:29, Aaron Lauterer wrote:
> Some users have a more complicated CRUSH hierarchy, for example with a
> stretched cluster. The additional hierarchy steps (datacenter, rack,
> room, ...) are shown in the OSD panel. Showing a generic icon for any
> CRUSH types that have not a specific icon configured will make it easier
> to navigate the tree as it will not look somewhat broken and empty.
> 
> Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
> ---
>   www/manager6/ceph/OSD.js | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/www/manager6/ceph/OSD.js b/www/manager6/ceph/OSD.js
> index 78f226ff..1255e396 100644
> --- a/www/manager6/ceph/OSD.js
> +++ b/www/manager6/ceph/OSD.js
> @@ -847,7 +847,8 @@ Ext.define('PVE.node.CephOsdTree', {
>   		osd: 'fa-hdd-o',
>   		root: 'fa-server',
>   	    };
> -	    return 'fa x-fa-tree ' + iconMap[data.type];
> +	    let icon = iconMap[data.type] ?? 'fa-folder-o';
> +	    return `fa x-fa-tree ${icon}`;
>   	},
>   },
>   	{ type: 'number', name: 'crush_weight' },




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [pve-devel] [PATCH manager] ui: ceph: osd: set default icon for other crush types
  2022-11-17  9:29 [pve-devel] [PATCH manager] ui: ceph: osd: set default icon for other crush types Aaron Lauterer
  2022-12-01 12:23 ` Aaron Lauterer
@ 2023-02-08  9:56 ` Aaron Lauterer
  2023-02-15 14:08 ` [pve-devel] applied: " Dominik Csapak
  2 siblings, 0 replies; 5+ messages in thread
From: Aaron Lauterer @ 2023-02-08  9:56 UTC (permalink / raw)
  To: pve-devel

ping?

On 11/17/22 10:29, Aaron Lauterer wrote:
> Some users have a more complicated CRUSH hierarchy, for example with a
> stretched cluster. The additional hierarchy steps (datacenter, rack,
> room, ...) are shown in the OSD panel. Showing a generic icon for any
> CRUSH types that have not a specific icon configured will make it easier
> to navigate the tree as it will not look somewhat broken and empty.
> 
> Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
> ---
>   www/manager6/ceph/OSD.js | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/www/manager6/ceph/OSD.js b/www/manager6/ceph/OSD.js
> index 78f226ff..1255e396 100644
> --- a/www/manager6/ceph/OSD.js
> +++ b/www/manager6/ceph/OSD.js
> @@ -847,7 +847,8 @@ Ext.define('PVE.node.CephOsdTree', {
>   		osd: 'fa-hdd-o',
>   		root: 'fa-server',
>   	    };
> -	    return 'fa x-fa-tree ' + iconMap[data.type];
> +	    let icon = iconMap[data.type] ?? 'fa-folder-o';
> +	    return `fa x-fa-tree ${icon}`;
>   	},
>   },
>   	{ type: 'number', name: 'crush_weight' },




^ permalink raw reply	[flat|nested] 5+ messages in thread

* [pve-devel] applied: [PATCH manager] ui: ceph: osd: set default icon for other crush types
  2022-11-17  9:29 [pve-devel] [PATCH manager] ui: ceph: osd: set default icon for other crush types Aaron Lauterer
  2022-12-01 12:23 ` Aaron Lauterer
  2023-02-08  9:56 ` Aaron Lauterer
@ 2023-02-15 14:08 ` Dominik Csapak
  2023-02-15 14:16   ` Aaron Lauterer
  2 siblings, 1 reply; 5+ messages in thread
From: Dominik Csapak @ 2023-02-15 14:08 UTC (permalink / raw)
  To: Proxmox VE development discussion, Aaron Lauterer

applied, with a short follow up that moves the icon inside the interpolated string
(it's shorter and still readable)

should we maybe look into adding specific icons for pre-generated types?
or is that a niche feature for our users anyway?




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [pve-devel] applied: [PATCH manager] ui: ceph: osd: set default icon for other crush types
  2023-02-15 14:08 ` [pve-devel] applied: " Dominik Csapak
@ 2023-02-15 14:16   ` Aaron Lauterer
  0 siblings, 0 replies; 5+ messages in thread
From: Aaron Lauterer @ 2023-02-15 14:16 UTC (permalink / raw)
  To: Dominik Csapak, Proxmox VE development discussion


> On 02/15/2023 3:08 PM CET Dominik Csapak <d.csapak@proxmox.com> wrote:
> 
>  
> applied, with a short follow up that moves the icon inside the interpolated string
> (it's shorter and still readable)
> 
> should we maybe look into adding specific icons for pre-generated types?
> or is that a niche feature for our users anyway?

I thought about it and tried it at first. But honestly, I think that a generic icon should work in most situations to guide the eye better where hierarchy levels are.

Overall, I think this is a niche use case.




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-02-15 14:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-17  9:29 [pve-devel] [PATCH manager] ui: ceph: osd: set default icon for other crush types Aaron Lauterer
2022-12-01 12:23 ` Aaron Lauterer
2023-02-08  9:56 ` Aaron Lauterer
2023-02-15 14:08 ` [pve-devel] applied: " Dominik Csapak
2023-02-15 14:16   ` Aaron Lauterer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal