fix #8098: ui: ceph: osd: sort by name naturally
Sorting the OSD tree by the name column compared the names as plain strings, so 'osd.10' and 'osd.11' ended up before 'osd.8' and 'osd.9', and the same happened for host names like 'pve10' and 'pve2'. Add a sorter to the name column that compares numbers in the names by their value, like it is already done for the storage content view. Signed-off-by: Michal Fox <me@dualfroz.com>
This commit is contained in:
1 parent
1edfa6daea
commit
d0dbabcade
1 file changed
+1
@@ -1202,6 +1202,7 @@ Ext.define('PVE.node.CephOsdTree', {
|
|||||||
text: 'Name',
|
text: 'Name',
|
||||||
dataIndex: 'name',
|
dataIndex: 'name',
|
||||||
width: 150,
|
width: 150,
|
||||||
|
sorter: (a, b) => a.data.name.localeCompare(b.data.name, undefined, { numeric: true }),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: 'Type',
|
text: 'Type',
|
||||||
|
|||||||
Reference in new issue
Block a user