-
-
Notifications
You must be signed in to change notification settings - Fork 656
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
ui option sort by newest does not work #942
Comments
We are using AKHQ quite a lot and I was always annoyed by AKHQ not changing the default sorting even if I configured My observations are based on AKHQ 0.21.1, but the git history does not look like there has changed much in that area, so I started with a simple test, to figure out if the setting the default sort via the configuration key is actually working. Setup of my test:
AKHQ will automatically store the default ui options in local storage: {"docker-kafka-server":{"topic":{},"topicData":{"sort":"NEWEST","dateTimeFormat":"RELATIVE"}}} If you go to the application and view the messages for a topic, you can see that NEWEST is prefilled as the default sort option and the messages are sort correctly from newest to oldest. I also checked that this is also working the same way if you have multiple servers configured. So far so good, it seems like it's actually working and I can not see that there is really a bug in the application. However, there is behavior that could make it look like it is not working, especially if the configuration option was set If the installation did not so set akhq.ui-options.topic-data.sort and a user goes to AKHQ for the first time, {"docker-kafka-server":{"topic":{},"topicData":{"dateTimeFormat":"RELATIVE"}}} There will be no change to the ui options unless the user selects one of the options on the settings screen. Emptying the cache and hard reloads will not help because it will not change the ui options in local storage. Another thing that I noticed is, that the settings screen will neither display nor store the ui options in local storage My suggestions for improvements would be:
I provided a PR #1161 for my first suggestion, for the second I'm unsure if this is the desired behavior because it would effectively always trigger a backend request to see if there is new configuration. |
close in #1161 |
I had a request from my userbase to make the default topic message sort option "sort by newest". I found the entry in the docs for
akhq.ui-options.topic-data.sort
and set that toNEWEST
and applied the configuration - there was no difference in the behaviour.I thought that making this change to RecordRepository.java would solve the problem, but it does not:
The text was updated successfully, but these errors were encountered: