-
Notifications
You must be signed in to change notification settings - Fork 266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong sorting of various views and columns in Rancher UI #9782
Comments
I think this was an intentional design decision. Not sure where it came from, possibly customer based
This comes from a summation of the container restarts. As this is a computed property sorting will not be supported once server-side pagination is implemented |
Sorting is possible in the related section of Storybook and it will need to be extended. This would mean to add rows containing the data with these cases:
Sorting utility does already exists and should be extended or defined here. Tests for sorting needs to be added, since we don't want to use Lodash. Other mentioned cases require some pages/models/configurations adjustments. |
@bisht-richa as extension to our talk, I'll write a couple of notes here as reminder and easier to track. The table is automatically recognizing the type, using JS results of the As a test, we may use the existing ones for the function which is finally called as "composition", then extend with these parameters: it.only.each([
[[{ a: 1 }, { a: 9 }], ['a'], [{ a: 1 }, { a: 9 }]],
[[{ a: 2 }, { a: 1 }], ['a'], [{ a: 1 }, { a: 2 }]],
[[{ a: '2' }, { a: '19' }], ['a'], [{ a: '2' }, { a: '19' }]],
[[{ a: '19' }, { a: '2' }], ['a'], [{ a: '2' }, { a: '19' }]],
[[{ a: undefined }, { a: '19' }], ['a'], [{ a: '19' }, { a: undefined }]],
[[{ a: 'xx.xx.17.196' }, { a: 'xx.xx.17.2' }], ['a'], [{ a: 'xx.xx.17.2' }, { a: 'xx.xx.17.196' }]],
[[{ a: 'xx.xx.17.196' }, { a: 'xx.xx.17.2' }], ['a'], [{ a: 'xx.xx.17.2' }, { a: 'xx.xx.17.196' }]],
[[{ a: '6d4h' }, { a: '6m56s' }, { a: '23h' }], ['a'], [{ a: '6m56s' }, { a: '23h' }, { a: '6d4h' }]],
])('should sort by single property', (ary, key, expected) => {
testSortBy(ary, key, expected);
}); For the numbers we can convert with the Lodash util |
Following on from #9782 (comment), i think we should pause on these. I went through all the requests, minus the one by design, and they will all be avoided when we do server side pagination leaving us back at square 1. There's some different issues to address
|
Beside there's already 2 points of 4, we can always fix it now and then improve it by moving the same function on the service (separated web?) worker. |
I've closed the associated PR (which fixed two of the issues listed). Any fixes we make now will not apply for server side pagination (which is coming soon). I've tracked additional requests for them to support some of these based on basic columns where the value is in the resource in #8527 (comment), others will come in via rancher/rancher#40771 Edit: @gaktive These aren't going to come for 2.8next1, so bumping to 2.8.x |
We need to test the outstanding parts with the new vai backed api and come up with a definitive list for them to resolve |
Internal reference: SURE-6951
Reported in 2.7.6
Some columns of tables in the Rancher UI sort differently than one would expect. This mainly affects the "Flat List" but sometimes also grouped views.
Problems found:
xx.xx.17.196
,xx.xx.17.2
,xx.xx.17.204
,xx.xx.17.24
,xx.xx.17.243
and should be sorted numerically-octet-wise.Business impact:
While this is not a major issue, it bugs the users and they'd like us to look at it.
Troubleshooting steps:
The issue is visible when using sorting columns in the UI; this mainly affects the "Flat List" but sometimes also grouped views.
Workaround:
none
Actual behaviour:
Some fields during "sort" are arranged alphabetically when different sorting algorithms might be more suitable
Expected behaviour:
Better sorting for some columns as listed in the "Problems found:" above
The text was updated successfully, but these errors were encountered: