Ability to sort columns
Is this a bug or a feature request?
Feature Request
What did you expect?
I would like to sort the devices view by the column. For example, the last seen at column.
What happened?
Not Required
What version are your using?
2.4.1-10-g0485199
How can your issue be reproduced?
Not Required
Could you share your log output?
Not Required
if somebody would like to contribute on this, please let me know.
I think I can help with this
Would be a nice feature to have and applies to both device and gateway page.
Ostensibly requires adding a sort_by field to the device/gateway api and subsequently tying that to the front-end sort option.
- [x] I have searched the issues of this repository and believe that this is not a duplicate.
Summary
To improve user experience, it may be good to have the hability to sort columns for all existing tables.
What is the use-case?
This feature becomes extremely beneficial when a table contains several columns and hundred of records.
Implementation description
My main idea would be update all existing tables in ChirpStack Application Server: List {Devices, Applications, Gateways} and so on. However, as this feature requires to make considerable changes in ChirpStack Application Server (ui and backend) I would like to have a review from you first to test the implementation and see if there are changes to make, if so, make them and once are ready, move forward the remaining tables. Being said that, the approach to be proposed:
For reviewing:
ChirpStack API
- Adding a
order_byfield in proto definitions, this will be the anchor between ui and backend. It will define the order and order by parameters, e.gorder_by:"last seen asc"
ChirpStack Application
UI
- Create a
DataTableSortedcomponent that will handle logic for sorted tables. In the meantime for tables that won't be sorted,DataTablewill be used.
Backend
- Forward ChirpStack API request to each corresponding table on database.
- Create new migrations that contains new indexes for each columns to be sorted.
This is a sneak peek of final results.
For applications.
For devices.
I'm really looking forward to receive feedback on this and be able to provide this feature that I think a lot of users have been waiting for.
@brocaar does this approach make sense to you?
Can you implement this by yourself and make a pull request?
Yes, I can.
@sophiekovalevsky Any progress on this? :smile:
@chopmann I haven't received any response from @brocaar about this. Hence, we need to wait =)