chirpstack-application-server icon indicating copy to clipboard operation
chirpstack-application-server copied to clipboard

Ability to sort columns

Open tomaql opened this issue 6 years ago • 6 comments

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

tomaql avatar Jan 30 '19 10:01 tomaql

if somebody would like to contribute on this, please let me know.

brocaar avatar Feb 13 '19 14:02 brocaar

I think I can help with this

wolftrax5 avatar Sep 27 '19 16:09 wolftrax5

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.

Safrone avatar Feb 06 '20 20:02 Safrone

  • [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_by field in proto definitions, this will be the anchor between ui and backend. It will define the order and order by parameters, e.g order_by: "last seen asc"

ChirpStack Application

UI
  • Create a DataTableSorted component that will handle logic for sorted tables. In the meantime for tables that won't be sorted, DataTable will 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.

application-sorting For applications.

devices 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 avatar Jun 16 '20 13:06 sophiekovalevsky

@sophiekovalevsky Any progress on this? :smile:

chopmann avatar Oct 19 '20 13:10 chopmann

@chopmann I haven't received any response from @brocaar about this. Hence, we need to wait =)

sophiekovalevsky avatar Oct 19 '20 13:10 sophiekovalevsky